/* ==========================================================================
   Easy Physio — feuille de style principale
   Minimalisme editorial : blanc casse, encre noire, accents rose/rouge du logo.
   ========================================================================== */

/* --------------------------------------------------------- 1. Design tokens */
:root {
  /* Couleurs — derivees du logo (rouge profond + lavis rose) */
  --bg:          oklch(0.993 0.004 15);
  --bg-blush:    oklch(0.968 0.016 12);
  --surface:     oklch(1 0 0);
  --ink:         oklch(0.19 0.015 20);
  --ink-soft:    oklch(0.44 0.012 20);
  --line:        oklch(0.895 0.008 20);
  --line-strong: oklch(0.80 0.012 20);
  --accent:      oklch(0.44 0.155 22);
  --accent-deep: oklch(0.34 0.130 22);
  --blush:       oklch(0.83 0.075 12);

  /* Typographie */
  --font-display: "Bodoni Moda", Didot, "Times New Roman", serif;
  --font-body:    "Archivo", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2:  clamp(1.55rem, 1.32rem + 1.1vw, 2.15rem);
  --step-3:  clamp(2rem, 1.55rem + 2.1vw, 3.2rem);
  --step-4:  clamp(2.5rem, 1.75rem + 3.5vw, 4.15rem);

  /* Rythme */
  --gutter:   clamp(1.25rem, 5vw, 4.5rem);
  --measure:  68ch;
  --section:  clamp(4.5rem, 3rem + 7vw, 9rem);
  --maxw:     78rem;

  /* Mouvement */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Empilement */
  --z-sticky:  100;
  --z-overlay: 200;
  --z-dialog:  300;

  color-scheme: light;
}

/* --------------------------------------------------------------- 2. Reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* L en-tete est collant : les ancres doivent s arreter sous lui. */
  scroll-padding-top: 6.5rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* Une classe qui pose `display` battrait la regle [hidden] du navigateur :
   sans ce !important, un bouton masque reste visible. */
[hidden] { display: none !important; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; top: 0; left: 50%;
  translate: -50% -140%;
  z-index: var(--z-dialog);
  background: var(--ink); color: var(--bg);
  padding: 0.7rem 1.2rem; text-decoration: none;
}
.skip-link:focus-visible { translate: -50% 0; }

/* ------------------------------------------------------------- 3. Layout */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--prose { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--blush { background: var(--bg-blush); }
.section--flush { padding-top: 0; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.stack-sm > * + * { margin-top: 1rem; }
.stack-md > * + * { margin-top: clamp(1.5rem, 2.5vw, 2.25rem); }

/* -------------------------------------------------- 4. Typographie utilitaire */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.h1   { font-size: var(--step-4); }
.h2   { font-size: var(--step-3); }
.h3   { font-size: var(--step-2); }
.lede { font-size: var(--step-1); line-height: 1.5; }
.prose { max-width: var(--measure); color: var(--ink-soft); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--ink); font-weight: 600; }
.small { font-size: var(--step--1); color: var(--ink-soft); max-width: 62ch; }
.accent { color: var(--accent); }

.mantra {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--accent);
}

/* ------------------------------------------------------------- 5. Boutons */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.65rem;
  min-height: 3rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out), translate 0.35s var(--ease-out);
}
.btn:hover { --btn-bg: var(--accent-deep); translate: 0 -2px; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--bg); border-color: var(--ink); }
.btn__arrow { transition: translate 0.35s var(--ease-out); }
.btn:hover .btn__arrow { translate: 3px 0; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 35%, transparent);
  transition: border-color 0.3s var(--ease-out);
}
.link-more:hover { border-color: var(--accent); }

/* ------------------------------------------------------------ 6. En-tete */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand__mark { width: 2.6rem; height: 2.6rem; flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__name em { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.nav a {
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  transition: color 0.25s var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__ig { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink); }

.nav-toggle { display: none; }
.nav-scrim { display: none; }
body.is-locked { overflow: hidden; }

@media (max-width: 52rem) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    min-width: 3rem;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    font-size: var(--step--1);
    cursor: pointer;
  }
  /* Voile sous le panneau : le contenu ne se lit plus tronque derriere lui. */
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    /* Sous l en-tete et sous le panneau : seul le contenu de la page est voile. */
    z-index: calc(var(--z-sticky) - 1);
    background: oklch(0.19 0.015 20 / 0.35);
    border: 0;
    padding: 0;
    cursor: pointer;
  }
  .nav-scrim[hidden] { display: none; }
  .nav {
    position: fixed;
    inset: 5rem 0 auto;
    z-index: var(--z-overlay);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-block: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 2rem;
  }
  .nav[hidden] { display: none; }
  .nav a {
    width: 100%;
    font-size: var(--step-1);
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--line);
  }
}

