/* ============================================================
   Asfaly - Style global unique (nettoyé, doublons supprimés)
   ============================================================ */

/* ============================================================
   1. VARIABLES
   ============================================================ */
:root {
    --primary: #763cbd;
    --primary-hover: #5a2e94;
    --primary-light: #f0ebf7;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #ffd209;
    --success-hover: #16a34a;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --background: #f1f5f9;
    --white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 10px;
    --transition: all 0.3s ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-margin-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ============================================================
   3. HEADER
   ============================================================ */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
}
.logo a:hover {
    text-decoration: none;
}
.logo-img {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
}
@media (max-width: 768px) {
    .logo-img { height: 32px; }
}
@media (max-width: 480px) {
    .logo-img { height: 28px; }
    .logo a { font-size: 1rem; gap: 0.5rem; }
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.user-name {
    font-weight: 500;
    color: var(--text);
}

.language-selector,
.user-menu {
    position: relative;
}
.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text);
    transition: var(--transition);
}
.dropdown-toggle:hover { background: var(--background); }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    min-width: 180px;
    padding: 0.5rem 0;
    z-index: 1000;
}
.dropdown-menu.open { display: block; }
.dropdown-menu li { list-style: none; }
.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}
.dropdown-menu a:hover {
    background: var(--background);
    color: var(--primary);
    text-decoration: none;
}
.dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}
@media (max-width: 768px) {
    .dropdown-menu {
        right: auto;
        left: 0;
        min-width: 160px;
    }
    .language-selector:last-child .dropdown-menu {
        right: 0;
        left: auto;
    }
}

/* ============================================================
   4. MAIN & CONTAINER
   ============================================================ */
main {
    flex: 1;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 2rem;
    padding-top: 10px;
    width: 100%;
}

.container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    padding-top: 10px;
    box-shadow: var(--shadow);
}

/* ============================================================
   5. FOOTER
   ============================================================ */
footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}
.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--text);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--primary);
    text-decoration: none;
}
.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1rem 2rem 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

/* ============================================================
   6. BOUTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-warning { background: var(--warning); color: var(--text); }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--primary); color: var(--white); }
.btn-info:hover { background: var(--primary-hover); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; }

/* ============================================================
   7. FORMULAIRES
   ============================================================ */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(118, 60, 189, 0.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .help {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.form-row { display: flex; gap: 1rem; }
.form-group.half { flex: 1; }
select[multiple] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}
@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
}

/* ============================================================
   8. ALERTES
   ============================================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success { color: #16a34a; background: #dcfce7; border-color: #bbf7d0; }
.alert-error { color: #dc2626; background: #fee2e2; border-color: #fecaca; }
.alert-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 15px 20px;
    border-radius: var(--radius);
}
.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 15px;
    border-radius: var(--radius);
}

/* ============================================================
   9. STATISTIQUES
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}
.stat-number { font-size: 2.2rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-light); font-size: 0.9rem; }

/* ============================================================
   10. ACTIONS
   ============================================================ */
.actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* ============================================================
   11. ÉTATS VIDES
   ============================================================ */
