/* ============================================================
   CFOAC — Design System
   Système de design unifié pour toutes les vues
   ============================================================ */

:root {
    --primary: #194784;
    --primary-light: #2F63A4;
    --primary-soft: #e8f1fb;
    --accent: #4e97c6;
    --accent-dark: #3a7aad;
    --accent-soft: #f0f7ff;
    --success: #38a169;
    --success-soft: #f0fff4;
    --warning: #ed8936;
    --warning-soft: #fffaf0;
    --danger: #e53e3e;
    --danger-soft: #fff5f5;
    --info: #4299e1;
    --info-soft: #ebf8ff;
    --purple: #7c3aed;
    --purple-soft: #f5f3ff;
    --dark: #0d1b2a;
    --ink: #1a202c;
    --muted: #64748b;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --border: #e2e8f0;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 26px rgba(25,71,132,0.10), 0 2px 8px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 50px rgba(25,71,132,0.16), 0 6px 16px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(160deg, #2F63A4 0%, #4080C0 100%);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -120px; right: -100px;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: -1;
}

a { text-decoration: none; }
img { max-width: 100%; }

.app-shell {
    padding-top: 76px;
    min-height: 100vh;
}

.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ============================================================
   Barre de navigation
   ============================================================ */
.app-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226,232,240,0.9);
    transition: box-shadow 0.3s ease;
}

.app-nav.scrolled { box-shadow: var(--shadow-md); }

.app-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.app-brand-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.app-brand:hover { color: var(--primary); }

.app-brand-badge {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 6px 16px rgba(25,71,132,0.30);
    flex-shrink: 0;
}

.app-brand small {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 0.15rem;
}

.app-nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.app-nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.app-nav-link:hover { color: var(--primary); }
.app-nav-link.active { color: var(--primary); border-bottom-color: var(--accent); }

.app-nav-cta {
    padding: 0.55rem 1.3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(25,71,132,0.30);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.app-nav-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(25,71,132,0.42); }

.app-nav-toggle {
    display: none;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    width: 42px; height: 42px;
    font-size: 1.05rem;
    color: var(--primary);
    cursor: pointer;
}

/* ============================================================
   Boutons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.62rem 1.35rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
    border: 1.5px solid transparent;
    white-space: nowrap;
    font-family: inherit;
    cursor: pointer;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(25,71,132,0.28);
}

.btn-primary:hover { color: #fff; background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(25,71,132,0.38); }

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, var(--success) 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(56,161,105,0.30);
}

.btn-success:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(56,161,105,0.40); }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover { color: #fff; background: #c53030; }

.btn-outline {
    background: #fff;
    color: var(--primary-light);
    border-color: var(--border);
}

.btn-outline:hover { background: var(--primary-soft); border-color: var(--accent); color: var(--primary); }

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
}

.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); }

.btn-back {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 0.55rem 1.2rem;
    font-weight: 600;
}

.btn-back:hover { background: var(--primary-soft); border-color: var(--accent); transform: translateX(-3px); color: var(--primary); }

.btn-icon {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

.btn-icon:hover { background: var(--primary-soft); border-color: var(--accent); color: var(--primary); }

/* ============================================================
   En-tête de page
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-width: 0;
}

.page-header-icon {
    width: 54px; height: 54px;
    border-radius: 2px;
    background: linear-gradient(337deg, #dbe0e5 0%, #dae1e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #006494;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(25,71,132,0.28);
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.page-header .page-subtitle {
    color: #000308;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ============================================================
   Cartes statistiques
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--surface);
    border-radius: 5px;
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.s-total    { background: var(--primary-soft); color: var(--primary); }
.stat-icon.s-actif    { background: var(--success-soft); color: var(--success); }
.stat-icon.s-diplome  { background: var(--info-soft); color: var(--info); }
.stat-icon.s-suspendu { background: var(--warning-soft); color: var(--warning); }
.stat-icon.s-inactif  { background: var(--surface-alt); color: var(--muted); }

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

/* ============================================================
   Cartes génériques
   ============================================================ */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card.shadow-md { box-shadow: var(--shadow-md); }
