/*
  L'Eau Blanche — styles globaux
  Migration Vite : importer depuis main.js (postcss) selon la config du build.
*/

:root {
  --color-bg: #f5ecd7;
  --color-accent: #8b5e3c;
  --color-gold: #c9a84c;
  --color-text: #2c1a0e;
  --color-nav: #2c1a0e;
  --color-offwhite: #faf6ee;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Lato", system-ui, sans-serif;
  --header-height: 4rem;
  --site-header-height: var(--header-height);
  --shadow-soft: 0 4px 24px rgba(44, 26, 14, 0.08);
  --radius-pill: 999px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover {
  color: var(--color-gold);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-nav);
  color: var(--color-offwhite);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: var(--color-nav);
  box-shadow: var(--shadow-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-offwhite);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(250, 246, 238, 0.35);
  border-radius: 0.35rem;
  background: transparent;
  color: var(--color-offwhite);
  cursor: pointer;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle__bars span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.site-nav.is-open .nav-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.site-nav.is-open .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav__link {
  display: block;
  padding: 0.65rem 0.75rem;
  color: var(--color-offwhite);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 0.35rem;
}

.site-nav__link:hover {
  color: var(--color-gold);
  background: rgba(250, 246, 238, 0.06);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-gold);
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-underline-offset: 0.25em;
}

.site-nav__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 0;
  overflow: hidden;
  background: var(--color-nav);
  border-bottom: 1px solid rgba(201, 168, 76, 0.25);
  transition: max-height 0.35s ease;
}

.site-nav.is-open .site-nav__panel {
  max-height: 18rem;
}

.site-nav__panel .container {
  padding-block: 0.75rem 1rem;
}

@media (min-width: 48rem) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
  }

  .site-nav__panel {
    position: static;
    max-height: none;
    overflow: visible;
    border: none;
    background: transparent;
  }

  .site-nav__panel .container {
    padding: 0;
    width: auto;
    margin: 0;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .site-nav__link {
    padding: 0.5rem 0.85rem;
  }
}

/* main offset for fixed header — --site-header-height mis à jour par main.js */
main {
  padding-top: calc(var(--site-header-height) + 1.5rem);
  padding-bottom: 3rem;
}

.section {
  margin-bottom: 3rem;
}

.section--tight {
  margin-bottom: 2rem;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-accent);
  letter-spacing: 0.15em;
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  max-width: 6rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gold),
    transparent
  );
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-offwhite);
}

.btn--primary:hover {
  background: #7a5133;
  color: var(--color-offwhite);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background: rgba(139, 94, 60, 0.1);
  border-color: var(--color-gold);
  color: #6b4a2f;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.card-surface {
  background: var(--color-offwhite);
  border: 1px solid rgba(139, 94, 60, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

/* fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  background: var(--color-nav);
  color: rgba(250, 246, 238, 0.88);
  padding: 2.5rem 0;
  margin-top: auto;
}

.site-footer a {
  color: var(--color-gold);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 40rem) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.site-footer__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-offwhite);
  margin: 0 0 0.5rem;
}

.site-footer__tagline {
  margin: 0 0 1rem;
  font-style: italic;
  color: rgba(250, 246, 238, 0.75);
}

.site-footer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav li {
  margin-bottom: 0.35rem;
}

.site-footer__nav a {
  color: rgba(250, 246, 238, 0.9);
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__meta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(250, 246, 238, 0.15);
  font-size: 0.875rem;
  color: rgba(250, 246, 238, 0.72);
}

.site-footer__year {
  display: block;
  margin-bottom: 0.35rem;
  color: rgba(250, 246, 238, 0.55);
  font-size: 0.8rem;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-shell main {
  flex: 1;
}

/* --- Page d'accueil --- */
.hero {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(139, 94, 60, 0.25);
  box-shadow: var(--shadow-soft);
  text-align: center;
  overflow: hidden;
  min-height: clamp(16rem, 52vw, 26rem);
}

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

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(44, 26, 14, 0.15) 0%,
      rgba(245, 236, 215, 0.55) 42%,
      rgba(245, 236, 215, 0.92) 100%
    ),
    radial-gradient(
      ellipse 100% 70% at 50% 0%,
      rgba(201, 168, 76, 0.2),
      transparent 55%
    );
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    rgba(139, 94, 60, 0.04) 12px,
    rgba(139, 94, 60, 0.04) 13px
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 4vw, 2rem)
    clamp(2.25rem, 5vw, 3.5rem);
}

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-text);
}

.hero__subtitle {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__lead {
  max-width: 38rem;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
}

.specialty {
  margin-bottom: 3rem;
}

.specialty h2 {
  margin-top: 0;
  font-size: 1.75rem;
  color: var(--color-text);
}

.specialty__badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-nav);
  background: linear-gradient(90deg, var(--color-gold), #e8d49a);
  border-radius: var(--radius-pill);
}

.intro-columns {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .intro-columns {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Horaires (accueil) */
.horaires-statut {
  margin: 0 0 1.25rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  text-align: center;
}

.horaires-statut--ouvert {
  background: rgba(76, 122, 72, 0.2);
  color: #1e3d1c;
  border: 1px solid rgba(76, 122, 72, 0.45);
}

.horaires-statut--ferme {
  background: rgba(139, 46, 46, 0.12);
  color: #4a1515;
  border: 1px solid rgba(139, 46, 46, 0.3);
}

.horaires-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.horaires-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.35rem;
  border-radius: 0.4rem;
  border: 1px solid transparent;
}

.horaires-list .horaires-list__jour {
  margin: 0;
  font-weight: 700;
}

.horaires-list .horaires-list__plages {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.horaires-list li.is-today {
  background: rgba(201, 168, 76, 0.28);
  border-color: var(--color-gold);
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.35);
}

@media (max-width: 28rem) {
  .horaires-list li {
    grid-template-columns: 1fr;
  }

  .horaires-list .horaires-list__plages {
    text-align: left;
  }
}
