/* ===================================
   FORMALEO - Styles
   =================================== */

:root {
    --bleu-nuit: #1e1b4b;
    --bleu-nuit-light: #312e81;
    --bleu-cerulean: #6366f1;
    --primary: #4338ca;
    --primary-light: #e0e7ff;
    --ocre-jaune: #f59e0b;
    --ocre-dark: #d97706;
    --white: #ffffff;
    --gris-light: #f5f7fa;
    --gris-border: #e0e4eb;
    --gris-text: #4a5568;
    --text-muted: #9ca3af;
    --vert: #2d7a3a;
    --vert-light: #e8f5e9;
    --rouge: #c0392b;
    --rouge-light: #fdecea;
    --orange: #e67e22;
    --orange-light: #fef3e2;
    --sidebar-width: 220px;
    --navbar-height: 60px;
    --shadow: 0 2px 8px rgba(30,27,75,0.12);
    --shadow-md: 0 4px 16px rgba(30,27,75,0.18);
    --radius: 10px;
    --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    background: var(--gris-light);
    color: var(--gris-text);
    font-size: 14px;
    line-height: 1.5;
}

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== LOGIN ===== */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bleu-nuit) 0%, var(--bleu-cerulean) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}

.login-logo {
    text-align: center;
    margin-bottom: 8px;
}

.logo {
    max-height: 70px;
    margin-bottom: 10px;
}

.brand-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--bleu-nuit);
    text-transform: uppercase;
}

.brand-title span { color: var(--bleu-cerulean); }

.login-subtitle {
    text-align: center;
    color: var(--gris-text);
    margin-bottom: 24px;
    font-size: 13px;
}

.login-tabs {
    display: flex;
    border-bottom: 2px solid var(--gris-border);
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--gris-text);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.login-tab.active {
    color: var(--bleu-cerulean);
    border-bottom-color: var(--bleu-cerulean);
}

.login-form { display: none; }
.login-form.active { display: block; }

.info-box {
    background: #e8f0fe;
    border-left: 4px solid var(--bleu-cerulean);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--bleu-nuit);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: var(--bleu-nuit);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gris-border);
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--gris-text);
    background: white;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--bleu-cerulean);
    box-shadow: 0 0 0 3px rgba(29,112,183,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 500px;
}

/* ===== BOUTONS ===== */
.btn-primary {
    background: var(--bleu-cerulean);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover { background: #1560a0; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: var(--gris-light);
    color: var(--bleu-nuit);
    border: 1.5px solid var(--gris-border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover { background: var(--gris-border); }

.btn-danger {
    background: var(--rouge);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-full { width: 100%; }

.btn-logout {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--bleu-nuit);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo { height: 32px; }

.nav-title {
    font-weight: 800;
    font-size: 16px;
    color: white;
    letter-spacing: 0.5px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-username {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
}

.nav-role-badge {
    background: var(--ocre-jaune);
    color: var(--bleu-nuit);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-page {
    display: none;
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.dashboard-page.active { display: flex; }

.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    background: white;
    border-right: 1px solid var(--gris-border);
    padding: 16px 0;
    flex-shrink: 0;
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    overflow-y: auto;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--gris-text);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-btn:hover { background: var(--gris-light); color: var(--bleu-nuit); }
.sidebar-btn.active {
    background: #e8f0fe;
    color: var(--bleu-cerulean);
    border-left-color: var(--bleu-cerulean);
}

.sidebar-btn .icon { font-size: 16px; }

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 24px;
    min-height: calc(100vh - var(--navbar-height));
}

.section-content { display: none; }
.section-content.active { display: block; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--bleu-nuit);
}

/* ===== CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gris-border);
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bleu-nuit);
    margin-bottom: 6px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--gris-text);
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-blue { background: #e8f0fe; color: var(--bleu-cerulean); }
.badge-green { background: var(--vert-light); color: var(--vert); }
.badge-red { background: var(--rouge-light); color: var(--rouge); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-gold { background: #fef9e7; color: var(--ocre-dark); }

.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.token-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ocre-jaune);
    color: var(--bleu-nuit);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ===== TABLES ===== */
.table-container { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th {
    background: var(--bleu-nuit);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background 0.15s;
}
th.sortable:hover {
    background: #1a2d5a;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gris-border);
    font-size: 13px;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gris-light); }

.score-cell {
    font-weight: 700;
    font-size: 14px;
}

.score-pass { color: var(--vert); }
.score-fail { color: var(--rouge); }

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    margin-left: auto;
    padding: 5px 14px;
    border: 1.5px solid var(--gris-border);
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    min-width: 230px;
    outline: none;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text-dark);
}
.search-input:focus {
    border-color: var(--bleu-cerulean);
    box-shadow: 0 0 0 3px rgba(30, 100, 200, 0.08);
}
.search-input::placeholder {
    color: #aab;
    font-weight: 400;
}

/* ===== CHECKBOX GROUP (habilitations stagiaire) ===== */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9ff;
    border: 1.5px solid var(--gris-border);
    border-radius: 8px;
    min-height: 44px;
    align-items: center;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: white;
    border: 1.5px solid var(--gris-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.checkbox-group label:hover {
    border-color: var(--bleu-cerulean);
    background: #eef3ff;
}
.checkbox-group input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--bleu-cerulean);
    cursor: pointer;
}
.checkbox-group label:has(input:checked) {
    border-color: var(--bleu-cerulean);
    background: #e8f0fb;
    color: var(--bleu-cerulean);
    font-weight: 600;
}

.filter-btn {
    padding: 6px 16px;
    border: 1.5px solid var(--gris-border);
    border-radius: 20px;
    background: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--bleu-cerulean);
    color: white;
    border-color: var(--bleu-cerulean);
}

