/* { outline: 1px solid red !important; } */ /* CORRECTION : Fermeture du commentaire ajoutée */

/* =========================================
   1. VARIABLES (Intact)
   ========================================= */
:root {
  --font-titre: 'Space Grotesk', sans-serif;
  --font-texte: 'Public Sans', sans-serif;

  --color-bg-light: #fdfaf5;
  --color-bg-nav: #fcf8f0;
  --color-text-dark: #272017;
  --color-accent-purple: #e3e0fc;

  --radius: 8px;
}



/* =========================================
   2. RESET & BASE (Intact)
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* C'est ICI qu'on empêche la page de scroller de gauche à droite */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  font-family: var(--font-texte);
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h2 {
  font-size: clamp(2.0rem, 4vw, 2.6rem);
  font-weight: 625;
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin: 0;
}

p {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 350;
  line-height: 1.7;
}

p strong {
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}



/* =========================================
   3. LAYOUTS & UTILITAIRES (Structure globale)
   ========================================= */
/* J'ai remis le .container indispensable ici */
.container {
  width: 100%;   /* Force à prendre toute la largeur */
  max-width: none;
  margin: 0;

  /* C'est ici que tu réduis l'espace gauche/droite */
  /* Si 6.4vw est trop grand, mets 2vw ou 1vw ici */
  padding-left: 4vw !important;
  padding-right: 4vw !important;
}

.align-center { align-items: center; }

.text-center { text-align: center; }

.section-padding { padding: 5rem 0; margin-bottom: 4rem; }

.pt-0 { padding-top: 0; }

.mt-2 { margin-top: 3rem; }



/* =========================================
   4. BOUTONS (Composants)
   ========================================= */
.btn {
  display: inline-block;
  width: max-content; /* Protège le bouton : il prend uniquement la taille de son texte */
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-titre);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: #fcf8f0;
  color: var(--color-text-dark);
}

.btn-dark {
  background-color: var(--color-text-dark);
  color: #fff;
}

.btn-dark:hover { background-color: #43464d; }

.btn-outline {
  border: 1px solid var(--color-text-dark);
}

.btn:hover {
  transform: scale(1.03); /* Le bouton grandit très légèrement au survol */
}



/* =========================================
   5. SECTIONS DU SITE (Dans l'ordre d'apparition)
   ========================================= */

/* --- Header & Nav --- *************************************************************************/
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-bg-nav);
  border-bottom: 1px solid #e3dfda;
  padding: 15px 0;
}

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

/* Le correctif clé : on empêche les éléments de s'étirer */
.brand, .nav-menu {
  width: auto !important;
}

.logo {
  margin-left: 3vw !important;
  height: 42px;
  width: auto !important; /* Protège l'image */
  display: block;
}




/* --- Hero Section --- *************************************************************************/
.hero {
  position: relative;
  background-color: #000;
  color: #fff;
  padding: 13vh 0 20vh 0;
  overflow: hidden;
  min-height: 75vh;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: left;
  margin-left: 3vw !important;
}

.hero h1 {
  font-family: var(--font-titre);
  font-size: clamp(2.6rem, 5.2vw, 3.2rem) !important;
  font-weight: 650;
  line-height: 1.15;
  margin-bottom: 2rem;
  width: 70%;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem) !important;
  opacity: 0.85;
  line-height: 1.5;
}

/* --- Logos Clients --- */
.logos-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  opacity: 0.6;
  margin-top: 2rem;
}

.logos-grid img { max-width: 120px; }



/* --- Features --- ************************************************************************************/
.features,
.eco {
  background-color: #ffffff !important;
}

.features {
  margin-bottom: 0 !important;
  padding-bottom: 2.5rem !important;
  background-color: #ffffff !important;
}

.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.features .grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 3rem;
}

.features .text-content {
  width: 100%;
}

.features .text-content p {
  width: 100%;
  /* Justifier permet de combler tout le vide à droite */
  text-align: justify;
}

