/* ==========================================================================
   Chai Marguerite - effets de la page d'accueil (Divi 5)
   Les contenus, couleurs et polices se règlent dans Divi.
   Ce fichier ne gère que les effets : relief 3D, recouvrement, défilement
   horizontal, menu plein écran.
   Les règles "html.cm-js" ne s'appliquent que sur le site public,
   jamais dans le Visual Builder, pour garder l'édition confortable.
   ========================================================================== */

html { scroll-behavior: smooth; }
/* Pages avec ces effets : le menu rond remplace l'en-tête Divi, on retire son espace réservé */
html.cm-js #page-container { padding-top: 0 !important; }
html.cm-js body { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- 01 HERO ------------------------------------------------------ */
.cm-hero {
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
}
html.cm-js .cm-hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}
.cm-relief-canvas,
.cm-relief-voile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cm-relief-canvas { z-index: 0; display: block; opacity: 0; transition: opacity .8s ease; }
.cm-relief-canvas.is-ready { opacity: 1; }
.cm-relief-voile {
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, .35) 0%,
    rgba(0, 0, 0, .55) 45%,
    rgba(0, 0, 0, .92) 88%,
    #000 100%);
  opacity: var(--cm-voile, .6);
}
.cm-hero > .et_pb_row,
.cm-hero .cm-hero-row {
  position: relative;
  z-index: 2;
}
.cm-hero .cm-hero-row {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  /* marges gauche et bas : réglées dans Divi (ligne Hero > Design > Espacement, en %) */
}
.cm-hero .cm-hero-row > .et_pb_column {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: flex-end;
  min-height: 140px;
}

/* Titre flottant en bas à gauche, jamais collé aux bords */
.cm-hero-title {
  width: auto !important;
  max-width: min(80%, 12em);
  margin-top: 0 !important;
}
.cm-hero-title .et_pb_heading_container > * {
  padding-bottom: 0;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
}

/* Chouette centrée, ferrée en bas */
.cm-hero-owl {
  position: absolute !important;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  margin: 0 !important;
  width: auto !important;
  z-index: 3;
}
.cm-hero-owl a { display: block; cursor: pointer; }
.cm-hero-owl img {
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .4));
}
.cm-hero-owl a:hover img,
.cm-hero-owl a:focus-visible img { transform: translateY(-8px); }
.cm-hero-owl a:focus-visible { outline: 2px solid currentColor; outline-offset: 8px; border-radius: 4px; color: #fff; }
html.cm-js .cm-hero-owl img { animation: cm-owl-bob 3.2s ease-in-out 1.2s infinite; }
@keyframes cm-owl-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 6px; }
}

@media (max-width: 767px) {
  .cm-hero-title { max-width: 100%; }
  .cm-hero-owl { bottom: -100px; }
}

/* ---------- Recouvrement (parallax) des sections suivantes ----------------- */
html.cm-js .cm-cover {
  position: relative;
  z-index: 2;
}
/* Vagues de vin au-dessus de la section 02 */
.cm-presentation { overflow: visible !important; }
.cm-waves {
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  height: clamp(120px, 22vh, 240px);
  transform: translateY(0);
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}
.cm-waves svg { display: block; width: 110%; height: 100%; margin-left: -5%; }
.cm-depth {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .9) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.cm-presentation > .et_pb_row { position: relative; z-index: 1; will-change: transform; }
.cm-liquid {
  position: absolute;
  inset: -2px 0 0;
  z-index: 2;
  pointer-events: none;
}

/* Galerie pleine hauteur */
.cm-pres-gallery-col { padding: 0 !important; align-self: stretch; }
.cm-pres-gallery-col .cm-pres-gallery,
.cm-pres-gallery-col .cm-pres-gallery .et_pb_gallery_items,
.cm-pres-gallery-col .cm-pres-gallery .et_pb_gallery_item,
.cm-pres-gallery-col .cm-pres-gallery .et_pb_gallery_image {
  height: 100% !important;
  margin: 0 !important;
}
.cm-pres-gallery-col .cm-pres-gallery { flex: 1 1 auto; width: 100% !important; border-radius: 0; box-shadow: none; }
.cm-pres-gallery-col .cm-pres-gallery img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
}
@media (max-width: 767px) {
  .cm-pres-gallery-col .cm-pres-gallery { height: 62vh; }
}

