/* ============================================================
   EDOUARGOT — index.php : fond vidéo comme article.php
   Ne touche pas à .custom-nav a.
   ============================================================ */

/* Pas de gouttière artificielle à droite */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  scrollbar-gutter: auto !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Le fond vidéo doit couvrir toute la fenêtre.
   Ne pas mettre max-width:100% ici, sinon il peut s'arrêter avant la scrollbar. */
.edo-video-ciel0-global,
#video-bg {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;

  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;

  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;

  object-fit: cover !important;
  object-position: center center !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: -9999 !important;
  background: transparent !important;
}

/* Les autres éléments restent au-dessus du fond */
body > *:not(.edo-video-ciel0-global):not(#video-bg) {
  position: relative;
}

/* Le bandeau défilant peut dépasser mathématiquement,
   mais il ne doit pas peindre en dehors de son cadre. */
.scrolling-text-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  contain: paint !important;
  isolation: isolate !important;
}

#scrollingText.scrolling-text,
.scrolling-text.edo-scroll-raf {
  width: max-content !important;
  max-width: none !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  will-change: transform !important;
}

#scrollingText .edo-scroll-copy,
.scrolling-text .edo-scroll-copy {
  display: inline-block !important;
  white-space: nowrap !important;
}

/* Sécurité légère : pas de règle sur les liens du menu */
.top-banner,
.header-animation,
.custom-nav,
main,
section,
footer {
  max-width: 100% !important;
}

/* EDOUARGOT CENTRAGE CARTES VISIBLES DEBUT */

/*
  NOTE VERTE :
  Ce bloc corrige seulement le centrage des cartes produits visibles.
  Il ne change pas les couleurs, les bordures, les images, les prix ni le thème.
  Cause : l'ancien CSS force une grille de 4 colonnes.
  Avec 3 cartes visibles, cela crée une colonne vide à droite.
*/

body .indexhaut.edo-produits-accueil .indexhaut-cards,
body .edo-produits-zone .indexhaut-cards {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
}

body .indexhaut.edo-produits-accueil .ih-card,
body .edo-produits-zone .ih-card {
  flex: 0 1 276px !important;
  width: 276px !important;
  max-width: 276px !important;
}

@media (max-width: 699px) {
  body .indexhaut.edo-produits-accueil .ih-card,
  body .edo-produits-zone .ih-card {
    flex: 0 1 calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
  }
}

@media (max-width: 420px) {
  body .indexhaut.edo-produits-accueil .ih-card,
  body .edo-produits-zone .ih-card {
    flex: 0 1 100% !important;
    width: 100% !important;
    max-width: 340px !important;
  }
}

/* EDOUARGOT CENTRAGE CARTES VISIBLES FIN */








/* EDOUARGOT ARTICLE FLEX BASIS AUTO DEBUT */

/*
  NOTE VERTE :
  Correction uniquement pour /articles/article.php.

  Cause :
  grid-articles.css met body en display:flex + flex-direction:column.
  Or les CSS produits donnent à .edo-produits-zone un flex-basis:100%.
  Donc la zone produits prend une hauteur énorme, d'où le grand vide avant
  "Carte de la Maison".

  Ce bloc remet la zone produits en hauteur naturelle.
*/

html body.edo-page-articles .edo-produits-zone {
  flex: 0 0 auto !important;
  flex-basis: auto !important;
  align-self: center !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  width: 100% !important;
  max-width: 1180px !important;

  margin-top: 18px !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Tous les enfants directs doivent rester en hauteur naturelle */
html body.edo-page-articles .edo-produits-zone > section.indexhaut,
html body.edo-page-articles .edo-produits-zone .indexhaut-hero,
html body.edo-page-articles .edo-produits-zone .indexhaut-cards {
  flex: 0 0 auto !important;
  flex-basis: auto !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Cartes : pas de hauteur artificielle sur article.php */
html body.edo-page-articles .edo-produits-zone .ih-card,
html body.edo-page-articles .edo-produits-zone .ih-card > a {
  flex-basis: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  background: #ffffff !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
}

/* Image propre, sans fond parasite CSS */
html body.edo-page-articles .edo-produits-zone .ih-img {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Prix rapproché, sans pousser la carte vers le bas */
html body.edo-page-articles .edo-produits-zone .ih-price {
  margin-top: 6px !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 4px !important;
  padding-bottom: 16px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Section suivante : hauteur naturelle aussi */
html body.edo-page-articles .edo-produits-zone + .edo-preparations-statiques {
  flex: 0 0 auto !important;
  flex-basis: auto !important;

  margin-top: 10px !important;
  padding-top: clamp(16px, 3vw, 26px) !important;
}

@media (max-width: 700px) {
  html body.edo-page-articles .edo-produits-zone + .edo-preparations-statiques {
    margin-top: 10px !important;
    padding-top: 16px !important;
  }
}

/* EDOUARGOT ARTICLE FLEX BASIS AUTO FIN */


/* EDOUARGOT ARTICLE ESPACE FINAL PRODUITS PREPARATIONS DEBUT */

/*
  NOTE VERTE :
  Correction uniquement pour /articles/article.php.

  Ne pas mettre de <br><br> dans .edo-preparations-grid.
  L'espace entre les cartes produits et "Carte de la Maison" se règle ici.

  Réglage :
  - trop collé : augmente 44px ;
  - trop éloigné : diminue 44px.
*/

html body.edo-page-articles .edo-produits-zone + .edo-preparations-statiques {
  margin-top: 44px !important;
}

/* Mobile : un peu moins d'espace */
@media (max-width: 700px) {
  html body.edo-page-articles .edo-produits-zone + .edo-preparations-statiques {
    margin-top: 28px !important;
  }
}

/* EDOUARGOT ARTICLE ESPACE FINAL PRODUITS PREPARATIONS FIN */



/* EDOUARGOT ARTICLE ESPACE HAUT PRODUITS DEBUT */

/*
  NOTE VERTE :
  Correction uniquement pour /articles/article.php.

  Objectif :
  réduire plus fortement l’espace entre le menu et les cartes produits.

  Réglage :
  - encore trop grand : passe margin-top à -28px ;
  - trop collé : passe margin-top à -8px ou 0px.
*/

html body.edo-page-articles .edo-produits-zone {
  margin-top: -18px !important;
}

html body.edo-page-articles .edo-produits-zone .indexhaut,
html body.edo-page-articles .edo-produits-zone .indexhaut-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body.edo-page-articles .edo-produits-zone .indexhaut-cards {
  margin-top: 0 !important;
}

/* Mobile : éviter que ça colle trop */
@media (max-width: 700px) {
  html body.edo-page-articles .edo-produits-zone {
    margin-top: -6px !important;
  }

  html body.edo-page-articles .edo-produits-zone .indexhaut-cards {
    margin-top: 0 !important;
  }
}

/* EDOUARGOT ARTICLE ESPACE HAUT PRODUITS FIN */
