/* ============================================================
   NEUROVALYS — Site minimaliste
   Base graphique : Site_minimaliste (juin 2026)
   Palette : marine #0E2A4D · terracotta #C8553D · crème #FAF7F2
   Typo    : Fraunces (display) · Inter (corps)
   ============================================================ */

:root {
  --marine: #0E2A4D;
  --terracotta: #C8553D;
  --cream: #FAF7F2;
  --text: #3A3A3A;
  --muted: #6E6E6E; /* AA sur fond crème (>= 4.5:1) */
  --border: #E5E2DC;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Les ancres ne passent pas sous le header sticky */
section[id] { scroll-margin-top: 96px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Filet de tête éditorial, terracotta plein de la palette */
  border-top: 6px solid var(--terracotta);
}

::selection { background: var(--terracotta); color: var(--cream); }

/* Inter n'est pas chargée en 700 : on impose la 600 réelle (pas de faux gras) */
strong, b { font-weight: 600; }

img, svg { max-width: 100%; }

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.skip {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--marine);
  color: var(--cream);
  font-size: 14px;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ─── HEADER ─── */
header {
  padding: 24px 0;
  position: sticky;
  top: 0;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}
header.scrolled { border-bottom-color: var(--border); }
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 50px; width: auto; display: block; }

nav ul {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}
nav a {
  color: var(--marine);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--terracotta); }
nav .cta {
  background: var(--marine);
  color: var(--cream);
  padding: 10px 20px;
  border-radius: 2px;
  font-size: 13px;
}
nav .cta:hover { background: var(--terracotta); color: var(--cream); }

/* ─── HERO ─── */
.hero { padding: 56px 0; }

.eyebrow {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--terracotta);
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.eyebrow::after {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--terracotta);
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 1;
  color: var(--marine);
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.hero h1 .accent { font-style: italic; color: var(--terracotta); }
.hero h1 .word { display: block; }

.hero p.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  max-width: 620px;
  margin-bottom: 28px;
}

/* Phrase signature du hero : élevée au rang de signature, même geste
   que la signature de la section À propos (filet terracotta en tête). */
.hero .signature-line {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--marine);
  max-width: 620px;
  margin-bottom: 48px;
}
.hero .signature-line::before {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--terracotta);
  margin-bottom: 20px;
}

.hero .cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
  padding: 16px 28px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}
.btn-primary:hover { background: #b04832; }

.btn-secondary {
  border: 1px solid var(--marine);
  color: var(--marine);
  padding: 16px 28px;
  border-radius: 2px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--marine); color: var(--cream); }

/* ─── SECTIONS ─── */
section.bloc {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.section-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--terracotta);
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-num::after {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--terracotta);
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  color: var(--marine);
  letter-spacing: -0.015em;
  margin-bottom: 80px;
  max-width: 800px;
}
.section-title .accent { font-style: italic; color: var(--terracotta); }

.section-lede {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  max-width: 640px;
  margin: -56px 0 72px;
}

/* ─── INTERVENTIONS — index éditorial des pratiques ─────────────
   Chaque domaine est une entrée : nom en regard de son explication,
   séparés par des filets fins, sans boîte. */
.grid-services {
  border-top: 1px solid var(--border);
}

.service {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  column-gap: 72px;
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}
.service .num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--terracotta);
  font-size: 13px;
  margin-bottom: 24px;
}
.service h3 {
  grid-column: 1;
  align-self: start;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--marine);
  line-height: 1.15;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}
.service p {
  grid-column: 2;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  max-width: 60ch;
  margin-bottom: 24px;
}
.service .tag {
  align-self: flex-start;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  width: 100%;
}

/* Tiroir dépliable des interventions */
.service details {
  grid-column: 2;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  width: 100%;
}
.service summary {
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}
.service summary:hover { color: var(--marine); }
.service summary::-webkit-details-marker { display: none; }
.service summary::after { content: '+'; content: '+' / ''; font-size: 16px; line-height: 1; }
.service details[open] summary::after { rotate: 45deg; }
.service details ul {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.service details li {
  font-size: 14px;
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
  color: var(--text);
}
.service details li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--terracotta);
  font-weight: 700;
}

