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

:root {
    --primary-color: #3730a3;
    --accent-color: #6366f1;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
}

.header-theme {
    background: linear-gradient(135deg, #3730a3 0%, #6366f1 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(55, 48, 163, 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: #6366f1;
    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: #6366f1;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.06);
}

.step-number {
    background: #e0e7ff;
    color: #4f46e5;
    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: #3730a3;
}

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

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

.section-title { color: #3730a3; margin-bottom: 15px; border-bottom: 2px solid #6366f1; padding-bottom: 5px; }

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

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

.check-btn { background-color: #6366f1; 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: #4f46e5; }

/* --- 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-milan {
    background-color: #e0e7ff;
    color: #3730a3;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-roos {
    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-milan .speaker-name { color: #6366f1; }

.chat-roos .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: #6366f1;
    background-color: #eef2ff;
}

.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: #3730a3; font-size: 1.1rem; margin-bottom: 10px; background: #e0e7ff; 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: #3730a3; 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: #4f46e5; }

.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; font-weight: 600; }

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

.score-zone { margin-top: 15px; font-weight: 700; color: #3730a3; background: #e0e7ff; 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-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 20px 0;
}

.grammar-box {
    background-color: #f8fafc;
    border-left: 5px solid #6366f1;
    padding: 20px;
    border-radius: 0 16px 16px 0;
}

.grammar-box.orange {
    border-left-color: #f97316;
}

.grammar-box h3 {
    color: #3730a3;
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 800;
}

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

.example-sentence strong {
    color: #ef4444;
}

.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: #4f46e5;
    width: 160px;
    text-align: center;
    transition: all 0.2s;
}

.input-blank:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 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: #6366f1;
    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: #4f46e5;
}

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

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

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

.grammar-block.extra { border-left-color: #f97316; background: #fff7ed; }

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

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

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

/* --- Audio --- */

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

.transcript-zone { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-top: 15px; display: none; }

/* --- Projet final --- */

.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: #6366f1; }

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

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

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

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

.btn-action { background: #6366f1; 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: #4f46e5; }

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

.outfit-preview { background: #e0e7ff; border: 2px solid #c7d2fe; border-radius: 16px; padding: 20px; }

.outfit-preview h4 { color: #3730a3; margin-top: 0; }

.outfit-line { background: white; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 0.95rem; font-weight: 600; color: #334155; border-left: 4px solid #6366f1; }

.slider-group { margin-bottom: 15px; }

.slider-group label { display: block; font-weight: 700; color: #334155; margin-bottom: 5px; font-size: 0.9rem; }

.slider-group input[type="range"] { width: 100%; accent-color: #6366f1; }

@media (max-width: 768px) {
    .project-grid { 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;
    }
}

.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: #6366f1; background-color: #eef2ff; }
.match-item.selected { border-color: #6366f1; background-color: #6366f1; 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%; } }
