:root{ --topbar-offset: 96px; }

section[id], .slide[id]{
  scroll-margin-top: var(--topbar-offset);
}



/* ===================================
   Animation pour tous les éléments sauf les images
   =================================== */
[data-animate]:not(figure) {
  transform: translate3d(0, 3rem, 0);
  opacity: 0;
}

.animated:not(figure) {
  animation: animate 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) both;
  animation-delay: var(--stagger, 0ms);
}

@keyframes animate {
  to { transform: none; opacity: var(--target-opacity, 1); }
}

/* ===================================
   Reveal pour les images dans figure
   =================================== */
figure[data-animate] {
  position: relative;
  overflow: hidden; /* masque le pseudo-élément */
}

figure[data-animate] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* fade-in */
}

/* Masque blanc pour le reveal */
figure[data-animate]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateX(0);
  z-index: 2;
  pointer-events: none;
}

/* Animation du voile et de l’image */
figure[data-animate].animated::before {
  animation: reveal 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

figure[data-animate].animated img {
  animation: fadeIn 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* Keyframes */
@keyframes reveal {
  to { transform: translateX(100%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===================================
   Réduction du mouvement
   =================================== */
@media (prefers-reduced-motion: reduce) {
  figure[data-animate]::before { transform: none !important; display: none !important; }
  figure[data-animate] img { opacity: 1 !important; animation: none !important; }
  [data-animate]:not(figure) { transform: none !important; opacity: 1 !important; animation: none !important; }
}







html, body { font-family: "Jost"; color: #282b60; }

a.legal {color: #fff; display:inline-block; }
a.bouteille { text-decoration: none; color: #282b60; transition: opacity .1s ease, transform .1s ease; }

a.bouteille:hover { opacity: 0.8; transform: scale(1.02); }

a.bouteille .titrebouteille {
  margin-top:1rem;
  font-weight: bold;
  letter-spacing:0.1rem;
}

#vins h2 span {
  font-family: 'Jost';
  font-size: 1.2rem;
  font-weight: 400;
}

a.back {
    text-decoration: none;
    margin-bottom: 3rem;
    color: #282b60;
    display: flex;
    align-items: center;
    margin-left:6px;
}
a.back img {
  width: 30px;
  transition: transform 0.3s ease;
}
a.back:hover img {
  transform: translateX(-6px);
}

.btn-icon { color: #292c5f; text-decoration:none; }
.btn-icon img { transition: transform 0.3s ease; }
.btn-icon:hover { opacity:.8; }
.btn-icon:hover img { transform: translateX(-6px); }
.btn-icon .ico{ width:30px; height:30px; margin-right:.5rem; vertical-align:middle; }
.rb-quote{ position:relative; padding-left:2.2rem; margin:2rem 0; }
.rb-quote .quote-mark{ position:absolute; left:0; top:-0.5rem; width:26px; height:26px; }
.rb-quote p { font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;  }

hr {
  border: none;
  height: 1px;
  background-color: #bdaf82;
}

.container-menu {
  max-width: 1620px;
  padding-right: calc(var(--bs-gutter-x) * .5);
  padding-left: calc(var(--bs-gutter-x) * .5);
  margin-right: auto;
  margin-left: auto;
}

.slide{
  height: auto;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
}

/* ronds de navigation */
#dotsNav{
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display:flex; flex-direction:column; gap:10px; z-index:1000;
}
#dotsNav button{
  width:10px; height:10px; border-radius:50%; border:0; padding:0; cursor:pointer;
  background: rgba(255,255,255,.45); transition: transform .15s ease, background .15s ease;
}
#dotsNav button[aria-current="true"]{ background:#fff; transform: scale(1.35); }

.slide-home {
  position:relative;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 2;
}
@supports (height: 100svh) {
  .slide-home{
    min-height: 100svh; /* évite le "saut" quand la barre d’URL change */
  }
}
.slide-home::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0, 0, 0, 0.2); /* voile noir */
  z-index: 2;
}
.slide-home > * {
  position: relative;
  z-index: 3;
}

.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: crossfade 12s infinite;
}

/* Chaque image avec son background et décalage */
.bg1 { background-image: url("../img/image-homepage01.webp"); animation-delay: 0s; }
.bg2 { background-image: url("../img/image-homepage02.webp"); animation-delay: 4s; }
.bg3 { background-image: url("../img/image-homepage03.webp"); animation-delay: 8s; }

/* Animation fade sans voir de gris */
/* Pour 3 photos */
@keyframes crossfade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  33%  { opacity: 1; }
  41%  { opacity: 0; }
  100% { opacity: 0; }
}
/* Pour 4 photos */
/*@keyframes crossfade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  25%  { opacity: 1; }
  33%  { opacity: 0; }
  100% { opacity: 0; }
}*/

.logo {
    width: 70%;
    max-width: 450px;
}
.stitle {
  width: 80%;
  max-width: 600px;
  opacity:.2;
}

.form-result {
  font-size:1.4rem;
  font-weight: bold;
  color: #007A65;
}

/* TOPBAR */
.topbar{
  position: fixed; inset: 0 0 auto 0;
  z-index: 9000; pointer-events:auto;
  padding: 18px 28px;
  color:#fff;
  height: 96px;
  transition: background .1s ease;
}
.topbar a {
  color: #fff;
  text-decoration:none;
  font-size:1.2rem;
}
.topbar.is-solid a {
  color: #000;
}
.topbar.is-solid img {
  filter: invert(1);
}
.topbar .brand img{ opacity:0; display: none; height: 68px; transition: opacity .25s; }

.topbar.is-solid .brand img {
  display: block;
  opacity:1; 
}

/* Option: fond solide dès qu’on quitte la 1re slide */
.topbar.is-solid{
  background: #ffffff;
}

/* FLÈCHE BAS */
#arrowDown{
  position: absolute; left:50%; bottom: 34px; transform: translateX(-50%);
  width:66px; height:66px;
  border:0;
  background: transparent; color:#fff; cursor:pointer;
  display:grid; place-items:center; z-index:1100;
  outline:none;
}
#arrowDown .chevron{
  width:44px; height:44px; display:block;
  border-right:2px solid rgba(255,255,255,.7);
  border-bottom:2px solid rgba(255,255,255,.7);
  transform: rotate(45deg);
  transition: width .25s, height .25s;
}
#arrowDown .chevron{
  width:54px; height:54px;
  animation: arrowBob 1.6s ease-in-out infinite;
}
@keyframes arrowBob{
  0%,100%{ transform: translateY(0) rotate(45deg); }
  50%    { transform: translateY(-6px) rotate(45deg); }
}
#arrowDown[hidden]{ display:none; }


