/* ==========================================================================
   CONFIGURATIONS GÉNÉRALES & VARIABLES
   ========================================================================== */
:root {
    /* Palette Automne 2026 : Terracotta & Ambre */
    --primary: #7a3b1e;        /* Terre Cuite : Autorité et sécurité */
    --primary-dark: #4a2412;   /* Brun Châtaigne : fonds profonds (footer, overlays) */
    --primary-light: #a65d34;  /* Sienne : Interactions */
    --accent: #e08e3c;         /* Ambre Doré : Boutons et accents */
    --accent-rgb: 224, 142, 60;
    --bg-surface: #fbf3ea;     /* Crème Chaude : Fonds de section */

    /* Couleurs de texte */
    --text-main: #3a2c22;      /* Brun foncé pour la lecture */
    --text-muted: #8a7566;     /* Taupe chaud pour infos secondaires */
    --white: #ffffff;

    /* Système */
    --font-display: 'Fraunces', Georgia, serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 4px 20px rgba(122, 59, 30, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

h1, h2, h3 {
    font-family: var(--font-display);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(122, 59, 30, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 600;
    font-size: 1.8rem;
    text-decoration: none;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-menu > li {
    margin-left: 2rem;
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--accent);
}

/* Dropdown Menu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(122, 59, 30, 0.1);
    padding: 1rem 0;
    min-width: 240px;
    display: none;
    border-radius: 8px;
    border: 1px solid rgba(122, 59, 30, 0.05);
    z-index: 100;
    /* --- ICI LA CORRECTION --- */
    list-style: none; 
}

/* On s'assure aussi que les éléments de liste n'ont pas de marge parasite */
.submenu li {
    margin: 0;
    padding: 0;
}

.dropdown:hover .submenu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.submenu a {
    padding: 0.7rem 1.5rem;
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
}

.submenu a:hover {
    background-color: var(--bg-surface);
}

.btn-contact {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-weight: 600 !important;
}

/* Pont de sécurité pour éviter que le menu ne se ferme au survol */
.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px; /* Largeur du pont invisible */
    display: block;
}

/* ==========================================================================
   SECTION HERO (Accueil)
   ========================================================================== */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    background-image: url('https://chesnaie.com/images/banniere_chesnaie.webp');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(74, 36, 18, 0.92) 0%, rgba(122, 59, 30, 0.65) 55%, rgba(224, 142, 60, 0.25) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.hero-subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    line-height: 1.1;
    margin-bottom: 1.8rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.hero-actions a {
    font-size: 0.9rem;
    padding: 0.9rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.btn-primary:hover, .btn-outline:hover {
    transform: translateY(-3px);
    background: var(--white);
    color: var(--primary);
}

/* Animation combinant un battement (scale) et une lueur (box-shadow) */
@keyframes heart-glow-pulse {
  0% {
    transform: scale(1);
    /* La lueur de base est visible */
    box-shadow: 0 0 10px 3px rgba(var(--accent-rgb, 37, 99, 235), 0.5);
  }
  14% {
    /* Légère augmentation de taille (début du battement) */
    transform: scale(1.05);
    /* La lueur s'intensifie et s'élargit légèrement */
    box-shadow: 0 0 15px 5px rgba(var(--accent-rgb, 37, 99, 235), 0.7);
  }
  28% {
    /* Retour à la taille normale */
    transform: scale(1);
    /* La lueur reste présente mais diminue un peu */
    box-shadow: 0 0 10px 3px rgba(var(--accent-rgb, 37, 99, 235), 0.5);
  }
  42% {
    /* Deuxième micro-battement pour l'effet "boum-boum" */
    transform: scale(1.03);
    box-shadow: 0 0 12px 4px rgba(var(--accent-rgb, 37, 99, 235), 0.6);
  }
  100% {
    /* Fin du cycle, retour à l'état initial */
    transform: scale(1);
    box-shadow: 0 0 10px 3px rgba(var(--accent-rgb, 37, 99, 235), 0.5);
  }
}

.btn-animated-primary {
  /* Vos styles de base (j'ai ajouté un fond pour que le glow se voit mieux sur l'image) */
  background-color: var(--accent, #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--white, #ffffff);
  padding: 1.1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  
  /* Transition douce pour le survol */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  
  /* Application de la nouvelle animation combinée (cycle de 2 secondes) */
  animation: heart-glow-pulse 2s infinite;
}

.btn-animated-primary:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
  /* On met une ombre plus classique et nette au survol */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: none;
}

/* ==========================================================================
   CONTENU DES PAGES INTERNES
   ========================================================================== */
.page-intro {
    padding: 80px 0 40px;
    text-align: center;
}

.page-intro h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    padding: 60px 0 100px;
}

.text-block {
    max-width: 800px;
    margin-bottom: 50px;
}

.text-block h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.info-box {
    background: var(--primary);
    color: var(--white);
    padding: 40px;
    border-radius: 20px;
    margin: 40px 0;
}

/* Grilles Modernes (Concepts & UDF) */
.concept-grid, .udf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.concept-card, .udf-item {
    background: var(--bg-surface);
    padding: 35px;
    border-radius: 15px;
    border: 1px solid rgba(122, 59, 30, 0.05);
    transition: var(--transition);
}

.concept-card:hover, .udf-item:hover {
    transform: translateY(-5px);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.concept-card h3, .udf-item h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.25rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--primary-dark);
    padding: 80px 0 0 0;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-phone {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 10px;
}

.footer-email {
    color: var(--accent);
    text-decoration: none;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ==========================================================================
   RESPONSIVITÉ (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Menu burger nécessaire pour une version mobile avancée */
    }

    .hero {
        text-align: center;
        height: auto;
        padding: 120px 0 80px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .page-intro h1 {
        font-size: 2.2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==========================================================================
   CSS POUR LES PAGES INTERNES (Habillement)
   ========================================================================== */

/* 1. Bannière de tête pour les pages internes */
.page-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.page-hero .lead {
    color: white;
    opacity: 1;
    font-weight: 400;
    font-size: 1.3rem;
}

/* 2. Mise en page en Zig-Zag (Texte + Image) */
.feature-section {
    display: flex;
    align-items: center;
    gap: 70px; /* Grand espace entre texte et image */
    padding: 100px 25px;
}

.feature-section:nth-child(even) {
    flex-direction: row-reverse; /* Inverse l'image et le texte */
}

.feature-image {
    flex: 1.2; /* L'image prend un peu plus de place */
}

.feature-image img {
    width: 100%;
    height: 450px; /* Hauteur fixe pour l'uniformité */
    object-fit: cover; /* Recadre proprement */
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(122, 59, 30, 0.1);
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 2.3rem;
    font-weight: 600;
}

.feature-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-main);
}

/* Fond alterné doux */
.bg-light {
    background-color: var(--bg-surface);
}

/* 3. Section de développement (plus simple) */
.development-section {
    padding: 80px 25px 120px;
    text-align: center;
}

.development-section h2 {
    color: var(--primary);
    margin-bottom: 40px;
}

.development-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    columns: 2; /* Texte sur deux colonnes pour le style */
    column-gap: 40px;
}

@media (max-width: 768px) {
    .development-content { columns: 1; }
}

/* ==========================================================================
   ENCART DE PRÉVENTION SUICIDE (Footer)
   ========================================================================== */
.footer-prevention-banner {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.footer-prevention-banner p {
    font-size: 0.9rem;
    color: #e2e8f0;
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-prevention-banner a {
    color: var(--white);
    font-weight: 600;
    text-decoration: underline;
    transition: var(--transition);
}

.footer-prevention-banner a:hover {
    color: var(--accent);
}

.footer-prevention-banner .emergency-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.9;
    margin: 0;
}

/* ==========================================================================
   BANNIÈRE DE CONSENTEMENT COOKIES
   ========================================================================== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: var(--primary-dark);
    color: var(--white);
    padding: 20px 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.cookie-banner-text {
    flex: 1;
    min-width: 250px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.cookie-btn-primary {
    background: var(--accent);
    color: var(--white);
}

.cookie-btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.5);
}

@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie-banner-actions {
        justify-content: center;
    }
}

/* Placeholder vidéo YouTube (chargement soumis au consentement) */
.yt-consent-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 20px;
}

.yt-consent-placeholder p {
    margin-bottom: 15px;
    max-width: 400px;
}

.yt-consent-load-btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.yt-consent-load-btn:hover {
    opacity: 0.9;
}