/*==========================================================================================*/
/*  RESPONSIVE.CSS — Version grand écran                                                    */
/*  Basé sur la maquette mobile, adapté PC                                                  */
/*==========================================================================================*/

@media (min-width: 768px) {

    /*------------------------------------------------------------------------*/
    /*  GLOBAL                                                                 */
    /*------------------------------------------------------------------------*/

    body {
        font-size: 120%;
    }

    h1 {
        font-size: 6rem;
        -webkit-text-stroke: 5px #170F05;
        margin-top: -100px;
    }

    h2 {
        font-size: 4rem;
        -webkit-text-stroke: 4px #F6A0AC;
    }

    h3 {
        font-size: 2.8rem;
        -webkit-text-stroke: 2px #F3CA27;
    }

    p {
        font-size: 1.3rem;
        line-height: 1.75;
        padding: 14px 30px;
        margin: 10px auto;
    }

    .barre {
        width: 500px;
        height: 12px;
        margin: -40px auto 20px auto;
    }

    main img {
        width: 80%;
        max-width: 700px;
    }

    .entete {
        width: 100%;
        max-height: 500px;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

    /*------------------------------------------------------------------------*/
    /*  FOOTER GLOBAL                                                          */
    /*------------------------------------------------------------------------*/

    footer ul li img {
        width: 100px;
    }

    footer ul {
        gap: 30px;
    }

    /*------------------------------------------------------------------------*/
    /*  ACCUEIL — index.html                                                   */
    /*------------------------------------------------------------------------*/

    .decorP {
        font-size: 1.2rem;
        max-width: 600px;
        margin: 20px auto;
        padding: 20px 30px;
        display: block;
    }

    /* Matt Groening : photo ronde à gauche + texte à droite */
    .accueil-matt {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 40px;
        max-width: 860px;
        margin: 30px auto;
        padding: 0 30px;
    }

    #mattGro {
        width: 260px;
        height: 260px;
        flex-shrink: 0;
    }

    .descMatt {
        text-align: left;
        font-size: 1.15rem;
        line-height: 1.7;
        margin: 0;
        padding: 0 0 10px 0;
        max-width: 480px;
        border-bottom: 3px solid #DD727B;
    }

    /* Image Simpson + texte décoratif côte à côte */
    .accueil-bottom {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 40px;
        max-width: 860px;
        margin: 30px auto 10px auto;
        padding: 0 30px;
    }

    .centre {
        width: 400px;
        flex-shrink: 0;
        border-radius: 30px;
        overflow: hidden;
        box-shadow: inset 0 0 12px rgba(0,0,0,0.3);
    }

    .centre img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 30px;
    }

    .accueil-bottom .decorP {
        text-align: left;
        max-width: 400px;
        margin: 0;
        font-size: 1.15rem;
    }

    /*------------------------------------------------------------------------*/
    /*  HISTORIQUE — historique.html                                           */
    /*------------------------------------------------------------------------*/

    .bordureImg {
        width: 85%;
        max-width: 800px;
        display: block;
        margin: 20px auto;
    }

    /*------------------------------------------------------------------------*/
    /*  ÉPISODES — episodes.html                                               */
    /*------------------------------------------------------------------------*/

    .mainEpisodes {
        max-width: 1100px;
        margin: 0 auto;
    }

    .mainEpisodes img {
        max-width: 700px;
        width: 85%;
    }

    .mainEpisodes ul {
        display: flex !important;
        justify-content: center;
        gap: 20px;
        padding: 0;
        max-width: 900px;
        margin: 20px auto;
    }

    .mainEpisodes ul li {
        width: 48%;
        list-style: none;
    }

    .mainEpisodes ul li img {
        width: 100%;
        max-width: none;
    }

    .mainEpisodes p {
        max-width: 800px;
        margin: 10px auto;
    }

    .mainEpisodes footer {
        padding: 15px 60px;
    }

    .btn-suivant {
        font-size: 1.4rem;
        padding: 18px 80px;
    }

    /*------------------------------------------------------------------------*/
    /*  ÉPISODES CULTES — episode_2.html                                      */
    /*------------------------------------------------------------------------*/

    table {
        width: 85%;
        font-size: 1.2rem;
    }

    th, td {
        padding: 14px 18px;
    }

    .footer-episodes {
        min-height: 380px;
    }

    .footer-episodes .famsimpson {
        width: 280px;
    }

    .footer-episodes ul {
        gap: 60px;
        padding-top: 80px;
    }

    .footer-episodes ul li img {
        width: 80px;
    }

    /*------------------------------------------------------------------------*/
    /*  PRODUITS — produits.html                                               */
    /*------------------------------------------------------------------------*/

    .mainProd {
        max-width: 1100px;
        margin: 0 auto;
    }

    .mainProd p {
        max-width: 800px;
        margin: 10px auto;
    }

    .bandeDessinés {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center;
        gap: 24px;
        padding: 10px 20px !important;
        max-width: 960px;
        margin: 0 auto;
    }

    .bandeDessinés li {
        width: 22% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bandeDessinés li img {
        width: 100% !important;
        height: auto !important;
        max-width: 200px;
    }

    .figurines {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center;
        gap: 24px;
        padding: 10px 20px !important;
        max-width: 960px;
        margin: 0 auto;
    }

    .figurines li {
        width: 22% !important;
    }

    .figurines li img {
        width: 100% !important;
        max-width: 200px;
        height: auto !important;
    }

    .figurines2col {
        max-width: 560px;
        margin: 0 auto;
    }

    .figurines2col figure img {
        max-width: 220px !important;
        height: 280px !important;
    }

    .grille2x2 {
        max-width: 660px !important;
        gap: 10px !important;
    }

    .grille2x2 li img {
        height: 300px !important;
    }

    /*------------------------------------------------------------------------*/
    /*  LIENS — liens.html                                                     */
    /*------------------------------------------------------------------------*/

    .mainLiens {
        max-width: 800px;
        margin: 0 auto;
    }

    .mainLiens ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 640px;
        margin: 0 auto;
        gap: 0;
        padding: 0 20px;
    }

    .mainLiens ul li {
        width: 100%;
        text-align: left;
        border-bottom: 2px solid #F6A0AC;
        padding: 14px 0;
        list-style: none;
    }

    .mainLiens a {
        font-size: 1.5rem;
    }

    /*------------------------------------------------------------------------*/
    /*  PERSONNAGES                                                            */
    /*------------------------------------------------------------------------*/

    .persoBack {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 60px;
        min-height: 520px;
        padding: 60px 50px;
    }

    .persoBack figure img {
        width: 380px;
        max-width: 100%;
    }

    .persoBack figure .imgGrand {
        width: 460px;
    }

    .persoBack > p {
        max-width: 440px;
        text-align: left;
        font-size: 1.2rem;
        line-height: 1.7;
        margin: 0;
        padding: 0;
    }

    .btn-retour {
        font-size: 1.2rem;
        padding: 12px 32px;
    }
}

