@import url("thema-base.css");

:root {
    --primary-color: #b91c1c;
    --accent-color: #ef4444;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
}

.header-theme {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 10px 25px rgba(185, 28, 28, 0.1);
    position: relative;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.theme-badge {
    background: #ef4444;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 15px;
}

.header-theme p {
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

.step-card:hover {
    transform: translateY(-3px);
    border-color: #ef4444;
    box-shadow: 0 10px 25px rgba(239,68,68,0.06);
}

.step-number {
    background: #fef2f2;
    color: #dc2626;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #b91c1c;
}

.arrow-icon {
    color: #ef4444;
    font-weight: 800;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

/* PAGES STAP (t5-stap*.html) */

.section-title { color: #b91c1c; margin-bottom: 15px; border-bottom: 2px solid #ef4444; padding-bottom: 5px; }

.quiz-question { font-weight: 700; color: #b91c1c; margin-bottom: 12px; margin-top: 15px; }

.quiz-option:hover { background: #f1f5f9; border-color: #cbd5e1; }

.check-btn { background-color: #ef4444; color: white; border: none; padding: 10px 20px; border-radius: 10px; cursor: pointer; font-weight: 700; margin-top: 15px; transition: background 0.2s; }

.check-btn:hover { background-color: #dc2626; }

/* --- Bulles de Dialogue (Stap 1) --- */

.dialogue-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
}

.chat-bubble {
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 75%;
    line-height: 1.5;
    position: relative;
    font-size: 1.05rem;
}

.chat-axel {
    background-color: #fef2f2;
    color: #7f1d1d;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-sara {
    background-color: #f0fdf4;
    color: #166534;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.speaker-name {
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
    letter-spacing: 0.5px;
}

.chat-axel .speaker-name { color: #ef4444; }

.chat-sara .speaker-name { color: #22c55e; }

/* --- Zone de Questions de repérage --- */

.quiz-box {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-top: 25px;
}

.quiz-question {
    margin-bottom: 20px;
}

.quiz-question p {
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 10px;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: #ef4444;
    background-color: #fff5f5;
}

.option-btn.correct {
    background-color: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.option-btn.wrong {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* --- Vocabulaire interactif --- */

.vocab-category h3 { color: #b91c1c; font-size: 1.1rem; margin-bottom: 10px; background: #fef2f2; padding: 6px 12px; border-radius: 8px; display: inline-block; }

.vocab-btn { background-color: #1e293b; color: white; border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 0.85rem; font-family: 'Plus Jakarta Sans'; }

.vocab-table tr:hover { background-color: #f8fafc; }

.exercise-box h4 { color: #b91c1c; font-size: 1.1rem; margin-bottom: 10px; }

/* --- Exercice association côte-à-côte (clic pour relier) --- */
.matching-container { display: flex; justify-content: space-between; gap: 40px; margin-top: 20px; }
.matching-column { display: flex; flex-direction: column; gap: 12px; width: 45%; }
.match-item { background: white; border: 2px solid #e2e8f0; padding: 15px; border-radius: 12px; text-align: center; cursor: pointer; font-weight: 700; color: #475569; transition: all 0.2s; user-select: none; }
.match-item:hover { border-color: #ef4444; background-color: #fef2f2; }
.match-item.selected { border-color: #ef4444; background-color: #ef4444; color: white; }
.match-item.matched { border-color: #10b981; background-color: #dcfce7; color: #166534; cursor: default; pointer-events: none; }
.match-item.wrong-flash { background-color: #fee2e2; border-color: #ef4444; }
@media (max-width: 600px) { .matching-container { flex-direction: column; gap: 20px; } .matching-column { width: 100%; } }

/* --- Exercice association en ligne (select) --- */
.match-container { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }

.match-row { display: flex; align-items: center; gap: 15px; }

.match-word { background: white; border: 2px solid #cbd5e1; padding: 8px 12px; border-radius: 8px; width: 45%; font-weight: 700; }

.match-select { padding: 8px; border-radius: 8px; border: 2px solid #cbd5e1; width: 45%; font-family: 'Plus Jakarta Sans'; }

.fill-input { padding: 6px 10px; border: 2px solid #cbd5e1; border-radius: 6px; font-family: 'Plus Jakarta Sans'; font-weight: 700; text-align: center; color: #b91c1c; }

.intruder-group { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }

.intruder-label { font-weight: 700; min-width: 140px; color: #475569; }

.intruder-option { background: white; border: 2px solid #cbd5e1; padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: 0.2s; }

.intruder-option:hover { background: #fff5f5; }

.score-zone { margin-top: 15px; font-weight: 700; color: #b91c1c; background: #fef2f2; padding: 10px; border-radius: 8px; display: inline-block; }

/* --- Grammaire --- */

.hidden-text { background-color: #1e293b; color: #1e293b; border-radius: 4px; cursor: pointer; user-select: none; padding: 2px 6px; transition: background 0.2s; }

.hidden-text.revealed { background-color: transparent; color: inherit; }

.grammar-block { background: #fef2f2; border-left: 6px solid #ef4444; padding: 20px; border-radius: 0 14px 14px 0; margin-bottom: 20px; }

.grammar-block.variant { border-left-color: #facc15; background: #fefce8; }

.syntax-box { font-family: monospace; font-size: 1.1rem; background: #1e293b; color: white; padding: 10px 15px; border-radius: 8px; display: inline-block; margin: 10px 0; }

.compl { color: #fb923c; font-weight: bold; }

.reorder-container { background: #f1f5f9; padding: 20px; border-radius: 12px; margin-bottom: 20px; border: 1px solid #e2e8f0; }

.word-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; min-height: 45px; padding: 10px; background: white; border-radius: 8px; border: 2px dashed #cbd5e1; }

.word-card { background: #1e293b; color: white; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 700; user-select: none; transition: background 0.2s; }

.word-card:hover { background: #334155; }

.word-card.used { opacity: 0.4; pointer-events: none; }

.answer-zone { min-height: 45px; padding: 10px; background: #e2e8f0; border-radius: 8px; border: 2px solid #cbd5e1; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-weight: 700; color: #1e293b; }

.btn-small { background: #64748b; color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: bold; margin-right: 5px; }

.btn-small:hover { background: #475569; }

.final-score-zone { background: #fef2f2; color: #b91c1c; padding: 15px; border-radius: 10px; font-weight: bold; text-align: center; margin-top: 20px; display: none; }

/* --- Audio --- */

/* --- Transcript caché --- */

.transcript-toggle { background: #fef2f2; border: 2px solid #fecaca; padding: 15px; border-radius: 12px; margin-top: 15px; }

.transcript-toggle summary { font-weight: 700; color: #b91c1c; cursor: pointer; }

.transcript-text { margin-top: 10px; font-style: italic; line-height: 1.7; color: #374151; }

/* --- Lezen: Menu & Recept --- */

.text-reading { background: #fff; border: 2px solid #fecaca; border-radius: 16px; padding: 25px; margin-bottom: 20px; }

.text-reading h3 { color: #b91c1c; border-bottom: 2px solid #fecaca; padding-bottom: 8px; margin-bottom: 15px; }

.menu-section { margin-bottom: 20px; }

.menu-section h4 { color: #ef4444; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

.menu-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dotted #e2e8f0; }

.menu-item span:last-child { font-weight: 700; color: #b91c1c; }

.recept-ingredienten { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 15px; }

.recept-ingredienten li { background: #fef2f2; padding: 6px 10px; border-radius: 6px; font-size: 0.9rem; }

.recept-stap { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }

.stap-num { background: #ef4444; color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; font-size: 0.85rem; }

/* --- Drag & Drop --- */

.drag-zone { min-height: 50px; border: 2px dashed #fecaca; border-radius: 10px; padding: 10px; background: #fef2f2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.drag-item { background: #1e293b; color: white; padding: 8px 14px; border-radius: 8px; cursor: grab; font-weight: 600; user-select: none; font-size: 0.9rem; }

.drag-item:active { cursor: grabbing; }

.drag-item.placed { background: #059669; }

.drop-slot { border: 2px dashed #cbd5e1; border-radius: 8px; padding: 8px 12px; min-width: 200px; min-height: 40px; background: white; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.drop-slot.drag-over { background: #fff5f5; border-color: #ef4444; }

/* --- Projet final (Stap 6) --- */

.input-group input, .input-group select, .input-group textarea { width: 100%; padding: 10px; border: 2px solid #e2e8f0; border-radius: 8px; font-family: inherit; font-size: 0.95rem; outline: none; transition: border-color 0.2s; box-sizing: border-box; }

.input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: #ef4444; }

.input-group textarea { resize: vertical; min-height: 70px; }

.progress-bar { width: 0%; height: 100%; background: #ef4444; transition: width 0.3s ease; }

.oral-zone { background: #fef2f2; border: 2px solid #fecaca; padding: 20px; border-radius: 12px; margin-top: 25px; }

.timer-display { font-size: 2.5rem; font-weight: 800; color: #b91c1c; font-family: monospace; margin: 10px 0; }

.btn-action { background: #ef4444; color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; font-family: 'Plus Jakarta Sans'; }

.btn-action:hover { background: #dc2626; }

.print-btn { background: #10b981; color: white; border: none; padding: 12px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; width: 100%; margin-top: 15px; font-family: 'Plus Jakarta Sans'; }

.add-btn { background: #fef2f2; color: #b91c1c; border: 2px solid #fecaca; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 700; font-family: 'Plus Jakarta Sans'; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }

.add-btn:hover { background: #ef4444; color: white; border-color: #ef4444; }

.dynamic-item { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }

.dynamic-item input, .dynamic-item textarea { flex: 1; }

.remove-btn { background: #fee2e2; color: #ef4444; border: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-weight: 800; font-size: 1rem; flex-shrink: 0; }

.remove-btn:hover { background: #ef4444; color: white; }

.recept-preview { background: white; border: 2px solid #fecaca; border-radius: 16px; padding: 25px; }

.recept-preview h2 { color: #b91c1c; font-size: 1.8rem; margin-bottom: 5px; }

.recept-preview .meta { color: #64748b; font-size: 0.9rem; margin-bottom: 20px; }

.recept-preview h4 { color: #ef4444; border-bottom: 1px solid #fecaca; padding-bottom: 4px; margin-bottom: 10px; }

.recept-preview ul { padding-left: 20px; }

.recept-preview li { margin-bottom: 6px; color: #374151; }

.recept-preview ol { padding-left: 20px; }

.recept-preview ol li { margin-bottom: 10px; line-height: 1.5; color: #374151; }

/* --- Matching classement --- */

.sortable-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }

.sort-category { border: 2px solid #e2e8f0; border-radius: 12px; padding: 15px; min-height: 80px; }

.sort-category h5 { margin: 0 0 10px 0; font-weight: 800; color: #b91c1c; text-align: center; background: #fef2f2; padding: 5px; border-radius: 6px; }

.food-items-pool { display: flex; flex-wrap: wrap; gap: 8px; padding: 15px; background: #f8fafc; border-radius: 10px; border: 2px dashed #cbd5e1; margin-bottom: 15px; }

.food-chip { background: #1e293b; color: white; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.9rem; user-select: none; transition: background 0.2s; }

.food-chip:hover { background: #ef4444; }

.food-chip.selected { background: #ef4444; }

.sort-drop { min-height: 40px; display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; }

/* --- Exercice d'association quantité-produit --- */

.assoc-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }

.assoc-label { font-weight: 700; background: #fef2f2; padding: 6px 12px; border-radius: 8px; color: #b91c1c; white-space: nowrap; }

.assoc-select { padding: 8px; border: 2px solid #e2e8f0; border-radius: 8px; font-family: 'Plus Jakarta Sans'; font-weight: 600; }

@media (max-width: 768px) {
    .project-grid { grid-template-columns: 1fr; }
    .sortable-container { grid-template-columns: 1fr; }
    .recept-ingredienten { grid-template-columns: 1fr; }
}

@media print {
    .main-content > a,
    .lesson-section:nth-of-type(2),
    .progress-container,
    .form-side,
    .print-btn,
    h2.section-title,
    .lesson-section > p,
    h3 { display: none !important; }

    html, body { height: 100%; margin: 0 !important; padding: 0 !important; background: white; }

    .main-content, .lesson-section, .project-grid, .preview-side {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .preview-side {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100vw;
        min-height: 100vh;
    }
}