/* ---------- 02 PRESENTATION -------------------------------------------- */
.cm-presentation .cm-pres-text p:not(:last-child) { padding-bottom: 1em; }
.cm-bottle-icon .et-pb-icon,
.cm-bottle-icon .et_pb_icon_wrap { transition: transform .4s ease; }
.cm-bottle-icon a:hover .et-pb-icon,
.cm-bottle-icon a:hover .et_pb_icon_wrap { transform: rotate(-12deg) translateY(-4px); }
.cm-pres-gallery { overflow: hidden; }

/* ---------- 03 NOS PRODUITS : défilement horizontal ---------------------- */
.cm-products .cm-slide {
  min-height: 100vh;
  margin: 0 !important;
  padding: clamp(60px, 10vh, 120px) clamp(24px, 6vw, 110px) !important;
  align-items: center;
  column-gap: 2vw;
  overflow: hidden;
}
.cm-products .cm-products-head {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: clamp(28px, 5vh, 56px) clamp(24px, 6vw, 110px) 0 !important;
}
html.cm-js .cm-products.is-horizontal .cm-products-head {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
}
html.cm-js .cm-products.is-horizontal { padding: 0 !important; }
.cm-presentation .et_pb_column > .et_pb_module:not(.cm-bottle-icon) { width: 100%; }
.cm-pin {
  width: 100%;
  align-self: stretch;
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.cm-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.cm-track > .cm-slide {
  flex: 0 0 100vw;
  width: 100vw !important;
  height: 100%;
  min-height: 0;
}

/* Bouteille en diagonale (façon BRAND), qui flotte et pivote au scroll */
.cm-bottle-col { position: relative; z-index: 2; overflow: visible !important; }
.cm-bottle {
  position: relative;
  margin: 0 !important;
  --cm-float: 0;
  --cm-tilt: 0;
}
.cm-bottle img {
  position: relative;
  z-index: 1;
  max-height: 78vh;
  width: auto;
  transform: translateY(calc(var(--cm-float) * -18px)) rotate(calc(var(--cm-tilt, 0) * 4deg));
  filter: drop-shadow(14px 22px 22px rgba(20, 24, 18, .28));
  transition: transform .15s linear;
}
.cm-slide-tagline { position: relative; z-index: 1; }
.cm-slide-tagline h3 { padding-bottom: 0; text-wrap: balance; }
.cm-slide .cm-slide-text p { padding-bottom: 0; }

/* Barre de progression des slides */
.cm-progress {
  position: absolute;
  left: clamp(24px, 6vw, 110px);
  right: clamp(24px, 6vw, 110px);
  bottom: clamp(20px, 4vh, 40px);
  height: 2px;
  background: rgba(27, 36, 32, .18);
  z-index: 3;
}
.cm-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: rgba(27, 36, 32, .8);
  transform-origin: left;
  transform: scaleX(var(--cm-p, 0));
}

@media (max-width: 767px) {
  .cm-products .cm-slide {
    flex-direction: column;
    justify-content: center;
    row-gap: 18px;
    padding-top: 90px !important;
    padding-bottom: 60px !important;
  }
  .cm-bottle img { max-height: 46vh; transform: none; }
  .cm-products .cm-slide .cm-bottle-col { order: -1; }
  .cm-products .cm-slide .et_pb_column { width: 100%; }
}

