/* =========================================
   1. IMPORTS & VARIABLES
   ========================================= */
/* Import de polices "ludiques" et lisibles (Fredoka pour les titres, Quicksand pour le texte) */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&family=Quicksand:wght@500;700&display=swap');

:root {
    /* Nouvelle Palette eLearniz */
    --bg-beige: #f8f3e8;       /* Fond principal */
    --primary-green: #245847;  /* Vert foncé (Textes, Footer) */
    --accent-orange: #d8aa64;  /* Boutons d'action, CTA */
    --highlight-yellow: #f0df75; /* Accents, Badges Promo */
    
    --white: #FFFFFF;
    --text-dark: #245847;      /* On utilise le vert foncé comme noir */
    --border-radius: 20px;     /* Arrondis prononcés */
    --shadow-soft: 0 4px 15px rgba(36, 88, 71, 0.1); /* Ombre douce verte */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    font-size: 18px;
    
    /* --- DÉBUT DU MOTIF CARREAUTÉ --- */
    /* 1. La couleur de fond de base (le beige actuel) */
    background-color: var(--bg-beige); 
    
    /* 2. Création du motif avec des bandes transparentes superposées */
    /* On utilise une couleur beige/marron un peu plus foncée avec de la transparence (rgba) */
    background-image:
        linear-gradient(90deg, rgba(215, 204, 200, 0.4) 50%, transparent 50%),
        linear-gradient(transparent 50%, rgba(215, 204, 200, 0.4) 50%);
        
    /* 3. Taille des carreaux (Ajuste cette valeur si tu les veux plus gros ou plus petits) */
    background-size: 50px 50px; 
    /* --- FIN DU MOTIF CARREAUTÉ --- */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka', sans-serif; /* Police titres arrondie */
    color: var(--primary-green);
    margin-top: 0;
    font-weight: 600;
}
h2 {
    font-size: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    background-color: var(--bg-beige); /* Fond beige comme le reste */
    border-bottom: 2px solid rgba(36, 88, 71, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

/* --- BARRE D'ANNONCE DÉFILANTE --- */
.top-bar-container {
    background-color: var(--primary-green);
    color: white;
    overflow: hidden; /* Masque le texte qui dépasse */
    padding: 8px 0;
    position: relative;
    z-index: 100; /* Au-dessus du menu */
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
    /* Animation infinie de 20 secondes */
    animation: scroll-left 25s linear infinite;
    padding-left: 100%; /* Commence hors de l'écran à droite */
    font-weight: bold;
    font-size: 0.95rem;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Pause l'animation au survol de la souris pour lire */
.top-bar-container:hover .scrolling-text {
    animation-play-state: paused;
}

/* --- AMÉLIORATION VISIBILITÉ HERO --- */
.hero-content-box {
    background: rgba(255, 255, 255, 0.7); /* Fond blanc semi-transparent */
    padding: 2rem 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: inline-block;
    max-width: 1000px;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-orange); /* Logo en orange */
}

/* Gestion de l'image du logo */
.logo img {
    max-height: 80px; /* Ajuste cette valeur selon la hauteur désirée */
    width: auto;      /* Garde les proportions de l'image */
    display: block;   /* Évite les petits espaces fantômes sous l'image */
}
/* Sur mobile (écran plus petit que 768px) */
@media (max-width: 768px) {
    header .logo img {
        height: 50px; /* On le réduit un peu sur mobile */
    }
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: var(--accent-orange);
}

/* Le bouton Panier devient Orange */
.nav-links .btn-primary {
    background-color: var(--accent-orange);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px; /* Forme pilule */
    box-shadow: 0 4px 0 rgba(0,0,0,0.1); /* Petit effet 3D */
    transform: translateY(0);
}

.nav-links .btn-primary:hover {
    background-color: #f0df75;
    color: black;
    transform: translateY(-2px);
}

/* Burger Menu */
.burger-menu {
    display: none;
    font-size: 2rem;
    color: var(--primary-green);
    cursor: pointer;
}

/* =========================================
   SECTION FEATURES (POURQUOI NOUS ?)
   ========================================= */

.features-section {
    margin: 4rem auto;
    text-align: center;
}

.features-section h2 {
    color: var(--primary-green);
    margin-bottom: 3rem;
    font-size: 2rem;
}

.features-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

/* La carte blanche pour couper du fond carreauté */
.feature-card {
    background-color: var(--white);
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius); /* Coins arrondis */
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    border: 2px solid transparent; /* Pour éviter le saut au hover */
}

/* Petit effet au survol */
.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--highlight-yellow);
}

/* La bulle jaune autour de l'icône */
.feature-icon {
    width: 80px;
    height: 80px;
    background-color: var(--highlight-yellow); /* Jaune pastel */
    border-radius: 50%; /* Rond parfait */
    margin: 0 auto 1.5rem auto; /* Centré */
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--primary-green);
}