/* --------------------------------------------------------------- 7. Heros */
.hero { padding-block: clamp(3rem, 2rem + 6vw, 7rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 4vw, 4.5rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
}
.hero__title { font-size: var(--step-4); }
.hero__mantra { margin-top: 1rem; }
.hero__text { margin-top: clamp(1.5rem, 2vw, 2.25rem); max-width: 48ch; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(1.75rem, 2.5vw, 2.5rem);
}
.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.hero__figure figcaption {
  margin-top: 0.85rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
/* Sur mobile : accroche, presentation, bouton, puis visuel (ordre du brief) */
@media (max-width: 59.99rem) {
  .hero__figure { order: 2; }
}

/* --------------------------------------------------------------------------
   Le battement du logo, devenu dispositif de marque.
   Deux echelles : la ligne longue (respiration de section) et la marque courte
   qui remplace les filets separateurs du triptyque.
   `non-scaling-stroke` garde le trait a 1,25px reel quelle que soit l echelle
   du viewBox — sans lui le trait tombait sous le demi-pixel.
   -------------------------------------------------------------------------- */
.pulse { width: min(100%, 24rem); height: 2rem; color: var(--ink); }
.pulse path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.pulse--center { margin-inline: auto; }
.js.reveal-ready .pulse path { stroke-dasharray: 520; stroke-dashoffset: 520; }
.js.reveal-ready .pulse.is-visible path { animation: draw 1.8s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.beat { width: 5.25rem; height: 1.25rem; color: var(--line-strong); }
.beat path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.beat .beat__spike { color: var(--accent); }

/* --------------------------------------------- 8. Triptyque Apprendre... */
/* Pas de filet pleine largeur entre les piliers : une marque de battement
   courte tient lieu de separateur, et l espace fait le reste. */
.triptych { display: grid; gap: clamp(3rem, 5vw, 5rem); }
.pillar {
  display: grid;
  gap: clamp(0.75rem, 3vw, 3rem);
}
@media (min-width: 52rem) {
  .pillar { grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr); align-items: start; }
}
.pillar__word {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.02em;
}
.pillar__word::after { content: "."; color: var(--accent); }
.pillar__head { display: grid; gap: clamp(0.85rem, 1.5vw, 1.25rem); }

/* -------------------------------------------------------- 9. Declaration */
.statement { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
@media (min-width: 60rem) {
  .statement { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
}
.pull-quote {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 26ch;
}

/* ------------------------------------------------------- 10. Ressource */
.resource { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 52rem) {
  .resource { grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr); }
}
.resource__cover {
  width: 100%;
  max-width: 20rem;
  aspect-ratio: 210 / 297;
  box-shadow: 0 1.5rem 3rem -1.5rem oklch(0.19 0.015 20 / 0.4);
}
.resource__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.resource__dot {
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ------------------------------------------------------- 11. Fondateur */
.founder { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
@media (min-width: 52rem) {
  .founder { grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr); }
}
.founder__photo { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ------------------------------------------------------- 12. Instagram */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
/* Le titre est pose sous l image, en encre : la vignette ne depend plus d une
   photo sombre, et il n entre pas en collision avec la typographie propre
   des publications Instagram. */
.ig-card {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  text-decoration: none;
  color: var(--ink);
}
.ig-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-blush);
}
.ig-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale 0.7s var(--ease-out);
}
.ig-card:hover img { scale: 1.04; }
.ig-card__title {
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
  transition: color 0.25s var(--ease-out);
}
.ig-card:hover .ig-card__title { color: var(--accent); }

/* ------------------------------------------------------ 13. Partenaires */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.partner {
  display: grid;
  place-items: center;
  min-height: 9.5rem;
  padding: 2rem 1.5rem;
  background: var(--surface);
}
.partner img { max-height: 3.25rem; width: auto; }

/* ------------------------------------------------------ 14. Newsletter */
.newsletter__inner { display: grid; gap: clamp(1.75rem, 3vw, 3.5rem); align-items: start; }
@media (min-width: 60rem) {
  .newsletter__inner { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); }
}

.form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.field { flex: 1 1 16rem; display: grid; gap: 0.4rem; }
.field label { font-size: var(--step--1); font-weight: 600; }
.field input[type="email"] {
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  transition: border-color 0.25s var(--ease-out);
}
.field input::placeholder { color: var(--ink-soft); opacity: 1; }
.field input:focus { border-color: var(--accent); }
.field input[aria-invalid="true"] {
  border-color: var(--accent);
  border-width: 2px;
  background: color-mix(in oklch, var(--accent) 4%, var(--surface));
}

/* Ligne de confiance sous le champ : ce que devient l adresse. */
.field-note {
  margin-top: 0.7rem;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 48ch;
}
.field-note a { color: var(--ink); text-underline-offset: 3px; }

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1.1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 56ch;
}
.consent input {
  margin: 0.2rem 0 0;
  width: 1.05rem; height: 1.05rem;
  accent-color: var(--accent);
  flex: none;
}
.form-note { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-soft); }
.form-feedback { margin-top: 1rem; font-size: var(--step--1); font-weight: 600; }
.form-feedback[data-state="ok"] { color: var(--accent); }
.form-feedback[data-state="error"] { color: var(--accent-deep); }

