/* --- 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);
}

/* Cette première règle s'occupe de l'alignement du logo et du titre */
.site-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Cette nouvelle règle s'assure que le texte du titre garde son style d'origine */
.site-title h1 {
    font-size: 2.0rem;
    color: #002395;
    margin: 0; /* Important pour annuler la marge par défaut du H1 */
    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 --- */
.info-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-column {
    flex: 1;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--radius);
    padding: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    line-height: 1.5;
    cursor: pointer; /* Ajout pour indiquer la cliquabilité */
}

.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; }

@media (max-width: 700px) {
    .info-grid {
        flex-direction: column;
    }
}

/* --- MENU SELECTION (refonte du 17/05/2024) --- */
.choice-grid {
    display: grid;
    gap: 16px;
}

.choice-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.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-dark);
    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;
}

/* Actions dans la carte - DESIGN HARMONISÉ */
.card-actions {
    display: flex;
    gap: 12px;
}

.card-actions button {
    flex-grow: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
    border-style: solid;
    border-width: 1px; /* Bordure fine par défaut */
}

/* Différenciation subtile pour l'action primaire */
.card-actions button.primary-action {
    border-width: 2px; /* Bordure plus épaisse */
}

/* Au survol, les deux boutons se remplissent */
.card-actions button:hover {
    background-color: var(--primary);
    color: white;
}

/* Cas spécifique pour la carte qui est un lien simple (utilisé sur la page Ressources) */
.choice-card.is-link {
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.choice-card.is-link .card-title {
    color: var(--primary);
}

.choice-card.is-link::after {
    content: '→';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.choice-card.is-link:hover::after {
    opacity: 1;
    right: 20px;
}

/* --- 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; }

/* --- SECTION NOTES & LÉGALE --- */
.notes-section {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.note-card {
    flex: 1;
    min-width: 300px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    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; }
.note-en { background-color: #f0f9ff; border-color: #bae6fd; }
.card-nat { border-left: 5px solid #e74c3c; }

.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; }


/* --- AUTRES --- */
.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; }
.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; }
}

/* --- LIEN CHANGELOG SOUS STATUT --- */
.changelog-link-container {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.changelog-link-container a {
    font-size: 0.8rem;          /* Texte plus petit pour plus de discrétion */
    color: var(--text-light);   /* Utilisation de la couleur de texte secondaire (gris) */
    text-decoration: none;
    font-weight: 400;           /* Police légèrement moins épaisse */
}

.changelog-link-container a:hover {
    color: var(--text-main);    /* La couleur fonce au survol pour confirmer l'interaction */
    text-decoration: underline;
}