.feature-card h3 {
    color: var(--accent-orange); /* Titre en orange pour le contraste */
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* =========================================
   SECTION THÉMATIQUES (ACCUEIL)
   ========================================= */

.theme-grid {
    display: grid;
    /* On force exactement 3 colonnes de largeur égale */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 4rem;
}

/* OPTIONNEL MAIS RECOMMANDÉ :
   Sur mobile, 3 colonnes c'est trop petit. 
   On ajoute ça juste en dessous pour qu'ils passent à 2 ou 1 sur téléphone */
@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 par ligne sur tablette */
    }
}

@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: 1fr; /* 1 par ligne sur petit mobile */
    }
}

.theme-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 2px solid transparent; /* Prêt pour le hover */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
}

.theme-card:hover {
    transform: translateY(-5px); /* Monte un peu */
    border-color: var(--highlight-yellow);
    box-shadow: 0 10px 20px rgba(36, 88, 71, 0.15);
}

/* L'icône */
.theme-icon {
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 1rem;
    background: var(--bg-beige);
    width: 70px;
    height: 70px;
    line-height: 70px; /* Centre verticalement */
    border-radius: 50%;
    transition: background 0.3s, color 0.3s;
}

.theme-card:hover .theme-icon {
    background: var(--accent-orange);
    color: var(--white);
}

/* Le titre */
.theme-card h3 {
    font-size: 1.1rem;
    color: var(--primary-green);
    margin: 0;
    line-height: 1.4;
}

/* Style spécial pour la carte "Toutes les thématiques" */
.special-card {
    background-color: var(--primary-green);
}

.special-card h3 {
    color: var(--white);
}

.special-card .theme-icon {
    background-color: rgba(255,255,255,0.1);
    color: var(--highlight-yellow);
}

.special-card:hover {
    background-color: #1e4a3b; /* Un peu plus foncé */
    border-color: var(--accent-orange);
}

/* =========================================
   3. BOUTONS & ÉLÉMENTS
   ========================================= */
.btn-primary {
    background-color: var(--accent-orange);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(239, 107, 49, 0.3);
}

.btn-primary:hover {
    background-color: #f0df75;
    color: black;
    transform: scale(1.05);
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    height: 80vh;
    align-content: center;
    align-items: center;
    background-color: var(--bg-beige);
    background-size: cover;
    background-position: center;
    text-align: center;
    /* On garde l'image de fond mais on ajoute un filtre pour adoucir */
}

/* On ajoute un bloc blanc arrondi derrière le texte du Hero pour la lisibilité */
.hero h1, .hero p, .hero a {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px var(--highlight-yellow); /* Touche pop ludique */
}

/* =========================================
   5. LAYOUT & GRIDS (Produits)
   ========================================= */