/*==========================================================================================*/
/*  1024px+                                                                                 */
/*==========================================================================================*/

@media (min-width: 1024px) {

    body {
        font-size: 125%;
    }

    h1 { font-size: 7rem; }
    h2 { font-size: 4.5rem; }
    h3 { font-size: 3rem; }

    p { font-size: 1.2rem; }

    main img { max-width: 800px; }

    #mattGro {
        width: 300px;
        height: 300px;
    }

    .centre {
        width: 460px;
        overflow: hidden;
    }

    .accueil-matt,
    .accueil-bottom {
        max-width: 1000px;
        gap: 60px;
    }

    .descMatt {
        font-size: 1.2rem;
        max-width: 560px;
    }

    table {
        width: 75%;
        font-size: 1.1rem;
    }

    .footer-episodes { min-height: 420px; }
    .footer-episodes .famsimpson { width: 320px; }
    .footer-episodes ul li img { width: 90px; }
    .footer-episodes ul { gap: 80px; }

    footer ul li img { width: 110px; }

    .persoBack { gap: 80px; padding: 80px; }
    .persoBack figure img { width: 440px; }
    .persoBack > p { max-width: 500px; font-size: 1.25rem; }
}

/*==========================================================================================*/
/*  1280px+                                                                                 */
/*==========================================================================================*/

