/* ============================================================
   Songes Funambules — styles personnalisés
   Design : éditorial poétique & nomade
   ============================================================ */

:root {
  --paper:      #E9EEF1;
  --sand:       #D5DEE3;
  --sand-deep:  #C3CED5;
  --ink:        #1A2430;
  --terracotta: #0E8A78;
  --terradeep:  #0A5F54;
  --sauge:      #6B7380;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Étiquette éditoriale — petites capitales espacées */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
}

/* Grosse typographie éditoriale (taille fluide) */
.display-xl { font-size: clamp(2.5rem, 7vw, 5.2rem); }
.display-lg { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.display-md { font-size: clamp(1.5rem, 3vw, 2.3rem); }

/* Lien de navigation : soulignement animé */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  height: 2px; width: 0;
  background: var(--terracotta);
  transition: width .3s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after,
[data-nav][aria-current="page"] .nav-link::after,
a[data-nav][aria-current="page"]::after { width: 100%; }

[data-nav][aria-current="page"] .nav-link,
a[data-nav][aria-current="page"] { color: var(--terracotta); }
.mnav-link[aria-current="page"] { color: var(--terracotta); }

/* Menu mobile */
#mobile-menu { display: none; }
#mobile-menu.is-open { display: block; }
@media (min-width: 1024px) {
  #mobile-menu { display: none !important; }
}

/* Hamburger animé en croix */
#menu-toggle .bar {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
#menu-toggle .bar + .bar { margin-top: 5px; }
#menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
#menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown bureau : hover + focus clavier */
@media (min-width: 1024px) {
  .dropdown {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    min-width: 11rem;
  }
  .dropdown-open:hover > .dropdown,
  .dropdown-open:focus-within > .dropdown {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
}

/* Entrée du hero : apparitions décalées */
.hero-in > * {
  opacity: 0;
  transform: translateY(26px);
  animation: rise .95s cubic-bezier(.22, .61, .36, 1) forwards;
}
.hero-in > *:nth-child(1) { animation-delay: .08s; }
.hero-in > *:nth-child(2) { animation-delay: .22s; }
.hero-in > *:nth-child(3) { animation-delay: .36s; }
.hero-in > *:nth-child(4) { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Révélation au scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .85s cubic-bezier(.22, .61, .36, 1),
              transform .85s cubic-bezier(.22, .61, .36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Zoom doux des images cliquables */
.zoom { overflow: hidden; display: block; }
.zoom img { transition: transform 1s cubic-bezier(.22, .61, .36, 1); }
.zoom:hover img, .zoom:focus-visible img { transform: scale(1.05); }

/* Focus visible homogène */
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 2px; }

/* Champs de formulaire */
.field {
  width: 100%;
  background: #fff;
  border: 1px solid var(--sand-deep);
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: #A79D8A; }
.field:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(14, 138, 120, .18); }

/* Accordéons FAQ */
.accordion-btn .chevron { transition: transform .25s ease; }
.accordion-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* Lien d'évitement (accessibilité) */
.skip-link {
  position: absolute;
  left: 0.75rem; top: -120px;
  z-index: 100;
  padding: .6rem 1.1rem;
  border-radius: .6rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 0.75rem; }

/* Grille fine du fond éditorial (motif léger) */
.tex-sand {
  background-image: radial-gradient(rgba(43, 38, 34, .05) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Accessibilité : respect de la réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-in > * { opacity: 1; transform: none; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
