/* ========================================
   Français Facile - Styles principaux
   Interface enfant-friendly
   ======================================== */

:root {
    --bleu-clair: #4FC3F7;
    --bleu: #2196F3;
    --vert: #66BB6A;
    --vert-clair: #A5D6A7;
    --jaune: #FFD54F;
    --orange: #FFB74D;
    --rouge-doux: #EF9A9A;
    --violet: #CE93D8;
    --rose: #F48FB1;
    --blanc: #FFFFFF;
    --gris-clair: #F5F5F5;
    --gris: #E0E0E0;
    --texte: #37474F;
    --texte-clair: #78909C;
    --ombre: 0 4px 15px rgba(0, 0, 0, 0.1);
    --ombre-forte: 0 8px 25px rgba(0, 0, 0, 0.15);
    --radius: 20px;
    --radius-petit: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #E3F2FD 0%, #E8F5E9 50%, #FFF3E0 100%);
    min-height: 100vh;
    color: var(--texte);
    overflow-x: hidden;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ========================================
   BOUTONS GÉNÉRAUX
   ======================================== */

.btn-principal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    font-size: 1.4rem;
    font-family: inherit;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-clair) 100%);
    box-shadow: var(--ombre);
}

.btn-principal:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--ombre-forte);
}

.btn-principal:active {
    transform: translateY(0) scale(0.98);
}

.btn-petit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    border: 2px solid var(--gris);
    border-radius: 30px;
    cursor: pointer;
    background: white;
    color: var(--texte);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-petit:hover {
    background: var(--gris-clair);
    transform: scale(1.05);
}

.btn-retour {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 1.5rem;
    text-decoration: none;
    background: white;
    border-radius: 50px;
    box-shadow: var(--ombre);
    transition: all 0.2s ease;
}

.btn-retour:hover {
    transform: scale(1.1);
    box-shadow: var(--ombre-forte);
}

.btn-ecouter, .btn-ecouter-petit, .btn-ecouter-grand {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 5px;
}

.btn-ecouter { font-size: 1.5rem; }
.btn-ecouter-petit { font-size: 1.2rem; }
.btn-ecouter-grand { font-size: 2rem; }

.btn-ecouter:hover, .btn-ecouter-petit:hover, .btn-ecouter-grand:hover {
    transform: scale(1.3);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ========================================
   PAGE ACCUEIL
   ======================================== */

.page-accueil {
    text-align: center;
    padding: 30px 0;
}

.accueil-header {
    margin-bottom: 40px;
}

.titre-principal {
    font-size: 2.5rem;
    color: var(--texte);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1.3;
}

.sous-titre {
    font-size: 1.3rem;
    color: var(--texte-clair);
}

.eleves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.eleve-carte {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    text-decoration: none;
    color: var(--texte);
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid transparent;
}

.eleve-carte:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--ombre-forte);
    border-color: var(--bleu-clair);
}

.carte-nouvelle {
    border: 3px dashed var(--gris);
    background: var(--gris-clair);
}

.carte-nouvelle:hover {
    border-color: var(--vert);
    background: white;
}

.avatar-grand {
    font-size: 5rem;
    margin-bottom: 10px;
    line-height: 1;
}

.avatar-moyen {
    font-size: 3.5rem;
    line-height: 1;
}

.avatar-petit {
    font-size: 2rem;
    line-height: 1;
}

.eleve-prenom {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.eleve-niveau-badge {
    font-size: 1rem;
    color: var(--texte-clair);
    background: var(--gris-clair);
    padding: 5px 15px;
    border-radius: 20px;
}

.etoile {
    font-size: 1rem;
}

.accueil-footer {
    margin-top: 20px;
}

.info-text {
    font-size: 1rem;
    color: var(--texte-clair);
}

/* ========================================
   PAGE NOUVEAU
   ======================================== */

.page-nouveau {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.page-nouveau .btn-retour {
    margin-bottom: 20px;
}

.page-nouveau .titre-principal {
    text-align: center;
    margin-bottom: 30px;
}

.erreur-message {
    background: var(--rouge-doux);
    color: #C62828;
    padding: 15px 25px;
    border-radius: var(--radius-petit);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.form-nouveau {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
}

.form-section {
    margin-bottom: 30px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    cursor: pointer;
    color: var(--texte);
}

.avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 10px;
}

.avatar-choix {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-radio {
    display: none;
}

.avatar-emoji {
    font-size: 3rem;
    padding: 10px;
    border-radius: var(--radius-petit);
    border: 3px solid transparent;
    transition: all 0.2s ease;
    background: var(--gris-clair);
}

.avatar-radio:checked + .avatar-emoji,
.avatar-choix.selected .avatar-emoji {
    border-color: var(--bleu);
    background: #E3F2FD;
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
}

.avatar-emoji:hover {
    transform: scale(1.2);
    background: #E3F2FD;
}

.input-prenom {
    width: 100%;
    padding: 18px 25px;
    font-size: 1.8rem;
    font-family: inherit;
    border: 3px solid var(--gris);
    border-radius: var(--radius-petit);
    outline: none;
    transition: border-color 0.3s;
    text-align: center;
}

.input-prenom:focus {
    border-color: var(--bleu);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.2);
}

.aide-texte {
    text-align: center;
    color: var(--texte-clair);
    margin-top: 10px;
    font-size: 1.1rem;
}

.btn-creer {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--vert) 0%, #81C784 100%);
}

/* ========================================
   PAGE TABLEAU DE BORD
   ======================================== */

.page-tableau {
    padding: 10px 0;
}

.tableau-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
}

