/* ==========================================================================
   Advanced Training Pro — feuille de style
   Mobile-first · thème sombre · esprit « produit » : grands titres centrés,
   photos en tuiles arrondies, beaucoup d'air. Aucune dépendance.
   Typo : Inter Tight (titres) + Inter (texte), auto-hébergées.
   ========================================================================== */

/* ---------- Polices auto-hébergées (aucun appel à Google) ---------- */
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables ---------- */
/* Layout : colonne centrée, titres centrés, tuiles arrondies type « bento » */
:root {
  color-scheme: dark;
  --bg: #121314;
  --bg-alt: #000000;
  --tile: #1c1d1f;
  --tile-hover: #222326;
  --surface: #323232;
  --line: #2a2b2d;
  --text: #e9e7e7;
  --text-muted: #a4a1a1; /* 7,6:1 sur #121314 */
  --accent: #f3d921;
  --accent-ink: #121314;
  --danger: #ff8a7a;
  --success: #9be29b;

  --font-display: "Inter Tight", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Inter", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  --header-h: 64px;
  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(3.25rem, 6vw, 5.5rem);
  --radius-lg: clamp(20px, 3vw, 30px);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Liens ---------- */
.link-underline {
  position: relative;
  text-decoration: none;
  padding-block: 0.15em;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.link-underline:hover::after,
.link-underline:focus-visible::after,
.link-underline[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Lien texte façon « En savoir plus › » */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.link-more .chev {
  transition: transform 0.3s var(--ease);
}
.link-more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.link-more:hover .chev {
  transform: translateX(3px);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.25s, color 0.25s;
}
.btn:hover {
  transform: scale(1.03);
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px -10px rgba(243, 217, 33, 0.45);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* ---------- En-tête ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(18, 19, 20, 0);
  border-bottom: 1px solid transparent;
  transition: background-color 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}
.site-header.is-scrolled,
.site-header.menu-open,
.page-legal .site-header {
  background: rgba(18, 19, 20, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
/* En haut de page, liens bien lisibles sur la photo */
.site-header:not(.is-scrolled) .site-nav a {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand img {
  width: auto;
  height: 36px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sélecteur de langue */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.lang-switch button {
  min-width: 40px;
  min-height: 32px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.lang-switch button:hover {
  color: var(--text);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.lang-switch .sep {
  display: none;
}

/* Navigation : menu déroulant sur mobile */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle-bars {
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before {
  top: -5px;
}
.nav-toggle-bars::after {
  top: 5px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-5px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: none;
  min-height: calc(100vh - var(--header-h));
  background: var(--bg);
}
.site-nav.is-open {
  display: block;
  animation: menu-in 0.35s var(--ease);
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.site-nav ul {
  margin: 0;
  padding: 1.5rem var(--gutter);
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-y);
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  display: grid;
  gap: 1.1rem;
  max-width: 820px;
  margin: 0 auto clamp(2rem, 3.5vw, 3rem);
  text-align: center;
  justify-items: center;
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.section-title {
  font-size: clamp(2.3rem, 6vw, 4rem);
}
.section-lead {
  margin: 0;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 88vh;
  min-height: 88svh;
  padding-block: calc(var(--header-h) + clamp(3.5rem, 9vw, 6rem)) clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
  text-align: center;
  background: var(--bg-alt);
}
.hero-inner {
  display: grid;
  gap: clamp(3rem, 8vw, 5.5rem);
}

/* Photos de fond : derrière le texte, assombries pour garder un contraste fort */
.bg-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.bg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .bg-photo img {
  object-position: 78% 50%;
}
@media (min-width: 960px) {
  .hero .bg-photo img {
    object-position: 62% 50%;
  }
}
.hero .bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.92) 100%),
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(0, 0, 0, 0.35), transparent 75%);
}
.js .parallax img {
  transform: translate3d(0, var(--shift, 0px), 0) scale(1.12);
  will-change: transform;
}
.hero-copy {
  display: grid;
  justify-items: center;
  gap: 1.4rem;
  max-width: 940px;
  margin-inline: auto;
}
.hero .eyebrow {
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero-title {
  font-size: clamp(2.8rem, 8.6vw, 6.4rem);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -0.032em;
}
.hero-title .amp {
  color: var(--accent);
}
.hero-lead {
  max-width: 46ch;
  margin: 0;
  color: #d2cfcf;
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  line-height: 1.45;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(243, 217, 33, 0.72);
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn-pill:hover,
.btn-pill:focus-visible {
  background: var(--accent);
  transform: scale(1.06);
  box-shadow: 0 8px 24px -8px rgba(243, 217, 33, 0.5);
}
.btn-pill:active {
  transform: scale(1.02);
}
.btn-pill:focus-visible {
  outline-offset: 4px;
  border-radius: 999px;
}

.link-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 34px;
  color: #d2cfcf;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
}
.link-play-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.link-play:hover {
  color: var(--text);
}
.link-play:hover .link-play-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.06);
}
.link-play:focus-visible {
  border-radius: 999px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
}

/* Repères : zone, format, public */
.hero-facts {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  margin: 0 auto;
  padding-top: 1.75rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0;
  list-style: none;
  max-width: 900px;
}
.hero-facts li {
  display: grid;
  gap: 0.2rem;
}
.hero-facts .label {
  color: #bdbaba;
  font-size: 0.85rem;
}
.hero-facts strong {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* ---------- À propos ---------- */
.has-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-alt);
}
.services-photo img {
  object-position: 50% 30%;
}
.services-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg-alt) 0%, rgba(0, 0, 0, 0.7) 22%, rgba(0, 0, 0, 0.7) 78%, var(--bg-alt) 100%),
    rgba(0, 0, 0, 0.25);
}
.has-photo .section-lead {
  color: #c9c6c6;
}
.about-grid {
  display: grid;
}
.about-text {
  display: grid;
  gap: 1.25rem;
  max-width: 720px;
  margin-inline: auto;
}
.about-text .section-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}
.about-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Chiffres clés : volontairement discrets */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.5rem 0 0;
  padding: 1.25rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.stats li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.stats li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Services : tuiles « bento » ---------- */
.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: rgba(28, 29, 31, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  background: rgba(34, 35, 38, 0.82);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  overflow: hidden;
  background: #0b0c0c;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(18, 19, 20, 0.55) 100%);
}
.card:hover .card-media img {
  transform: scale(1.05);
}
.card-body {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: clamp(1.5rem, 3vw, 2.1rem);
}
.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  padding: 11px;
  border-radius: 14px;
  background: rgba(243, 217, 33, 0.1);
  color: var(--accent);
}
.card-tag {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.card-title {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.card p:last-child {
  margin: 0;
  color: #bdbaba;
}

/* ---------- Vidéo (façade légère) ---------- */
.video-wrap {
  position: relative;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #26272a 0%, #0b0c0c 72%);
  border-radius: var(--radius-lg);
}
.video-wrap iframe,
.video-poster,
.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-poster {
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.4s, transform 0.9s var(--ease);
}
.video-play {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.video-play-icon {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(243, 217, 33, 0.35);
  transition: transform 0.35s var(--ease), box-shadow 0.5s var(--ease);
}
.video-play-label {
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.video-play:hover .video-play-icon,
.video-play:focus-visible .video-play-icon {
  transform: scale(1.06);
  box-shadow: 0 0 0 14px rgba(243, 217, 33, 0.12);
}
.video-wrap:hover .video-poster {
  opacity: 0.85;
  transform: scale(1.02);
}
.video-play:focus-visible {
  outline-offset: -4px;
}
.video-note {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Contact ---------- */
.contact-wrap {
  max-width: 760px;
  margin-inline: auto;
}
.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4.5vw, 2.75rem);
  background: var(--tile);
  border-radius: var(--radius-lg);
}
.field {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}
.field label {
  font-size: 0.9rem;
  font-weight: 560;
}
.field .optional,
.field .required {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  min-height: 160px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #858282;
}
.field input:hover,
.field textarea:hover {
  border-color: var(--surface);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(243, 217, 33, 0.16);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-row {
  display: grid;
  gap: 1.25rem;
}
.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.875rem;
}
.field-error:empty {
  display: none;
}

/* Champ piège pour les robots : hors écran, jamais visible */
.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-box {
  min-height: 65px;
}
.form-legal {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}
.form-legal a {
  color: var(--text);
  text-underline-offset: 3px;
}
.form-actions {
  display: flex;
  justify-content: flex-start;
}
.form-status {
  margin: 0;
  font-size: 1rem;
}
.form-status:not(:empty) {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--bg);
  border-left: 3px solid var(--surface);
}
.form-status.is-success {
  border-left-color: var(--success);
}
.form-status.is-error {
  border-left-color: var(--danger);
}

/* ---------- Pied de page ---------- */
.site-footer {
  padding-block: 3.5rem 2.5rem;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-logo {
  width: 120px;
  height: auto;
}
.footer-legal p {
  margin: 0 0 0.25rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  color: var(--text);
}
.footer-bottom {
  margin: 1.5rem 0 0;
}

/* ---------- Pages légales ---------- */
.legal-main {
  padding-block: calc(var(--header-h) + 4rem) var(--section-y);
}
.legal-main .container {
  max-width: 780px;
}
.legal-main h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin-bottom: 0.75rem;
}
.legal-updated {
  margin-bottom: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.legal-body h2 {
  margin: 3rem 0 1rem;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}
.legal-body p,
.legal-body li {
  color: #cfcccc;
}
.legal-body ul {
  padding-left: 1.25rem;
}
.legal-body li {
  margin-bottom: 0.5rem;
}
.legal-body a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.legal-body a:hover {
  color: var(--accent);
}
.legal-body dl {
  display: grid;
  gap: 0.2rem 1.5rem;
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: var(--tile);
  border-radius: var(--radius);
}
.legal-body dt {
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.legal-body dt:first-child {
  margin-top: 0;
}
.legal-body dd {
  margin: 0;
}
.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-weight: 500;
}

/* 404 */
.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--gutter);
  text-align: center;
}
.notfound h1 {
  font-size: clamp(5rem, 20vw, 9rem);
  color: var(--accent);
}

/* ---------- Apparition au scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Entrée du hero au chargement */
.js .hero-in {
  animation: hero-in 1.1s var(--ease) both;
  animation-delay: var(--in-delay, 0s);
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Téléphone : espacements resserrés entre les sections ---------- */
@media (max-width: 767px) {
  :root {
    --section-y: 3.25rem;
  }
  .section-head {
    margin-bottom: 2rem;
    gap: 0.75rem;
  }
  .legal-main {
    padding-top: calc(var(--header-h) + 2rem);
  }
  .legal-updated {
    margin-bottom: 2rem;
  }
  .legal-body h2 {
    margin-top: 2rem;
  }
  .site-footer {
    padding-block: 2.5rem 2rem;
  }
  .footer-bottom {
    margin-top: 1.25rem;
  }
}

/* ---------- Téléphone en portrait : photo du hero recadrée et plus visible ---------- */
@media (max-width: 767px) and (orientation: portrait) {
  .hero {
    align-items: flex-start;
    min-height: 0;
    padding-top: calc(var(--header-h) + 14vw);
    padding-bottom: 2.5rem;
  }
  .hero-title,
  .hero-lead,
  .hero .eyebrow {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  }
  .hero .bg-photo {
    bottom: auto;
    height: 125vw; /* format 4:5 de la photo : on la voit en entier */
  }
  .hero .bg-photo img {
    object-position: 50% 50%;
  }
  .js .hero .parallax img {
    transform: none; /* pas d'effet de profondeur ici : la photo reste entière */
  }
  .hero .bg-photo::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.32) 25%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 0.78) 78%,
      #000 100%
    );
  }
  .hero-inner {
    gap: 2.5rem;
  }
}

