/* --- DESIGN SYSTEM MODERNE --- */
:root {
    --primary: #2563eb;
    --primary-dark: #000000;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-light: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
}

/* --- HEADER --- */
.site-header {
    text-align: center;
    margin-bottom: 40px;
    background-color: var(--bg-card);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.0rem;
    color: #002395;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.site-subtitle {
    font-size: 1.2rem;
    color: #555;
    margin-top: -10px;
    font-weight: 500;
}


/* --- LAYOUT --- */
main {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* --- ENCART INFO --- */
/* --- ENCARTS D'INFORMATION (GRILLE) --- */
.info-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-column {
    flex: 1; /* Les deux colonnes prennent la même largeur */
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    padding: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    line-height: 1.5;
}

.info-column h2 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-column p { margin: 0 0 10px 0; }
.info-column a { color: var(--primary); font-weight: 600; text-decoration: none; }
.info-column a:hover { text-decoration: underline; }

.info-note {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #cce0ff;
    font-size: 0.85em;
    opacity: 0.9;
}

/* Version Mobile : on empile les colonnes */
@media (max-width: 700px) {
    .info-grid {
        flex-direction: column;
    }
}

/* --- SECTION LÉGALE --- */
.legal-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8fafc; /* Gris très clair */
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-light);
    border: 1px solid #e2e8f0;
}

.legal-section h3 {
    font-size: 1rem;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 10px;
}

.legal-section a {
    color: var(--text-light);
    text-decoration: underline;
}

/* Footer link adjustment */
footer a.permanent-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}
footer a.permanent-link:hover { text-decoration: underline; }
.info-box h2 {
    font-size: 1rem;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-box p { margin: 0 0 12px 0; }
.info-box p:last-child { margin-bottom: 0; }
.info-box a { color: var(--primary); font-weight: 600; text-decoration: none; }
.info-box a:hover { text-decoration: underline; }

/* --- MENU SELECTION --- */
.choice-grid {
    display: grid;
    gap: 16px;
}

.choice-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.choice-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.card-info {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.choice-card::after {
    content: '';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;  /* Augmenté de 8px */
    height: 10px; /* Augmenté de 8px */
    border-top: 3px solid var(--primary);  /* Épaissi et couleur changée */
    border-right: 3px solid var(--primary); /* Épaissi et couleur changée */
    opacity: 0.8; /* Opacité augmentée */
    transition: right 0.2s ease;
}

.choice-card:hover::after { color: var(--primary); }

/* --- BADGE STATUT --- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 10px;
    max-width: 100%;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--success); }
.dot-orange { background: #f59e0b; }
.dot-red { background: var(--error); }

/* --- INTERFACE QUIZ --- */
#quiz-interface { display: none; }

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

.counter-badge {
    background: #e0e7ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.85rem;
}

.question-card {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.4;
}

.options-stack { display: flex; flex-direction: column; gap: 12px; }

.option-btn {
    width: 100%;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
}

.option-btn:hover { border-color: #cbd5e1; background: #f8fafc; }

.option-btn.correct { background: #dcfce7 !important; border-color: var(--success) !important; color: #064e3b; }
.option-btn.wrong { background: #fee2e2 !important; border-color: var(--error) !important; color: #7f1d1d; opacity: 0.7; }

.feedback-area {
    margin-top: 20px;
    padding: 16px;
    background: #f0f9ff;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    display: none;
    font-size: 0.95rem;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    display: none;
}
.btn-primary:active { background: var(--primary-dark); }

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
        }

footer {
    margin-top: auto;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
}
footer a { color: #64748b; }

.report-btn {
    display: inline-block;
    font-size: 0.85rem;
    color: #94a3b8; /* Gris discret */
    text-decoration: none;
    border-bottom: 1px dotted #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.report-btn:hover {
    color: var(--primary); /* Devient bleu au survol */
    border-color: var(--primary);
}

/* --- SECTION LÉGALE --- */
.legal-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f1f5f9;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-light);
    border: 1px solid #e2e8f0;
}

.legal-section h3 {
    font-size: 1rem;
    color: var(--text-main);
    margin-top: 0;
}

.legal-section a {
    color: var(--text-light);
    text-decoration: underline;
}

/* Ajustement du footer pour le lien permanent */
footer {
    background-color: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
}

footer a.permanent-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: block; /* Sur une ligne à part */
    margin-bottom: 10px;
}
footer a.permanent-link:hover {
    text-decoration: underline;
}

/* --- SECTION NOTES (Français / Anglais) --- */
.notes-section {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Permet le passage à la ligne sur mobile */
}

.note-card {
    flex: 1;
    min-width: 300px; /* Largeur minimum avant de passer à la ligne */
    background-color: #f8fafc; /* Gris très clair */
    border: 1px solid #e2e8f0;
    border-radius: var(--radius); /* Utilise la variable définie en haut du CSS */
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.note-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #334155;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.note-card p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

/* Style spécifique pour la note anglaise (fond bleu très pâle) */
.note-en {
    background-color: #f0f9ff;
    border-color: #bae6fd;
}

/* Style spécifique pour la carte Naturalisation */
.card-nat {
    border-left: 5px solid #e74c3c; /* Une petite touche rouge "Marianne" */
}

/* Ajustement speak button */
.speak-btn {
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer;
}

/* --- ECRAN DE RÉSULTATS --- */
.result-card {
    background: white;
    padding: 40px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.score-circle {
    width: 120px;
    height: 120px;
    background: var(--bg-page);
    border-radius: 50%;
    border: 5px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.result-msg {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* On change la couleur du cercle selon la réussite (sera géré par JS) */
.result-card.success .score-circle { border-color: var(--success); color: var(--success); }
.result-card.fail .score-circle { border-color: var(--error); color: var(--error); }

/* --- DASHBOARD STATUT --- */
.status-board {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    max-width: 600px;
    margin: 30px auto;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.header-left {
    font-size: 0.9rem;
    color: #666;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}
.badge.ok { background: #27ae60; }
.badge.warning { background: #f39c12; }
.badge.error { background: #c0392b; }

.status-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.status-item {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.stat-title {
    font-weight: bold;
    color: #002395;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.stat-date {
    font-size: 0.75rem;
    color: #888;
    margin-top: 3px;
}

@media (max-width: 500px) {
    .status-details-grid { grid-template-columns: 1fr; }
    .status-header { flex-direction: column; gap: 10px; }
}