/* ===== QUIZ PAGE ===== */
.quiz-wrapper {
    min-height: 100vh;
    background: var(--gris-light);
    display: flex;
    flex-direction: column;
    padding-top: var(--navbar-height);
}

.quiz-header-bar {
    background: white;
    padding: 16px 32px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.quiz-info h2 {
    font-size: 16px;
    color: var(--bleu-nuit);
    font-weight: 700;
}

.habilitation-badge {
    background: var(--bleu-cerulean);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.quiz-progress-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gris-text);
}

.progress-bar-container {
    width: 200px;
    height: 8px;
    background: var(--gris-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bleu-cerulean), var(--ocre-jaune));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quiz-body {
    flex: 1;
    padding: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.question-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    max-width: 700px;
    width: 100%;
    box-shadow: var(--shadow);
}

.question-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--bleu-nuit);
    margin-bottom: 24px;
    line-height: 1.5;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    padding: 14px 18px;
    border: 2px solid var(--gris-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.answer-option:hover {
    border-color: var(--bleu-cerulean);
    background: #e8f0fe;
}

.answer-option.selected {
    border-color: var(--bleu-cerulean);
    background: #e8f0fe;
    color: var(--bleu-nuit);
    font-weight: 700;
}

.answer-option .answer-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gris-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.answer-option.selected .answer-letter {
    background: var(--bleu-cerulean);
    color: white;
}

.quiz-footer {
    background: white;
    padding: 16px 32px;
    box-shadow: 0 -2px 8px rgba(16,44,104,0.08);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-submit {
    background: var(--vert);
}

.btn-submit:hover { background: #1e5c28; }

/* ===== RESULTS PAGE ===== */
.results-wrapper {
    min-height: 100vh;
    padding-top: var(--navbar-height);
    background: var(--gris-light);
}

.results-header {
    background: var(--bleu-nuit);
    padding: 24px 32px;
    color: white;
}

.results-header h2 { font-size: 20px; }
.results-header p { font-size: 14px; opacity: 0.8; margin-top: 4px; }

.score-display {
    background: white;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 6px solid var(--gris-border);
}

.score-circle.pass { border-color: var(--vert); }
.score-circle.fail { border-color: var(--rouge); }

.score-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.score-label { font-size: 14px; }

.score-circle.pass .score-value { color: var(--vert); }
.score-circle.fail .score-value { color: var(--rouge); }

.score-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--bleu-nuit);
    margin-bottom: 6px;
}

.score-status {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.score-status.pass { color: var(--vert); }
.score-status.fail { color: var(--rouge); }

.results-detail {
    padding: 24px 32px;
}

.result-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--gris-border);
}

.result-item.correct { border-left-color: var(--vert); }
.result-item.incorrect { border-left-color: var(--rouge); }

.result-question {
    font-weight: 700;
    color: var(--bleu-nuit);
    margin-bottom: 8px;
    font-size: 14px;
}

.result-answer {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-answer.user-correct { background: var(--vert-light); color: var(--vert); }
.result-answer.user-wrong { background: var(--rouge-light); color: var(--rouge); }
.result-answer.correct-answer { background: #e8f5e9; color: var(--vert); font-weight: 600; }

.result-explanation {
    font-size: 12px;
    color: var(--bleu-cerulean);
    margin-top: 6px;
    font-style: italic;
}

/* ===== MODALES ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,20,50,0.5);
    z-index: 200;
}

.modal-overlay.active { display: block; }

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 300;
    box-shadow: var(--shadow-md);
}

.modal.active { display: block; }
.modal-large { max-width: 600px; }
.modal-xlarge { max-width: 900px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gris-border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--bleu-nuit);
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gris-text);
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close:hover { background: var(--gris-light); }

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gris-border);
}

/* ===== QUESTIONS MANAGER ===== */
.questions-manager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.questions-list-panel, .question-form-panel {
    max-height: 500px;
    overflow-y: auto;
}

.questions-list-panel h4, .question-form-panel h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bleu-nuit);
    margin-bottom: 12px;
    font-weight: 700;
}