.empty-state {
    background: var(--background);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-hint { font-size: 0.9rem; margin-top: 0.25rem; }

/* ============================================================
   12. DÉTAIL
   ============================================================ */
.detail-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}
.detail-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 500; color: var(--text-light); }
.detail-value {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.password-hidden {
    font-family: monospace;
    letter-spacing: 3px;
    margin-right: 0.5rem;
}
.password-hidden.visible { letter-spacing: normal; }

/* ============================================================
   13. LOGIN
   ============================================================ */
.login-box {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.login-box h1 { color: var(--text); text-align: center; }

/* ============================================================
   14. TABLEAUX
   ============================================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.table th {
    background: var(--background);
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
}
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}
.table tr:hover td { background: var(--background); }
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

/* ============================================================
   15. BÉNÉFICIAIRES
   ============================================================ */
.beneficiaries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.beneficiary-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.beneficiary-card:hover { box-shadow: var(--shadow); }
.beneficiary-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}
.beneficiary-info { flex: 1; }
.beneficiary-info h3 { margin: 0 0 5px 0; color: var(--text); font-size: 1.1em; }
.beneficiary-info p { margin: 2px 0; font-size: 0.9em; color: var(--text-light); }
.beneficiary-info .beneficiary-email { color: var(--primary); }
.beneficiary-status { margin-top: 8px; }
.beneficiary-actions { display: flex; gap: 5px; flex-wrap: wrap; flex-shrink: 0; }
.beneficiaries-list { display: flex; flex-direction: column; gap: 10px; margin: 15px 0; }
.beneficiary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}
.beneficiaries-stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9em;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   16. STATUTS
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}
.status-badge.confirmed { background: #dcfce7; color: #16a34a; }
.status-badge.pending { background: #fef3c7; color: #d97706; }
.status-badge.declined { background: #fee2e2; color: #dc2626; }
.status-badge.expired { background: #f1f5f9; color: var(--text-muted); }
.status-badge.active { background: #dcfce7; color: #16a34a; }
.status-badge.suspended { background: #fee2e2; color: #dc2626; }
.status-badge.pending_admin { background: #fef3c7; color: #d97706; }
.status-badge.pending_user { background: #dbeafe; color: #2563eb; }
.status-badge.completed { background: #dcfce7; color: #16a34a; }
.status-badge.rejected { background: #fee2e2; color: #dc2626; }
.status-badge.approved { background: #dcfce7; color: #16a34a; }

/* ============================================================
   17. FILTRE - ONGLETS
   ============================================================ */
.filter-tabs,
.user-tabs {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    border-bottom: 2px solid var(--border);
}
.filter-tabs .tab,
.user-tabs .tab {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.filter-tabs .tab:hover,
.user-tabs .tab:hover { color: var(--text); }
.filter-tabs .tab.active,
.user-tabs .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================================
   18. TRANSMISSIONS
   ============================================================ */
.transmissions-list { display: flex; flex-direction: column; gap: 15px; margin: 20px 0; }
.transmission-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.transmission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.transmission-header h3 { margin: 0; color: var(--text); }
.transmission-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.transmission-info { display: flex; flex-direction: column; }
.info-label {
    font-size: 0.8em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.info-value { font-weight: 500; color: var(--text); }
.transmission-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}
.transmissions-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9em;
    text-align: center;
}

/* ============================================================
   19. ADMIN
   ============================================================ */
.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}
.admin-nav-item {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    color: var(--text);
    border: 1px solid var(--border);
}
.admin-nav-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    text-decoration: none;
}
.nav-icon { display: block; font-size: 2.5em; margin-bottom: 10px; }
.nav-label { font-weight: 500; }
.admin-nav { margin-bottom: 20px; }
.search-bar { margin-bottom: 20px; }
.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
}

/* ============================================================
   20. 2FA
   ============================================================ */
.twofa-setup { margin-top: 0; }
.twofa-setup .step:first-child { margin-top: 0; }
.twofa-status { margin: 20px 0; }
.status-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--background);
    border-radius: var(--radius);
    flex-wrap: wrap;
}
.status-icon { font-size: 1.5em; }
.status-text { font-weight: 500; color: var(--text); }
.status-required {
    background: #fef3c7;
    color: #d97706;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}
.setup-steps { margin-top: 20px; }
.step {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: bold;
    flex-shrink: 0;
}
.step-content { flex: 1; }
.step-content h4 { margin: 0 0 5px 0; color: var(--text); }
.step-content p { margin: 0 0 15px 0; color: var(--text-light); }
.app-links { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin: 10px 0; }
.btn-app { display: inline-block; }
.btn-app img { height: 40px; width: auto; }
.or-text { color: var(--text-muted); font-size: 0.9em; }
.qr-container { text-align: center; margin: 10px 0; }
.qr-code { width: 200px; height: 200px; object-fit: contain; }
.secret-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-wrap: wrap;
    margin-top: 10px;
}
.secret-label { color: var(--text-light); font-weight: 500; white-space: nowrap; }
.secret-code {
    font-family: monospace;
    font-size: 1.1em;
    padding: 5px 10px;
    background: var(--background);
    border-radius: var(--radius);
    flex: 1;
    word-break: break-all;
    overflow-wrap: break-word;
    min-width: 0;
}
.secret-copy-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
    .secret-container { flex-direction: column; align-items: stretch; gap: 8px; }
    .secret-label { text-align: center; }
    .secret-code { text-align: center; font-size: 0.9em; padding: 8px; }
    .secret-copy-btn { width: 100%; text-align: center; }
}
.recovery-codes {
    margin: 20px 0;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius);
}
.recovery-codes h3 { margin-top: 0; color: var(--text); }
.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 15px 0;
}
.recovery-code {
    font-family: monospace;
    padding: 8px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.9em;
}
.warning-text { color: var(--danger); }
.codes-container {
    margin: 20px 0;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius-lg);
}
body.twofa-page,
body.twofa-page header,
body.twofa-page main,
body.twofa-page .container,
body.twofa-page h1,
.twofa-status {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.setup-steps .step { margin-bottom: 15px; }
html, body { scroll-behavior: auto !important; }

/* ============================================================
   21. RGPD
   ============================================================ */
.rgpd-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.rgpd-section h2 { margin-top: 0; color: var(--text); }
.exports-list { margin: 15px 0; display: flex; flex-direction: column; gap: 10px; }
.export-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: var(--background);
    border-radius: var(--radius);
    flex-wrap: wrap;
}
.export-date { color: var(--text-light); font-size: 0.9em; min-width: 130px; }
.export-size { color: var(--text-muted); font-size: 0.85em; }
.export-status { font-size: 0.85em; font-weight: 500; }
.export-status.completed { color: #16a34a; }
.export-status.processing { color: #d97706; }
.export-status.expired { color: #dc2626; }

/* ============================================================
   22. REQUÊTES
   ============================================================ */
.requests-list { display: flex; flex-direction: column; gap: 15px; margin: 20px 0; }
.request-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.request-card.pending { border-left: 4px solid var(--warning); }
.request-card.approved { border-left: 4px solid var(--success); }
.request-card.rejected { border-left: 4px solid var(--danger); }
.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.request-header h3 { margin: 0; color: var(--text); }
.request-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.request-info.full { grid-column: 1 / -1; }
.request-info { display: flex; flex-direction: column; }
.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* ============================================================
   23. PROFIL
   ============================================================ */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.profile-container h1 { margin-top: 0; color: var(--text); }
.profile-tabs { display: flex; gap: 5px; margin: 20px 0; border-bottom: 2px solid var(--border); }
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; padding-top: 20px; }
.tab-content.active { display: block; }
.profile-links { display: flex; gap: 10px; margin-top: 30px; justify-content: center; flex-wrap: wrap; }

.profile-tabs {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    overflow-x: auto;
}
.tab-btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .profile-tabs {
        gap: 2px;
    }
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .profile-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 0;
    }
    .tab-btn {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        margin-bottom: 0;
    }
    .tab-btn.active {
        background: var(--primary-light);
    }
}
/* ============================================================
   24. MOT DE PASSE - WRAPPER (une seule déclaration, réutilisée partout)
   ============================================================ */
.password-wrapper { display: flex; gap: 5px; }
.password-wrapper input { flex: 1; }
.password-wrapper button {
    padding: 10px 15px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.1em;
}
.password-wrapper button:hover { background: var(--border); }

.password-strength {
    margin-top: 5px;
    padding: 3px 10px;
    border-radius: var(--radius);
    font-size: 0.85em;
}
.password-strength.very-weak { background: #fee2e2; color: #dc2626; }
.password-strength.weak { background: #fef3c7; color: #d97706; }
.password-strength.medium { background: #fde68a; color: #b45309; }
.password-strength.strong { background: #bbf7d0; color: #16a34a; }
.password-strength.very-strong { background: #86efac; color: #15803d; }

.reset-box,
.forgot-box {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.reset-box h1,
.forgot-box h1 { text-align: center; color: #1e293b; }
.reset-box p,
.forgot-box p { text-align: center; color: #64748b; }

/* ============================================================
   25. DIVERS
   ============================================================ */
.info-box {
    margin: 1.5rem 0;
    padding: 1.25rem 1.25rem;
    background: var(--background);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}
.info-box h4 { margin-top: 0; color: var(--text); }
.info-box p { color: var(--text-light); margin-bottom: 0.5rem; }
.info-box ul { margin: 10px 0 0 0; padding-left: 1.25rem; color: var(--text-light); }
.info-box ul li { margin-bottom: 0.25rem; }
.info-box.warning { border-left-color: var(--danger); background: #fef2f2; }

.help { font-size: 0.85em; color: var(--text-muted); margin-top: 5px; }

.pending-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--warning);
}
.blocked-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--danger);
}
.blocked-info {
    margin: 20px 0;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius);
}
.password-check-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.manual-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.recovered-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.recovered-section h2 { margin-top: 0; color: var(--text); }
.empty-text { color: var(--text-muted); text-align: center; padding: 20px; }
.beneficiary-list { list-style: none; padding: 0; }
.beneficiary-list li { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.action-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.8em; }
.action-badge.recovery_access { background: #dbeafe; color: #2563eb; }
.action-badge.entry_view { background: #dcfce7; color: #16a34a; }
.logs-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9em;
    text-align: center;
}

.register-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.register-box h1 { text-align: center; color: var(--text); }
.welcome-text { text-align: center; color: var(--text-light); }

/* ============================================================
   26. LISTES COMPACTES AVEC DÉTAIL DÉPLIABLE (admin)
   ============================================================ */
.compact-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    overflow: hidden;
}
.compact-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 10px 14px;
    font-size: 0.85em;
    color: var(--text-light);
    background: var(--bg-hover, #f8fafc);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}
.compact-list-row {
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.compact-list-row:last-child { border-bottom: none; }
.compact-list-row:hover .compact-list-main { background: var(--bg-hover, #f8fafc); }
.compact-list-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px 14px;
    align-items: center;
}
.row-toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 8px;
    color: var(--text-light);
}
.compact-list-row.open .row-toggle-icon { transform: rotate(90deg); }
.compact-list-detail {
    display: none;
    padding: 14px 20px;
    background: var(--bg-hover, #f8fafc);
    border-top: 1px dashed var(--border);
}
.compact-list-detail.open { display: block; }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 20px;
}
.detail-grid-item { font-size: 0.9em; }
.detail-grid-item .label {
    display: block;
    color: var(--text-light);
    font-size: 0.8em;
    margin-bottom: 2px;
}
.detail-grid-item .value { font-weight: 500; }
.name-cell { display: flex; flex-direction: column; }
.name-cell .primary { font-weight: 600; }
.name-cell .secondary { font-size: 0.85em; color: var(--text-light); }
.compact-list-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   27. RESPONSIVE GÉNÉRAL
   ============================================================ */
@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; height: auto; padding: 0.75rem 0; }
    .main-nav ul { flex-wrap: wrap; gap: 0.5rem; }
    .header-actions { flex-wrap: wrap; gap: 0.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 0.5rem; }
    .detail-row { grid-template-columns: 1fr; gap: 0.25rem; }
    .detail-value { width: 100%; }
    .detail-value button { flex-shrink: 0; }
    .container { padding: 1rem; }
    main { padding: 0 1rem; margin: 1rem auto; }
    .beneficiaries-grid { grid-template-columns: 1fr; }
    .compact-list-header { display: none; }
    .compact-list-main { grid-template-columns: 1fr; gap: 6px; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
}
/* ============================================================
   VIDÉO RESPONSIVE (ratio 16:9)
   ============================================================ */
.video-responsive-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding-bottom: 56.25%; /* ratio 16:9 = 9/16 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 15px 0;
}
.video-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}