.eleve-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.eleve-nom-grand {
    font-size: 1.8rem;
    color: var(--texte);
}

.etoiles-total {
    font-size: 1.1rem;
    color: var(--texte-clair);
}

.niveau-actuel-banner {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--violet) 100%);
    color: white;
    padding: 25px 30px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--ombre);
}

.niveau-actuel-texte {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.btn-commencer {
    font-size: 1.6rem;
    padding: 20px 50px;
    background: linear-gradient(135deg, var(--vert) 0%, #81C784 100%);
}

.section-titre {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 25px;
    color: var(--texte);
    cursor: pointer;
}

.chemin-niveaux {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 700px;
    margin: 0 auto;
}

.niveau-etape {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius-petit);
    box-shadow: var(--ombre);
    transition: all 0.3s ease;
    position: relative;
    border-left: 5px solid var(--gris);
}

.niveau-etape.actuel {
    border-left-color: var(--bleu);
    background: #E3F2FD;
    transform: scale(1.02);
}

.niveau-etape.complete {
    border-left-color: var(--vert);
    background: #E8F5E9;
}

.niveau-etape.verrouille {
    opacity: 0.5;
    border-left-color: var(--gris);
}

.niveau-icone-container {
    position: relative;
    min-width: 60px;
    text-align: center;
}

.niveau-icone {
    font-size: 2.5rem;
}

.niveau-numero {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--texte-clair);
}

.niveau-check, .niveau-lock {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1.2rem;
}

.niveau-details {
    flex: 1;
}

.niveau-titre {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.niveau-progression {
    display: flex;
    align-items: center;
    gap: 10px;
}

.barre-progression {
    flex: 1;
    height: 12px;
    background: var(--gris);
    border-radius: 10px;
    overflow: hidden;
}

.barre-remplie {
    height: 100%;
    background: linear-gradient(90deg, var(--vert) 0%, var(--jaune) 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progression-texte {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--texte-clair);
    white-space: nowrap;
}

.btn-reviser {
    margin-top: 8px;
    font-size: 0.9rem;
}

.niveau-verrouille-texte {
    font-size: 0.9rem;
    color: var(--texte-clair);
    font-style: italic;
}

.chemin-connecteur {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gris);
    margin: -5px 0;
    padding-left: 30px;
}

.connecteur-ok {
    color: var(--vert);
}

/* ========================================
   PAGE EXERCICE
   ======================================== */

.page-exercice {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
}

.exercice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 18px;
    border-radius: var(--radius-petit);
    box-shadow: var(--ombre);
    margin-bottom: 10px;
}

.exercice-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.niveau-badge {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--bleu-clair);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
}

.niveau-nom-badge {
    font-size: 1rem;
    color: var(--texte-clair);
}

.exercice-compteur {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--texte);
    background: var(--gris-clair);
    padding: 5px 15px;
    border-radius: 20px;
}

.exercice-score-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.score-display {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

.barre-session {
    flex: 1;
    height: 10px;
    background: var(--gris);
    border-radius: 10px;
    overflow: hidden;
}

.barre-session-remplie {
    height: 100%;
    background: linear-gradient(90deg, var(--bleu-clair) 0%, var(--bleu) 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.exercice-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    padding: 25px;
    position: relative;
    min-height: 400px;
}

/* Chargement */
.chargement {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 20px;
}

.chargement p {
    font-size: 1.3rem;
    color: var(--texte-clair);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--gris);
    border-top-color: var(--bleu);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Question */
.exercice-contenu {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.question-zone {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%);
    border-radius: var(--radius-petit);
}

.btn-ecouter-question {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    padding: 5px;
}

.btn-ecouter-question:hover {
    transform: scale(1.3);
}

.question-texte {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--texte);
    flex: 1;
}

/* Options QCM */
.options-zone {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: auto;
}

.option-btn {
    padding: 20px 25px;
    font-size: 1.4rem;
    font-family: inherit;
    font-weight: 700;
    border: 3px solid var(--gris);
    border-radius: var(--radius-petit);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--texte);
    text-align: center;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn:hover:not(.disabled) {
    border-color: var(--bleu);
    background: #E3F2FD;
    transform: scale(1.05);
    box-shadow: var(--ombre);
}

.option-btn.selectionnee {
    border-color: var(--bleu);
    background: #BBDEFB;
}

.option-btn.disabled {
    opacity: 0.6;
    cursor: default;
}

/* Zone écriture */
.ecriture-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

.input-reponse {
    width: 100%;
    max-width: 500px;
    padding: 18px 25px;
    font-size: 1.8rem;
    font-family: inherit;
    text-align: center;
    border: 3px solid var(--gris);
    border-radius: var(--radius-petit);
    outline: none;
    transition: border-color 0.3s;
}

.input-reponse:focus {
    border-color: var(--bleu);
}

.btn-valider {
    background: linear-gradient(135deg, var(--vert) 0%, #81C784 100%);
}

/* Zone ordonner */
.ordonner-zone {
    margin-top: auto;
}

.mots-melanges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.mot-btn {
    padding: 12px 22px;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: 700;
    border: 3px solid var(--bleu-clair);
    border-radius: var(--radius-petit);
    background: #E3F2FD;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--texte);
}

.mot-btn:hover:not(.utilise) {
    background: var(--bleu-clair);
    color: white;
    transform: scale(1.08);
}

.mot-btn.utilise {
    opacity: 0.3;
    cursor: default;
    transform: scale(0.95);
}

.phrase-construite {
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: var(--gris-clair);
    border-radius: var(--radius-petit);
    border: 2px dashed var(--gris);
    margin-bottom: 15px;
}

.placeholder-phrase {
    color: var(--texte-clair);
    font-style: italic;
}

.mot-place {
    padding: 8px 16px;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--bleu);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mot-place:hover {
    background: var(--rouge-doux);
    transform: scale(0.95);
}

.ordonner-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Feedback */
.feedback-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-petit);
    animation: fadeIn 0.5s ease;
}