@media (min-width: 1280px) {

    main {
        max-width: 1300px;
        margin: 0 auto;
    }

    .mainEpisodes,
    .mainLiens,
    .mainProd {
        max-width: 1300px;
        margin: 0 auto;
    }

    .accueil-matt,
    .accueil-bottom {
        max-width: 1100px;
    }

    table { width: 65%; }

    .bandeDessinés,
    .figurines { max-width: 1100px; }

    .grille2x2 { max-width: 800px !important; }
    .grille2x2 li img { height: 360px !important; }

    .footer-episodes .famsimpson { width: 360px; }
}

/*==========================================================================================*/
/*  PERSONNAGES — layout desktop                                                             */
/*==========================================================================================*/

@media (min-width: 768px) {

    /* Chaque bloc occupe toute la largeur, fond coloré plein */
    .persoBack {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        min-height: 500px;
        padding: 60px 80px;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* La figure = row : image gauche, texte droite */
    .persoBack figure {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 60px;
        width: 100%;
        max-width: 1100px;
        margin: 0;
        position: relative;
        z-index: 2;
    }

    /* Image à gauche, taille fixe */
    .persoBack figure > img {
        width: 300px;
        max-width: 300px;
        height: auto;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
        display: block;
    }

    .persoBack figure > img.imgGrand {
        width: 340px;
        max-width: 340px;
    }

    /* Bloc texte à droite : h3 + paragraphe */
    .persoBack figure .texte-perso {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        position: relative;
        z-index: 2;
    }

    .persoBack figure .texte-perso h3 {
        font-size: 3.5rem;
        margin: 0;
        display: block;
    }

    .persoBack figure .texte-perso p {
        font-size: 1.3rem;
        line-height: 1.85;
        text-align: left;
        padding: 0;
        margin: 0;
        color: white;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
        max-width: 600px;
    }

    /* Nuages en arrière-plan absolu — dans figure, relatif au persoBack */
    .persoBack figure .nuages {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        z-index: 0;
        pointer-events: none;
    }

    /* Intro */
    .persos .intro-block,
    .persos2 .intro-block {
        max-width: 800px;
    }

    /* Footer */
    .persos footer {
        padding: 40px;
        background-color: #A42868;
    }

    .persos footer .btn-suivant {
        font-size: 1.4rem;
        padding: 18px 60px;
    }
}

@media (min-width: 1024px) {

    .persoBack {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding: 70px 120px;
        min-height: 540px;
    }

    .persoBack figure {
        gap: 80px;
        max-width: 1200px;
    }

    .persoBack figure > img {
        width: 360px;
        max-width: 360px;
    }

    .persoBack figure > img.imgGrand {
        width: 400px;
        max-width: 400px;
    }

    .persoBack figure .texte-perso h3 {
        font-size: 3.5rem;
    }

    .persoBack figure .texte-perso p {
        font-size: 1.2rem;
        max-width: 620px;
    }
}

@media (min-width: 1280px) {

    .persoBack {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding: 80px 160px;
        min-height: 560px;
    }

    .persoBack figure {
        gap: 100px;
        max-width: 1300px;
    }

    .persoBack figure > img {
        width: 400px;
        max-width: 400px;
    }

    .persoBack figure > img.imgGrand {
        width: 440px;
        max-width: 440px;
    }

    .persoBack figure .texte-perso p {
        font-size: 1.25rem;
        max-width: 680px;
    }
}

/*==========================================================================================*/
/*  HISTORIQUE & INDEX — tailles ajustées                                                   */
/*==========================================================================================*/

@media (min-width: 768px) {

    /*--- HISTORIQUE ---*/

    .mainHistorique {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* Bloc image + texte côte à côte */
    .historique-bloc {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 50px;
        margin: 40px auto;
        max-width: 1060px;
    }

    /* Quand reverse : texte à gauche, image à droite */
    .historique-bloc.reverse {
        flex-direction: row-reverse;
    }

    .historique-img {
        width: 42%;
        max-width: 420px;
        flex-shrink: 0;
        height: auto;
        border-radius: 12px;
        display: block;
    }

    .historique-bloc p {
        flex: 1;
        font-size: 1.3rem;
        line-height: 1.85;
        text-align: left;
        margin: 0;
        padding: 0;
    }

    /* Image pleine largeur entre les blocs */
    .historique-full {
        width: 100% !important;
        max-width: 1060px !important;
        height: auto;
        display: block;
        margin: 30px auto;
        border-radius: 12px;
    }

    .historique-conclusion {
        font-size: 1.3rem;
        line-height: 1.85;
        max-width: 1060px;
        margin: 30px auto 40px auto;
        text-align: left;
    }

    /*--- INDEX — tailles augmentées ---*/

    .accueil-matt {
        max-width: 960px;
        gap: 50px;
        margin: 40px auto;
    }

    #mattGro {
        width: 300px;
        height: 300px;
        flex-shrink: 0;
    }

    .descMatt {
        font-size: 1.25rem;
        line-height: 1.8;
        max-width: none;
    }

    .accueil-bottom {
        max-width: 960px;
        gap: 50px;
        margin: 40px auto;
    }

    .centre {
        width: 400px;
        flex-shrink: 0;
        overflow: hidden;
        border-radius: 30px;
    }

    .centre img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 30px;
    }

    .accueil-bottom .decorP {
        font-size: 1.2rem;
        line-height: 1.8;
        max-width: none;
        flex: 1;
    }

    .decorP {
        font-size: 1.2rem;
        padding: 22px 34px;
    }
}

