/* =========================================================
   Olivier Perrin — Ostéopathe D.O.
   Design éditorial premium, sobre et médical
   ========================================================= */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ----- Reset léger ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ----- Tokens ----- */
:root {
  --bg: #f4f0e9;
  --surface: #fbf9f4;
  --surface-2: #efeae1;
  --ink: #1d2a25;
  --text: #34403a;
  --muted: #6c766f;
  --primary: #294a40;
  --primary-dark: #1d3730;
  --accent: #9a7b4f;
  --line: #ddd6c8;
  --ring: #294a4055;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --display: clamp(3rem, 1.2rem + 7.5vw, 7rem);
  --h2: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  --h3: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 4px rgba(20, 35, 28, .04), 0 22px 48px -24px rgba(20, 35, 28, .22);
  --container: 1200px;
  --pad: clamp(4rem, 2rem + 8vw, 8rem);
}

/* ----- Base ----- */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: clamp(1rem, .97rem + .15vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  color: var(--ink);
  font-weight: 480;
  line-height: 1.04;
  letter-spacing: -0.015em;
}
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 520; line-height: 1.2; }
p { color: var(--text); }
strong { color: var(--ink); font-weight: 600; }

::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff;
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ----- Layout ----- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding: var(--pad) 0; }
.section-alt { background: var(--surface-2); }

