/* ===== JEUX PÉDAGOGIQUES — Index & Pages de jeu ===== */

/* --- Hero --- */
#JeuxHero {
    background: linear-gradient(135deg, #f8fafb 0%, #fff5ee 100%);
    border-bottom: 1px solid rgba(255,140,66,.15);
    padding: 60px 0 50px;
}
#JeuxHero .section { padding-top: 0; }
#JeuxHero h1 {
    font-family: var(--FontFamily);
    font-size: clamp(36px, 5vw, 54px);
    font-weight: 700;
    color: var(--CouleurPrimaire);
    margin-bottom: 14px;
}
.jeux-intro {
    font-family: var(--FontFamily);
    font-size: clamp(16px, 1.2vw, 20px);
    color: #4a5568;
    max-width: 600px;
    line-height: 1.6;
}

/* --- Filtres --- */
#JeuxFiltres { padding: 28px 0 0; }
#JeuxFiltres .section { padding-top: 0; }
.filtres-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filtre-btn {
    font-family: var(--FontFamily);
    font-size: 14px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 50px;
    border: 1.5px solid rgba(31,53,77,.15);
    background: white;
    color: var(--CouleurPrimaire);
    cursor: pointer;
    transition: all .15s;
}
.filtre-btn:hover, .filtre-btn.actif {
    background: var(--CouleurPrimaire);
    color: white;
    border-color: var(--CouleurPrimaire);
}

/* --- Grille de jeux --- */
#JeuxGrid { padding-bottom: 80px; }
#JeuxGrid .section { padding-top: 30px; }

.jeux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
    justify-content: center;
    gap: 24px;
}

/* --- Carte jeu --- */
.jeu-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid rgba(31,53,77,.09);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.jeu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(31,53,77,.1);
}
.jeu-card-cover {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}
.jeu-card-cover.math    { background: linear-gradient(135deg, #eef6f6, #d4eeee); }
.jeu-card-cover.francais { background: linear-gradient(135deg, #fff5ee, #ffe0c7); }
.jeu-card-cover.histoire { background: linear-gradient(135deg, #f5f0ff, #e8d8ff); }

.jeu-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.jeu-card-matiere {
    font-family: var(--FontFamily);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--CouleurSecondaire);
    margin-bottom: 6px;
}
.jeu-card-titre {
    font-family: var(--FontFamily);
    font-size: 17px;
    font-weight: 600;
    color: var(--CouleurPrimaire);
    margin-bottom: 8px;
    line-height: 1.3;
}
.jeu-card-desc {
    font-family: var(--FontFamily);
    font-size: 13px;
    color: #4a5568;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 12px;
}
.jeu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.jeu-niveau {
    font-family: var(--FontFamily);
    font-size: 11px;
    font-weight: 600;
    background: rgba(31,53,77,.06);
    color: var(--CouleurPrimaire);
    padding: 3px 10px;
    border-radius: 20px;
}
.jeu-jouer {
    font-family: var(--FontFamily);
    font-size: 13px;
    font-weight: 700;
    color: var(--CouleurAccent);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Page de jeu --- */
#JeuHero {
    background: linear-gradient(135deg, #f8fafb 0%, #fff5ee 100%);
    border-bottom: 1px solid rgba(255,140,66,.15);
    padding: 40px 0 30px;
}
#JeuHero .section { padding-top: 0; }

.jeu-fil-ariane {
    font-family: var(--FontFamily);
    font-size: 13px;
    color: #9aa5b4;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.jeu-fil-ariane a { color: var(--CouleurSecondaire); text-decoration: none; }
.jeu-fil-ariane a:hover { text-decoration: underline; }

#JeuHero h1 {
    font-family: var(--FontFamily);
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 700;
    color: var(--CouleurPrimaire);
    margin-bottom: 10px;
}
.jeu-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.jeu-meta-tag {
    font-family: var(--FontFamily);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(31,53,77,.07);
    color: var(--CouleurPrimaire);
}

/* --- Zone de jeu --- */
#JeuZone { padding: 40px 0 80px; }
#JeuZone .section { padding-top: 0; }

.jeu-conteneur {
    background: white;
    border: 1px solid rgba(31,53,77,.09);
    border-radius: 18px;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

/* Placeholder affiché tant que le jeu n'est pas développé */
.jeu-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.jeu-placeholder-icone {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff5ee, #ffe0c7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.jeu-placeholder h2 {
    font-family: var(--FontFamily);
    font-size: 22px;
    font-weight: 600;
    color: var(--CouleurPrimaire);
}
.jeu-placeholder p {
    font-family: var(--FontFamily);
    font-size: 15px;
    color: #9aa5b4;
    max-width: 340px;
    line-height: 1.6;
}