@media (min-width: 1024px) {

    .mainHistorique {
        max-width: 1200px;
    }

    .historique-bloc {
        gap: 70px;
        max-width: 1160px;
    }

    .historique-img {
        width: 40%;
        max-width: 480px;
    }

    .historique-bloc p {
        font-size: 1.25rem;
    }

    .historique-full {
        max-width: 1160px !important;
    }

    .historique-conclusion {
        font-size: 1.25rem;
        max-width: 1160px;
    }

    .accueil-matt,
    .accueil-bottom {
        max-width: 1060px;
        gap: 70px;
    }

    #mattGro {
        width: 340px;
        height: 340px;
    }

    .centre {
        width: 460px;
        overflow: hidden;
    }

    .descMatt,
    .accueil-bottom .decorP {
        font-size: 1.3rem;
    }
}

@media (min-width: 1280px) {

    .mainHistorique {
        max-width: 1300px;
    }

    .historique-bloc {
        max-width: 1260px;
        gap: 90px;
    }

    .historique-img {
        max-width: 540px;
    }

    .historique-full {
        max-width: 1260px !important;
    }

    .historique-conclusion {
        max-width: 1260px;
        font-size: 1.3rem;
    }

    .accueil-matt,
    .accueil-bottom {
        max-width: 1160px;
        gap: 90px;
    }

    #mattGro {
        width: 380px;
        height: 380px;
    }

    .centre {
        width: 520px;
        overflow: hidden;
    }
}

/*==========================================================================================*/
/*  PERSONNAGES — alternance gauche/droite                                                  */
/*==========================================================================================*/

@media (min-width: 768px) {

    /* Par défaut : image gauche, texte droite — déjà fait */

    /* Classe .reverse : image droite, texte gauche */
    .persoBack.reverse figure {
        flex-direction: row-reverse;
    }
}

/*==========================================================================================*/
/*  HEADER IMAGES & BOUTONS — Version grand écran                                          */
/*==========================================================================================*/

@media (min-width: 768px) {

    /* Image d'entête plein écran */
    .entete {
        width: 100%;
        height: 55vh;
        max-height: none;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

    /* Boutons suivant et retour */
    .btn-suivant {
        font-size: 1.8rem;
        padding: 22px 90px;
        border-width: 5px;
    }

    .btn-retour {
        font-size: 1.6rem;
        padding: 16px 40px;
        border-width: 5px;
    }
}

@media (min-width: 1024px) {

    .entete {
        height: 60vh;
    }

    .btn-suivant {
        font-size: 2rem;
        padding: 26px 110px;
    }

    .btn-retour {
        font-size: 1.8rem;
        padding: 18px 50px;
    }
}

@media (min-width: 1280px) {

    .entete {
        height: 65vh;
    }

    .btn-suivant {
        font-size: 2.2rem;
        padding: 28px 120px;
    }

    .btn-retour {
        font-size: 2rem;
        padding: 20px 56px;
    }
}

/*==========================================================================================*/
/*  PRODUITS — jeux vidéos grille, film, figurines uniformes                               */
/*==========================================================================================*/

/* --- MOBILE : jeux en colonne simple --- */
.jeux-grid {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 500px;
}

.jeu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background-color: #F3CA27;
    border: 4px solid #F6A0AC;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 4px 8px 16px rgba(0,0,0,0.15);
}

