/* --- CONFIGURATION GÉNÉRALE --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6; /* Fond gris très clair */
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* --- EN-TÊTE --- */
header {
    text-align: center;
    margin-bottom: 30px;
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CONTENEUR PRINCIPAL --- */
main {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
}

h1 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    text-align: center;
}

.subtitle {
    color: #16a085; /* Vert/Bleu */
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 30px;
    font-weight: normal;
}

/* --- BOÎTE DE DESCRIPTION --- */
.description-box {
    background-color: #f8f9fa;
    border-left: 4px solid #16a085;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 1em;
    line-height: 1.6;
}

.description-box h3 { margin-top: 0; color: #2c3e50; }
.description-box ul { padding-left: 20px; margin-bottom: 0; }

/* --- LECTEUR VIDÉO --- */
#video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

video {
    width: 100%;
    display: block;
}

/* --- COUCHE D'INTERACTION --- */
#interaction-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(44, 62, 80, 0.95); /* Fond bleu foncé opaque */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

#interaction-layer.visible {
    opacity: 1;
    pointer-events: auto;
}

.question-content {
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 80%;
}

.question-text {
    font-size: 1.4em;
    margin-bottom: 25px;
    font-weight: 600;
}

/* --- BOUTONS DU QUIZ --- */
.quiz-btn {
    background-color: white;
    color: #2c3e50;
    border: none;
    padding: 12px 25px;
    margin: 8px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: block;
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-btn:hover { transform: scale(1.02); background-color: #ecf0f1; }
.btn-correct { background-color: #2ecc71 !important; color: white !important; }
.btn-wrong { background-color: #e74c3c !important; color: white !important; opacity: 0.8; }

/* --- NAVIGATION --- */
#chapters {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.chapter-btn {
    background-color: #2c3e50;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chapter-btn:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.8em;
    color: #95a5a6;
}