/* ─── FAQ ─── */
.faq { max-width: 820px; }
.faq-item {
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  color: var(--marine);
  margin: 0;
  transition: color 0.2s;
}
.faq-item summary:hover h3 { color: var(--terracotta); }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  line-height: 1;
  color: var(--terracotta);
  flex-shrink: 0;
  transition: rotate 0.2s;
}
.faq-item[open] summary::after { rotate: 45deg; }
.faq-item p {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  max-width: 72ch;
}

/* Signature de positionnement dans le footer */
.footer-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  margin-bottom: 12px;
  opacity: 0.85;
}

/* ─── APPROCHE ─── */
.grid-approche {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px 96px;
  max-width: 1000px;
}
.principe h4 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--marine);
  margin-bottom: 16px;
}
.principe h4 .accent { font-style: italic; color: var(--terracotta); }
.principe p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

/* ─── À PROPOS ─── */
.a-propos-content { max-width: 760px; }
.a-propos-content p {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 24px;
  color: var(--text);
}
.a-propos-content p:first-of-type {
  font-size: 20px;
  line-height: 1.6;
  color: var(--marine);
  font-family: 'Fraunces', serif;
  font-weight: 400;
}

.a-propos-content .signature {
  margin-top: 36px;
  margin-bottom: 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--marine);
  letter-spacing: 0.02em;
}
.a-propos-content .signature::before {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--terracotta);
  margin-bottom: 14px;
}
.a-propos-content .signature-role {
  display: block;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 5px;
}

.frise {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.frise-titre {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 16px;
}
.frise-mots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 13px;
}
.frise-mots span { white-space: nowrap; }
.frise-mots span + span::before {
  content: '·';
  margin-right: 24px;
  color: var(--terracotta);
}

/* ─── CONTACT ─── */
#contact {
  background: var(--marine);
  color: var(--cream);
  border-top: none;
}
#contact .section-title { color: var(--cream); }
#contact .section-title .accent { color: var(--terracotta); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 64px;
}
.contact-block h5 {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.75);
  margin-bottom: 16px;
  font-weight: 500;
}
.contact-block p,
.contact-block a {
  color: var(--cream);
  text-decoration: none;
  font-size: 18px;
  line-height: 1.5;
  font-family: 'Fraunces', serif;
}
.contact-block p { margin-bottom: 8px; }
.contact-block a:hover { color: var(--terracotta); }
.contact-block .note {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(250, 247, 242, 0.75);
  margin-top: 12px;
  max-width: 38ch;
}

/* ─── FOOTER ─── */
footer {
  background: var(--marine);
  color: rgba(250, 247, 242, 0.75);
  padding: 40px 0;
  font-size: 12px;
  border-top: 1px solid rgba(250, 247, 242, 0.1);
}
footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
footer a {
  color: rgba(250, 247, 242, 0.75);
  text-decoration: none;
  margin-left: 24px;
}
footer a:first-child { margin-left: 0; }
footer a:hover { color: var(--terracotta); }

/* ─── PAGES LÉGALES ─── */
.page-head { padding: 96px 0 24px; }
.page-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  color: var(--marine);
  letter-spacing: -0.015em;
  margin-top: 8px;
}
.page-head .lead {
  font-size: 17px;
  color: var(--text);
  max-width: 620px;
  margin-top: 24px;
}

/* ─── PAGE 404 ─── */
.page-head.p404 { padding: 96px 0 140px; }
.code404 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(96px, 14vw, 160px);
  line-height: 0.95;
  color: var(--marine);
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.code404 .accent { font-style: italic; color: var(--terracotta); }
.sub404 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  color: var(--marine);
  margin: 22px 0 10px;
}
.p404 .lead {
  font-size: 17px;
  color: var(--text);
  max-width: 560px;
}

.legal {
  max-width: 720px;
  padding: 24px 0 120px;
}
.legal h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 24px;
  color: var(--marine);
  margin: 48px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.legal h2:first-of-type { margin-top: 16px; }