/* -------------------------------------------------- 15. Dialogue guide */
.dialog {
  position: relative;
  width: min(34rem, calc(100vw - 2rem));
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
}
.dialog::backdrop { background: oklch(0.19 0.015 20 / 0.5); }
.dialog__close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%;
  cursor: pointer; color: var(--ink-soft);
}
.dialog__close:hover { background: var(--bg-blush); color: var(--ink); }
.dialog[open] { animation: dialog-in 0.4s var(--ease-out); }
@keyframes dialog-in {
  from { opacity: 0; translate: 0 1rem; }
  to   { opacity: 1; translate: 0 0; }
}

/* ---------------------------------------------------------- 16. Contact */
.contact-card {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
}
@media (min-width: 52rem) {
  .contact-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

/* ------------------------------------------------------------ 17. Pied */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 4vw, 4.5rem) 2rem;
}
.site-footer__grid { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 52rem) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.3fr) auto auto; }
}
.footer-nav { display: grid; gap: 0.6rem; font-size: var(--step--1); }
.footer-nav a { text-decoration: none; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); }
.footer-title {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 4vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.site-footer__bottom a { text-decoration: none; }
.site-footer__bottom a:hover { text-decoration: underline; }

/* ------------------------------------------------------- 18. Revelations */
/* Le contenu est visible par defaut ; l animation ne fait que l enrichir.
   Quatre gestes distincts, choisis pour ce qu ils revelent — pas une entree
   unique appliquee partout. */

/* REGLE DE SURETE : aucun element n a d etat masque au repos. L etat de
   depart n existe QUE dans les keyframes, et seule la classe `is-visible`
   declenche l animation. Si l animation ne part jamais — onglet en
   arriere-plan, JS absent, feuille de style obsolete en cache, moteur de
   capture — l element est simplement visible. C est le seul montage ou un
   contenu ne peut pas rester bloque invisible. */

/* Defaut : montee courte. Pour ce qui arrive (le premier ecran). */
.js.reveal-ready [data-reveal].is-visible {
  animation: reveal-rise 0.7s var(--ease-out) var(--delay, 0s) both;
}
@keyframes reveal-rise {
  from { opacity: 0; translate: 0 1.25rem; }
  to   { opacity: 1; translate: 0 0; }
}

/* « still » : fondu pur. Pour les blocs de texte poses, qui ne bougent pas. */
.js.reveal-ready [data-reveal="still"].is-visible {
  animation: reveal-fade 0.9s var(--ease-out) var(--delay, 0s) both;
}
@keyframes reveal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* « wipe » : le mot s ecrit de gauche a droite. Reserve au triptyque. */
.js.reveal-ready [data-reveal="wipe"].is-visible {
  animation: reveal-wipe 0.95s var(--ease-out) var(--delay, 0s) both;
}
@keyframes reveal-wipe {
  from { opacity: 0; clip-path: inset(0 100% -0.2em 0); }
  to   { opacity: 1; clip-path: inset(0 0 -0.2em 0); }
}

/* « cover » : l image se decouvre par le bas, comme un tirage qui apparait. */
.js.reveal-ready [data-reveal="cover"].is-visible {
  animation: reveal-cover 1.1s var(--ease-out) var(--delay, 0s) both;
}
@keyframes reveal-cover {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Une animation terminee n a plus rien a retenir. */
.js [data-reveal].is-done { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] {
    opacity: 1;
    translate: none;
    clip-path: none;
    transition: none;
    animation: none !important;
  }
  .js .pulse path { stroke-dashoffset: 0; animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* A l impression, rien ne doit dependre d une transition declenchee au scroll. */
@media print {
  .js [data-reveal] { opacity: 1 !important; translate: none !important; clip-path: none !important; }
  .site-header, .nav-toggle, .skip-link { display: none !important; }
  .section, .hero { padding-block: 1.5rem; }
}
