/* ============================================
   MADE Institut — Sections Styling
   Navigation, Hero, Soins, Localisation, About, Footer
   ============================================ */

/* ══════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-overlay) + 10); /* Must sit above mobile-menu overlay */
  height: var(--nav-height);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header--transparent {
  background-color: transparent;
}

.site-header--solid {
  background-color: rgba(255, 250, 245, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

/* When mobile menu is open, make header transparent and let clicks pass through to the overlay */
.site-header.menu-open {
  background-color: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  z-index: 10;
}

.nav-logo img {
  height: 42px;
  width: auto;
  transition: opacity var(--transition-fast);
}

.nav-logo .logo-white { display: block; }
.nav-logo .logo-color { display: none; }

.site-header--solid .nav-logo .logo-white { display: none; }
.site-header--solid .nav-logo .logo-color { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.site-header--solid .nav-links a {
  color: var(--text);
}

.site-header--solid .nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  padding: 0.5rem 1.25rem !important;
  border: 2px solid var(--white) !important;
  border-radius: var(--radius-sm) !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
  font-size: var(--fs-caption) !important;
}

.nav-cta:hover {
  background-color: var(--white) !important;
  color: var(--primary) !important;
}

.nav-cta::after { display: none !important; }

.site-header--solid .nav-cta {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.site-header--solid .nav-cta:hover {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

/* ── Hamburger (Mobile) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}

.hamburger {
  position: relative;
  width: 24px;
  height: 2px;
  background-color: var(--white);
  transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: inherit;
  transition: all var(--transition-fast);
}

.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

.site-header--solid .hamburger {
  background-color: var(--dark);
}

.site-header--solid .hamburger::before,
.site-header--solid .hamburger::after {
  background-color: var(--dark);
}

/* Hamburger open state — hide it; the overlay has its own X close button */
.nav-toggle[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
}

/* ── Mobile Menu Overlay ── */
/* Now lives OUTSIDE the <header> to avoid stacking context issues.
   z-index sits between page content and header so hamburger stays clickable. */
.mobile-menu {
  display: none; /* shown via responsive.css on mobile only */
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-overlay) + 5); /* below header (+10) but above everything else */
  background-color: rgba(44, 24, 16, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Close (X) button inside the overlay — top-right corner */
.mobile-menu__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--white);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.mobile-menu__close:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  color: var(--white);
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.mobile-menu.is-open a {
  animation: menuItemIn 0.4s var(--ease-out) both;
}

.mobile-menu a:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu a:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu a:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu a:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu .lang-toggle { animation: menuItemIn 0.4s var(--ease-out) 0.25s both; }
.mobile-menu .btn { animation: menuItemIn 0.4s var(--ease-out) 0.3s both; }

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu a:hover {
  color: var(--secondary);
}

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height — accounts for mobile browser chrome */
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--dark); /* Fallback while image loads */
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(44, 24, 16, 0.55) 0%,
    rgba(44, 24, 16, 0.35) 50%,
    rgba(44, 24, 16, 0.5) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  max-width: 700px;
}

.hero__emblem {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-xl);
  animation: heroEmblemIn 1.2s var(--ease-out) both;
}

@keyframes heroEmblemIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: var(--fw-semibold);
  color: var(--white);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  line-height: 1;
  animation: heroFadeUp 0.8s var(--ease-out) 0.3s both;
}

.hero__title-sub {
  font-size: 0.45em;
  letter-spacing: 0.35em;
  font-weight: var(--fw-regular);
  display: block;
  margin-top: 0.15em;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: var(--fs-h4);
  font-weight: var(--fw-light);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2xl);
  animation: heroFadeUp 0.8s var(--ease-out) 0.5s both;
}

.hero .btn {
  animation: heroFadeUp 0.8s var(--ease-out) 0.7s both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: heroFadeUp 0.8s var(--ease-out) 1s both;
}

.hero__scroll-icon {
  width: 24px;
  height: 24px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ══════════════════════════════════════════════
   NOS SOINS DU MOMENT — Horizontal Slider
   ══════════════════════════════════════════════ */
.soins {
  background-color: var(--bg);
  overflow: hidden;
}

.soins .section__header {
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.soins .section__title {
  white-space: nowrap;
  margin-bottom: 0;
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.soins .divider {
  flex: 1;
  height: 2px;
  background-color: var(--dark);
  margin: 0;
  width: auto;
}

.soins__slider-wrap {
  position: relative;
}

.soins__grid {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) var(--border-light);
}

.soins__grid::-webkit-scrollbar {
  height: 6px;
}

.soins__grid::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 3px;
}

.soins__grid::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* Slider nav arrows */
.soins__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-calc(50% + var(--space-lg)));
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  color: var(--dark);
}

.soins__nav:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.soins__nav--prev {
  left: -22px;
}

.soins__nav--next {
  right: -22px;
}

.soins__nav svg {
  width: 20px;
  height: 20px;
}

.soins__empty {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
  font-style: italic;
  width: 100%;
}

/* ══════════════════════════════════════════════
   LOCALISATION & HORAIRES
   ══════════════════════════════════════════════ */
.location {
  background-color: var(--bg-alt);
}

.location__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.location__map {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.location__map iframe {
  width: 100%;
  height: 350px;
  border: 0;
  display: block;
}

.location__gallery {
  margin-top: var(--space-xl);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.location__gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.location__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.location__address h3,
.location__hours h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  margin-bottom: var(--space-md);
  color: var(--dark);
}

.location__address address {
  font-style: normal;
  font-size: var(--fs-body);
  color: var(--text-light);
  line-height: 1.8;
}

.location__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  font-weight: var(--fw-semibold);
  color: var(--primary);
  font-size: var(--fs-body);
}

.location__phone:hover {
  color: var(--primary-dark);
}

.location__directions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: var(--fs-small);
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ══════════════════════════════════════════════
   QUI SUIS-JE ?
   ══════════════════════════════════════════════ */
.about {
  background-color: var(--bg);
}

.about__grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about__content {
  padding: var(--space-lg) 0;
}

.about__content .section__label {
  text-align: left;
}

.about__content h2 {
  margin-bottom: var(--space-lg);
}

.about__content p {
  color: var(--text-light);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.about__quote {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-style: italic;
  color: var(--primary);
  padding: var(--space-lg) 0;
  border-left: 3px solid var(--primary);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
}

.about__signature {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-style: italic;
  color: var(--primary);
  margin-top: var(--space-lg);
}

/* ══════════════════════════════════════════════
   CONTACT (section simple avant le footer)
   ══════════════════════════════════════════════ */
.contact {
  background-color: var(--cream);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact__info h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  margin-bottom: var(--space-md);
}

.contact__info p {
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.footer {
  background-color: var(--dark);
  color: var(--text-on-dark);
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.5fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand img {
  height: 90px;
  width: auto;
  margin-bottom: var(--space-md);
}

.footer__tagline {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer__nav h4,
.footer__connect h4 {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--space-lg);
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__nav a {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition-fast);
}

.footer__nav a:hover {
  color: var(--white);
}

.footer__connect {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__bottom p {
  font-size: var(--fs-caption);
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a {
  font-size: var(--fs-caption);
  color: rgba(255, 255, 255, 0.4);
}

.footer__legal a:hover {
  color: rgba(255, 255, 255, 0.7);
}