/* ---------- MENU PLEIN ÉCRAN -------------------------------------------- */
.cm-burger {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + clamp(28px, 6vh, 64px));
  right: calc(env(safe-area-inset-right, 0px) + clamp(22px, 4vw, 60px));
  z-index: 100001;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #1b2420;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  transition: transform .3s ease, background-color .3s ease;
}
.cm-burger:hover { transform: scale(1.06); }
.cm-burger:focus-visible { outline: 2px solid #c5d05a; outline-offset: 3px; }
.cm-burger i,
.cm-burger i::before {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .35s ease, translate .35s ease;
}
.cm-burger i { position: relative; translate: 0 -3px; }
.cm-burger i::before { content: ""; position: absolute; left: 0; top: 6px; }
html.cm-nav-open .cm-burger i { translate: 0 0; transform: rotate(45deg); }
html.cm-nav-open .cm-burger i::before { top: 0; transform: rotate(-90deg); }

html.cm-js .cm-nav {
  position: fixed !important;
  inset: 0;
  z-index: 100000;
  margin: 0 !important;
  overflow-y: auto;
  display: flex !important;
  align-items: stretch;
  padding: clamp(24px, 4vw, 48px) 0 !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2%);
}
html.cm-nav-anim .cm-nav {
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .55s;
}
html.cm-js.cm-nav-open .cm-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
}
html.cm-nav-anim.cm-nav-open .cm-nav {
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1), visibility 0s;
}
html.cm-nav-open, html.cm-nav-open body { overflow: hidden; }
html.cm-js .cm-nav > .et_pb_row { min-height: 100%; align-items: stretch; }
.cm-nav-logo { margin: 0 !important; }