.burgermenu {
  position: relative;
  border: none;
  background: none;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  outline:0;
}

/* Container central invisible */
.burgermenu span {
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transform: translateY(-50%);
}

/* Traits visibles */
.burgermenu span::before,
.burgermenu span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.25s cubic-bezier(0.19,1,0.22,1);
}

.topbar.is-solid .burgermenu span::before,
.topbar.is-solid .burgermenu span::after {
  background: #000;
}

.burgermenu span::before { top: -5px; }
.burgermenu span::after  { top:  5px; }

.burgermenu:hover span::before {
  transform: translateY(-2px);
}
.burgermenu:hover span::after {
  transform: translateY(2px);
}

.burgermenu.opened span::before {
  transform: translateY(5px) rotate(45deg);
}
.burgermenu.opened span::after {
  transform: translateY(-5px) rotate(-45deg);
}
.burgermenu.opened:hover {
  transform: rotate(90deg);
  transition: transform 0.6s ease-in-out;
}

/* ----- Overlay ----- */
#menuOverlay{
  position: fixed; inset:0; z-index:3000;
  display:block; opacity:0; pointer-events:none;
  transition: opacity .28s cubic-bezier(.4,0,.2,1);
}
#menuOverlay .menu-bg{
  position:absolute; inset:0;
  background: url(../img/image-homepage01.webp);
  background-size: cover;
}
#menuOverlay::after{                        /* voile sombre + léger blur */
  content:""; position:absolute; inset:0;
  background: rgba(39,41,90,.58);
}
#menuOverlay .menu-content{
  position:relative; z-index:1; color:#fff;
  padding: clamp(28px,4vw,56px) 0;
}
#menuOverlay .menu-logo{ height:115px; }

.menu-content .row { max-width: 50rem; }

.col-img{ position:relative; }                 /* parent de référence */
.col-img .media-cover{ flex: 1;           /* prend toute la hauteur dispo */
  display: flex; }
.col-img .media-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

