/* ============================================================
   ISFB – Bilans de Compétences | Feuille de style principale
   Charte graphique isfb.ch
   Couleurs: #1C355E (navy), #44ACBC (teal), #A28B69 (gold),
             #5A1F45 (burgundy), #F8F7F6 (light bg)
   Police: Open Sans
   ============================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #333C4E;
    background: #F2F1F0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #1C355E; text-decoration: none; }
a:hover { color: #44ACBC; }

ul { list-style: none; }

/* ---------- VARIABLES ---------- */
:root {
    --navy:     #1C355E;
    --teal:     #44ACBC;
    --gold:     #A28B69;
    --burgundy: #5A1F45;
    --light-bg: #F8F7F6;
    --border:   #E2E5EA;
    --text:     #333C4E;
    --muted:    #6b7280;
    --white:    #FFFFFF;
    --success:  #2e7d32;
    --warning:  #e6a817;
    --danger:   #c62828;
    --info:     #0277BD;
    --radius:   8px;
    --shadow:   0 2px 8px rgba(28,53,94,.10);
    --nav-h:    60px;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,.20);
}

.navbar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
}
.navbar-logo-img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1); /* logo blanc sur fond navy */
    display: block;
}
.navbar-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    display: none;
}
@media(min-width:900px){ .navbar-subtitle { display: block; } }
.navbar-divider { width: 1px; height: 24px; background: rgba(255,255,255,.2); margin: 0 4px; }


