/* ============================================================
   LAYOUT — Villa Lou Bagarède
   Reset, typographie de base, header, hero, sections, footer
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');


/* ----------------------------------------------------------
   RESET
   ---------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

img,
video {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

svg {
  display: block;
}


/* ----------------------------------------------------------
   TYPOGRAPHIE DE BASE
   ---------------------------------------------------------- */

body {
  font-family: var(--font-ui);
  color: var(--color-deep);
  background: var(--color-sand);
  line-height: var(--lh-normal);
  font-weight: var(--fw-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }

h3,
h4 {
  font-family: var(--font-ui);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  line-height: var(--lh-snug);
}

h3 { font-size: 0.875rem; }
h4 { font-size: 0.75rem; }

p {
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: var(--fw-light);
}

p + p {
  margin-top: 1em;
}


/* ----------------------------------------------------------
   CONTAINER
   ---------------------------------------------------------- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}


/* ----------------------------------------------------------
   HEADER — sticky, transparent → frosted glass
   ---------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition:
    background-color 0.35s var(--ease-elegant),
    box-shadow       0.35s var(--ease-elegant),
    height           0.35s var(--ease-elegant),
    backdrop-filter  0.35s var(--ease-elegant);
}

/* État initial : transparent sur le hero */
.site-header--top {
  background-color: transparent;
  box-shadow: none;
}

/* État au scroll */
.site-header--scrolled {
  background-color: var(--color-white-95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  height: var(--header-height-scrolled);
}

/* Inner du header */
.header-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.site-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: inherit;
  flex-shrink: 0;
  transition: color 0.2s var(--ease-elegant);
}

.site-header--top .site-logo {
  color: var(--color-white-off);
}

.site-header--scrolled .site-logo {
  color: var(--color-deep);
}

/* Navigation principale */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  position: relative;
  font-family: var(--font-ui);
  font-weight: var(--fw-light);
  font-size: var(--fs-body-sm);
  letter-spacing: var(--ls-nav);
  color: inherit;
  transition: color 0.2s var(--ease-elegant);
  white-space: nowrap;
}

.site-header--top .nav-link {
  color: rgba(255, 255, 255, 0.90);
}

.site-header--scrolled .nav-link {
  color: var(--color-deep);
}

/* Underline animée */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-elegant);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Sélecteur de langue */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-ui);
  font-weight: var(--fw-medium);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.lang-switcher__sep {
  color: var(--color-stone);
  user-select: none;
  margin: 0 0.1rem;
  font-weight: var(--fw-light);
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.15rem 0.1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  opacity: 0.55;
  transition: opacity 0.2s var(--ease-elegant);
  line-height: 1;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
}

.lang-btn.active {
  color: var(--color-gold);
}

.site-header--top .lang-btn {
  color: rgba(255, 255, 255, 0.90);
}

.site-header--top .lang-btn.active {
  color: var(--color-gold);
  opacity: 1;
}

/* CTA Réserver */
.btn-reserve {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: var(--fw-regular);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  padding: 0.5rem 1.25rem;
  border: var(--border-gold);
  color: var(--color-gold);
  background: transparent;
  transition:
    background-color 0.2s var(--ease-elegant),
    color            0.2s var(--ease-elegant);
  white-space: nowrap;
}

.btn-reserve:hover {
  background-color: var(--color-gold);
  color: var(--color-white-off);
}

.btn-reserve__arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease-elegant);
}

.btn-reserve:hover .btn-reserve__arrow {
  transform: translateX(3px);
}

/* Hamburger mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: calc(var(--z-header) + 10);
}

.nav-hamburger__line {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition:
    transform  0.35s var(--ease-elegant),
    opacity    0.2s  var(--ease-elegant),
    width      0.35s var(--ease-elegant);
  transform-origin: center;
}

.site-header--top .nav-hamburger {
  color: var(--color-white-off);
}

.site-header--scrolled .nav-hamburger {
  color: var(--color-deep);
}

/* Hamburger → croix */
.nav-hamburger.is-open .nav-hamburger__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger.is-open .nav-hamburger__line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-hamburger.is-open .nav-hamburger__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile overlay menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-deep);
  z-index: calc(var(--z-header) + 5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-elegant);
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav-overlay__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.nav-overlay__link {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-white-off);
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease-elegant);
}

.nav-overlay__link:hover {
  color: var(--color-gold);
}

.nav-overlay__lang {
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-overlay__lang .lang-btn {
  color: var(--color-stone);
  font-size: 0.8rem;
}

.nav-overlay__lang .lang-btn.active {
  color: var(--color-gold);
  opacity: 1;
}

.nav-overlay__lang .lang-switcher__sep {
  color: var(--color-stone);
  opacity: 0.4;
}

.nav-overlay__reserve {
  margin-top: 1rem;
}


/* ----------------------------------------------------------
   HERO — 100vh
   ---------------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--color-deep) center center / cover no-repeat;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Vidéo hero (Phase D) — desktop only, fallback sur background-image inline */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* Mobile : on cache la vidéo (économie data) — le background-image inline prend le relais */
@media (max-width: 768px) {
  .hero-video { display: none; }
}

/* Accessibilité : si l'utilisateur préfère réduire les animations */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* Overlay : gradient bas uniquement */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(44, 36, 22, 0.60) 100%
  );
  pointer-events: none;
}

/* Contenu centré en bas */
.hero-content {
  position: absolute;
  z-index: 2;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 90%;
  max-width: 900px;
}

