 
        /* --- BASE --- */
        body {
            margin: 0;
            padding: 20px 10px;
            font-family: 'Segoe UI', Arial, sans-serif;
            background-color: #d2b48c;
            background-image: 
                repeating-linear-gradient(90deg, rgba(0,0,0,0.03) 0px, rgba(0,0,0,0.03) 1px, transparent 1px, transparent 40px),
                linear-gradient(to bottom, #8b4513 0%, #d2b48c 100%);
            background-attachment: fixed;
        }

        .container {
            max-width: 1000px;
            width: 95%;
            margin: 20px auto;
            background-color: white;
            border-radius: 25px;
            box-shadow: 0 15px 40px rgba(0,0,0,0.4);
            padding: 30px;
            box-sizing: border-box;
            text-align: center;
        }

        /* --- HEADER STYLE AFFICHE --- */
        .header-box {
            background: #ffce54 !important;
            padding: 40px 20px;
            border: 6px dashed #34495e;
            border-radius: 30px;
            margin-bottom: 40px;
        }

        .title-line-1 { font-family: 'Luckiest Guy'; font-size: clamp(2rem, 8vw, 4rem); color: #34495e; display: block; line-height: 0.9; }
        .title-line-2 { font-family: 'Luckiest Guy'; font-size: clamp(1.5rem, 6vw, 3rem); color: #e67e22; display: block; margin: 10px 0; }
        
        .date-line { 
            border-top: 3px solid #34495e; 
            padding-top: 10px; 
            margin-top: 15px;
            font-family: 'Space Mono';
            font-weight: bold;
            color: #2c3e50;
            font-size: 1.1rem;
        }
        
        .title-line-3 { font-family: 'Luckiest Guy'; font-size: clamp(1.2rem, 5vw, 2.5rem); color: #34495e; display: block; }

        .champion-text {
            font-size: 1.4rem;
            color: #f39c12;
            font-weight: bold;
            margin: 30px 0;
            display: block;
        }

        /* --- TITRES DE SECTION --- */
        .section-title {
            font-family: 'Luckiest Guy', cursive;
            font-size: 2.2rem;
            color: #e74c3c;
            margin: 40px 0 20px;
            border-left: 15px solid #e74c3c;
            padding-left: 20px;
            text-align: left;
        }

        /* --- SLIDER ÉNONCÉ VIF --- */
        .slider-container {
            position: relative;
            width: 100%;
            height: 500px; /* Plus grand pour voir l'image */
            background: #d5f5e3; /* Vert vif clair */
            border-radius: 20px;
            overflow: hidden;
            border: 5px solid #34495e;
        }

        .slide {
            min-width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            box-sizing: border-box;
        }

        .img-label { font-family: 'Luckiest Guy'; font-size: 1.5rem; color: #16a085; margin-bottom: 15px; }
        .main-img { width: 85%; max-width: 500px; border-radius: 15px; border: 4px solid #34495e; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

        /* --- BLOC SOLUTION AÉRÉ --- */
        .solution-box {
            background: #fdfefe;
            padding: 30px;
            border-radius: 20px;
            margin: 30px 0;
            text-align: left;
            border-left: 12px solid #2ecc71;
            box-shadow: 0 8px 20px rgba(0,0,0,0.1);
            font-family: 'Space Mono', monospace;
            line-height: 2;
        }

        .sol-item { margin-bottom: 25px; display: block; }
        .sol-item:last-child { margin-bottom: 0; }

        /* --- GRILLE DE CALCULS COMPLÈTE --- */
        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
        }

        .column { background-color: #fafafa; border-radius: 10px; padding: 15px; border-top: 6px solid; }
        .col-1 { border-color: #e74c3c; } .col-2 { border-color: #3498db; } .col-3 { border-color: #2ecc71; } .col-4 { border-color: #f1c40f; } .col-5 { border-color: #9b59b6; }

        .math-row { font-size: 18px; padding: 10px 0; display: flex; justify-content: space-between; border-bottom: 1px dashed #ddd; }
        .result { font-weight: bold; background-color: #e8f4fd; padding: 2px 8px; border-radius: 4px; }

        /* --- FÉLICITATIONS GÉANTES --- */
        .conclusion-box {
            margin-top: 60px;
            padding: 50px 20px;
            background: #2ecc71;
            border-radius: 40px;
            border: 8px solid #27ae60;
            color: white;
            animation: bounce 2s infinite;
        }

        .conclusion-box h2 { font-family: 'Luckiest Guy'; font-size: clamp(2.5rem, 10vw, 5rem); margin: 0; text-shadow: 4px 4px 0 #16a085; }
        .conclusion-box p { font-size: clamp(1.2rem, 4vw, 2rem); font-weight: bold; margin-top: 20px; }

        @keyframes bounce {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }

        .slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: #34495e; color: white; border: none; width: 50px; height: 50px; cursor: pointer; border-radius: 50%; font-size: 1.5rem; z-index: 10; }
        .prev { left: 15px; } .next { right: 15px; }

        @media (max-width: 600px) {
            .slider-container { height: 400px; }
            .container { padding: 15px; }
        }


    .container-global-enonce {
        background-color: #FFF4A3; /* Jaune banane clair */
        border: 2px solid #F0E060;
        border-radius: 15px;
        padding: 20px;
        max-width: 850px;
        margin: auto;
        text-align: center;
        font-family: sans-serif;
    }

    .slider-container {
        display: flex;
        align-items: center;
        position: relative;
        background: white;
        border-radius: 10px;
        padding: 10px;
        min-height: 250px;
        box-sizing: border-box;
    }

    .viewport-images {
        flex: 1;
        overflow: hidden;
    }

    .content-box {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* L'image garde ses proportions réelles */
    .img-enonce {
        max-width: 100%;
        max-height: 400px;
        display: block;
        cursor: pointer;
    }

    /* Le message par défaut si pas d'image */
    .no-image {
        display: none; /* Caché par défaut */
        width: 100%;
        height: 200px;
        background: #f0f0f0;
        border: 2px dashed #ccc;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        color: #777;
        font-style: italic;
    }

    .slide { display: none; }
    .fade { animation: fadeAnim 0.5s; }
    @keyframes fadeAnim { from {opacity: 0.4} to {opacity: 1} }

    /* Flèches */
    .nav-btn {
        background: #444;
        color: white;
        border: none;
        padding: 15px;
        cursor: pointer;
        border-radius: 5px;
        margin: 0 10px;
    }












    /* Cadre Global avec Jaune Banane Clair */
    .container-global-enonce {
        background-color: #FFF4A3; /* Jaune banane doux, moins agressif */
        border: 2px solid #F0E060;
        border-radius: 15px;
        padding: 20px;
        max-width: 700px;
        margin: 20px auto;
        font-family: 'Arial', sans-serif;
        box-shadow: 0 6px 12px rgba(0,0,0,0.05);
        text-align: center;
    }

    /* Ligne 1 : Style Header */
    .header-maths {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 15px;
    }

    .picto-maths {
        font-size: 1.5rem;
    }

    .titre-section {
        margin: 0;
        font-size: 1.2rem;
        color: #444;
        text-transform: uppercase;
        font-weight: bold;
    }

    /* Ligne 2 : Slider */
    .slider-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.5); /* Fond léger pour détacher l'image */
        padding: 15px;
        border-radius: 10px;
		
		/* Ajoute ces deux lignes pour corriger le dépassement */
    box-sizing: border-box; 
    width: 100%; 
    
    /* Assure-toi que le margin ne pousse pas le cadre dehors */
    margin: 10px 0;
	
    }

    .image-viewport {
        flex-grow: 1;
        display: flex;
        justify-content: center;
    }

    .image-slider {
        max-width: 100%;
        height: 200px; /* Taille miniature contrôlée */
        object-fit: contain; /* Garde les proportions réelles */
        cursor: zoom-in;
        transition: transform 0.3s ease;
        border-radius: 5px;
        border: 1px solid #ddd;
        background: white;
    }

    .image-slider:hover {
        transform: scale(1.05);
    }

    /* Boutons de navigation */
    .nav-btn {
        background: #444;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.2rem;
        transition: background 0.2s;
    }

    .nav-btn:hover {
        background: #000;
    }

    /* Ligne 3 : Incitation */
    .footer-incitation {
        margin-top: 15px;
    }

    .texte-clic {
        /*
		font-style: italic;
        color: #666;
        font-size: 0.9rem;
        */
		
		margin: 0;
		
	/* Change '0.9rem' par '1.2rem' ou '18px' selon ta préférence */
    font-size: 1.2rem; 
    
    font-style: italic;
    color: #444; /* Un gris un peu plus foncé pour mieux lire sur le jaune */
    font-weight: 600; /* Optionnel : pour mettre un peu de gras */
    }





/* LA DERNIERE PARTIE - GENERER par GEMINI */

    /* Ajoute ceci pour que l'image montre qu'elle est cliquable */
    .img-enonce {
        cursor: zoom-in !important;
        transition: transform 0.2s;
        /* Empêche le menu contextuel du téléphone de bloquer le swipe */
        touch-action: pan-y; 
    }
    
    .img-enonce:active {
        transform: scale(0.98);
    }

/* FIN : LA DERNIERE PARTIE - GENERER par GEMINI*/




/* FIN VERSION 05 */

/* --- TEST RADICAL MOBILE --- */

/* --- CORRECTIF FINAL : FORCE L'AFFICHAGE --- */
@media screen and (max-width: 600px) {
    /* On force le conteneur à être assez grand */
    .slider-container {
        display: flex !important;
        flex-direction: column !important;
        min-height: 380px !important;
        padding-bottom: 80px !important;
        overflow: visible !important;
    }

    .viewport-images {
        width: 100% !important;
        order: 1 !important;
        display: block !important;
    }

    /* Le JavaScript essaie de les cacher ? On dit NON avec !important */
    .nav-btn {
        display: flex !important; /* Force l'affichage même si le JS dit 'none' */
        visibility: visible !important;
        position: absolute !important;
        bottom: 15px !important;
        background: #34495e !important; /* Gris foncé pro (fini le rouge test) */
        color: white !important;
        width: 60px !important;
        height: 50px !important;
        border-radius: 12px !important;
        z-index: 99999 !important;
        justify-content: center !important;
        align-items: center !important;
        opacity: 1 !important;
    }

    /* Positionnement précis en bas */
    .prev { 
        left: 25% !important; 
        transform: translateX(-50%) !important; 
    }
    
    .next { 
        right: 25% !important; 
        transform: translateX(50%) !important; 
    }

    /* Ajustement de l'image pour laisser la place aux pouces */
    .img-enonce {
        max-height: 280px !important;
        margin-bottom: 10px !important;
    }
}





/* --- CORRECTIF MOBILE FINAL --- */
@media screen and (max-width: 768px) {
    /* On empile le contenu et on crée de la place en bas */
    .slider-container {
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 80px !important; 
        position: relative !important;
        min-height: 350px !important;
    }

    .viewport-images {
        width: 100% !important;
        order: 1 !important;
    }

    /* Les boutons se placent en bas du cadre */
    .nav-btn {
        display: flex !important;
        visibility: visible !important;
        position: absolute !important;
        bottom: 15px !important;
        background: #34495e !important; /* Couleur sombre */
        color: white !important;
        width: 65px !important;
        height: 50px !important;
        border-radius: 10px !important;
        z-index: 999 !important;
        justify-content: center;
        align-items: center;
    }

    /* Écartement des boutons pour les pouces */
    .prev { left: 25% !important; transform: translateX(-50%) !important; }
    .next { right: 25% !important; transform: translateX(50%) !important; }

    /* On s'assure que l'image ne dépasse pas */
    .img-enonce {
        max-height: 250px !important;
        width: auto !important;
        margin: 0 auto !important;
    }
}



/* --- RECENTRAGE VERTICAL MOBILE --- */
@media screen and (max-width: 600px) {
    .slider-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; /* Centre verticalement */
        align-items: center !important;     /* Centre horizontalement */
        min-height: 350px !important;       /* Donne une hauteur stable */
    }

    .viewport-images {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .content-box {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
}





/* --- STYLE ACCORDÉON DÉTAILS --- */
.details-container {
    margin-top: 20px;
    border: 2px solid #2ecc71;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fffb;
}

.details-header {
    background: #2ecc71;
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-family: 'Space Mono', monospace;
    transition: background 0.3s;
}

.details-header:hover { background: #27ae60; }

.fleche {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.details-content {
    max-height: 0; /* Caché par défaut */
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* Animation de glisse */
    background: white;
}

.details-inner {
    padding: 20px;
    border-top: 1px solid #eee;
    line-height: 1.6;
    color: #333;
}

/* Classe pour la flèche retournée */
.rotate { transform: rotate(180deg); }





/* --- AJUSTEMENT POUR LA GRILLE --- */
.grid {
    max-height: 0; /* Cachée par défaut */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out; /* Animation fluide */
    display: grid; /* On garde le mode grid */
}

/* Quand elle est ouverte, on laisse le contenu prendre sa place */
.grid.ouvert {
    max-height: 2000px; /* Une valeur assez grande pour tout montrer */
    margin-top: 20px;
}