.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
}
.navbar-menu a {
    color: rgba(255,255,255,.8);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255,255,255,.15);
    color: var(--white);
}
.navbar-menu i { margin-right: 5px; }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}
.user-mail { color: rgba(255,255,255,.6); font-size: 12px; }
.btn-logout, .btn-profil {
    color: #fff;
    font-size: 18px;
    transition: background .15s, color .15s;
    padding: 6px 10px;
    border-radius: 7px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.btn-logout:hover { background: rgba(248,113,113,.4); border-color: rgba(248,113,113,.5); color: #fff; }
.btn-profil:hover { background: rgba(68,172,188,.4); border-color: rgba(68,172,188,.5); color: #fff; }

/* Role badges */
.badge-role {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-role-superadmin  { background: #7c3aed;          color: #fff; }
.badge-role-staff       { background: var(--teal);     color: #fff; }
.badge-role-referent    { background: var(--gold);     color: #fff; }
.badge-role-coach       { background: var(--burgundy); color: #fff; }
.badge-role-beneficiaire{ background: #475569;          color: #fff; }

/* ---------- MAIN CONTENT ---------- */
.main-content {
    flex: 1;
    padding: 28px 24px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- PAGE HEADER ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
}
.page-header h1 i { color: var(--teal); margin-right: 8px; }

/* ---------- CARDS ---------- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--light-bg);
}
.card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}
.card-header h2 i { color: var(--teal); margin-right: 6px; }
.card-body  { padding: 20px; }
.card-footer{ padding: 12px 20px; border-top: 1px solid var(--border); background: var(--light-bg); }
.card.mb-3  { margin-bottom: 20px; }
.mt-3       { margin-top: 20px; }
.p-0        { padding: 0 !important; }

/* ---------- GRIDS ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
@media(max-width:900px){ .dashboard-grid { grid-template-columns: 1fr; } }

.view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
@media(max-width:768px){ .view-grid { grid-template-columns: 1fr; } }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media(max-width:640px){ .form-grid-2 { grid-template-columns: 1fr; } }
.form-full { grid-column: 1 / -1; }
.form-section-title {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ---------- KPI CARDS ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media(max-width:900px){ .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:480px){ .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card {
    border-radius: var(--radius);
    padding: 20px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.kpi-navy     { background: linear-gradient(135deg, #1C355E 0%, #254a80 100%); }
.kpi-teal     { background: linear-gradient(135deg, #44ACBC 0%, #2d8a9a 100%); }
.kpi-gold     { background: linear-gradient(135deg, #A28B69 0%, #c0a57d 100%); }
.kpi-burgundy { background: linear-gradient(135deg, #5A1F45 0%, #7b2d5e 100%); }

.kpi-icon { font-size: 28px; opacity: .25; position: absolute; right: 16px; top: 16px; }
.kpi-value { font-size: 36px; font-weight: 700; line-height: 1; }
.kpi-label { font-size: 13px; opacity: .85; margin-top: 4px; }
.kpi-link  { font-size: 12px; color: rgba(255,255,255,.8); display: inline-block; margin-top: 10px; }
.kpi-link:hover { color: #fff; }

/* ---------- TABLES ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th, .table td { padding: 11px 16px; text-align: left; }
.table th { background: var(--light-bg); color: var(--navy); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--border); }
.table td { border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: #f0f4f8; }
.table-sm td, .table-sm th { padding: 7px 12px; }

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}
.badge-success  { background: #dcfce7; color: var(--success); }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-danger   { background: #fee2e2; color: var(--danger); }
.badge-info     { background: #dbeafe; color: #1d4ed8; }
.badge-primary  { background: #e0e7ff; color: #4338ca; }
.badge-secondary{ background: #f1f5f9; color: #475569; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, box-shadow .15s, border-color .15s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.btn-primary   { background: var(--navy);   color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: #15294a; color: #fff; }
.btn-secondary { background: #64748b;        color: #fff; }
.btn-secondary:hover { background: #475569; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #1b5e20; color: #fff; }
.btn-danger    { background: var(--danger);  color: #fff; }
.btn-danger:hover { background: #8b0000; color: #fff; }
.btn-outline   { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm  { padding: 5px 12px; font-size: 12.5px; }
.btn-xs  { padding: 3px 8px;  font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.actions-cell { white-space: nowrap; }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(68,172,188,.15); }
textarea.form-control { resize: vertical; min-height: 100px; }

.input-eye-wrapper { position: relative; }
.input-eye-wrapper .form-control { padding-right: 44px; }
.btn-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 24px; flex-wrap: wrap; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.checkbox-label input { accent-color: var(--teal); }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .15s;
}
.radio-item:hover     { border-color: var(--teal); }
.radio-item.selected  { border-color: var(--teal); background: #f0fafa; }
.radio-item input     { accent-color: var(--teal); }

/* ---------- ALERTS ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    margin-bottom: 16px;
    border-left: 4px solid transparent;
}
.alert i { margin-right: 8px; }
.alert-success { background: #f0fdf4; border-color: var(--success); color: #166534; }
.alert-danger  { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--warning);  color: #92400e; }
.alert-info    { background: #eff6ff; border-color: var(--info);    color: #1e40af; }
.alert ul { padding-left: 18px; margin-top: 6px; }

/* ---------- LOGIN PAGE ---------- */
.login-page { background: linear-gradient(135deg, #1C355E 0%, #254a80 60%, #44ACBC 100%); display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.login-wrapper { width: 100%; max-width: 420px; padding: 20px; }

.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-img { max-width: 160px; height: auto; margin: 0 auto 10px; display: block; }
.login-subtitle { color: var(--muted); font-size: 13px; text-align: center; }
.login-footer-links { margin-top: 18px; text-align: center; font-size: 12.5px; }
.login-footer-links a { color: var(--navy); }
.login-footer-links a:hover { color: var(--teal); }

/* ---------- FOOTER ---------- */
/* ── Tuiles de configuration ── */
.config-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border, #E2E5EA);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text, #333C4E);
    transition: box-shadow .18s, transform .18s, border-color .18s;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.config-tile:hover {
    box-shadow: 0 6px 20px rgba(28,53,94,.12);
    transform: translateY(-2px);
    border-color: rgba(68,172,188,.4);
    color: var(--text, #333C4E);
}
.config-tile-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.config-tile-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy, #1C355E);
    line-height: 1.3;
}
.config-tile-desc {
    font-size: 12px;
    color: var(--muted, #6b7280);
    line-height: 1.4;
}

.footer { background: var(--navy); color: rgba(255,255,255,.6); padding: 14px 24px; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1280px; margin: 0 auto; font-size: 12px; }
.footer-version { color: rgba(255,255,255,.4); }

/* ---------- TEXT UTILITIES ---------- */
.text-muted   { color: var(--muted); }
.text-success { color: var(--success); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.py-3         { padding-top: 12px; padding-bottom: 12px; }
.mt-1         { margin-top: 4px; }
.mt-2         { margin-top: 10px; }
.mb-0         { margin-bottom: 0; }
.mb-2         { margin-bottom: 10px; }
.mb-3         { margin-bottom: 20px; }
.d-flex       { display: flex; }
.align-items-center { align-items: center; }
.align-items-end    { align-items: flex-end; }
.justify-between    { justify-content: space-between; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2        { gap: 10px; }

/* ---------- INFO DL ---------- */
.info-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.info-dl dt { font-weight: 600; color: var(--navy); white-space: nowrap; }
.info-dl dd { color: var(--text); }

/* ---------- PROCESS LIST ---------- */
.process-list { display: flex; flex-direction: column; gap: 12px; }
.process-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.process-list li i { width: 18px; text-align: center; }
.process-done    i { color: var(--success); }
.process-pending i { color: #d1d5db; }
.process-progress i { color: var(--warning); }

/* ---------- STEPS BAR ---------- */
.steps-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 100px; }
.step-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    transition: background .2s;
}
.step-done .step-circle { background: var(--success); color: #fff; }
.step-label { font-size: 11px; color: var(--muted); text-align: center; }
.step-done .step-label { color: var(--success); font-weight: 600; }

/* ---------- ACTION BLOCKS (bénéficiaire) ---------- */
.action-block {
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--teal);
    background: #f0fafa;
}
.action-block h3 { font-size: 16px; color: var(--navy); margin-bottom: 10px; }
.action-done { border-color: var(--success); background: #f0fdf4; text-align: center; padding: 30px; }

/* ---------- COHORTE ITEM ---------- */
.cohorte-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.cohorte-item:last-child { border: none; }
.cohorte-date  { font-size: 12px; color: var(--teal); font-weight: 600; }
.cohorte-title { font-weight: 600; font-size: 13.5px; margin: 2px 0; }
.cohorte-meta  { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }

/* ---------- QUICK ACTIONS ---------- */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-action-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--light-bg);
    border-radius: 6px;
    color: var(--navy);
    font-size: 13.5px; font-weight: 500;
    transition: background .15s;
}
.quick-action-btn:hover { background: #e2e8f0; color: var(--navy); }
.quick-action-btn i { color: var(--teal); width: 18px; text-align: center; }

/* ---------- DISPONIBILITÉS ---------- */
.dispo-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.dispo-item:last-child { border: none; }
.dispo-date { font-weight: 600; color: var(--navy); }

/* ---------- SEARCH FORM ---------- */
.search-form { display: flex; gap: 8px; align-items: center; flex: 1; }
.search-form .form-control { max-width: 320px; }

/* ---------- PAGINATION ---------- */
.pagination-bar { display: flex; gap: 6px; }
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--navy);
    border: 1px solid var(--border);
    background: var(--white);
    transition: background .15s;
}
.page-btn:hover { background: var(--light-bg); }
.page-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- TEST INTERFACE ---------- */
.test-container { max-width: 780px; margin: 0 auto; }

.test-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.test-title h1 { font-size: 20px; color: var(--navy); }
.test-title span { font-size: 13px; color: var(--muted); }

.test-timer {
    display: flex; align-items: center; gap: 8px;
    font-size: 22px; font-weight: 700; color: var(--navy);
    background: var(--white); padding: 8px 16px; border-radius: 8px;
    box-shadow: var(--shadow); border: 2px solid var(--border);
}
.timer-warning { color: var(--warning); border-color: var(--warning); }
.timer-expired { color: var(--danger);  border-color: var(--danger); }

.progress-bar-wrapper {
    height: 6px; background: var(--border); border-radius: 3px;
    margin-bottom: 20px; overflow: hidden;
}
.progress-bar-fill { height: 100%; background: var(--teal); border-radius: 3px; transition: width .4s; }

.q-category-tag { font-size: 12px; color: var(--teal); font-weight: 600; margin-bottom: 10px; }
.q-enonce-test  { font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 20px; line-height: 1.5; }

.q-choix { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.q-choix-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 14px;
}
.q-choix-item:hover  { border-color: var(--teal); background: #f0fafa; }
.q-choix-item.selected { border-color: var(--navy); background: #eef5f9; }
.q-choix-item input { display: none; }
.q-choix-letter {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--border); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.q-choix-item.selected .q-choix-letter { background: var(--navy); color: #fff; }

.test-nav { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- QUESTION LIST (admin) ---------- */
.question-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.question-item:last-child { border: none; }
.question-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.q-enonce { font-weight: 600; color: var(--text); margin-bottom: 10px; }
.q-reponses { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-rep {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--light-bg);
}
.q-rep-correct { background: #dcfce7; color: var(--success); font-weight: 600; }

/* ---------- BILAN / TEST RESULTS ---------- */
.test-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.test-result-box { background: var(--light-bg); border-radius: 8px; padding: 14px; }
.tr-title { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tr-score { font-size: 28px; font-weight: 700; color: var(--navy); }
.tr-bar-wrapper { height: 6px; background: var(--border); border-radius: 3px; margin-top: 8px; }
.tr-bar { height: 100%; background: var(--teal); border-radius: 3px; }

.test-result-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.test-result-item:last-child { border: none; }
.score-badge { background: var(--navy); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }

/* ---------- MESURES ---------- */
.mesure-cat { margin-bottom: 18px; }
.mesure-cat-title { font-weight: 600; color: var(--navy); font-size: 13px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }

/* ---------- RÉFÉRENTIELS ---------- */
.ref-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--light-bg);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
}

/* ---------- COACH PROFILE ---------- */
.coach-profile { display: flex; gap: 14px; align-items: flex-start; }
.coach-photo   { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--teal); }
.coach-avatar  { width: 56px; height: 56px; border-radius: 50%; background: var(--light-bg); display: flex; align-items: center; justify-content: center; color: var(--muted); border: 2px solid var(--border); flex-shrink: 0; }
.coach-thumb   { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }

/* ---------- INLINE FORM ---------- */
.inline-form { margin-bottom: 16px; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border); }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 3px; }

/* ---------- ORGANISATIONS ---------- */
.org-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
}
.org-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; cursor: pointer;
    background: var(--light-bg);
    transition: background .15s;
}
.org-header:hover { background: #e8edf3; }
.org-header-left { display: flex; align-items: center; gap: 12px; }
.org-header-right { display: flex; align-items: center; gap: 8px; }
.org-chevron { transition: transform .2s; color: var(--muted); }
.org-open .org-chevron { transform: rotate(90deg); }
.org-body { display: none; padding: 16px 20px; }
.org-open .org-body { display: block; }
.org-actions-top { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.coll-section { }
.coll-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.coll-header h3 { font-size: 14px; color: var(--navy); }
.coll-header h3 i { color: var(--teal); margin-right: 6px; }
.row-inactive td { opacity: .5; }

/* ---------- MODALS ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-box {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    background: var(--light-bg);
}
.modal-header h3 { font-size: 16px; color: var(--navy); margin: 0; }
.modal-header h3 i { color: var(--teal); margin-right: 8px; }
.modal-close {
    background: none; border: none; font-size: 22px; cursor: pointer;
    color: var(--muted); line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--danger); }
.modal-box form { padding: 20px; }
.required { color: var(--danger); }

/* ---------- UPLOAD ---------- */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    color: var(--muted);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--teal);
    background: #f0fafa;
}
.upload-zone i { font-size: 40px; opacity: .3; margin-bottom: 10px; display: block; }
.upload-zone input[type=file] { display: none; }

/* ---------- DOCUMENT LIST ---------- */
.doc-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.doc-item:last-child { border: none; }
.doc-item-left { display: flex; align-items: center; gap: 12px; }
.doc-icon { font-size: 24px; color: #e53e3e; }
.doc-name { font-weight: 600; color: var(--navy); }
.doc-meta { color: var(--muted); font-size: 12px; }

/* ---------- 2FA / OTP ---------- */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-digit {
    width: 52px; height: 60px;
    text-align: center; font-size: 24px; font-weight: 700;
    border: 2px solid var(--border); border-radius: 8px;
    color: var(--navy);
}
.otp-digit:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(68,172,188,.15); }

/* ============================================================
   SECTIONS THÉMATIQUES — DAS1 (Référentiel) · DAS3 (Bilans)
   Palette ISFB : bleu navy #1C355E, teal #44ACBC, blanc, gris clair
   Source : isfb.ch — design sobre, professionnel, cohérent
   ============================================================

   Les deux sections partagent la même palette navy/teal d'ISFB.
   Différenciation subtile : badge de section uniquement.
   Pas de beige, pas de couleurs chaudes — strict ISFB bleu/blanc.
   ──────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════
   COMMUN AUX DEUX SECTIONS — base propre navy/teal
   ════════════════════════════════════════════════════════════ */
body.section-referentiel,
body.section-bilan {
    background: #F2F4F8;  /* fond légèrement bleuté, sobre */
}

/* Navbar identique ISFB pour les deux sections */
body.section-referentiel .navbar,
body.section-bilan .navbar {
    background: #1C355E;
}
body.section-referentiel .navbar-menu a,
body.section-bilan .navbar-menu a {
    color: rgba(255,255,255,.82);
}
body.section-referentiel .navbar-menu a:hover,
body.section-referentiel .navbar-menu a.active,
body.section-bilan .navbar-menu a:hover,
body.section-bilan .navbar-menu a.active {
    background: rgba(68,172,188,.22);
    color: #fff;
}

/* Cards : fond blanc pur, bordure fine bleu-gris */
body.section-referentiel .card,
body.section-bilan .card {
    border-color: #DDE3ED;
    background: #fff;
}
body.section-referentiel .card-header,
body.section-bilan .card-header {
    background: #F6F8FB;
    border-color: #DDE3ED;
}

/* Fond page et table header */
body.section-referentiel table thead tr,
body.section-bilan table thead tr { background: #EEF2F8; }
body.section-referentiel table thead th,
body.section-bilan table thead th  { color: #1C355E; font-weight: 700; letter-spacing: .3px; }

/* Focus formulaire */
body.section-referentiel .form-control:focus,
body.section-bilan .form-control:focus {
    border-color: #44ACBC;
    box-shadow: 0 0 0 3px rgba(68,172,188,.15);
}

/* ════════════════════════════════════════════════════════════
   DAS1 — RÉFÉRENTIEL DES COMPÉTENCES
   Accent : teal #44ACBC (fraîcheur, savoir, compétences)
   ════════════════════════════════════════════════════════════ */
body.section-referentiel .section-badge {
    background: #44ACBC;
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 12px; border-radius: 20px; letter-spacing: .3px;
}
body.section-referentiel .card-header  { border-top: 3px solid #44ACBC; }
body.section-referentiel .card-header h2 i { color: #44ACBC; }
body.section-referentiel .page-header  { border-left: 4px solid #44ACBC; padding-left: 14px; }
body.section-referentiel .page-header h1 i { color: #44ACBC; }
body.section-referentiel .btn-primary        { background: #44ACBC; border-color: #44ACBC; color: #fff; }
body.section-referentiel .btn-primary:hover  { background: #2d8a9a; border-color: #2d8a9a; color: #fff; }
body.section-referentiel .btn-outline        { border-color: #44ACBC; color: #2d8a9a; background: transparent; }
body.section-referentiel .btn-outline:hover  { background: #44ACBC; color: #fff; }
body.section-referentiel a     { color: #1C355E; }
body.section-referentiel a:hover { color: #44ACBC; }

/* ════════════════════════════════════════════════════════════
   DAS3 — BILANS DE COMPÉTENCES
   Accent : navy profond #1C355E (sérieux, accompagnement)
   ════════════════════════════════════════════════════════════ */
body.section-bilan .section-badge {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.30);
    font-size: 11px; font-weight: 700;
    padding: 3px 12px; border-radius: 20px; letter-spacing: .3px;
}
/* Fine bande teal sous la navbar — distingue visuellement la section bilan */
body.section-bilan .navbar {
    border-bottom: 3px solid #44ACBC;
}
body.section-bilan .card-header  { border-top: 3px solid #1C355E; }
body.section-bilan .card-header h2 i { color: #1C355E; }
body.section-bilan .page-header  { border-left: 4px solid #1C355E; padding-left: 14px; }
body.section-bilan .page-header h1 i { color: #1C355E; }
body.section-bilan .btn-primary        { background: #1C355E; border-color: #1C355E; color: #fff; }
body.section-bilan .btn-primary:hover  { background: #142848; border-color: #142848; color: #fff; }
body.section-bilan .btn-outline        { border-color: #1C355E; color: #1C355E; background: transparent; }
body.section-bilan .btn-outline:hover  { background: #1C355E; color: #fff; }
body.section-bilan a     { color: #1C355E; }
body.section-bilan a:hover { color: #44ACBC; }

/* ---------- PROFIL ---------- */
.profil-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
}
@media(max-width:768px){ .profil-grid { grid-template-columns: 1fr; } }
.toggle-2fa { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--light-bg); border-radius: 8px; }
.toggle-2fa-label { flex: 1; }
.toggle-2fa-label strong { display: block; color: var(--navy); margin-bottom: 2px; }
.toggle-2fa-label small { color: var(--muted); }