.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  color: var(--color-white-off);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-family: var(--font-ui);
  font-weight: var(--fw-light);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1.25rem;
}

/* Indicateur de scroll */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-indicator__line {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.50);
  transform-origin: top;
}

.scroll-indicator__label {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.50);
  writing-mode: vertical-rl;
  margin-top: 0.5rem;
}


/* ----------------------------------------------------------
   SECTIONS EDITORIALES
   ---------------------------------------------------------- */

.section {
  padding: var(--section-padding-desktop) 0;
  position: relative;
}

.section--sand {
  background: var(--color-sand);
}

.section--off-white {
  background: var(--color-white-off);
}

.section--dark {
  background: var(--color-deep);
  color: var(--color-white-off);
}

/* En-tête de section */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-header--centered {
  text-align: center;
}

/* Numéro décoratif "01 —" */
.section-number {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: var(--fs-number);
  color: var(--color-stone);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 0.25rem;
  pointer-events: none;
}

/* Label de section "La Villa" */
.section-label {
  display: block;
  font-family: var(--font-ui);
  font-weight: var(--fw-medium);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-terra);
  margin-bottom: 1.25rem;
}

.section--dark .section-label {
  color: var(--color-gold);
}

/* Séparateur en ligne (pas de <hr>) */
.section-divider {
  border: none;
  border-top: var(--border-hairline);
  margin: var(--space-lg) 0;
}

.section--dark .section-divider {
  border-top-color: rgba(196, 185, 168, 0.25);
}

/* Texte éditorial */
.section-intro {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.4;
  color: var(--color-deep);
}

.section--dark .section-intro {
  color: var(--color-white-off);
}


/* ----------------------------------------------------------
   LAYOUT ASYMETRIQUE — photo + texte
   ---------------------------------------------------------- */

.layout-asymmetric {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
}

/* Variante : image à gauche, texte à droite */
.layout-asymmetric--img-left .layout-asymmetric__image {
  margin-right: var(--overlap-img); /* -60px */
  position: relative;
  z-index: var(--z-above);
}

/* Variante : image à droite, texte à gauche */
.layout-asymmetric--img-right {
  grid-template-columns: 1fr 1fr;
}

.layout-asymmetric--img-right .layout-asymmetric__image {
  order: 2;
  margin-left: var(--overlap-img);
  position: relative;
  z-index: var(--z-above);
}

.layout-asymmetric--img-right .layout-asymmetric__text {
  order: 1;
  padding-right: 3rem;
}

.layout-asymmetric__image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.layout-asymmetric__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-expo);
}

.layout-asymmetric__image:hover img {
  transform: scale(1.03);
}

.layout-asymmetric__text {
  padding: var(--space-lg);
}

.layout-asymmetric__text .section-label {
  margin-bottom: 1rem;
}

.layout-asymmetric__text h2 {
  margin-bottom: 1.5rem;
}

.layout-asymmetric__text p {
  color: var(--color-deep);
  opacity: 0.85;
}

.layout-asymmetric__text .btn {
  margin-top: var(--space-md);
}


/* ----------------------------------------------------------
   FOOTER MINIMAL
   ---------------------------------------------------------- */

.site-footer {
  background: var(--color-deep);
  color: var(--color-stone);
  padding: 3.75rem 0; /* 60px */
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: 1.25rem;
  color: var(--color-white-off);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-nav__link {
  font-family: var(--font-ui);
  font-weight: var(--fw-light);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-nav);
  color: var(--color-stone);
  transition: color 0.2s var(--ease-elegant);
}

.footer-nav__link:hover {
  color: var(--color-white-off);
}

.footer-lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-lang .lang-btn {
  color: var(--color-stone);
  font-size: 0.65rem;
}

.footer-lang .lang-btn.active {
  color: var(--color-gold);
  opacity: 1;
}

.footer-lang .lang-switcher__sep {
  color: var(--color-stone);
  opacity: 0.3;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--color-stone);
  opacity: 0.5;
  margin-top: 1rem;
  border-top: 1px solid rgba(196, 185, 168, 0.15);
  padding-top: 1.5rem;
}


/* ----------------------------------------------------------
   RESPONSIVE — 768px
   ---------------------------------------------------------- */

@media (max-width: 768px) {

  /* Header */
  .site-nav,
  .lang-switcher,
  .btn-reserve {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-content {
    bottom: 12%;
    width: 85%;
  }

  .hero-subtitle {
    letter-spacing: 0.15em;
    font-size: 0.75rem;
  }

  /* Sections */
  .section {
    padding: var(--section-padding-mobile) 0;
  }

  .section-number {
    font-size: 3.5rem;
  }

  /* Layout asymétrique → colonne unique */
  .layout-asymmetric {
    grid-template-columns: 1fr;
  }

  .layout-asymmetric--img-left .layout-asymmetric__image,
  .layout-asymmetric--img-right .layout-asymmetric__image {
    margin-right: 0;
    margin-left: 0;
    order: 1;
    aspect-ratio: 4 / 3;
  }

  .layout-asymmetric--img-right .layout-asymmetric__text,
  .layout-asymmetric__text {
    order: 2;
    padding: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
  }

}

@media (max-width: 480px) {

  .container {
    padding: 0 1.25rem;
  }

  .hero-content {
    width: 92%;
  }

  .layout-asymmetric__text {
    padding: var(--space-sm);
  }

}