/* Liens */
.menu-primary a {
  font-family: "Anton";
  font-weight: 100;
}
.menu-primary a, .menu-secondary a{ 
  display:block; color:#fff; text-decoration:none;
  font-size:clamp(1.25rem, 1.2vw, 1.75rem);
  padding:.35rem 0;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-primary a:hover, .menu-secondary a:hover {
  opacity:.8;
  transform: translateX(6px);
}
.menu-secondary h3{
  font-weight:800; font-size:clamp(1.25rem,1.2vw,1.75rem); margin-bottom:.75rem;
}
.menu-secondary a{ 
  display:block;
}
.menu-secondary a:first-of-type::before{
  content:"";
  display:block;
  width:60px;
  height:1px;
  background: rgba(255,255,255,.25);
  margin-bottom:.6rem; /* espace entre le trait et le lien */
}
.menu-secondary a::after{
  content:"";
  display:block;
  width:60px;                 /* le trait de 100px */
  height:1px;
  background: rgba(255,255,255,.25);
  margin-top:.6rem;            /* espace au-dessus du trait */
}

/* option : pas de trait après le dernier lien */
.menu-secondary a:last-child::after{ content:none; }
/* Etat ouvert */
body.menu-open #menuOverlay{ opacity:1; pointer-events:auto; }

/* Cacher tout le reste de la topbar quand le menu est ouvert (sauf burger) */
body.menu-open .topbar .brand,
body.menu-open .topbar .topbar-actions, body.menu-open a.lang { opacity:0; visibility:hidden; pointer-events:none; }

a.lang, .topbar-actions a {
  transition: opacity .2s ease;
}
a.lang:hover, .topbar-actions a:hover {
  opacity:.6;
}

a.lang.active {
  font-weight: bold;
}

/* Assure la visibilité du burger au-dessus de l’overlay */
.btn-menu{ position:relative; z-index:3100; }

/* Option accessibilité focus */
#menuOverlay a:focus-visible{ outline:2px solid #fff; outline-offset:2px; }

.histoire {
  background: url(../img/histoire-01.webp);
}

.terroir {
  background: url(../img/terroir-01.webp);
  color: #fff !important;
}

.engagements {
  background: url(../img/terroir-01.webp);
  color: #fff !important;
}
.domaine {
  background: url(../img/fond-doamine.webp);
  color: #fff !important;
}
#vins {
  background: url(../img/image-fond-lesvins.webp);
  background-color: #f2f2f4;
  background-size: auto;
  background-position: bottom right;
  background-repeat: no-repeat;
  color: #292c5f;
}

.cave {
  background: url(../img/la-cave-01.webp);
}

.paper{
  position: relative;
  background-color: #fff;
  background-size: cover;
  padding: 3rem;
  padding-top: 6rem;
  padding-bottom: 6rem;
  color: #292c5f;
}
.paper h2, #vins h2 {
  font-family: "Anton";
  font-size: 1.8rem;
  line-height: 1.6rem;
}
.paper h3 {
  margin-bottom: 2rem;
}
.paper p, label, .paper ul li, #vins ul li {
  font-size: 1.3rem;
  font-weight: 100;
}
b, strong {
    font-weight: 600;
}
#vins p {
  font-size: 1.3rem;
}
.image-domaine {
  background: url(../img/image-domaine.webp);
}

a[href^="tel:"] {
  color: #fff;          /* blanc */
  text-decoration: none; /* pas de soulignement */
}

a[href^="tel:"]:hover {
  color: #fff;          /* reste blanc au survol */
  text-decoration: underline; /* ou none si tu veux jamais de souligné */
}
.next {
  background: transparent;
  color: #fff;
  border:1px solid transparent;
  outline:0;
  letter-spacing:0.2rem;
  font-size:1.3rem;
  padding-left:2rem;
  padding-right:2rem;
}
.next:hover {
  background:#292c5f;
  border:1px solid #fff;
  border-radius:4rem;
}

.form-control {
    background: transparent;
    padding: 1.2rem;
    border-radius: 4rem;
    color: #fff;
}