.question-item {
    background: var(--gris-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.question-item-text { flex: 1; font-weight: 500; }

.question-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-icon:hover { background: var(--gris-border); }

.answers-inputs { display: flex; flex-direction: column; gap: 8px; }

.answer-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.answer-input-row input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid var(--gris-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
}

/* ===== TOKEN DISPLAY ===== */
.token-display {
    text-align: center;
    padding: 20px;
}

.token-code {
    font-size: 36px;
    font-weight: 800;
    color: var(--bleu-nuit);
    letter-spacing: 4px;
    background: var(--gris-light);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 12px 0;
    font-family: 'Courier New', monospace;
}

.token-password {
    font-size: 24px;
    font-weight: 700;
    color: var(--bleu-cerulean);
    margin-top: 4px;
}

.token-info {
    font-size: 12px;
    color: var(--gris-text);
    margin-top: 12px;
}

/* ===== SESSION DETAIL ===== */
.session-detail-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.session-trainee-row {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--gris-border);
    gap: 12px;
}

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

.trainee-name { flex: 1; font-weight: 600; }

.status-chip {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-pending { background: var(--orange-light); color: var(--orange); }
.status-pass { background: var(--vert-light); color: var(--vert); }
.status-fail { background: var(--rouge-light); color: var(--rouge); }

/* ===== LOADING / EMPTY ===== */
.loading-state, .empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gris-text);
}

.loading-state::before {
    content: '⏳';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

.empty-state::before {
    content: '📭';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bleu-nuit);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 300px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--vert); }
.toast.error { background: var(--rouge); }

/* ===== ERROR MSG ===== */
.error-msg {
    color: var(--rouge);
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    min-height: 20px;
}

/* ===== EXPIRY ALERT ===== */
.expiry-list { display: flex; flex-direction: column; gap: 8px; }

.expiry-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--orange-light);
    border-left: 4px solid var(--orange);
    font-size: 13px;
}

.expiry-item.urgent {
    background: var(--rouge-light);
    border-left-color: var(--rouge);
}

/* ===== INVITE LINK ===== */
.invite-link-box {
    background: var(--gris-light);
    border: 1.5px dashed var(--bleu-cerulean);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}

.user-no-password {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange-light);
    color: var(--orange);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ===== RÉPONSES DYNAMIQUES ===== */
.answer-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.answer-field-row input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vert);
    flex-shrink: 0;
    cursor: pointer;
}
.answer-field-row .answer-text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--gris-border);
    border-radius: 6px;
    font-size: 14px;
}
.answer-field-row .answer-text-input:focus {
    border-color: var(--bleu-cerulean);
    outline: none;
}
.answer-field-row .btn-remove-answer {
    background: none;
    border: none;
    color: var(--rouge, #e74c3c);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}
.answer-field-row .btn-remove-answer:hover { background: #fdecea; }

/* ===== LIGNES TABLEAU CLIQUABLES ===== */
.table-hover tbody tr.clickable-row {
    cursor: pointer;
    transition: background 0.15s;
}
.table-hover tbody tr.clickable-row:hover {
    background: var(--bleu-light, #e8f4fd);
}

/* ===== ÉVALUATION PRATIQUE ===== */
.eval-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--gris-border);
    margin-bottom: 8px;
}
.eval-legend-item {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 2px solid;
}
.eval-legend-item.rating-ts { color: #22a34a; border-color: #22a34a; background: #f0faf4; }
.eval-legend-item.rating-s  { color: #1a7fc1; border-color: #1a7fc1; background: #f0f7ff; }
.eval-legend-item.rating-ps { color: #e07b00; border-color: #e07b00; background: #fff8f0; }
.eval-legend-item.rating-i  { color: #c62828; border-color: #c62828; background: #fff0f0; }

.eval-grid-rows { display: flex; flex-direction: column; }
.eval-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid var(--gris-border);
    transition: background 0.12s;
}
.eval-row:hover { background: var(--gris-light); }
.eval-criterion-text { flex: 1; font-size: 14px; }

.rating-group { display: flex; gap: 6px; flex-shrink: 0; }
.rating-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.15s;
    white-space: nowrap;
    user-select: none;
}
.rating-btn input[type="radio"] { display: none; }
.rating-btn.rating-ts { color: #22a34a; border-color: #22a34a; }
.rating-btn.rating-s  { color: #1a7fc1; border-color: #1a7fc1; }
.rating-btn.rating-ps { color: #e07b00; border-color: #e07b00; }
.rating-btn.rating-i  { color: #c62828; border-color: #c62828; }
.rating-btn.rating-ts:has(input:checked) { background: #22a34a; color: white; }
.rating-btn.rating-s:has(input:checked)  { background: #1a7fc1; color: white; }
.rating-btn.rating-ps:has(input:checked) { background: #e07b00; color: white; }
.rating-btn.rating-i:has(input:checked)  { background: #c62828; color: white; }

.eval-preview { min-height: 40px; }
.eval-result {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}
.eval-result.pass { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.eval-result.fail { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-btn span:not(.icon) { display: none; }
    .main-content { margin-left: 60px; }
    .questions-manager { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .quiz-header-bar { flex-direction: column; align-items: flex-start; }
    .score-display { flex-direction: column; align-items: center; text-align: center; }
}
