/* =========================================================
   PAGE EXERCICES
========================================================= */

.exercices-page {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 25px 15px 50px;

    box-sizing: border-box;
}


/* =========================================================
   EN-TÊTE
========================================================= */

.exercices-header {
    text-align: center;

    max-width: 900px;

    margin: 0 auto 35px;
}

.exercices-header h1 {
    margin: 0 0 12px;

    font-size: 32px;
    line-height: 1.2;

    color: #1e293b;
}

.exercices-header p {
    margin: 0;

    font-size: 16px;
    line-height: 1.6;

    color: #64748b;
}


/* =========================================================
   BLOCS DE CHAPITRES
========================================================= */

.chapitres-container {
    display: flex;
    flex-direction: column;

    gap: 25px;
}


.chapitre-card {
    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    padding: 20px;

    box-sizing: border-box;

    box-shadow:
        0 4px 15px rgba(15, 23, 42, .05);
}


/* =========================================================
   TITRE DU CHAPITRE
========================================================= */

.chapitre-title {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 20px;

    padding-bottom: 15px;

    border-bottom: 1px solid #eef2f7;
}


.chapitre-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: #f8fafc;
}


.chapitre-icon img {
    width: 46px;
    height: 46px;

    object-fit: contain;

    display: block;
}


.chapitre-title h2 {
    margin: 0;

    font-size: 23px;
    line-height: 1.2;

    color: #1e293b;
}


/* =========================================================
   GRILLE DES EXERCICES
========================================================= */

.exercices-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(210px, 1fr));

    gap: 12px;
}


/* =========================================================
   CARTE EXERCICE
========================================================= */
.exercice-card {
    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 70px;
    padding: 8px 10px;

    box-sizing: border-box;

    background: #f8fafc;

    border: 1px solid #e8edf3;
    border-radius: 12px;

    text-decoration: none;
    color: #334155;

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;

    /* très important */
    min-width: 0;
}

.exercice-card:hover {
    transform: translateY(-2px);

    background: #ffffff;

    border-color: #93c5fd;

    box-shadow:
        0 5px 14px rgba(37, 99, 235, .10);
}


/* =========================================================
   ICÔNE EXERCICE
========================================================= */

.exercice-icon {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #ffffff;
}


.exercice-icon img {
    width: 42px;
    height: 42px;

    object-fit: contain;

    display: block;
}


/* =========================================================
   NOM EXERCICE
========================================================= */

.exercice-name {
    flex: 1;
    min-width: 0;

    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;

    color: #334155;

    /* permet au texte long de revenir à la ligne */
    overflow-wrap: break-word;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .exercices-page {
        padding: 18px 8px 35px;
    }


    .exercices-header {
        margin-bottom: 25px;
    }


    .exercices-header h1 {
        font-size: 27px;
    }


    .exercices-header p {
        font-size: 14px;
    }


    .chapitre-card {
        padding: 14px;

        border-radius: 14px;
    }


    .chapitre-title {
        gap: 10px;

        margin-bottom: 14px;

        padding-bottom: 12px;
    }


    .chapitre-icon {
        width: 48px;
        height: 48px;

        border-radius: 12px;
    }


    .chapitre-icon img {
        width: 38px;
        height: 38px;
    }


    .chapitre-title h2 {
        font-size: 19px;
    }


    .exercices-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 8px;
    }


    .exercice-card {
        min-height: 64px;

        padding: 7px;

        gap: 7px;

        border-radius: 10px;
    }


    .exercice-icon {
        width: 42px;
        height: 42px;
    }


    .exercice-icon img {
        width: 36px;
        height: 36px;
    }


    .exercice-name {
        font-size: 12px;
    }

}


/* =========================================================
   TRÈS PETIT MOBILE
========================================================= */

@media (max-width: 420px) {

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


    .exercice-card {
        min-height: 60px;
    }


    .exercice-name {
        font-size: 13px;
    }

}


/* =========================================================
   BANDEAU CHAPITRE
========================================================= */

.chapitre-title {
    display: flex;
    align-items: center;

    gap: 15px;

    margin-bottom: 20px;
    padding-bottom: 15px;

    border-bottom: 1px solid #eef2f7;
}

/* =========================================================
   ICÔNE
========================================================= */

.chapitre-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: #f8fafc;
}

.chapitre-icon img {
    width: 46px;
    height: 46px;

    object-fit: contain;

    display: block;
}

/* =========================================================
   TITRE + JAUGES
========================================================= */

.chapitre-heading {
    flex: 1;
    min-width: 0;
}

