/* =========================================================================
   Mié Tanaka — Shiatsu, Tuina & énergétique chinoise
   Feuille de styles principale
   Palette et typographie pilotées par variables CSS (voir :root)
   ========================================================================= */

/* ---------- 1. Variables : palette, typo, espacements ---------- */
:root {
  /* Couleurs (reprise modernisée de l'identité existante) */
  --cream:       #F5EAD3;   /* fond principal, ivoire chaud */
  --cream-deep:  #EFE1C3;   /* cartes / sections alternées */
  --olive:       #8A8B5C;   /* accent kaki : motifs, feuillages, filets */
  --olive-deep:  #5F6138;   /* kaki foncé : blocs pleins (texte crème dessus) */
  --cherry:      #C0392B;   /* accent cerise : titres clés, hover, focus */
  --cherry-dark: #9E2E22;   /* cerise foncé pour hover */
  --ink:         #3A322B;   /* texte principal, gris-brun (jamais noir pur) */
  --ink-soft:    #6A5F54;   /* texte secondaire / légendes */

  /* Typographie */
  --font-title: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:  "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Rythme / mise en page */
  --maxw: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 14px;
  --shadow-soft: 0 6px 24px rgba(58, 50, 43, 0.10);
  --shadow-hover: 0 14px 38px rgba(58, 50, 43, 0.18);
  --header-h: 68px;
}

/* ---------- 2. Reset léger & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  /* Motif japonais (seigaiha) très discret en fond — opacité bakée dans le SVG */
  background-image: url("../images/seigaiha.svg");
  background-size: 200px auto;
  background-repeat: repeat;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--cherry); text-decoration: none; }
a:hover { color: var(--cherry-dark); text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }

/* ---------- 3. Utilitaires ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.2rem, 5vw, 2.5rem); }
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--alt { background: var(--cream-deep); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cherry);
  margin-bottom: 0.6rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--olive-deep);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* Focus visible cohérent pour la navigation clavier */
:focus-visible {
  outline: 3px solid var(--cherry);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 4. Header / navigation sticky ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
/* Classe ajoutée en JS quand on scrolle : fond crème translucide + ombre */
.site-header.is-scrolled {
  background: rgba(245, 234, 211, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.brand {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.brand:hover { color: var(--cherry); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-nav ul {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--ink);
  font-weight: 500;
  padding: 0.3rem 0;
  position: relative;
}
.main-nav a:hover { color: var(--cherry); text-decoration: none; }
/* Soulignement animé */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--cherry);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--cherry); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 10vw, 7rem);
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
}
.hero__inner { position: relative; z-index: 2; max-width: 40ch; }
.hero h1 { color: var(--ink); margin-bottom: 0.1em; }
.hero__subtitle {
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--cherry);
  font-style: italic;
  margin: 0 0 1.2rem;
}
.hero__text { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2rem; }

/* Illustrations botaniques décoratives (parallaxe léger via JS) */
.hero__decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__branch {
  position: absolute;
  top: -4%;
  right: -2%;
  width: clamp(180px, 34vw, 420px);
  opacity: 0.92;
  will-change: transform;
}
.hero__bird {
  position: absolute;
  bottom: 12%;
  right: clamp(4%, 22vw, 26%);
  width: clamp(110px, 16vw, 190px);
  opacity: 0.9;
  will-change: transform;
}

/* ---------- 6. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn--primary { background: var(--cherry); color: #fff; }
.btn--primary:hover {
  background: var(--cherry-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.btn--ghost { border-color: var(--olive-deep); color: var(--olive-deep); background: transparent; }
.btn--ghost:hover { background: var(--olive-deep); color: var(--cream); text-decoration: none; transform: translateY(-2px); }

/* ---------- 7. Cartes de prestation / tarifs ---------- */
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--cream);
  border: 1px solid rgba(138, 139, 92, 0.35);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.section--alt .card { background: var(--cream); }

.card h2, .card h3 { margin-top: 0; }
.card ul { padding-left: 1.1rem; margin: 0 0 1.2rem; }
.card li { margin-bottom: 0.5rem; }

/* Encart prix */
.price {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed rgba(138, 139, 92, 0.5);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
}
.price__amount { font-family: var(--font-title); font-size: 2rem; font-weight: 600; color: var(--cherry); }
.price__detail { color: var(--ink-soft); font-size: 0.95rem; }
.price__note { display: block; width: 100%; color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.3rem; }

/* Bloc « bon cadeau » sur kaki foncé (texte crème = contraste AA) */
.accent-block {
  background: var(--olive-deep);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.accent-block h2 { color: var(--cream); }
.accent-block p { color: rgba(245, 234, 211, 0.92); max-width: 52ch; margin-inline: auto; }
.accent-block .btn--ghost { border-color: var(--cream); color: var(--cream); }
.accent-block .btn--ghost:hover { background: var(--cream); color: var(--olive-deep); }

/* ---------- 8. Contenu texte / listes de formation ---------- */
.prose p { max-width: 68ch; }
.prose { display: grid; gap: 1.2rem; }

.info-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }

/* Bloc coordonnées (NAP) */
.contact-card { background: var(--cream); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow-soft); }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem; margin: 0; }
.contact-card dt { color: var(--olive-deep); font-weight: 600; }
.contact-card dd { margin: 0; }
address { font-style: normal; }

/* ---------- 9. Formulaire de contact ---------- */
.form { display: grid; gap: 1.1rem; }
.form label { font-weight: 600; color: var(--olive-deep); display: block; margin-bottom: 0.3rem; }
.form input, .form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid rgba(138, 139, 92, 0.5);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--cherry); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18); }
.form textarea { min-height: 140px; resize: vertical; }
.form__note { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--olive-deep);
  color: var(--cream);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  margin-top: 2rem;
}
.site-footer a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h2 { color: var(--cream); font-size: 1.4rem; }
.site-footer .fine { font-size: 0.85rem; color: rgba(245, 234, 211, 0.7); margin-top: 2rem; border-top: 1px solid rgba(245, 234, 211, 0.2); padding-top: 1.2rem; }

/* ---------- 11. Animations au scroll (fade + slide-up) ----------
   Amélioration progressive : le contenu n'est masqué que si JS est actif
   (classe .js posée sur <html>). Sans JS, tout reste visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Léger décalage en cascade pour les cartes */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ---------- 12. Page 404 ---------- */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page .display { font-family: var(--font-title); font-size: clamp(5rem, 18vw, 10rem); color: var(--cherry); line-height: 1; }

/* ---------- 13. Responsive : navigation mobile ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--cream);
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav.is-open { max-height: 320px; }
  .main-nav ul { flex-direction: column; padding: 1rem clamp(1.2rem, 5vw, 2.5rem); gap: 0.4rem; }
  .main-nav a { display: block; padding: 0.6rem 0; }
  .hero__bird { display: none; } /* on allège le hero sur mobile */
}

/* ---------- 14. Préférence de réduction de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* La parallaxe est aussi désactivée côté JS */
}