.cm-nav-links {
  list-style: none !important;
  counter-reset: cm-nav;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  gap: .1em;
}
.cm-nav-links li {
  counter-increment: cm-nav;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 0 !important;
  list-style: none !important;
}
.cm-nav-links li::before {
  content: counter(cm-nav, decimal-leading-zero);
  font-family: "Figtree", sans-serif;
  font-size: 14px;
  color: rgba(236, 237, 230, .7);
  min-width: 2ch;
}
.cm-nav-links a {
  font-family: var(--et_global_heading_font, "Tryst"), Georgia, serif;
  font-size: clamp(40px, 6.2vw, 92px);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: rgba(236, 237, 230, .55);
  text-decoration: none;
  transition: color .3s ease, transform .4s ease;
  display: inline-block;
}
.cm-nav-links a:hover,
.cm-nav-links a:focus-visible { color: #ecede6; transform: translateX(10px); }

html.cm-js .cm-nav .cm-nav-links li {
  opacity: 0;
  translate: 0 18px;
  transition: opacity .5s ease, translate .6s cubic-bezier(.2, .7, .2, 1);
}
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li { opacity: 1; translate: 0 0; }
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li:nth-child(1) { transition-delay: .12s; }
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li:nth-child(2) { transition-delay: .18s; }
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li:nth-child(3) { transition-delay: .24s; }
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li:nth-child(4) { transition-delay: .30s; }
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li:nth-child(5) { transition-delay: .36s; }
html.cm-js.cm-nav-open .cm-nav .cm-nav-links li:nth-child(6) { transition-delay: .42s; }

.cm-nav-aside { max-width: 340px; margin-left: auto !important; }
html.cm-js .cm-nav > .et_pb_row { margin-left: auto !important; margin-right: auto !important; }
a.cm-nav-cta,
.cm-nav-cta .et_pb_button,
.cm-nav-cta a {
  border-radius: 999px !important;
  background: #ecede6 !important;
  color: #1b2420 !important;
  border: 0 !important;
  padding: .7em 1.4em !important;
  font-family: "Figtree", sans-serif !important;
  font-size: 16px !important;
}
.cm-nav-cta .et_pb_button::after, a.cm-nav-cta::after { display: none !important; }

@media (max-width: 767px) {
  .cm-nav-aside { margin-left: 0 !important; margin-top: 6vh !important; }
}

@media (prefers-reduced-motion: reduce) {
  html.cm-js .cm-hero-owl img { animation: none; }
  .cm-bottle img, .cm-bottle::after { transition: none; }
}

/* ---------- Boutons pilule (façon BRAND) -------------------------------- */
a.cm-pill.et_pb_button,
.cm-pill a.et_pb_button {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  border-radius: 999px !important;
  border: 0 !important;
  background: #ecede6 !important;
  color: #1b2420 !important;
  padding: .62em 1.3em !important;
  font-family: "Figtree", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  transition: transform .25s ease, background-color .25s ease !important;
}
a.cm-pill.et_pb_button::after { display: none !important; }
a.cm-pill.et_pb_button:hover { transform: translateX(3px); padding: .62em 1.3em !important; }
a.cm-pill.cm-pill-dark.et_pb_button { background: #1b2420 !important; color: #ecede6 !important; }
.cm-slide a.cm-pill.et_pb_button { background: #fff !important; }

/* ---------- 04 CONTACT ---------------------------------------------------- */
.cm-contact .cm-form .et_pb_contact_form { margin-left: 0 !important; }
.cm-contact .cm-form input.input,
.cm-contact .cm-form textarea.input {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(27, 36, 32, .35) !important;
  border-radius: 0 !important;
  padding: 14px 0 !important;
  font-family: "Figtree", sans-serif !important;
  font-size: 17px !important;
  color: #1b2420 !important;
}
.cm-contact .cm-form input.input:focus,
.cm-contact .cm-form textarea.input:focus { border-bottom-color: #1b2420 !important; outline: none; }
.cm-contact .cm-form .et_pb_contact_submit {
  border-radius: 999px !important;
  border: 0 !important;
  background: #1b2420 !important;
  color: #ecede6 !important;
  font-family: "Figtree", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: .7em 1.5em !important;
}
.cm-contact .cm-form .et_pb_contact_submit::after { display: none !important; }
.cm-list { list-style: none !important; margin: 0 !important; padding: 0 !important; border-top: 1px solid rgba(27, 36, 32, .2); }
.cm-list li {
  list-style: none !important;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 !important;
  border-bottom: 1px solid rgba(27, 36, 32, .2);
}
.cm-list li span:last-child { color: rgba(27, 36, 32, .55); text-align: right; }

/* ---------- FOOTER -------------------------------------------------------- */
.cm-footer .cm-wordmark p {
  font-family: var(--et_global_heading_font, "Tryst"), Georgia, serif;
  white-space: nowrap;
  padding-bottom: 0;
}
.cm-footer .cm-wordmark-sub p { opacity: .7; padding-bottom: 0; }
.cm-footer-bottom { border-top: 1px solid rgba(236, 237, 230, .18); }
.cm-footer-bottom p { padding-bottom: 0; opacity: .75; }
.cm-footer .cm-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) {
  .cm-footer .cm-credit p { text-align: left !important; }
  .cm-footer .cm-wordmark p { white-space: normal; }
}

/* Menu ouvert : le contenu de la page (qui contient le menu) passe au-dessus du pied de page */
html.cm-nav-open .et-l--post,
html.cm-nav-open .et-l--post .et_builder_inner_content { position: relative; z-index: 100000 !important; }

/* Liens : plus de bleu par défaut. Couleur des liens réglée dans Divi (Personnaliser > Réglages généraux > Typographie), et sur fond foncé ils reprennent la couleur du texte */
.cm-presentation a, .cm-footer a, .cm-nav a, .cm-hero a { color: inherit; }
.et_pb_text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Formulaire : texte des champs, libellés et captcha en #1B2420 */
.cm-contact .cm-form input.input,
.cm-contact .cm-form textarea.input,
.cm-contact .cm-form .et_pb_contact_captcha_question,
.cm-contact .cm-form input.et_pb_contact_captcha { color: #1b2420 !important; }
.cm-contact .cm-form input.input::placeholder,
.cm-contact .cm-form textarea.input::placeholder { color: #1b2420 !important; opacity: 1; }
.cm-contact .cm-form input.input:-webkit-autofill { -webkit-text-fill-color: #1b2420; }

/* Icône bouteille (section 02) : SVG dessiné au trait, puis rempli, pause de 5 s, et on recommence */
.cm-bottle-icon { max-width: 80px; color: #fff; }
.cm-bottle-icon img,
.cm-bottle-icon svg.cm-draw { display: block; width: 100%; max-width: 80px; height: auto; transition: transform .4s ease; }
.cm-bottle-icon a:hover svg.cm-draw { transform: rotate(-12deg) translateY(-4px); }
.cm-bottle-icon svg.cm-draw path {
  fill: currentColor; fill-opacity: 0;
  stroke: currentColor; stroke-width: 7; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
}
/* cycle de 8,2 s : tracé 2,5 s, remplissage 0,7 s, puis 5 s de pause sur le dessin complet */
.cm-bottle-icon svg.cm-draw.cm-draw-on path { animation: cm-draw 8.2s cubic-bezier(.55,.1,.35,1) infinite; }
@keyframes cm-draw {
  0%   { stroke-dashoffset: 1; fill-opacity: 0; }
  30%  { stroke-dashoffset: 0; fill-opacity: 0; }
  39%  { stroke-dashoffset: 0; fill-opacity: 1; }
  100% { stroke-dashoffset: 0; fill-opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-bottle-icon svg.cm-draw path { animation: none !important; stroke-dashoffset: 0; fill-opacity: 1; }
}

/* Section 02 : sur les écrans peu hauts (portables), la section s'agrandit au lieu de déborder,
   et les espacements, le logo, le titre et l'icône se resserrent selon la hauteur d'écran */
@media (min-width: 981px) {
  .cm-presentation,
  .cm-presentation > .et_pb_row { height: auto !important; min-height: 100vh; }
  .cm-presentation > .et_pb_row { align-items: stretch; }
  .cm-presentation .et_pb_column:not(.cm-pres-gallery-col) {
    height: auto !important;
    padding-top: clamp(48px, 10vh, 107px) !important;
    padding-bottom: clamp(48px, 10vh, 107px) !important;
    row-gap: clamp(14px, 2.6vh, 32px) !important;
  }
  .cm-presentation .et_pb_column:not(.cm-pres-gallery-col) > .et_pb_image:not(.cm-bottle-icon) img { max-height: 14vh; width: auto; }
  .cm-presentation .et_pb_column:not(.cm-pres-gallery-col) .et_pb_heading .et_pb_module_header { font-size: min(5vw, 8.4vh) !important; line-height: 1.02 !important; }
  .cm-bottle-icon svg.cm-draw, .cm-bottle-icon img { max-height: 10vh; width: auto; }
}

/* Boutons : flèche fine (avec queue) qui glisse à droite au survol, dans la couleur du texte du bouton */
html body a.cm-pill.et_pb_button,
html body .cm-pill a.et_pb_button,
html body a.cm-nav-cta, html body .cm-nav-cta .et_pb_button,
html body .cm-contact .cm-form .et_pb_contact_submit {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  white-space: nowrap;
}
html body a.cm-pill.et_pb_button:not(#cm-a):not(#cm-b)::after,
html body .cm-pill a.et_pb_button:not(#cm-a):not(#cm-b)::after,
html body a.cm-nav-cta:not(#cm-a):not(#cm-b)::after, html body .cm-nav-cta .et_pb_button:not(#cm-a):not(#cm-b)::after,
html body .cm-contact .cm-form .et_pb_contact_submit:not(#cm-a):not(#cm-b)::after {
  content: "" !important;
  display: block !important;
  position: static !important;
  top: auto !important; right: auto !important; left: auto !important;
  transform: none !important;
  flex: none;
  width: 0 !important;
  height: 1em !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: 1 !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h17M14 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat right center / 1em 1em;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h17M14 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat right center / 1em 1em;
  opacity: 0 !important;
  transition: width .25s ease, margin .25s ease, opacity .25s ease !important;
}
html body a.cm-pill.et_pb_button:not(#cm-a):not(#cm-b):hover::after,
html body .cm-pill a.et_pb_button:not(#cm-a):not(#cm-b):hover::after,
html body a.cm-nav-cta:not(#cm-a):not(#cm-b):hover::after, html body .cm-nav-cta .et_pb_button:not(#cm-a):not(#cm-b):hover::after,
html body .cm-contact .cm-form .et_pb_contact_submit:not(#cm-a):not(#cm-b):hover::after {
  width: 1em !important;
  margin-left: .45em !important;
  opacity: 1 !important;
}
html body a.cm-pill.et_pb_button:hover { transform: none; }

/* Galerie section 02 : hauteur fixe et photos superposées, pour que le changement de photo ne fasse plus sauter la page */
.cm-pres-gallery-col .cm-pres-gallery .et_pb_gallery_items { position: relative !important; overflow: hidden; }
.cm-pres-gallery-col .cm-pres-gallery .et_pb_gallery_item {
  position: absolute !important;
  inset: 0 !important;
  min-height: 0 !important;
}
@media (max-width: 980px) {
  .cm-pres-gallery-col .cm-pres-gallery,
  .cm-pres-gallery-col .cm-pres-gallery .et_pb_gallery_items { height: 62vh !important; height: 62svh !important; }
}
.cm-pres-gallery-col .cm-pres-gallery .et-pb-controllers { z-index: 3; }

/* ---------- 03b NOS VINS, variante animée (classe cm-products-v2) ---------- */
html.cm-js .cm-products-v2.is-cm2 { padding: 0 !important; overflow: visible !important; background: var(--cm2-first, #686868) !important; }
.cm2-pin {
  position: sticky; top: 0;
  width: 100%; height: 100vh; height: 100svh;
  overflow: hidden;
}
.cm2-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; will-change: transform; }
.is-cm2 .cm2-track > .cm-slide {
  flex: none;
  width: 100vw !important; max-width: none !important; height: 100%;
  margin: 0 !important;
  padding: clamp(60px, 10vh, 120px) clamp(24px, 6vw, 110px) !important;
  background: transparent !important;
  align-items: center; column-gap: 2vw;
  flex-wrap: nowrap !important;
}
/* titres, textes et noms de cuvée : couleurs réglées dans Divi (aucun style imposé ici) */
.is-cm2 .cm-slide .cm-bottle-col { min-height: 1px; }

/* bouteilles : calque fixe au centre */
.cm2-bottles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.cm2-b {
  position: absolute; left: 50%; top: 0; height: 100%;
  display: flex; align-items: center; justify-content: center;
  will-change: transform, opacity;
}
.cm2-b .cm-bottle { margin: 0 !important; transform: none !important; width: auto !important; }
.cm2-b .cm-bottle img { max-height: 76vh !important; max-height: 76svh !important; width: auto !important; transform: none !important; }

/* barre de progression (même style que la section d'origine), claire sur fond foncé */
.cm2-pin .cm2-progress { background: rgba(255, 255, 255, .22); }
.cm2-pin .cm2-progress span { background: rgba(255, 255, 255, .9); }
.cm2-pin.cm2-light .cm2-progress { background: rgba(27, 36, 32, .18); }
.cm2-pin.cm2-light .cm2-progress span { background: rgba(27, 36, 32, .8); }

/* clic à gauche / à droite : curseur flèche */
.cm2-pin.cm2-prev { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='21' fill='%23fff' fill-opacity='.92'/%3E%3Cpath d='M27 22H16m5-6-6 6 6 6' fill='none' stroke='%231B2420' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 22 22, w-resize; }
.cm2-pin.cm2-next { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='21' fill='%23fff' fill-opacity='.92'/%3E%3Cpath d='M17 22h11m-5-6 6 6-6 6' fill='none' stroke='%231B2420' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 22 22, e-resize; }

/* mobile : bouteille en haut, textes en bas */
@media (max-width: 767px) {
  .is-cm2 .cm2-track > .cm-slide {
    flex-direction: column !important; justify-content: flex-end; align-items: stretch;
    padding: 0 22px calc(5svh + 26px) !important; row-gap: 10px;
  }
  .is-cm2 .cm-slide .cm-bottle-col { display: none !important; }
  .is-cm2 .cm-slide > .et_pb_column { width: 100% !important; flex: none !important; margin: 0 !important; padding: 0 !important; }
  .is-cm2 .cm-slide .cm-slide-tagline :is(h1, h2, h3, h4) { font-size: 26px !important; }
  .is-cm2 .cm-slide .cm-slide-name img { max-height: 64px !important; }
  .is-cm2 .cm-slide .cm-slide-text { margin-bottom: 6px !important; }
  .is-cm2 .cm-slide .cm-slide-text .et_pb_text_inner {
    font-size: 14px !important; line-height: 1.5 !important;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden;
  }
  .is-cm2 .cm-slide .cm-slide-text p { padding-bottom: .4em; }
  .cm2-b { top: 9svh; height: 38svh; }
  .cm2-b .cm-bottle img { max-height: 36svh !important; }
}

/* 03b : titres rapprochés de la bouteille (colonne centrale resserrée, titre calé contre elle) */
@media (min-width: 768px) {
  .is-cm2 .cm2-track > .cm-slide { column-gap: clamp(24px, 3vw, 56px) !important; }
  .is-cm2 .cm2-track > .cm-slide > .et_pb_column { flex: 1 1 0 !important; width: auto !important; margin: 0 !important; }
  .is-cm2 .cm2-track > .cm-slide > .cm-bottle-col { flex: 0 0 clamp(220px, 20vw, 340px) !important; }
  .is-cm2 .cm2-track > .cm-slide > .et_pb_column:first-child { align-items: flex-end !important; }
  .is-cm2 .cm2-track > .cm-slide > .et_pb_column:first-child .cm-slide-tagline { width: auto !important; max-width: 420px; }
}
@media (min-width: 768px) { .is-cm2 .cm2-track > .cm-slide > .et_pb_column:first-child .cm-slide-tagline :is(h1,h2,h3,h4) { text-align: right !important; } }

/* mobile : zone bouteille calculée (--cm2-bh) au-dessus du texte le plus long */
@media (max-width: 767px) {
  .cm2-b { top: 70px !important; height: var(--cm2-bh, 38svh) !important; }
  .cm2-b .cm-bottle img { max-height: var(--cm2-bh, 36svh) !important; }
  .cm2-compact .cm-slide .cm-slide-text .et_pb_text_inner { -webkit-line-clamp: 4 !important; }
  .cm2-compact .cm-slide .cm-slide-tagline :is(h1, h2, h3, h4) { font-size: 22px !important; }
  .cm2-compact .cm-slide .cm-slide-name img { max-height: 48px !important; }
}

/* 03b : bouteille en plein écran sur mobile */
@media (max-width: 767px) {
  .cm2-b, .cm2-b img { pointer-events: auto; }
  .cm2-b img { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
}
.cm-lb {
  position: fixed; inset: 0; z-index: 200000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27, 36, 32, .94);
  opacity: 0; transition: opacity .3s ease;
  padding: 56px 20px 24px;
}
.cm-lb.is-open { opacity: 1; }
.cm-lb img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transform: scale(.94); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
}
.cm-lb.is-open img { transform: none; }
.cm-lb-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #ecede6; color: #1b2420; font-size: 28px; line-height: 44px; cursor: pointer;
}
html.cm-lb-open, html.cm-lb-open body { overflow: hidden !important; }
html.cm-lb-open .cm-burger { visibility: hidden; }

/* Ombre des bouteilles : portée par un conteneur avec marge intérieure, pour que le navigateur
   (Safari / iPhone surtout) ne la coupe pas en carré pendant les animations */
.cm2-b .cm-bottle { padding: 48px !important; margin: -48px !important; filter: drop-shadow(14px 22px 22px rgba(20, 24, 18, .28)); }
.cm2-b .cm-bottle img { filter: none !important; }
.cm2-b { will-change: auto; }
.cm-lb img { transform: none !important; filter: none !important; transition: none !important; }

/* Hero : titre centré sur mobile (alignement du texte réglé dans Divi, onglet mobile) */
@media (max-width: 767px) {
  .cm-hero-title { align-self: center !important; margin-left: auto !important; margin-right: auto !important; }
}

/* ---------- Pages légales (mentions, confidentialité, cookies) ---------- */
#page-container:has(.cm-legal-page) { padding-top: 0 !important; }
.cm-legal-page .cm-legal-back a { font-size: 14px; color: #1b2420; text-decoration: underline; text-underline-offset: 3px; }
.cm-legal-page .cm-legal-title { margin: 18px 0 clamp(28px, 5vh, 48px) !important; }
.cm-legal h2 { font-family: var(--et_global_heading_font, "Tryst"), Georgia, serif; font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; color: #1b2420; margin: 2.2em 0 .6em; padding: 0; }
.cm-legal h3 { font-family: "Figtree", sans-serif; font-weight: 600; font-size: 17px; color: #1b2420; margin: 1.6em 0 .4em; padding: 0; }
.cm-legal p { padding-bottom: 1em; }
.cm-legal ul { list-style: disc; padding: 0 0 1em 1.2em; }
.cm-legal li { margin-bottom: .4em; }
.cm-legal a { color: #1b2420; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cm-legal .cm-legal-intro { font-size: 18px; line-height: 1.6; }
.cm-legal .cm-todo { background: #c5d05a; padding: 0 .3em; border-radius: 3px; font-weight: 600; }
.cm-legal .cm-legal-date { margin-top: 3em; font-size: 13px; opacity: .6; }
/* Politique de cookies générée par Complianz, à la charte */
.cm-legal #cmplz-document, .cm-legal #cmplz-document p, .cm-legal #cmplz-document li, .cm-legal #cmplz-document span { font-family: "Figtree", sans-serif !important; font-size: 16px !important; line-height: 1.7 !important; color: #1b2420 !important; }
.cm-legal #cmplz-document { max-width: none !important; }
.cm-legal #cmplz-document h2 { font-family: var(--et_global_heading_font, "Tryst"), Georgia, serif !important; font-weight: 400 !important; font-size: clamp(22px, 2.4vw, 30px) !important; color: #1b2420 !important; margin: 2em 0 .6em !important; }
.cm-legal #cmplz-document h3, .cm-legal #cmplz-document .cmplz-service-header h3 { font-family: "Figtree", sans-serif !important; font-weight: 600 !important; font-size: 17px !important; color: #1b2420 !important; }
.cm-legal #cmplz-document a { color: #1b2420 !important; text-decoration: underline !important; }
.cm-legal #cmplz-document details, .cm-legal #cmplz-document .cmplz-dropdown { background: rgba(27, 36, 32, .05) !important; border-radius: 10px !important; border: 0 !important; }
.cm-legal #cmplz-document .cmplz-category-toggle, .cm-legal #cmplz-document summary { color: #1b2420 !important; }

/* Formulaire : message de remerciement aux couleurs du site, avec une mini chouette */
.cm-contact .et-pb-contact-message:has(p:not(.et_pb_contact_error_text)) {
  position: relative;
  background: #1b2420; color: #ecede6;
  border-radius: 14px;
  padding: 30px 30px 28px 98px;
  margin: 8px 0 18px;
  max-width: 520px;
  animation: cm-thanks-in .6s cubic-bezier(.2,.8,.2,1) both;
}
.cm-contact .et-pb-contact-message:has(p:not(.et_pb_contact_error_text))::before {
  content: ""; position: absolute; left: 28px; top: 30px;
  width: 48px; height: 48px;
  background-color: #ecede6;
  -webkit-mask: url("/wp-content/uploads/2026/10/chouette_marguerite_w.png") no-repeat center / contain;
          mask: url("/wp-content/uploads/2026/10/chouette_marguerite_w.png") no-repeat center / contain;
}
.cm-contact .et-pb-contact-message p:not(.et_pb_contact_error_text) {
  margin: 0 !important; padding: 0 !important;
  font-family: "Figtree", sans-serif !important; font-size: 16px !important; line-height: 1.6 !important; color: #ecede6 !important;
}
.cm-contact .et-pb-contact-message .cm-thanks-title {
  display: inline-block; margin-bottom: 6px;
  font-family: var(--et_global_heading_font, "Tryst"), Georgia, serif; font-size: 26px; line-height: 1.15;
}
.cm-contact .et-pb-contact-message .cm-thanks-sign {
  display: inline-block; margin-top: 8px;
  font-family: var(--et_global_heading_font, "Tryst"), Georgia, serif; font-size: 24px;
}
@keyframes cm-thanks-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
  .cm-contact .et-pb-contact-message:has(p:not(.et_pb_contact_error_text)) { padding: 84px 24px 24px; }
  .cm-contact .et-pb-contact-message:has(p:not(.et_pb_contact_error_text))::before { left: 24px; top: 24px; width: 44px; height: 44px; }
}

/* cm-nav-links-terre : liens du menu ouvert lisibles sur fond #AE5D4C */
#menu.cm-nav a:not(.et_pb_button), .cm-nav a:not(.et_pb_button){color:#ecede6;text-decoration:none}
.cm-nav a:not(.et_pb_button):hover{color:#ffffff}