.jeu-item img {
    width: 100%;
    max-width: 260px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    flex-shrink: 0;
}

.jeu-texte {
    text-align: left;
    width: 100%;
}

.jeu-texte h3 {
    font-size: 1.3rem;
    color: #F6A0AC;
    -webkit-text-stroke: 1px #F3CA27;
    margin-bottom: 4px;
}

.jeu-annee {
    font-size: 0.9rem;
    color: #DD5C3C;
    font-weight: bold;
    padding: 0 !important;
    margin: 0 0 8px 0 !important;
}

.jeu-texte p {
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0 !important;
    margin: 0 !important;
    color: #170F05;
}

/* --- FILM : mobile colonne --- */
.movie-bloc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 500px;
    margin: 20px auto;
}

.movie-bloc img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* --- FIGURINES uniformisées --- */
.figurines2col {
    display: flex !important;
    justify-content: center !important;
    gap: 20px;
    padding: 10px !important;
    list-style: none;
}

.figurines2col li {
    width: auto !important;
    flex: 1;
    max-width: 45%;
}

.figurines2col figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Taille uniforme pour Bartman et Krusty */
.figurines2col figure img {
    width: 100% !important;
    height: 220px !important;
    object-fit: contain !important;
    max-width: 180px;
}

.figurines2col figcaption {
    font-size: 0.9rem;
    text-align: center;
}

@media (min-width: 768px) {

    /* Jeux : grille 2 colonnes */
    .jeux-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        flex-direction: unset;
        gap: 28px;
        max-width: 960px;
        margin: 30px auto;
        padding: 0 20px;
        align-items: start;
    }

    /* Carte jeu desktop : image en haut pleine largeur, texte en bas */
    .jeu-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .jeu-item img {
        width: 100%;
        max-width: none;
        height: 240px;
        object-fit: cover;
        border-radius: 12px;
    }

    .jeu-texte {
        text-align: left;
        width: 100%;
    }

    .jeu-texte h3 {
        font-size: 1.5rem !important;
    }

    .jeu-annee {
        font-size: 1rem !important;
    }

    .jeu-texte p {
        font-size: 1.05rem !important;
        line-height: 1.55 !important;
    }

    .jeu-texte h3 {
        font-size: 1.6rem;
    }

    .jeu-annee {
        font-size: 1rem !important;
    }

    .jeu-texte p {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
    }

    /* Film : image gauche + texte droite */
    .movie-bloc {
        flex-direction: row;
        align-items: center;
        gap: 40px;
        max-width: 1000px;
        margin: 30px auto;
        padding: 0 20px;
    }

    .movie-bloc img {
        width: 280px;
        max-width: 280px;
        flex-shrink: 0;
        height: auto;
    }

    .movie-texte {
        flex: 1;
        text-align: left;
    }

    .movie-texte p {
        font-size: 1.2rem !important;
        line-height: 1.75 !important;
        padding: 0 !important;
        margin: 10px 0 !important;
    }

    /* Figurines uniformisées desktop */
    .figurines2col {
        max-width: 500px;
        margin: 0 auto;
    }

    .figurines2col figure img {
        height: 280px !important;
        max-width: 220px;
    }

    .figurines2col figcaption {
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {

    .jeux-grid {
        max-width: 1100px;
        gap: 36px;
    }

    .jeu-item img {
        height: 260px;
    }

    .jeu-texte h3 {
        font-size: 1.8rem;
    }

    .jeu-texte p {
        font-size: 1.2rem !important;
    }

    .movie-bloc {
        max-width: 1100px;
        gap: 60px;
    }

    .movie-bloc img {
        width: 340px;
        max-width: 340px;
    }
}