.chapitre-heading h2 {
    margin: 0 0 9px;

    font-size: 23px;
    line-height: 1.2;

    color: #1e293b;
}



/* =========================================================
   JAUGE
========================================================= */

.chapter-gauge {
    width: 100%;
    max-width: 500px;

    margin-top: 5px;
}


.gauge-label {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 3px;

    font-size: 11px;
    line-height: 1.2;

    color: #64748b;
}


.gauge-label strong {
    font-size: 12px;

    color: #334155;
}



/* =========================================================
   BARRE
========================================================= */

.gauge-bar {
    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 20px;

    background: #e9eef4;
}


.gauge-fill {
    height: 100%;

    border-radius: 20px;

    transition: width .5s ease;
}


/* Maîtrise */

.mastery-fill {
    background: linear-gradient(
        90deg,
        #38bdf8,
        #2563eb
    );
}


/* Progression */

.progress-fill {
    background: linear-gradient(
        90deg,
        #a78bfa,
        #7c3aed
    );
}


/* =========================================================
   TROPHÉE
========================================================= */

.chapter-trophy {
    flex-shrink: 0;

    font-size: 28px;

    line-height: 1;

    padding: 4px;
}


/* =========================================================
   CHAPITRE EXCELLENT
========================================================= */

.chapitre-card:has(.chapter-trophy) {
    border: 2px solid #eab308;

    box-shadow:
        0 6px 22px rgba(234, 179, 8, .18);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .chapitre-title {
        gap: 10px;
    }

    .chapitre-icon {
        width: 48px;
        height: 48px;

        border-radius: 12px;
    }

    .chapitre-icon img {
        width: 38px;
        height: 38px;
    }

    .chapitre-heading h2 {
        font-size: 18px;

        margin-bottom: 7px;
    }

    .chapter-trophy {
        font-size: 23px;
    }

    .gauge-label {
        font-size: 10px;
    }

    .gauge-label strong {
        font-size: 11px;
    }

    .gauge-bar {
        height: 6px;
    }
}

/* petit rond */
.exo-score {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    box-sizing: border-box;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 11px;
    line-height: 1;
    font-weight: 800;

    background: #f1f5f9;

    border: 4px solid #cbd5e1;

    color: #64748b;
}
/* =========================================================
   COULEURS DES SCORES
========================================================= */

/* 0% */
.score-vide {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #94a3b8;
}


/* 1 - 39% */
.score-faible {
    background: #fff7ed;
    border-color: #fb923c;
    color: #c2410c;
}


/* 40 - 59% */
.score-moyen {
    background: #fefce8;
    border-color: #facc15;
    color: #a16207;
}


/* 60 - 79% */
.score-bon {
    background: #f0fdf4;
    border-color: #84cc16;
    color: #4d7c0f;
}


/* 80 - 94% */
.score-tres-bon {
    background: #ecfdf5;
    border-color: #22c55e;
    color: #15803d;
}


/* 95 - 100% */
.score-excellent {
    background: #fffbeb;
    border-color: #eab308;
    color: #a16207;

    box-shadow: 0 0 0 2px rgba(234, 179, 8, .10);
}
@media (max-width: 700px) {

    .exo-score {
        width: 36px;
        height: 36px;
        flex-basis: 36px;

        border-width: 3px;

        font-size: 10px;
    }

}
.connexion-resultats {
    margin: 0 auto 22px;
    padding: 10px 16px;

    text-align: center;

    font-size: 14px;
    font-weight: 600;

    color: #64748b;
}

.connexion-resultats a {
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.connexion-resultats a:hover {
    text-decoration: underline;
}

.niveaux-menu {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin: 0 auto 24px;
    padding: 6px;

    max-width: 100%;

    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;

    overflow-x: auto;
    scrollbar-width: thin;
}


/* liens */

.niveaux-menu a {
    flex: 0 0 auto;

    padding: 8px 12px;

    border-radius: 8px;

    color: #475569;

    font-size: 13px;
    font-weight: 800;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}


.niveaux-menu a:hover {
    background: #ffffff;
    color: #2563eb;

    transform: translateY(-1px);
}


/* séparateurs */

.niveau-separateur {
    width: 1px;
    height: 24px;

    flex: 0 0 1px;

    margin: 0 4px;

    background: #cbd5e1;
}
@media (max-width: 700px) {

    .niveaux-menu {
        justify-content: flex-start;

        margin-bottom: 18px;

        border-radius: 10px;
    }

    .niveaux-menu a {
        padding: 7px 10px;
        font-size: 12px;
    }

}
	