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

:root {
    --primary-color: #5b21b6;
    --accent-color: #8b5cf6;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
}

.header-theme {
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 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(91, 33, 182, 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: #8b5cf6;
    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;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.step-card:hover {
    transform: translateY(-3px);
    border-color: #8b5cf6;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.06);
}

.step-number {
    background: #f5f3ff;
    color: #7c3aed;
    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: #5b21b6;
}

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

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

.section-title { color: #5b21b6; margin-bottom: 15px; border-bottom: 2px solid #8b5cf6; padding-bottom: 5px; }

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

.quiz-option:hover { background: #f5f3ff; border-color: #c4b5fd; }

.check-btn { background-color: #8b5cf6; color: white; border: none; padding: 10px 20px; border-radius: 10px; cursor: pointer; font-weight: 700; margin-top: 15px; transition: background 0.2s; font-family: 'Plus Jakarta Sans', sans-serif; }

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

/* --- 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-fien {
    background-color: #f5f3ff;
    color: #5b21b6;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-jade {
    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-fien .speaker-name { color: #7c3aed; }

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

.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: #8b5cf6;
    background-color: #f5f3ff;
}

.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: #5b21b6; font-size: 1.1rem; margin-bottom: 10px; background: #f5f3ff; 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', sans-serif; }

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

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

.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', sans-serif; }

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

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

.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; font-family: 'Plus Jakarta Sans', sans-serif; }

.intruder-option:hover { background: #f5f3ff; border-color: #8b5cf6; }

.score-zone { margin-top: 15px; font-weight: 700; color: #5b21b6; background: #f5f3ff; 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: #f5f3ff; border-left: 6px solid #8b5cf6; padding: 20px; border-radius: 0 14px 14px 0; margin-bottom: 20px; }

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

.grammar-block h3 { color: #5b21b6; margin-top: 0; margin-bottom: 12px; font-weight: 800; }

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

.highlight-de { color: #38bdf8; font-weight: bold; }

.highlight-het { color: #f43f5e; font-weight: bold; }

.highlight-adj { color: #facc15; font-weight: bold; }

.example-sentence {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 8px 0;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.adj-table { width: 100%; border-collapse: collapse; margin: 15px 0; }

.adj-table th { background: #5b21b6; color: white; padding: 10px 12px; text-align: left; }

.adj-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; }

.adj-table tr:nth-child(even) { background: #f5f3ff; }

.adj-table .highlight { color: #7c3aed; font-weight: 800; }

.article-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }

.article-word { background: white; border: 2px solid #e2e8f0; padding: 10px 15px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #334155; transition: all 0.2s; }

.article-word:hover { border-color: #8b5cf6; background: #f5f3ff; }

.article-word.selected-de { background: #38bdf8; color: white; border-color: #38bdf8; }

.article-word.selected-het { background: #f43f5e; color: white; border-color: #f43f5e; }

.article-word.article-correct { background: #d1fae5; border-color: #10b981; color: #065f46; }

.article-word.article-wrong { background: #fee2e2; border-color: #ef4444; color: #991b1b; }

.de-btn, .het-btn { padding: 8px 18px; border: none; border-radius: 8px; font-weight: 800; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.95rem; }

.de-btn { background: #38bdf8; color: white; }

.het-btn { background: #f43f5e; color: white; }

.fill-exercise { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }

.exercise-line { font-size: 1.1rem; color: #334155; background: #f8fafc; padding: 15px; border-radius: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.input-blank { border: 2px solid #cbd5e1; border-radius: 6px; padding: 6px 10px; font-size: 1rem; font-family: inherit; font-weight: 700; color: #5b21b6; width: 140px; text-align: center; transition: all 0.2s; }

.input-blank:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }

.input-blank.correct { border-color: #22c55e; background-color: #dcfce7; color: #15803d; }

.input-blank.wrong { border-color: #ef4444; background-color: #fee2e2; color: #b91c1c; }

.validate-btn { background-color: #8b5cf6; color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 700; cursor: pointer; margin-top: 20px; transition: background 0.2s; font-family: 'Plus Jakarta Sans', sans-serif; }

.validate-btn:hover { background-color: #7c3aed; }

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

/* --- Texte de lecture --- */

.reading-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.reading-card h3 {
    color: #5b21b6;
    margin-top: 0;
    border-bottom: 2px solid #8b5cf6;
    padding-bottom: 8px;
}

.reading-card p {
    line-height: 1.8;
    color: #334155;
}

.reading-tag {
    display: inline-block;
    background: #f5f3ff;
    color: #7c3aed;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- Audio --- */

.transcript-toggle { background: #334155; color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 0.85rem; margin-top: 10px; font-family: 'Plus Jakarta Sans', sans-serif; }

.transcript-zone { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-top: 15px; line-height: 1.8; color: #334155; display: none; }

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

.input-group input, .input-group select { 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 { border-color: #8b5cf6; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.checkbox-item { display: flex; align-items: center; gap: 6px; background: #f5f3ff; border: 2px solid #ddd6fe; padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s; }

.checkbox-item:hover { border-color: #8b5cf6; }

.checkbox-item input[type="checkbox"] { accent-color: #8b5cf6; width: 16px; height: 16px; cursor: pointer; }

.checkbox-item label { cursor: pointer; font-weight: 600; font-size: 0.9rem; }

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

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

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

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

.btn-action:hover { background: #7c3aed; }

.preview-box {
    background: #f5f3ff;
    border: 2px solid #ddd6fe;
    border-radius: 16px;
    padding: 25px;
    line-height: 2;
    font-size: 1.05rem;
    color: #334155;
    min-height: 200px;
}

.preview-box .preview-tag {
    background: #8b5cf6;
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 12px;
}

.preview-highlight {
    color: #5b21b6;
    font-weight: 800;
}

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

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

.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', sans-serif; }

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

@media print {
    .main-content > a,
    .lesson-section:not(:last-of-type),
    .progress-container,
    .form-side,
    .print-btn { display: none !important; }
    html, body { margin: 0 !important; padding: 0 !important; background: white; }
}

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