.eco .grid-2-col {
  display: grid;
  /* 1.5fr pour la 1ère colonne (texte), 1fr pour la 2ème (image) = 60/40 */
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
}

.eco .text-content {
  width: 100%;
}

.eco .text-content p {
  width: 90%;
}

.eco .btn {
  margin-top: 2rem;
}

/* --- Statistiques --- ***************************************************************************************/
.bg-accent {
  background-color: #B7E4C7;
}

.stats {
  margin-top: -9em;    /* Espace au-dessus de la bande */
  margin-bottom: 4rem; /* Espace en dessous de la bande */
}

.stats .stat-item p {
  margin-top: 0.1rem;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500;
  font-size: 1.15rem !important;
}

.stats .grid-3-col {
  gap: 15rem;
  padding: 0;
}

.stats .container {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  min-height: auto;    /* Force la hauteur à s'adapter au texte */
}



/* Sur mesure ***************************************************************************************/
.contact-container {
  max-width: 600px;
  width: 90%; /* On définit une largeur réelle */
  margin: 0 auto !important; /* C'est ça qui centre réellement le bloc */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.tally-wrapper {
  background: #FDF8F0;
  border: 1px solid var(--color-text-dark);
  border-radius: var(--radius);
  padding: 1rem;
}

/* On force l'alignement horizontal et vertical */
.icon-title {
  display: flex;
  align-items: center; /* Aligne l'image et le titre sur la même ligne */
  gap: 15px;
  margin-bottom: 1rem;
}

/* On s'assure que l'image reste cohérente */
.icon-small {
  width: 32px;
  height: auto;
  align-self: center; /* Force l'icône à se centrer elle-même dans le conteneur flex */
}

.icon-title h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin : 0;
  line-height: 1.15 /* AJOUTE ÇA : force le texte à rester centré sur sa ligne */
}

/* Ce code signifie : "Sélectionne le paragraphe qui suit immédiatement .icon-title" */
.icon-title + p {
  margin-top: 4rem;
}



/* Mobile *******************************************************************************************/
/* Bloc 2 : Mobile first - Réduction de l'espace en haut */
.features-zigzag .feature-block:nth-child(2) .icon-title {
  margin-top: -9rem !important;
}

.features-zigzag .feature-block:nth-child(3) .icon-title {
  margin-top: -9rem !important;
}

.features-zigzag .feature-block:nth-child(4) .icon-title {
  margin-top: -7rem !important;
}

.reverse-row {
  grid-template-areas: "img txt"; /* Image à gauche, texte à droite */
}

/* On assigne chaque div à sa zone */
.reverse-row .image-content {
  grid-area: img;
}

.reverse-row .text-content {
  grid-area: txt;
}

.features-zigzag {
  padding: 0; /* Gère UNIQUEMENT l'espace tout en haut du 1er bloc */
  padding-bottom: 0; /* Gère UNIQUEMENT l'espace tout en bas du dernier bloc */
}

/* --- SECTION ZIGZAG (60% Texte / 40% Image) --- */
/* 1. Bloc normal (Texte à gauche, Image à droite) : 60% / 40% */
.features-zigzag .feature-block {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 3rem;
  margin-bottom: 4rem !important; /* Ajuste cette valeur pour écarter les blocs */
}

/* 2. Bloc inversé (Image à gauche, Texte à droite) : 40% / 60% */
.features-zigzag .feature-block.reverse-row {
  grid-template-columns: 1fr 1.5fr; /* On inverse pour garder la proportion */
  grid-template-areas: "img txt";
}

/* Assignation des zones pour l'inversion */
.features-zigzag .reverse-row .image-content { grid-area: img !important; }
.features-zigzag .reverse-row .text-content { grid-area: txt !important; }

/* 3. On applique notre victoire d'alignement (le texte remplit le bloc) */
.features-zigzag .text-content {
  width: 100%;
}