.feedback-zone.correct {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

.feedback-zone.incorrect {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
}

.feedback-icone {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: bounce 0.6s ease;
}

.feedback-icone.correct {
    animation: bounce 0.6s ease, celebrer 1s ease 0.6s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes celebrer {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.feedback-texte {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feedback-texte.correct {
    color: #2E7D32;
}

.feedback-texte.incorrect {
    color: #E65100;
}

.feedback-explication {
    font-size: 1.2rem;
    color: var(--texte);
    margin-bottom: 10px;
    max-width: 500px;
}

.feedback-encouragement {
    font-size: 1.1rem;
    color: var(--texte-clair);
    font-style: italic;
    margin-bottom: 20px;
    max-width: 500px;
}

.feedback-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-suivant {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--violet) 100%);
    font-size: 1.3rem;
}

.btn-aide {
    border-color: var(--orange);
    color: var(--orange);
}

/* Aide */
.aide-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    z-index: 10;
    padding: 30px;
}

.aide-contenu {
    text-align: center;
    max-width: 500px;
}

.aide-contenu h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--bleu);
}

.aide-contenu p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Avancement */
.avancer-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius);
    z-index: 10;
}

.celebration {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.confettis {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: celebrer 1s infinite;
}

.celebration h2 {
    font-size: 2.5rem;
    color: var(--bleu);
    margin-bottom: 15px;
}

.celebration p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--texte);
}

.btn-avancer {
    background: linear-gradient(135deg, #FF6F00 0%, var(--jaune) 100%);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.btn-tableau {
    display: inline-block;
    margin-top: 10px;
}

/* Session finie */
.session-finie-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius);
    z-index: 10;
}

.session-resume {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.session-resume h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--texte);
}

.resume-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-nombre {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bleu);
}

.stat-label {
    font-size: 1rem;
    color: var(--texte-clair);
}

.session-message {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--texte);
}

.session-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Footer exercice */
.exercice-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.btn-aide-flottant, .btn-ecouter-flottant {
    padding: 12px 25px;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 700;
    border: 2px solid var(--gris);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--ombre);
}

.btn-aide-flottant:hover {
    background: #FFF3E0;
    border-color: var(--orange);
    transform: scale(1.05);
}

.btn-ecouter-flottant:hover {
    background: #E3F2FD;
    border-color: var(--bleu);
    transform: scale(1.05);
}

/* ========================================
   PAGE MODULE 1
   ======================================== */

.page-module {
    padding: 10px 0;
}

.module-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
}

.module-titre {
    font-size: 1.6rem;
    color: var(--texte);
}

.module-sous-titre {
    font-size: 1.1rem;
    color: var(--texte-clair);
}

/* Alphabet section */
.alphabet-section {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    padding: 20px;
    margin-bottom: 25px;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.lettre-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    font-size: 1.6rem;
    font-family: inherit;
    font-weight: 700;
    border: 3px solid var(--gris);
    border-radius: var(--radius-petit);
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: var(--texte);
}

.lettre-btn.voyelle {
    background: #E3F2FD;
    border-color: var(--bleu-clair);
    color: var(--bleu);
}

.lettre-btn.consonne {
    background: #FFF3E0;
    border-color: var(--orange);
    color: #E65100;
}

.lettre-btn:hover {
    transform: scale(1.15);
    box-shadow: var(--ombre);
    z-index: 2;
}

.alphabet-legende {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 8px;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--texte-clair);
    font-weight: 700;
}