.legal p, .legal li {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal ul { padding-left: 22px; margin-bottom: 14px; }
.legal a { color: var(--marine); }
.legal a:hover { color: var(--terracotta); }
.legal .todo {
  background: rgba(200, 85, 61, 0.08);
  border: 1px dashed rgba(200, 85, 61, 0.5);
  border-radius: 2px;
  padding: 1px 8px;
  font-size: 13px;
  color: var(--terracotta);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  nav ul { gap: 0; }
  nav ul li { display: none; }
  nav ul li:last-child { display: block; }
  .hero { padding: 44px 0; }
  section.bloc { padding: 80px 0; }
  .section-title { margin-bottom: 48px; }
  .section-lede { margin: -28px 0 48px; }
  .grid-approche,
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .service { grid-template-columns: 1fr; column-gap: 0; padding: 36px 0; }
  .service h3,
  .service p,
  .service details { grid-column: 1; }
  .service h3 { margin-bottom: 18px; font-size: 28px; }
  .container { padding: 0 24px; }
  /* Le CTA reste sur une ligne ; c'est le logo qui cède la place au besoin */
  nav { flex-shrink: 0; }
  nav .cta { white-space: nowrap; }
  .logo { min-width: 0; }
  .logo img { height: 42px; }
}

/* ============================================================
   FINITIONS — enrichissement progressif strict :
   chaque règle ci-dessous est ignorée sans dommage par les
   navigateurs qui ne la connaissent pas.
   ============================================================ */

/* ─── Typographie : titres équilibrés, paragraphes sans veuves ─── */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* ─── Liens : soulignement fin, révélé en douceur ─── */
nav a:not(.cta) {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: color 0.2s, text-decoration-color 0.25s;
}
nav a:not(.cta):hover { text-decoration-color: currentColor; }

footer a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.25s;
}
footer a:hover { text-decoration-color: currentColor; }

.legal a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(200, 85, 61, 0.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.legal a:hover { text-decoration-color: currentColor; }

.contact-block a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s, text-decoration-color 0.25s;
}
.contact-block a:hover { text-decoration-color: currentColor; }

/* ─── Focus visible : outline crème sur les fonds marine ─── */
#contact :focus-visible,
footer :focus-visible { outline-color: var(--cream); }

/* ─── Tiroirs <details> : autorise l'interpolation vers auto ─── */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

/* ─── Mouvement : neutralisé par prefers-reduced-motion, exclu de l'impression ─── */
@media screen and (prefers-reduced-motion: no-preference) {

  /* Boutons : soulèvement léger, appui tactile, flèche qui glisse */
  .btn-primary, .btn-secondary, nav .cta {
    transition: background 0.2s, color 0.2s, translate 0.25s ease, scale 0.2s ease;
  }
  .btn-primary:hover, .btn-secondary:hover, nav .cta:hover { translate: 0 -1px; }
  .btn-primary:active, .btn-secondary:active, nav .cta:active { translate: 0 0; scale: 0.985; }
  .btn-primary .arrow, .btn-secondary .arrow {
    transition: translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .btn-primary:hover .arrow, .btn-secondary:hover .arrow { translate: 3px 0; }

  /* Marqueur des tiroirs : le + pivote en croix de fermeture */
  .service summary::after { transition: rotate 0.3s ease; }

  /* Contenu des tiroirs : déploiement fluide via ::details-content */
  .service details::details-content {
    opacity: 0;
    block-size: 0;
    overflow-y: clip;
    transition: content-visibility 0.35s allow-discrete, opacity 0.3s ease, block-size 0.35s ease;
  }
  .service details[open]::details-content {
    opacity: 1;
    block-size: auto;
  }

  /* Entrée du hero : les quatre vagues se posent l'une après l'autre */
  @keyframes nv-enter {
    from { opacity: 0; translate: 0 10px; }
  }
  .hero h1 .word,
  .hero .lead,
  .hero .signature-line,
  .hero .cta-group {
    animation: nv-enter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero h1 .word:nth-child(2) { animation-delay: 70ms; }
  .hero h1 .word:nth-child(3) { animation-delay: 140ms; }
  .hero h1 .word:nth-child(4) { animation-delay: 210ms; }
  .hero .lead { animation-delay: 300ms; }
  .hero .signature-line { animation-delay: 380ms; }
  .hero .cta-group { animation-delay: 460ms; }

  /* Révélations liées au scroll : CSS pur, aucun listener */
  @supports (animation-timeline: view()) {
    @keyframes nv-rise {
      from { opacity: 0; translate: 0 14px; }
      to { opacity: 1; translate: 0 0; }
    }
    @keyframes nv-fade {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .section-num, .section-title, .section-lede,
    .a-propos-content p, .frise, .contact-grid {
      animation: nv-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
    .service {
      animation: nv-fade linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