.card.shadow-lg { box-shadow: var(--shadow-lg); border-radius: 2px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    padding: 1.1rem 1.5rem;
    background: linear-gradient(to right, var(--primary-soft), #f4f9ff);
    border-bottom: 1px solid var(--border);
    border-radius: 2px 2px 0 0;
}

.section-title i { color: var(--accent); font-size: 1.05rem; }

.card-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================================
   Alertes / messages flash
   ============================================================ */
.flash-alert {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.3rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1.5px solid;
    animation: fadeInUp 0.3s ease-out;
}

.flash-alert i { font-size: 1.1rem; }

.flash-success { background: var(--success-soft); color: #276749; border-color: #9ae6b4; }
.flash-error   { background: var(--danger-soft); color: #c53030; border-color: #feb2b2; }
.flash-info    { background: var(--info-soft); color: #2b6cb0; border-color: #90cdf4; }

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    font-size: 1.15rem;
    padding: 0 0.2rem;
    line-height: 1;
}

.flash-close:hover { opacity: 1; }

/* ============================================================
   Tableaux
   ============================================================ */
.table-responsive { overflow-x: auto; }

.table-cfoac { margin-bottom: 0; }

.table-cfoac thead th {
    padding: 0.9rem 1.1rem;
    text-align: left;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--surface-alt);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table-cfoac tbody td {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--ink);
    font-size: 0.9rem;
}

.table-cfoac tbody tr { transition: background 0.15s ease; }
.table-cfoac tbody tr:hover { background: var(--accent-soft); }
.table-cfoac tbody tr:last-child td { border-bottom: none; }

.table-cfoac thead th:first-child,
.table-cfoac tbody td:first-child { padding-left: 1.5rem; }
.table-cfoac thead th:last-child,
.table-cfoac tbody td:last-child { padding-right: 1.5rem; }

/* Avatars */
.avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar i { color: var(--primary); font-size: 1rem; }

.avatar-lg { width: 110px; height: 110px; border-radius: 20px; font-size: 1.6rem; border-width: 3px; }
.avatar-lg i { font-size: 2.4rem; }

/* Badges */
.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.75rem;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
}

.badge-soft.b-primary   { background: var(--primary-soft); color: var(--primary); }
.badge-soft.b-info      { background: var(--info-soft); color: #2b6cb0; }
.badge-soft.b-success   { background: var(--success-soft); color: #276749; }
.badge-soft.b-warning   { background: var(--warning-soft); color: #c05621; }
.badge-soft.b-danger    { background: var(--danger-soft); color: #c53030; }
.badge-soft.b-purple    { background: var(--purple-soft); color: var(--purple); }
.badge-soft.b-neutral   { background: #f1f5f9; color: #475569; }

.statut-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.statut-badge::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.statut-actif    { background: var(--success-soft); color: #276749; }
.statut-actif::before    { background: var(--success); }
.statut-inactif  { background: #f1f5f9; color: #475569; }
.statut-inactif::before  { background: #94a3b8; }
.statut-suspendu { background: var(--warning-soft); color: #c05621; }
.statut-suspendu::before { background: var(--warning); }
.statut-diplome  { background: var(--info-soft); color: #2b6cb0; }
.statut-diplome::before  { background: var(--info); }

/* ============================================================
   Menus d'actions
   ============================================================ */
.action-menu { position: relative; display: inline-block; }

.action-trigger {
    background: #fff;
    border: 1.5px solid var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.action-trigger i { color: var(--accent); }
.action-trigger:hover { background: var(--primary-soft); border-color: var(--accent); }

.action-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    min-width: 185px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    overflow: hidden;
    border: 1px solid var(--border);
    animation: fadeSlideDown 0.15s ease-out;
}

.action-list.show { display: block; }

.action-list a,
.action-list button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    font-size: 0.86rem;
    font-weight: 500;
    width: 100%;
    text-align: left;
    background: #fff;
    border: none;
    cursor: pointer;
    color: var(--ink);
    transition: background 0.15s;
    font-family: inherit;
}

.action-list a i,
.action-list button i { width: 18px; font-size: 0.85rem; }
.action-list a:hover,
.action-list button:hover { background: var(--surface-alt); }

.action-list .view-action i    { color: var(--info); }
.action-list .edit-action i    { color: #d97706; }
.action-list .delete-action i  { color: var(--danger); }
.action-list .delete-action:hover { background: var(--danger-soft); color: var(--danger); }

/* ============================================================
   Formulaires
   ============================================================ */
.form-card {
    background: #fff;
    border-radius: 2px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    animation: fadeInUp 0.4s ease-out;
}

.form-section {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child { border-bottom: none; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.4rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.45rem; }

.form-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i { color: var(--accent); font-size: 0.86rem; width: 16px; }

.required { color: var(--danger); font-size: 0.78rem; }

.form-control {
    padding: 0.68rem 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(78,151,198,0.14);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.3rem;
    cursor: pointer;
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.is-invalid { border-color: var(--danger) !important; }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(229,62,62,0.12); }

/* Documents */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
}

.doc-card {
    background: var(--surface-alt);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    transition: all 0.25s ease;
}

.doc-card:hover {
    background: #fff;
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.doc-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.doc-header i { font-size: 1.4rem; color: var(--accent); }
.doc-header h3 { font-size: 0.98rem; font-weight: 700; color: var(--ink); margin: 0; }

.file-drop {
    position: relative;
    display: block;
    width: 100%;
    cursor: pointer;
}

.file-drop input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-drop-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.62rem 1rem;
    background: #fff;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--muted);
    transition: all 0.25s ease;
}

.file-drop:hover .file-drop-label { border-color: var(--accent); background: var(--primary-soft); color: var(--primary); }
.file-drop-label i { color: var(--accent); }

.file-name {
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 0.55rem;
    word-break: break-all;
}

.file-name.has-file { color: var(--success); font-weight: 600; }

.form-hint { font-size: 0.72rem; color: var(--muted); font-style: italic; margin-top: 0.4rem; }

.current-file {
    background: var(--info-soft);
    border: 1px solid #bee3f8;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.current-file span { color: #2d3748; word-break: break-all; }

.photo-preview {
    text-align: center;
    margin-bottom: 1rem;
}

.photo-preview img {
    width: 120px; height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    background: #f0f0f0;
}

.form-actions {
    padding: 1.5rem 2rem;
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.9rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ============================================================
   Profil / Détails
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.profile-name {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    background: #fff;
}

.info-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i { color: #fff; font-size: 1.1rem; }

.info-content { min-width: 0; }

.info-content .label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.info-content .value {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.92rem;
    word-break: break-word;
}

.dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.date-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.date-icon {
    width: 42px; height: 42px;
    background: var(--primary-soft);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-icon i { color: var(--accent); font-size: 1.05rem; }

.date-content .label { font-size: 0.72rem; color: var(--muted); }
.date-content .value { font-weight: 700; color: var(--ink); font-size: 0.9rem; }

/* Documents list (details) */
.documents-list { display: flex; flex-direction: column; gap: 0.9rem; }

.document-item {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    transition: all 0.25s ease;
}

.document-item:hover {
    background: #fff;
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.document-info { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 220px; }

.document-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8f4fd 0%, #c5e0fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.document-icon i { color: var(--accent); font-size: 1.2rem; }

.document-name { font-weight: 700; color: var(--ink); }
.document-date { font-size: 0.76rem; color: var(--muted); }

.document-actions { display: flex; gap: 0.5rem; }

/* ============================================================
   Promotions / cartes
   ============================================================ */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.3rem;
}

.promo-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.promo-card-body { padding: 1.6rem; text-align: center; }

.promo-icon {
    width: 78px; height: 78px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft) 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.promo-card:hover .promo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    transform: scale(1.08);
}

.promo-icon i { font-size: 2.3rem; color: var(--primary); transition: color 0.3s; }
.promo-card:hover .promo-icon i { color: #fff; }

.promo-title { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin-bottom: 0.6rem; }

.promo-year {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--surface-alt);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
}

.promo-stats { text-align: left; }

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.86rem;
}

.stat-row:last-child { border-bottom: none; }

.stat-row .stat-label { color: var(--muted); display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; }
.stat-row .stat-label i { color: var(--accent); }

.stat-row .stat-value { font-weight: 700; color: var(--ink); font-size: 0.9rem; }

.stat-pill {
    background: var(--surface-alt);
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 0.8rem;
    transition: border-color 0.2s;
}

.progress { height: 6px; border-radius: 50px; background-color: #e9eef5; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ============================================================
   État vide
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--muted);
}

.empty-state i {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    color: var(--accent);
    opacity: 0.45;
}

.empty-state h5 { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: 0.4rem; }
.empty-state p { margin-bottom: 1.2rem; font-size: 0.94rem; }

/* ============================================================
   Pagination (bootstrap thématisée)
   ============================================================ */
.pagination { margin-bottom: 0; gap: 0.3rem; }

.pagination .page-link {
    border: 1.5px solid var(--border);
    border-radius: 9px !important;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.45rem 0.85rem;
    background: #fff;
    transition: all 0.2s;
}

.pagination .page-link:hover { background: var(--primary-soft); border-color: var(--accent); color: var(--primary); }

.pagination .active > .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .disabled > .page-link { color: #cbd5e1; background: #fff; }

/* ============================================================
   Page de confirmation
   ============================================================ */
.confirm-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: linear-gradient(160deg, #2F63A4 0%, #4080C0 100%);
}

.confirm-card {
    background: #fff;
    max-width: 520px;
    width: 100%;
    padding: 2.8rem 2.4rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.9);
    animation: fadeInUp 0.5s ease-out;
}

.confirm-check {
    width: 72px; height: 72px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #48bb78, var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 26px rgba(56,161,105,0.35);
}

.confirm-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin-bottom: 0.3rem; }

.confirm-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
}

.confirm-message {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin-bottom: 1.4rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.confirm-info {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.2rem;
    text-align: left;
    margin-bottom: 1.6rem;
}

.confirm-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.confirm-info-row:last-child { border-bottom: none; }

.confirm-info-row .info-label { color: var(--muted); font-weight: 500; }
.confirm-info-row .info-value { color: var(--ink); font-weight: 700; word-break: break-word; text-align: right; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .app-shell { padding-top: 66px; }
    .app-container { padding: 1.25rem 0.9rem 3rem; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header-actions .btn { flex: 1; justify-content: center; }
    .page-header h1 { font-size: 1.3rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-section { padding: 1.4rem 1.2rem; }
    .form-actions { padding: 1.25rem 1.2rem; flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .promo-grid { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; text-align: center; }
    .document-actions { width: 100%; }
    .document-actions .btn { flex: 1; justify-content: center; }

    .app-nav-links { display: none; }
    .app-nav-toggle { display: flex; align-items: center; justify-content: center; }
    .app-nav-cta { display: none; }
    .app-nav-links.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #fff;
        padding: 1rem 1.5rem 1.2rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .app-nav-links.open .app-nav-link { padding: 0.55rem 0; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}