.legende-couleur {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.voyelle-bg { background: #E3F2FD; border: 2px solid var(--bleu-clair); }
.consonne-bg { background: #FFF3E0; border: 2px solid var(--orange); }

/* Exercices section */
.exercices-section {
    text-align: center;
}

.btn-session-mixte {
    font-size: 1.4rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--vert) 0%, #81C784 100%);
}

.exercices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.exercice-carte {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    text-decoration: none;
    color: var(--texte);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.exercice-carte:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--ombre-forte);
    border-color: var(--bleu-clair);
}

.exercice-carte-icone {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.exercice-carte-nom {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
}

.exercice-carte-desc {
    font-size: 0.85rem;
    color: var(--texte-clair);
    text-align: center;
    line-height: 1.3;
}

/* ========================================
   EXERCICE MODULE 1 - Zones spécifiques
   ======================================== */

/* Media zone (image + son) */
.media-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--gris-clair);
    border-radius: var(--radius-petit);
    flex-wrap: wrap;
}

.mot-image {
    max-width: 180px;
    max-height: 180px;
    border-radius: var(--radius-petit);
    box-shadow: var(--ombre);
    object-fit: contain;
    background: white;
    padding: 5px;
}

.btn-son-mot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: 700;
    border: 3px solid var(--bleu-clair);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    color: var(--bleu);
    transition: all 0.2s ease;
}

.btn-son-mot:hover {
    background: #E3F2FD;
    transform: scale(1.05);
}

/* Lettre grande (affichée pour apprendre_lettres, sons, consonne_voyelle) */
.lettre-grande-zone {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.lettre-grande {
    font-size: 6rem;
    font-weight: 700;
    color: var(--bleu);
    background: #E3F2FD;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 4px solid var(--bleu-clair);
    box-shadow: var(--ombre);
}

/* Mot affiché (avec trou) */
.mot-affiche-zone {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.mot-affiche {
    display: flex;
    gap: 4px;
    font-size: 2.5rem;
    font-weight: 700;
}

.lettre-visible {
    color: var(--texte);
}

.lettre-trou {
    color: var(--rouge-doux);
    border-bottom: 4px solid var(--rouge-doux);
    min-width: 30px;
    text-align: center;
}

/* Ordonner lettres */
.ordonner-lettres-zone {
    margin-top: auto;
}

.lettres-melangees {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.lettre-tile {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-family: inherit;
    font-weight: 700;
    border: 3px solid var(--bleu-clair);
    border-radius: var(--radius-petit);
    background: #E3F2FD;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--texte);
}

.lettre-tile:hover:not(.utilise) {
    background: var(--bleu-clair);
    color: white;
    transform: scale(1.1);
}

.lettre-tile.utilise {
    opacity: 0.2;
    cursor: default;
    transform: scale(0.9);
}

.mot-construit {
    min-height: 70px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: var(--gris-clair);
    border-radius: var(--radius-petit);
    border: 2px dashed var(--gris);
    margin-bottom: 15px;
}

.lettre-placee {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--bleu);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.lettre-placee:hover {
    background: var(--rouge-doux);
    transform: scale(0.95);
}

/* Compléter lettres zone */
.completer-zone {
    margin-top: auto;
}

.mot-trou-display {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.lettre-case {
    width: 50px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 8px;
    border: 3px solid var(--gris);
    background: white;
}

.lettre-case.remplie {
    color: var(--texte);
    background: var(--gris-clair);
    border-color: var(--gris);
}

.lettre-case.vide {
    color: var(--rouge-doux);
    border-color: var(--orange);
    border-style: dashed;
    background: #FFF8E1;
}

.lettre-case.remplie-user {
    color: var(--bleu);
    border-color: var(--bleu-clair);
    border-style: solid;
    background: #E3F2FD;
}

.choix-lettres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.lettre-choix-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-family: inherit;
    font-weight: 700;
    border: 2px solid var(--gris);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--texte);
}

.lettre-choix-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--ombre);
}

.lettre-choix-btn.voyelle-btn {
    border-color: var(--bleu-clair);
    background: #E3F2FD;
}

.lettre-choix-btn.voyelle-btn:hover {
    background: var(--bleu-clair);
    color: white;
}

.lettre-choix-btn.consonne-btn {
    border-color: var(--orange);
    background: #FFF3E0;
}

.lettre-choix-btn.consonne-btn:hover {
    background: var(--orange);
    color: white;
}

.completer-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ========================================
   MODULE 2 : LES SYLLABES
   ======================================== */

.syllabe-tutorial-section {
    margin-bottom: 20px;
}

.tutorial-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: var(--radius);
    padding: 15px 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--ombre);
}

.tutorial-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre-forte);
}

.tutorial-icone {
    font-size: 2.5rem;
}

.tutorial-texte h3 {
    font-size: 1.1rem;
    color: var(--texte);
    margin-bottom: 2px;
}

.tutorial-texte p {
    font-size: 0.9rem;
    color: var(--texte-clair);
}

.tutorial-fleche {
    margin-left: auto;
    font-size: 1.5rem;
}

.tutorial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.tutorial-contenu {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.tutorial-contenu h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--texte);
}