.section-label {
  display: flex; align-items: baseline; gap: .7rem;
  font-family: var(--sans);
  font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.section-index {
  font-family: var(--serif);
  font-size: .95rem; font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.section-label.on-dark { color: #cbb48c; }
.section-label.on-dark .section-index { color: #fff; border-color: #cbb48c; }

.section-head { max-width: 48rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.section-sub { font-size: 1.1rem; color: var(--muted); margin-top: 1rem; max-width: 34rem; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

/* ----- Boutons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.7rem; border-radius: 999px;
  font-weight: 550; font-size: 1rem; text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: #efeae1; }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 74px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--ink); }
.brand-text small { color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }

.primary-nav ul { list-style: none; display: flex; align-items: center; gap: .2rem; padding: 0; }
.primary-nav a {
  text-decoration: none; color: var(--text); font-weight: 500; font-size: .96rem;
  padding: .5rem .8rem; border-radius: 8px; transition: color .15s ease, background .15s ease;
}
.primary-nav a:hover { color: var(--primary); }
.nav-cta a {
  background: var(--primary); color: #fff !important;
  padding: .6rem 1.2rem !important; border-radius: 999px; margin-left: .5rem;
}
.nav-cta a:hover { background: var(--primary-dark); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: transparent;
  border: 1px solid var(--line); border-radius: 10px;
}
.nav-toggle span { display: block; height: 2px; width: 22px; margin-inline: auto; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Hero ----- */
.hero { padding: clamp(3rem, 1rem + 7vw, 6.5rem) 0 var(--pad); }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center;
}
.hero h1 {
  font-size: var(--display); font-weight: 460;
  letter-spacing: -0.03em; margin: 1.2rem 0;
}
.hero .eyebrow { margin-bottom: .4rem; }
.hero-sub { font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); color: var(--text); max-width: 30rem; }
.cta-group { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero-meta { margin-top: 1.75rem; font-size: .9rem; color: var(--muted); letter-spacing: .01em; }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-figure::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41,74,64,.05) 0%, rgba(29,42,37,.34) 100%);
  box-shadow: inset 0 0 0 1px rgba(29,42,37,.08);
  pointer-events: none;
}

/* ----- À propos ----- */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 4vw, 5rem);
}
.about-body h2 { max-width: 18ch; margin-bottom: 1.5rem; }
.about-body p { font-size: 1.12rem; max-width: 60ch; }
.about-body p + p { margin-top: 1.25rem; }
.tag-row {
  list-style: none; padding: 0; margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.tag-row li {
  font-size: .9rem; font-weight: 500; color: var(--primary-dark);
  background: var(--surface); border: 1px solid var(--line);
  padding: .45rem 1rem; border-radius: 999px;
}

/* ----- Cabinets ----- */
.cabinets {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.cabinet {
  background: transparent;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  display: flex; flex-direction: column;
  transition: background .25s ease;
}
.cabinet:hover { background: var(--surface); }
.cabinet h3 { font-size: 1.5rem; color: var(--ink); margin-bottom: .6rem; }
.cabinet-addr { color: var(--text); font-weight: 500; }
.cabinet-meta { margin: 1.25rem 0; display: grid; gap: .55rem; }
.cabinet-meta div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.cabinet-meta dt { color: var(--muted); }
.cabinet-meta dd { color: var(--ink); font-weight: 600; text-align: right; }
.cabinet-note { font-size: .9rem; color: var(--muted); font-style: italic; }
.cabinet-actions { margin-top: auto; padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.cabinet-actions a {
  position: relative; text-decoration: none; color: var(--primary);
  font-weight: 550; font-size: .95rem; padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
}
.cabinet-actions a:hover { color: var(--primary-dark); border-color: var(--primary-dark); }

/* ----- Formation ----- */
.formation-grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start;
}
.formation-figure { margin-top: 2rem; }
.formation-figure img {
  width: 100%; max-height: 380px; object-fit: cover; object-position: center 28%;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.timeline { list-style: none; padding: 0; position: relative; margin-top: 1rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 2rem 2rem; }
.timeline li::before {
  content: ""; position: absolute; left: -4px; top: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline-year { display: block; font-family: var(--serif); font-size: 1.05rem; color: var(--accent); margin-bottom: .15rem; }
.timeline h3 { font-size: 1.2rem; }
.timeline p { color: var(--muted); font-size: .96rem; }

/* ----- FAQ ----- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 4vw, 5rem); align-items: start; }
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  font-family: var(--serif); font-size: 1.2rem; color: var(--ink);
  padding: 1.4rem 2.5rem 1.4rem 0;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.5rem; font-weight: 300; color: var(--accent);
  transition: transform .25s ease;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details > p { padding: 0 2.5rem 1.6rem 0; color: var(--muted); max-width: 60ch; }
.faq-list a { color: var(--primary); font-weight: 600; }

/* ----- Coordonnées & tarifs ----- */
.contact { background: linear-gradient(160deg, var(--primary), var(--primary-dark)); color: #eef3f0; }
.contact h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.contact h2 { margin-bottom: 2rem; max-width: 14ch; }
.contact-list { display: grid; gap: 1.1rem; margin-bottom: 2.25rem; }
.contact-list div { display: grid; gap: .15rem; padding-bottom: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.16); }
.contact-list dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #b9c9c2; }
.contact-list dd { font-size: 1.25rem; font-family: var(--serif); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.tarifs-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: clamp(1.75rem, 1rem + 2vw, 2.75rem); }
.tarifs-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 1.25rem; }
.tarif-list { list-style: none; padding: 0; display: grid; gap: .9rem; }
.tarif-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(255,255,255,.14); color: #dde7e2; }
.tarif-price { font-family: var(--serif); font-size: 1.5rem; color: #fff; }
.tarif-note { margin-top: 1.5rem; font-size: .88rem; color: #b9c9c2; line-height: 1.6; }

/* ----- Footer ----- */
.site-footer { background: var(--ink); color: #b7c2bc; padding: 3rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; justify-content: space-between; }
.footer-brand strong { font-family: var(--serif); font-weight: 500; color: #fff; }
.footer-brand p { color: #8a958f; font-size: .9rem; margin-top: .3rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: #b7c2bc; text-decoration: none; font-size: .92rem; }
.footer-nav a:hover { color: #fff; }
.footer-copy { width: 100%; border-top: 1px solid #2c3a34; padding-top: 1.5rem; font-size: .85rem; color: #79847e; }

/* ----- Révélation au scroll ----- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .hero-inner, .about-grid, .formation-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-figure img { aspect-ratio: 16 / 11; max-height: 340px; }
  .formation-figure { order: 1; margin-top: 0; margin-bottom: 1rem; }
  .section-head { max-width: none; }

  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: 74px 0 auto 0; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .primary-nav.is-open { max-height: 85vh; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: .15rem; padding: 1rem; }
  .primary-nav a { padding: .9rem 1rem; font-size: 1.05rem; }
  .nav-cta a { text-align: center; margin: .5rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