.features-zigzag .text-content p {
  width: 100%;
  text-align: justify;
}



/* Formulaire ******************************************************************************************/
.clients {
  padding-top: 2rem !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Optionnel : si tu veux un espacement spécifique après le titre */
.contact-container h2 {
  margin-bottom: 0;
}

.contact-container p {
  width: 85%;
}

/* On positionne le conteneur parent pour servir de repère */
.embeds-wrapper {
  position: relative;
  margin-top: 1rem;
  width: 100%;
}

/* On force le blanc sur toute la section Contact, du titre jusqu'en bas */
#contact {
  background-color: #ffffff !important;
  padding-top: 3rem !important;
}

/* On nettoie le formulaire pour qu'il se fonde sans démarcation */
.tally-wrapper {
    background-color: #FDFAF5 !important;
    border: 1px solid var(--color-text-dark) !important; /* Le trait sombre */
    border-radius: 16px !important;                      /* Les coins bien arrondis comme sur ta photo */
    padding: 2.5rem 1.5rem !important;                   /* L'espace pour aérer à l'intérieur du cadre */
    margin: 3rem auto !important;
    width: 100%;
  }



/* --- Footer --- ************************************************************************************/
.site-footer {
  display: block;
  background-color: var(--color-text-dark);
  padding: 12px 0;
  margin: 0;
}

/* =========================================
   6. ANIMATIONS
   ========================================= */
#animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-square {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: floatUp 5s linear forwards;
}

@keyframes floatUp {
  0% { transform: scale(0) translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: scale(1) translateY(-500px) rotate(360deg); opacity: 0; }
}