.tutorial-fermer {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.tutorial-etapes {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.tutorial-etape {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--gris-clair);
    border-radius: var(--radius-petit);
    padding: 15px;
}

.tutorial-etape-num {
    background: var(--bleu);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.tutorial-etape p {
    font-size: 1rem;
    line-height: 1.5;
}

.tutorial-contenu .btn-principal {
    display: block;
    margin: 0 auto;
}

/* Syllabe tiles */
.syllabe-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 55px;
    padding: 8px 16px;
    border-radius: var(--radius-petit);
    border: 3px solid var(--bleu);
    background: white;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--texte);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.syllabe-tile:hover {
    background: var(--bleu-clair);
    color: white;
    transform: scale(1.05);
}

.syllabe-tile.utilise {
    opacity: 0.3;
    transform: scale(0.9);
    pointer-events: none;
}

.syllabe-placee {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 48px;
    padding: 6px 14px;
    background: var(--bleu);
    color: white;
    border-radius: var(--radius-petit);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.syllabe-placee:hover {
    transform: scale(1.05);
    background: #1976D2;
}

.syllabe-separateur {
    color: var(--texte-clair);
    font-size: 1.2rem;
    margin: 0 2px;
}

.syllabe-option {
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.ordonner-syllabes-zone {
    text-align: center;
}

.syllabes-melangees {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ordonner-actions,
.deux-mots-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Syllabe prononcée zone */
.syllabe-prononcee-zone {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.btn-ecouter-syllabe {
    background: linear-gradient(135deg, var(--vert), var(--vert-clair));
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--ombre);
    font-family: inherit;
}

.btn-ecouter-syllabe:hover {
    transform: scale(1.05);
    box-shadow: var(--ombre-forte);
}

/* Deux mots mélangés */
.deux-mots-zone {
    text-align: center;
}

.deux-mots-construits {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.mot-construit-zone {
    flex: 1;
    max-width: 300px;
}

.mot-zone-label {
    font-size: 1rem;
    color: var(--texte-clair);
    margin-bottom: 5px;
    text-align: center;
}

.mot-construit.mot-zone-active {
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3);
}

/* Media double zone */
.media-zone-double {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.media-mot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.media-mot-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--texte-clair);
    background: var(--gris-clair);
    padding: 3px 12px;
    border-radius: 10px;
}

.btn-son-petit {
    padding: 6px 12px;
    font-size: 1rem;
    min-height: auto;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .titre-principal {
        font-size: 1.8rem;
    }

    .eleves-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .avatar-grand {
        font-size: 3.5rem;
    }

    .question-texte {
        font-size: 1.2rem;
    }

    .option-btn {
        font-size: 1.2rem;
        padding: 15px 20px;
        min-height: 55px;
    }

    .options-zone {
        grid-template-columns: 1fr;
    }

    .tableau-header {
        flex-wrap: wrap;
    }

    .eleve-nom-grand {
        font-size: 1.4rem;
    }

    .btn-commencer {
        font-size: 1.3rem;
        padding: 15px 30px;
    }

    .exercice-header {
        flex-wrap: wrap;
    }

    .exercice-info {
        order: 2;
        flex-basis: 100%;
        justify-content: center;
    }

    .btn-principal {
        font-size: 1.2rem;
        padding: 14px 30px;
    }

    .module-header {
        flex-wrap: wrap;
    }

    .module-titre {
        font-size: 1.3rem;
    }

    .alphabet-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 6px;
    }

    .lettre-btn {
        font-size: 1.3rem;
    }

    .exercices-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .lettre-tile {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .lettre-placee {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .lettre-case {
        width: 40px;
        height: 45px;
        font-size: 1.4rem;
    }

    .lettre-choix-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lettre-grande {
        font-size: 4.5rem;
        width: 100px;
        height: 100px;
    }

    .mot-image {
        max-width: 140px;
        max-height: 140px;
    }

    .syllabe-tile {
        min-width: 60px;
        height: 48px;
        font-size: 1.1rem;
        padding: 6px 12px;
    }

    .syllabe-placee {
        min-width: 50px;
        height: 42px;
        font-size: 1.1rem;
    }

    .deux-mots-construits {
        flex-direction: column;
        align-items: center;
    }

    .mot-construit-zone {
        max-width: 100%;
    }

    .media-zone-double {
        gap: 15px;
    }

    .tutorial-contenu {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 10px;
    }

    .titre-principal {
        font-size: 1.5rem;
    }

    .avatar-grand {
        font-size: 3rem;
    }

    .eleve-prenom {
        font-size: 1.2rem;
    }

    .exercice-zone {
        padding: 15px;
    }

    .question-zone {
        padding: 12px;
    }

    .feedback-icone {
        font-size: 3.5rem;
    }

    .feedback-texte {
        font-size: 1.2rem;
    }

    .exercices-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .exercice-carte {
        padding: 12px 8px;
    }

    .exercice-carte-icone {
        font-size: 2rem;
    }

    .exercice-carte-nom {
        font-size: 0.95rem;
    }

    .exercice-carte-desc {
        font-size: 0.75rem;
    }

    .lettre-tile {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .mot-affiche {
        font-size: 2rem;
    }
}

/* ========================
   MODULE 3 : Les Mots
   ======================== */

.sous-section-titre {
    font-size: 1.1rem;
    color: #6c63ff;
    margin: 18px 0 8px;
    padding-left: 4px;
    border-left: 3px solid #6c63ff;
}

/* Associer 4 mots */
.associer-zone {
    padding: 10px 0;
}
.associer-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.associer-img-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid transparent;
}
.associer-img-card:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(108,99,255,0.15);
    border-color: #6c63ff;
}
.associer-img {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
}
.associer-label {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #aaa;
    min-height: 24px;
}
.associer-label-rempli {
    color: #6c63ff;
    background: #ede7ff;
    border-radius: 8px;
    padding: 2px 8px;
}
.associer-mots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}
.associer-mot-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: 2px solid #6c63ff;
    background: #f7f5ff;
    color: #333;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.associer-mot-btn:hover { background: #ede7ff; }
.associer-mot-btn.selectionne { background: #6c63ff; color: #fff; }
.associer-mot-btn.utilise { opacity: 0.4; pointer-events: none; }
.associer-actions {
    display: flex; gap: 12px; justify-content: center; margin-top: 10px;
}
.btn-effacer {
    background: #f0f0f0; color: #666;
}

/* Memo game */
.memo-zone {
    padding: 10px 0;
}
.memo-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #555;
}
.memo-grille {
    display: grid;
    gap: 10px;
    justify-items: center;
}
.memo-carte {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    background: #6c63ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(108,99,255,0.2);
    user-select: none;
}
.memo-carte:hover { transform: scale(1.06); }
.memo-carte-dos {
    font-size: 2rem;
    color: #fff;
}
.memo-carte-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
}
.memo-carte-mot {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    padding: 4px;
    word-break: break-word;
}
.memo-carte.memo-retournee {
    background: #fff;
    border: 3px solid #6c63ff;
}
.memo-carte.memo-trouvee {
    background: #d4edda;
    border: 3px solid #28a745;
    pointer-events: none;
    opacity: 0.85;
}

/* Deviner mot */
.deviner-zone {
    padding: 10px 0;
    text-align: center;
}
.deviner-mot {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.deviner-lettre {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 52px;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}
.deviner-cachee {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    color: #bbb;
}
.deviner-visible {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #333;
}
.deviner-info {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}
.deviner-lettres {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}
.deviner-lettre-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 2px solid #6c63ff;
    background: #f7f5ff;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.deviner-lettre-btn:hover { background: #ede7ff; }
.deviner-lettre-btn:disabled, .deviner-lettre-btn.utilise {
    opacity: 0.3;
    pointer-events: none;
    background: #e0e0e0;
}

/* Relier mot forme */
.relier-zone {
    padding: 10px 0;
}
.relier-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 14px;
}
.relier-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-son-petit {
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: 120px;
}
.relier-formes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.relier-forme-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.relier-forme-btn:hover { border-color: #6c63ff; background: #f7f5ff; }
.relier-forme-btn.selectionne {
    border-color: #6c63ff;
    background: #6c63ff;
    color: #fff;
}
.relier-actions {
    text-align: center;
    margin-top: 10px;
}

/* Module 3 responsive */
@media (max-width: 600px) {
    .associer-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .associer-img {
        max-height: 70px;
    }
    .associer-mot-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .memo-carte {
        width: 72px;
        height: 72px;
    }
    .memo-carte-img {
        width: 62px;
        height: 62px;
    }
    .memo-carte-mot {
        font-size: 0.75rem;
    }
    .deviner-lettre {
        width: 36px;
        height: 44px;
        font-size: 1.2rem;
    }
    .deviner-lettre-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .relier-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================
   MODULE 4 : Phrases courtes
   ======================== */

/* Phrase display */
.phrase-display-zone {
    text-align: center;
    margin-bottom: 14px;
}
.phrase-cadre {
    background: #fffbe6;
    border: 2px solid #ffc107;
    border-radius: 14px;
    padding: 16px 22px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    display: inline-block;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Affirmation (vrai/faux) */
.affirmation-zone {
    text-align: center;
    margin-bottom: 12px;
}
.affirmation-texte {
    background: #f0f4ff;
    border: 2px solid #6c63ff;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    display: inline-block;
}
.option-vrai {
    border-color: #28a745 !important;
    color: #28a745;
}
.option-vrai:hover, .option-vrai.selectionnee {
    background: #28a745 !important;
    color: #fff !important;
}
.option-faux {
    border-color: #dc3545 !important;
    color: #dc3545;
}
.option-faux:hover, .option-faux.selectionnee {
    background: #dc3545 !important;
    color: #fff !important;
}
.option-phrase-btn {
    text-align: left;
    padding: 14px 18px;
    font-size: 1.05rem;
    line-height: 1.4;
    white-space: normal;
    min-height: 48px;
}

/* Pointage mot à mot */
.pointage-zone {
    text-align: center;
    padding: 10px 0;
}
.pointage-mots {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}
.pointage-mot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 14px;
    background: #f7f5ff;
    border: 3px solid #ddd;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    min-width: 60px;
}
.pointage-mot:hover {
    border-color: #6c63ff;
    transform: scale(1.05);
}
.pointage-mot.pointage-actif {
    border-color: #ffc107;
    background: #fffbe6;
    animation: pointage-pulse 1s infinite;
}
.pointage-mot.pointage-ok {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}
.pointage-mot.pointage-erreur {
    border-color: #dc3545;
    background: #f8d7da;
    animation: shake 0.3s;
}
@keyframes pointage-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255,193,7,0); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.pointage-info {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
}

/* Questions Oui/Non */
.questions-yn-zone {
    padding: 10px 0;
}
.yn-item {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 2px solid #eee;
}
.yn-question-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}
.yn-buttons {
    display: flex;
    gap: 10px;
}
.yn-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.yn-oui:hover { border-color: #28a745; background: #eafaf0; }
.yn-non:hover { border-color: #dc3545; background: #fdf0f0; }
.yn-btn.selectionne.yn-oui {
    border-color: #28a745;
    background: #28a745;
    color: #fff;
}
.yn-btn.selectionne.yn-non {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}
.yn-justification {
    font-size: 0.85rem;
    color: #6c63ff;
    margin-top: 8px;
    font-style: italic;
}

/* Remettre en ordre */
.remettre-ordre-zone {
    padding: 10px 0;
}
.ordre-depot {
    min-height: 60px;
    background: #fffbe6;
    border: 2px dashed #ffc107;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ordre-placeholder {
    color: #aaa;
    font-style: italic;
    font-size: 0.95rem;
}
.ordre-mot-place {
    display: inline-block;
    padding: 8px 14px;
    background: #6c63ff;
    color: #fff;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
}
.ordre-ponctuation {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}
.ordre-etiquettes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}
.ordre-etiquette {
    padding: 12px 18px;
    border-radius: 12px;
    border: 2px solid #6c63ff;
    background: #f7f5ff;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ordre-etiquette:hover {
    background: #ede7ff;
    transform: scale(1.04);
}
.ordre-etiquette.utilise {
    opacity: 0.3;
    pointer-events: none;
    background: #e0e0e0;
    border-color: #ccc;
}
.ordre-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Lire et montrer */
.lire-montrer-zone {
    padding: 10px 0;
}
.lire-montrer-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
}
.lire-montrer-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid transparent;
}
.lire-montrer-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(108,99,255,0.15);
    border-color: #6c63ff;
}
.lire-montrer-card.selectionnee {
    border-color: #28a745;
    background: #eafaf0;
}
.lire-montrer-card.disabled:not(.selectionnee) {
    opacity: 0.4;
    pointer-events: none;
}
.lire-montrer-img {
    width: 100%;
    max-height: 110px;
    object-fit: contain;
    border-radius: 8px;
}
.lire-montrer-placeholder {
    font-size: 3rem;
    padding: 20px;
    color: #ccc;
}