.st0{fill:#363E91;}
              .st1{fill:#005E89;}
              .st2{fill:#1D3D1D;}
              .st3{fill:#007974;}
              .st4{fill:#007A65;}
              .st5{fill:#007E96;}
              .st6{fill:none;stroke:#FFFFFF;stroke-width:0.5;stroke-linecap:round;stroke-miterlimit:10;}
              .st7{fill:#FFFFFF;}

#Calque_1 .st1, #Calque_1 .st2, #Calque_1 .st3, #Calque_1 .st4, #Calque_1 .st5 {
    transition: fill .2s ease;
    cursor: pointer;
  }

  #Calque_1 .st1:hover, #Calque_1 .st1.is-hover { fill:#aec0ca; }
  #Calque_1 .st2:hover, #Calque_1 .st2.is-hover { fill:#aec0ca; }
  #Calque_1 .st3:hover, #Calque_1 .st3.is-hover { fill:#aec0ca; }
  #Calque_1 .st4:hover, #Calque_1 .st4.is-hover { fill:#aec0ca; }
  #Calque_1 .st5:hover, #Calque_1 .st5.is-hover { fill:#aec0ca; }

  /* (facultatif) ne pas capter les events sur les traits blancs */
  #Calque_1 .st6 { pointer-events:none; }


.domaine-liste {
  min-width:20rem;
}
.parcelles{
  margin:0; padding-left:0;
  counter-reset: parcelles;
}
.parcelles li{
  position: relative;
  list-style:none;            /* on gère la numérotation à la main */
  counter-increment: parcelles;
  text-transform: uppercase;
  letter-spacing:.02em;
  margin:0;
  line-height: 2rem;
  color:#fff;                 /* adapter */
}
.parcelles li::before{
  content: counter(parcelles) " .";
  display:inline-block;
  text-align:left;           /* aligné à gauche */
  margin-right:.5rem;
  font-variant-numeric: tabular-nums; /* chiffres à chasse fixe (si dispo) */
}

.parcelles li::after {
  content: "";
  position: absolute;
  left: -52px;
  top: -7px;
  width: 2rem;
  height: 2rem;
  display: inline-block;
  margin-left: .5rem;
  background: url("../img/picto-situation-domaine.svg") no-repeat center;
  background-size: contain;
  opacity: 0; /* état normal */
}

.parcelles li:hover::after,
.parcelles li.active::after {
  opacity: 1; /* état hover ou actif */
}

.parcelles li { cursor:pointer; }
.parcelles li:hover, .parcelles li.active { text-decoration: underline; }


.custom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;           /* cachée par défaut */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Boîte centrale */
.custom-modal-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50vw;   /* moitié de l’écran en largeur */
  height: 50vh;  /* moitié de l’écran en hauteur */
  max-width: 900px;
  max-height: 700px;
  background: #292c61;
  background-image: url(../img/symbole-rives-blanques.webp);
  background-position: left bottom;
  background-repeat: no-repeat;
}

.custom-modal-content {
  color: #fff;
  border-radius: .5rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  text-align: center;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Bouton fermer */
.custom-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  opacity: 1;
}
.custom-close:hover { opacity: 0.8; }

.custom-title {
  font-family: "Anton";
  font-weight: 100;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.custom-body {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #fff;
}

.ensavoirplus {
  color: #fff;
  margin-top:1rem;
}


.vins-stage{ 
  display:grid;
  overflow:hidden;
  margin-top: 5rem;
  margin-bottom: 5rem;
}
.panel{ grid-area:1/1; transition:transform 420ms cubic-bezier(.18,.88,.22,1); will-change:transform,opacity; }

/* états par défaut */
.panel-level1{ transform:translateX(0);    pointer-events:auto; }
.panel-detail{ transform:translateX(100%);  pointer-events:none; }

#vins.state-detail .panel-detail{ transform:translateX(0);    pointer-events:auto; }

#vins.state-detail .panel-level1 {
  transform: translateX(-100%);
  pointer-events: none;
  height: 0;
}

@media (max-width: 768px) {
  .custom-modal-dialog {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  .custom-modal-content {
    border-radius: 0;
    padding: 1.5rem;
  }
}

@media (min-width: 992px){
  #Calque_1 {
    width: calc(100% - 4rem);
  }
}

@media (max-width: 600px){
  .brand {
    display:none;
  }
}

@media (max-width: 1200px){
    #dotsNav, #arrowDown{ display:none !important; }  /* cache les aides */
}

@media (min-width: 1400px){
  .paper{
    padding-left: 15rem;
    padding-right: 6rem;
  }
  .terroir, .engagements, .domaine {
    padding-left: 6rem;
  }
}
@media (min-width: 1600px){
  .max-width-domaine {
      max-width: 30rem;
  }
  #Calque_1 {
    margin-top: -8rem;
  }
}