.container {
    max-width: 1800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.grid-products {
    margin: 0 auto;
    max-width: 1500px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* Carte Produit - Style "Carte à jouer" */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--highlight-yellow);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 5px solid var(--highlight-yellow); /* Séparation jaune */
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.price {
    color: var(--accent-orange);
    font-weight: 800;
    font-size: 1.4rem;
    font-family: 'Fredoka', sans-serif;
}

/* Badge Promo */
span[style*="background:var(--accent-gold)"], 
span[style*="background:#FFD700"] {
    background-color: var(--highlight-yellow) !important;
    color: var(--primary-green) !important;
    font-weight: bold;
    border-radius: 20px;
    padding: 5px 12px !important;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

/* =========================================
   6. SIDEBAR & FILTRES
   ========================================= */
aside {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--highlight-yellow); /* Bordure jaune ludique */
}

aside h3 {
    color: var(--accent-orange);
    border-bottom: 2px dashed var(--bg-beige);
    padding-bottom: 10px;
}

aside ul li a {
    display: block;
    padding: 8px 0;
    font-weight: 600;
}

aside ul li a:hover {
    color: var(--accent-orange);
    padding-left: 5px; /* Petit mouvement */
}

/* Barre de recherche et inputs */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
select, 
textarea {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px; /* Inputs tout ronds */
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    background-color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

textarea {
    border-radius: 20px; /* Pas 50px pour les textareas sinon c'est moche */
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-orange);
}

/* =========================================
   7. CONTACT & FAQ & TÉMOIGNAGES
   ========================================= */
/* Style des témoignages façon "Sticker" */
.container > div > div[style*="background:white"] {
    /* Cible les boites de témoignages de l'accueil */
    background-color: var(--white) !important;
    border-radius: 20px 20px 20px 0px; /* Forme bulle de BD */
    border: 2px solid var(--primary-green);
    box-shadow: 5px 5px 0px var(--highlight-yellow);
}

details {
    background-color: var(--white);
    margin-bottom: 15px;
    border-radius: 15px;
    padding: 0 15px 0 15px;
    border: 2px solid var(--bg-beige);
    overflow: hidden;
}

details summary {
    padding: 20px;
    font-weight: 700;
    color: var(--primary-green);
}

details summary::after {
    color: var(--accent-orange);
    font-weight: 900;
}

/* =========================================
   8. FOOTER (Refait)
   ========================================= */
footer {
    background-color: var(--primary-green);
    color: var(--bg-beige);
    margin-top: auto;
    padding-top: 4rem;
    border-top: 5px solid var(--highlight-yellow); /* Petite touche de couleur */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 3rem;
    margin: 0 auto; /* Centrage */
}

/* Titres des sections */
.footer-section h4 {
    color: var(--highlight-yellow);
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    font-size: 1.8rem !important;
    margin-bottom: 0.5rem !important;
}

/* Textes et Descriptions */
.footer-section p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

.slogan {
    font-style: italic;
    color: var(--highlight-yellow);
    margin-bottom: 1rem;
}

/* Liste des liens */
.links-col ul li {
    margin-bottom: 12px;
}

.links-col ul li a {
    color: var(--bg-beige);
    font-weight: 500;
    display: inline-block;
    transition: transform 0.2s, color 0.2s;
}

.links-col ul li a:hover {
    color: var(--highlight-yellow);
    transform: translateX(5px); /* Petit mouvement vers la droite */
}

/* Formulaire Infolettre */
.footer-form {
    display: flex;
    gap: 2px;
    margin-top: 15px;
}

.footer-form input[type="email"] {
    flex: 1;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    /* On force le style pillule ici */
    border-radius: 50px 0 0 50px !important; 
    margin: 0;
}

.footer-form button {
    border-radius: 0 50px 50px 0 !important;
    padding: 10px 20px;
    margin: 0;
    box-shadow: none; /* On enlève l'ombre pour que ça colle à l'input */
}

.newsletter-msg {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Style des icônes réseaux sociaux */
.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15); /* Fond blanc transparent */
    border-radius: 50%; /* Rend le bouton rond */
    color: var(--white);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Animation au survol */
.social-icon:hover {
    transform: translateY(-5px); /* Le bouton remonte un peu */
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Couleurs spécifiques au survol (selon tes variables) */
.social-icon.facebook:hover {
    color: var(--accent-orange); /* Bleu Facebook */
}

.social-icon.instagram:hover {
    color: var(--accent-orange); /* Ton orange pour Instagram */
}

.social-icon.tiktok:hover {
    color: var(--accent-orange); /* Ton vert ou noir pour TikTok */
}

/* Barre de Copyright */
.copyright-bar {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.copyright-bar p {
    margin: 5px 0;
}

/* --- BADGES THÉMATIQUES SUR PHOTO (CORRIGÉ) --- */

.product-card-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.theme-badges-container {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 10px; /* NOUVEAU : On laisse le conteneur prendre toute la largeur si besoin */
    
    display: flex;
    flex-direction: row; /* NOUVEAU : Alignement horizontal (côte à côte) */
    flex-wrap: wrap; /* Permet de passer à la ligne proprement si vraiment trop de badges */
    justify-content: flex-end; /* On colle tout à droite */
    align-items: flex-start;
    
    gap: 5px; /* Espacement propre entre les badges */
    pointer-events: none; /* Le clic passe au travers */
    z-index: 10;
}

.theme-badge {
    background-color: var(--highlight-yellow);
    color: var(--primary-green);
    font-family: 'Fredoka', sans-serif;
    font-size: 0.75rem; /* Un tout petit peu plus petit pour que ça rentre mieux */
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    
    /* LE SECRET : Empêche le texte de se couper sur 2 lignes */
    white-space: nowrap; 
}

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .burger-menu { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-bottom: 5px solid var(--accent-orange);
    }

    .nav-links.active { display: flex; }
    
    .hero h1 { font-size: 2rem; }
    
    .container { margin: 2rem auto; }
    
    /* On empile les colonnes */
    .container > div { flex-direction: column !important; }
    aside { width: 100%; margin-bottom: 2rem; }
}

/* Le style par défaut (Ordinateur/Tablette) */
.presentation-card {
    background: var(--white);
    padding: 3rem; /* Padding par défaut */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

/* Le style pour Mobile (Écrans plus petits que 768px) */
@media (max-width: 768px) {
    .presentation-card {
        padding: 2rem; /* Le changement demandé */
        gap: 1.5rem;   /* Conseil : je réduirais aussi le gap (l'écart) qui est souvent trop grand sur mobile */
    }
}