/* @import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap"); */

/* ========================
   VARIABLES
======================== */
:root {
  --ivory: #f7f3eb;
  --blue: #002191;
  --gold: #c8a96a;
  --text-soft: rgba(0, 0, 0, 0.65);

  --domaine-line: rgba(0, 33, 145, 0.14);
  --domaine-shadow: 0 10px 30px rgba(0, 33, 145, 0.08);
  --domaine-shadow-hover: 0 14px 36px rgba(0, 33, 145, 0.12);

  --domaine-container-width: 1440px;
  --domaine-responsive-header-offset: 81px;
}

/* ========================
   SECTION
======================== */
.domaine-section {
  --domaine-active-bg: none;

  position: relative;
  height: calc(100vh - max(var(--header-height), 81px));
  min-height: calc(100vh - max(var(--header-height), 81px));
  display: grid;
  grid-template-rows: minmax(0, 90%) minmax(0, 10%);
  background-color: var(--ivory);
  background-image: var(--domaine-active-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* ========================
   CAROUSEL
======================== */
.domaine-carousel {
  position: relative;
  grid-row: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.domaine-track {
  min-height: 0;
  display: flex;
  height: 100%;
  overflow: visible;
  transition: transform 1.2s ease;
  will-change: transform;
}

/* ========================
   SLIDES
======================== */
.domaine-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;

  background-image: none !important;
}

.domaine-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.8);
}

/* ========================
   CONTENU
======================== */
.domaine-slide__content {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 900px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0 clamp(4.5rem, 8vw, 7rem);

  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: justify;
  overflow: hidden;

  opacity: 0.15;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.domaine-slide.is-active .domaine-slide__content {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   TEXTE
======================== */
.domaine-slide__eyebrow {
  margin-bottom: 1.5rem;
  letter-spacing: 0.25em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--gold);
}

.domaine-slide__title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.1;
  color: var(--blue);
}

.domaine-slide__title::after {
  content: "";
  display: block;
  width: 4rem;
  height: 2px;
  margin-top: 1rem;
  background: var(--gold);
}

.domaine-slide__text {
  flex: 0 1 auto;
  min-height: 0;
  max-width: 700px;
  max-height: 100%;
  margin-top: 1.5rem;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.7;
  color: var(--text-soft);
  overflow-y: auto;
}

/* ========================
   COUCHE DE NAVIGATION CENTRÉE
======================== */
.domaine-nav-shell {
  position: absolute;
  inset: 0 0 10%;
  z-index: 30;

  width: min(100%, var(--domaine-container-width));
  margin: 0 auto;
  pointer-events: none;
}

.domaine-nav-shell .domaine-nav {
  pointer-events: auto;
}

/* ========================
   NAVIGATION
======================== */
.domaine-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 56px;
  height: 56px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--domaine-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--blue);
  backdrop-filter: blur(8px);
  box-shadow: var(--domaine-shadow);

  cursor: pointer;

  transition:
    transform 240ms ease,
    background 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease,
    opacity 240ms ease;
}

.domaine-nav:hover {
  transform: translateY(calc(-50% - 1px));
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 33, 145, 0.24);
  box-shadow: var(--domaine-shadow-hover);
}

.domaine-nav:active {
  transform: translateY(-50%);
}

.domaine-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
}

.domaine-nav--prev {
  left: clamp(10px, 2vw, 20px);
}

.domaine-nav--next {
  right: clamp(10px, 2vw, 20px);
}

/* ========================
   DOTS
======================== */
.domaine-pagination {
  grid-row: 2;
  position: relative;
  z-index: 30;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  gap: 10px;
  width: 100%;
  min-height: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background: transparent;
}