/* ---------- Tracé ECG animé sous les boutons du hero ---------- */
.hero-ecg {
  width: min(100%, 440px);
  margin: 0.25rem auto 0;
  pointer-events: none;
}
.hero-ecg svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.ecg-trace,
.ecg-head {
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Balayage continu façon moniteur : un trait de 72 % de la longueur
   et un vide de 28 % défilent en boucle, sans temps mort. */
.ecg-trace {
  stroke-width: 2;
  stroke-dasharray: 0.72 0.28;
  stroke-dashoffset: 0.72;
  filter: drop-shadow(0 0 4px rgba(243, 217, 33, 0.65)) drop-shadow(0 0 12px rgba(243, 217, 33, 0.3));
  animation: ecg-sweep 3.2s linear infinite;
}
/* Point lumineux en tête du tracé, synchronisé */
.ecg-head {
  stroke: url(#ecg-head-grad);
  stroke-width: 3.2;
  stroke-dasharray: 0.02 0.98;
  stroke-dashoffset: 0.02;
  filter: drop-shadow(0 0 3px #fff6b0) drop-shadow(0 0 10px rgba(243, 217, 33, 0.95));
  animation: ecg-sweep-head 3.2s linear infinite;
}
@keyframes ecg-sweep {
  from { stroke-dashoffset: 0.72; }
  to { stroke-dashoffset: -0.28; }
}
@keyframes ecg-sweep-head {
  from { stroke-dashoffset: 0.02; }
  to { stroke-dashoffset: -0.98; }
}

/* Sur téléphone : la page s'affiche directement, sans fondu des textes */
@media (max-width: 959px) {
  .js .hero-in {
    animation: none;
  }
}

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  .hero-facts {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 3rem;
  }
}

/* ---------- Bureau ---------- */
@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }
  .site-nav {
    position: static;
    display: block;
    min-height: 0;
    background: none;
  }
  .site-nav ul {
    display: flex;
    gap: 2rem;
    padding: 0;
  }
  .site-nav a {
    display: inline;
    padding: 0.3rem 0;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 450;
    letter-spacing: -0.005em;
    color: var(--text-muted);
    transition: color 0.2s;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="true"] {
    color: var(--text);
  }
  .header-actions {
    gap: 2rem;
  }
  .cards {
    gap: 1.25rem;
  }
  .footer-grid {
    grid-template-columns: auto 1fr auto;
  }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal,
  .js .hero-in {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .js .parallax img {
    transform: none;
  }
  .ecg-trace {
    animation: none;
    stroke-dashoffset: 0;
  }
  .ecg-head {
    display: none;
  }
  .btn:hover,
  .btn-pill:hover,
  .card:hover,
  .card:hover .card-media img {
    transform: none;
  }
}