/* Module 4 responsive */
@media (max-width: 600px) {
    .phrase-cadre {
        font-size: 1.1rem;
        padding: 12px 16px;
    }
    .pointage-mot {
        padding: 10px 14px;
        font-size: 1.1rem;
        min-width: 50px;
    }
    .ordre-etiquette {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    .ordre-mot-place {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    .lire-montrer-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .lire-montrer-img {
        max-height: 80px;
    }
    .yn-buttons {
        flex-direction: column;
    }
    .option-phrase-btn {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
}

/* ========================
   MODULE 5 : Paragraphes
   ======================== */

/* Paragraphe display */
.para-display-zone {
    margin-bottom: 16px;
}
.para-titre {
    font-size: 1.1rem;
    color: #6c63ff;
    margin-bottom: 8px;
    font-weight: 700;
}
.para-texte-cadre {
    background: #f8f9ff;
    border: 2px solid #6c63ff;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 10px;
}
.para-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-jai-lu {
    background: #28a745 !important;
}

/* Comprehension questions */
.comprehension-zone {
    padding: 8px 0;
}
.comp-item {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 2px solid #eee;
}
.comp-question-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}
.comp-piege-tag {
    font-size: 0.8rem;
    background: #fff3cd;
    border-radius: 6px;
    padding: 2px 6px;
    color: #856404;
}
.comp-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.comp-option-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.comp-option-btn:hover {
    border-color: #6c63ff;
    background: #f7f5ff;
}
.comp-option-btn.selectionne {
    border-color: #6c63ff;
    background: #6c63ff;
    color: #fff;
}
.comp-option-btn.correct {
    border-color: #28a745;
    background: #28a745;
    color: #fff;
}
.comp-option-btn.incorrect {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}

/* Texte à trous */
.trous-zone {
    padding: 8px 0;
}
.para-texte-troue {
    background: #fffbe6;
    border: 2px solid #ffc107;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 14px;
}
.trou-blank {
    display: inline-block;
    min-width: 80px;
    border-bottom: 3px dashed #6c63ff;
    color: #6c63ff;
    font-weight: 700;
    padding: 2px 6px;
    margin: 0 4px;
    text-align: center;
    cursor: default;
    transition: all 0.3s;
}
.trou-blank.trou-rempli {
    border-bottom-style: solid;
    background: #e8f5e9;
    border-color: #28a745;
    color: #155724;
    border-radius: 6px;
}
.trous-banque {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.trous-banque-titre {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}
.trous-groupe {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.trous-numero {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: #6c63ff;
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
}
.trous-mot-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.trous-mot-btn:hover {
    border-color: #6c63ff;
    transform: scale(1.04);
}
.trous-mot-btn.selectionne {
    border-color: #28a745;
    background: #28a745;
    color: #fff;
}

/* Remise en ordre paragraphe */
.ordre-para-zone {
    padding: 8px 0;
}
.ordre-para-depot {
    min-height: 80px;
    background: #f0f4ff;
    border: 2px dashed #6c63ff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.ordre-para-placee {
    background: #fff;
    border: 2px solid #6c63ff;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.5;
}
.ordre-para-num {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    background: #6c63ff;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 8px;
}
.ordre-para-cartes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.ordre-para-carte {
    background: #fffbe6;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s;
}
.ordre-para-carte:hover {
    border-color: #6c63ff;
    background: #f7f5ff;
    transform: scale(1.01);
}
.ordre-para-carte.utilise {
    opacity: 0.3;
    pointer-events: none;
    background: #e0e0e0;
    border-color: #ccc;
}
.connecteur-highlight {
    color: #6c63ff;
    background: #ede7ff;
    padding: 1px 4px;
    border-radius: 4px;
}

/* Associer paragraphe et image */
.associer-img-zone {
    padding: 8px 0;
}
.associer-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.associer-img-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid transparent;
}
.associer-img-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(108,99,255,0.15);
    border-color: #6c63ff;
}
.associer-img-card.selectionnee {
    border-color: #28a745;
    background: #eafaf0;
}
.associer-img-card.disabled:not(.selectionnee) {
    opacity: 0.4;
    pointer-events: none;
}
.associer-img {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 6px;
}
.associer-img-desc {
    font-size: 0.85rem;
    color: #666;
}

/* Repérage d'informations */
.reperage-zone {
    padding: 8px 0;
}
.reperage-texte {
    background: #f8f9ff;
    border: 2px solid #6c63ff;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 1.15rem;
    line-height: 2;
    color: #333;
    margin-bottom: 14px;
    user-select: none;
}
.reperage-mot {
    cursor: pointer;
    padding: 2px 1px;
    border-radius: 4px;
    transition: background 0.2s;
}
.reperage-mot:hover {
    background: #e8f5e9;
}
.reperage-mot.reperage-selectionne {
    background: #ffc107;
    color: #333;
    font-weight: 700;
    border-radius: 4px;
}

/* Lecture en couleurs */
.couleurs-zone {
    padding: 8px 0;
}
.couleurs-legende {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.couleur-tag {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}
.couleur-tag.couleur-outil {
    background: #e3f2fd;
    color: #1565c0;
}
.couleur-tag.couleur-verbe {
    background: #ffebee;
    color: #c62828;
}
.couleur-tag.couleur-nom {
    background: #e8f5e9;
    color: #2e7d32;
}
.couleurs-texte {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 1.15rem;
    line-height: 2;
    margin-bottom: 14px;
}
.couleur-mot {
    cursor: pointer;
    padding: 2px 3px;
    border-radius: 4px;
    transition: all 0.2s;
}
.couleur-mot:hover {
    opacity: 0.7;
    transform: scale(1.05);
}
.couleur-mot.couleur-outil {
    color: #1565c0;
}
.couleur-mot.couleur-verbe {
    color: #c62828;
    font-weight: 700;
}
.couleur-mot.couleur-nom {
    color: #2e7d32;
    font-weight: 600;
}
.couleurs-quiz {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.couleurs-quiz-question {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.couleurs-quiz-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.couleur-quiz-btn {
    min-width: 100px;
}

/* Mot intrus paragraphe */
.intrus-para-zone {
    padding: 8px 0;
}
.para-texte-intrus {
    background: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 14px;
    padding: 18px 22px;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 14px;
}
.intrus-mot {
    cursor: pointer;
    padding: 2px 1px;
    border-radius: 4px;
    transition: background 0.2s;
}
.intrus-mot:hover {
    background: #fff3cd;
}
.intrus-mot.intrus-suspect {
    text-decoration: underline wavy #dc3545;
}
.intrus-mot.intrus-trouve {
    background: #dc3545;
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
}
.intrus-propositions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.intrus-props-titre {
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Mini-dictée */
.dictee-zone {
    padding: 8px 0;
}
.dictee-phrase-item {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 2px solid #eee;
}
.dictee-phrase-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.btn-lire-phrase-dictee {
    font-size: 0.9rem;
}
.dictee-hint {
    font-size: 0.8rem;
    color: #999;
}
.dictee-input {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 1.05rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s;
}
.dictee-input:focus {
    border-color: #6c63ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

/* Module 5 responsive */
@media (max-width: 600px) {
    .para-texte-cadre, .para-texte-troue, .reperage-texte, .couleurs-texte, .para-texte-intrus {
        font-size: 1rem;
        padding: 14px 16px;
        line-height: 1.6;
    }
    .associer-img-grid {
        grid-template-columns: 1fr;
    }
    .comp-options {
        flex-direction: column;
    }
    .couleurs-quiz-options {
        flex-direction: column;
    }
    .ordre-para-carte {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
}