.domaine-pagination::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.domaine-dot {
  position: relative;
  z-index: 1;

  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  padding: 0;
  background: rgba(0, 33, 145, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition:
    width 240ms ease,
    background 240ms ease,
    transform 240ms ease;
}

.domaine-dot:hover {
  transform: scale(1.08);
}

.domaine-dot.is-active {
  width: 28px;
  background: var(--blue);
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 980px) {
  .domaine-section {
    min-height: calc(100svh - var(--domaine-responsive-header-offset));
    height: calc(100svh - var(--domaine-responsive-header-offset));
  }

  .domaine-carousel,
  .domaine-track,
  .domaine-slide {
    height: 100%;
  }

  .domaine-slide__content {
    height: 100%;
    padding: 0 clamp(2.5rem, 7vw, 4rem);
    text-align: left;
  }

  .domaine-nav {
    width: 46px;
    height: 46px;
  }

  .domaine-nav--prev {
    left: clamp(8px, 2vw, 16px);
  }

  .domaine-nav--next {
    right: clamp(8px, 2vw, 16px);
  }

  .domaine-slide__title {
    font-size: clamp(2.7rem, 8vw, 4rem);
  }

  .domaine-slide__text {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }
}

/* @media (max-width: 768px) {

    .domaine-nav {
      display: none !important;
    }

  .domaine-section {
    min-height: 100svh;
    height: 100svh;
    overflow: hidden;
  }

  .domaine-carousel,
  .domaine-track,
  .domaine-slide {
    height: 100%;
  }

  .domaine-slide__content {
    height: 100%;
    max-height: 100%;
    justify-content: flex-start;
    padding: 5.25rem 2.8rem 4.75rem;
    overflow: hidden;
  }

  .domaine-slide__title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    line-height: 1.02;
    margin: 0;
  }

  .domaine-slide__title::after {
    width: 3rem;
    margin-top: 0.75rem;
  }

  .domaine-slide__text {
    max-width: 100%;
    margin-top: 1rem;
    font-size: 0.98rem;
    line-height: 1.62;
    overflow-y: auto;
    padding-right: 0.25rem;
  }
} */

@media (max-width: 768px) {
  :root {
    --domaine-responsive-header-offset: 105px;
  }

  .domaine-section {
    min-height: calc(100svh - var(--domaine-responsive-header-offset));
    height: auto;
    grid-template-rows: minmax(0, auto) auto auto;
    overflow: hidden;
    position: relative;
  }

  .domaine-carousel,
  .domaine-track,
  .domaine-slide {
    height: auto;
  }

  .domaine-slide__content {
    min-height: 0;
    height: auto;
    justify-content: flex-start;
    padding: clamp(2.75rem, 6svh, 4rem) 2.8rem clamp(1.25rem, 4svh, 2rem);
    overflow: visible;
  }

  .domaine-slide__title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    line-height: 1.02;
    margin: 0;
  }

  .domaine-slide__title::after {
    width: 3rem;
    margin-top: 0.75rem;
  }

  .domaine-slide__text {
    max-width: 100%;
    min-height: 0;
    flex: 0 1 auto;
    margin-top: 1rem;
    font-size: 0.98rem;
    line-height: 1.62;
    max-height: none;
    overflow: visible;
    padding-right: 0.25rem;
  }

  .domaine-nav-shell {
    grid-row: 2;
    position: static;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: min(100%, 18rem);
    margin: 0 auto 1rem;
    pointer-events: none;
  }

  .domaine-nav-shell .domaine-nav.slider-nav {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
  }

  .domaine-nav-shell .domaine-nav.slider-nav:hover,
  .domaine-nav-shell .domaine-nav.slider-nav:active {
    transform: none;
  }

  .domaine-pagination {
    grid-row: 3;
    position: relative;
    min-height: 2.75rem;
    padding-bottom: env(safe-area-inset-bottom);
  }

}

@media (max-width: 480px) {
  :root {
    --domaine-responsive-header-offset: 101px;
  }

  .domaine-slide__content {
    padding: clamp(2.75rem, 6svh, 3.75rem) 2.2rem clamp(1.25rem, 4svh, 2rem);
  }
}

/* ========================
   REDUCED MOTION
======================== */
@media (prefers-reduced-motion: reduce) {
  .domaine-track,
  .domaine-slide__content,
  .domaine-nav,
  .domaine-dot {
    transition: none !important;
  }
}