/* =========================================
   7. RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 1024px) {

  p {
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    text-align: left;
    line-height: 1.5;
  }

  /* On écrase la fonction clamp() qui réduit trop fort le texte sur tablette */
  h1 {
    font-size: clamp(2.3rem, 4.5vw, 3.2rem) !important;
    line-height: 1.1;
    text-align: left;
  }

  h2 {
    font-size: clamp(1.9rem, 3.8vw, 2.35rem) !important;
    line-height: 1.15;
    text-align: left !important;
    letter-spacing: -0.5px;
  }

  h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  }

  /* --- 2. Espacements (Facteur de compression ~0.85) --- */
  .section-padding {
    padding: 4rem 0;
    margin-bottom: 3.5rem;
  }

  .mt-2 {
    margin-top: 2.5rem;
  }

  .btn {
    padding: 14px 32px;
    font-size: 1.05rem;
  }



  /* --- 3. Header & Hero --- *************************************************************************************************/
  .logo {
    margin-left: 2vw;
  }

  .hero {
    padding: 8vh 0 9vh 0;
    min-height: 60vh;
  }

  .hero-content {
    margin-left: 1vw;
    padding-right: 5vw;
  }

  .hero .subtitle {
    font-size: clamp(1.3rem, 2.8vw, 1.55rem) !important;
    line-height: 1.5;
    max-width: 100%;
  }

  .logos-grid {
    gap: 2rem;
  }

  .logos-grid img {
    max-width: 90px;
  }



  /* --- 4. Sections Standards (Features & Eco) --- **********************************************************************/
  .desktop-only {
    display: none !important; /* Force le br à disparaître sur mobile */
  }

  .features {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  .eco {
    padding-top: 3rem !important; /* Gère l'espace entre les deux sections */
  }

  /* Force une grille stricte à une seule colonne */
  .features .grid-2-col,
  .eco .grid-2-col {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* CORRECTION ICI : "contents" avec un "s" dissout la boîte de texte */
  .features .text-content,
  .eco .text-content {
    display: contents !important;
  }

  /* Position 1 : Le titre tout en haut */
  .features h2 {
    grid-row: 1 !important;
    width: 100% !important;
    margin-top: -0.5rem !important; /* Ajout du !important */
    margin-bottom: 0.5rem !important;
    text-align: center !important;
  }

  .eco h2 {
    grid-row: 1 !important;
    width: 100% !important;
    margin-top: 3.75rem;
    margin-bottom: 1.75rem !important;
    text-align: center !important;
  }


  /* Position 2 : L'image s'intercale au milieu */
  .features img {
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto 1rem auto !important;
  }

  .eco img {
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 350px !important;
    margin: 0 auto 2rem auto !important;

  }

  /* Position 3 : Le paragraphe sous l'image */
  .features p, .eco p {
    grid-row: 3 !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    text-align: justify;
  }

  /* Position 4 : Le bouton (uniquement dans eco) tout en bas */
  .eco .btn {
    grid-row: 4 !important;
    margin-top: 2.5rem !important;
    margin-bottom: 6rem !important;
    justify-self: start !important; /* Aligne le bouton à gauche dans la grille */
  }



  /* --- 5. Statistiques (Adaptation Vitale) --- *************************************************************************$$$*/
  /* On empile les 3 colonnes pour éviter que le texte ne se superpose sur mobile */


  .stats .container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 0.75rem 0 !important; /* CORRECTION : on remplace 'auto' par '0' */
  }

  .stats .stat-item p {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    text-align: center;
    line-height: 1.5;
  }



  /* --- 6. Section Zigzag (Annulation de l'effet inversé) --- *****************************************************************************************/
  /* 1. On transforme chaque bloc en Flex colonne */
.features-zigzag .feature-block,
.features-zigzag .feature-block.reverse-row {
  display: flex !important;
  flex-direction: column !important;
  margin-bottom: 4rem !important;
}

/* 2. On "dissout" les sous-conteneurs pour que tout soit au même niveau */
.features-zigzag .text-content {
  display: contents !important;
}

/* 3. Ordre strict */
.features-zigzag .icon-title { order: 1 !important; width: 100% !important; justify-content: flex-start !important; }
.features-zigzag .text-content p { order: 3 !important; }
.features-zigzag .btn { order: 4 !important; margin-top: -1rem !important; margin-bottom: 0 !important; }


.features-zigzag .feature-block:nth-child(2) .text-content p { margin-top: -5.5rem !important; }

.features-zigzag .feature-block:nth-child(3) .text-content p { margin-top: -5rem !important; }

.features-zigzag .feature-block:nth-child(4) .text-content p { margin-top: -5rem !important; }


/* TES SETTINGS SUR-MESURE INTACTS */
.features-zigzag .feature-block:nth-child(1) .icon-title { margin-bottom: -3rem !important; }
.features-zigzag .feature-block:nth-child(1) .text-content p { margin-top: -5rem !important; margin-bottom: 1.5rem !important; }

.features-zigzag .feature-block:nth-child(2) .icon-title { margin-top: 1.5rem !important; margin-bottom: -3.75rem !important; }

.features-zigzag .feature-block:nth-child(3) .icon-title { margin-top: 3rem !important; margin-bottom: -2rem !important; }

.features-zigzag .feature-block:nth-child(4) .icon-title { margin-top: 3rem !important; margin-bottom: -3.5rem !important; }


/* Ajustements image (Code nettoyé des doublons) */
.features-zigzag .image-content {
  order: 2 !important;
  display: flex !important; /* Le display flex gagne pour centrer proprement */
  justify-content: center !important;
  width: 100% !important;
  padding: 0 5vw !important;
  margin-bottom: 2rem !important;
}

.features-zigzag .image-content img {
  display: block !important;
  width: 100% !important;
  max-width: 350px !important;
  margin: 0 auto !important;
}



  /* --- 7. Contact & Footer --- *********************************************************************************/
  .clients {
    padding-top: 2rem !important;
  }

  .contact-container {
    width: 95% !important;
    gap: 1.5rem;
  }

  #contact {
    padding-top: 2rem !important;
  }

  .tally-wrapper {
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .site-footer {
    padding: 15px 0;
    text-align: center;
  }

}
