/* =========================================================
   Cap Sécurité Formation — feuille de style unique
   Mobile first · hero sombre, contenu clair et aéré
   ========================================================= */

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #07111D;        /* fonds sombres */
  --night-2: #0E1E31;
  --ink: #0C1B2C;          /* texte principal */
  --muted: #5A6778;
  --line: #E3E8EE;
  --soft: #F3F5F8;
  --white: #FFFFFF;
  --blue: #1E8FE6;         /* bleu du logo */
  --blue-ink: #0F6FC0;     /* bleu lisible sur fond clair (AA) */
  --blue-light: #8CC8F6;   /* bleu lisible sur fond sombre */
  --red: #DC282D;          /* rouge du logo */
  --red-dark: #B91F23;
  --tbc: #FFF1B8;

  --font-title: "Outfit", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 20px;
  --radius: 14px;
  --radius-lg: 24px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 2px rgba(12, 27, 44, .04), 0 20px 50px -20px rgba(12, 27, 44, .18);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
figure { margin: 0; }
a { color: var(--blue-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
strong, b { font-weight: 400; color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: var(--white); }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.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;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 200;
  background: var(--white); color: var(--ink); padding: .6em 1em; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* Contenus à confirmer : visibles, à retirer avant la mise en ligne */
mark.tbc {
  background: var(--tbc);
  color: #5C4700;
  padding: .05em .4em;
  border-radius: 4px;
  font-family: var(--font-text);
  font-size: .8125rem;
  letter-spacing: 0;
  white-space: normal;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Petits éléments ---------- */

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-red { background: var(--red); }
.dot-blue { background: var(--blue); }

.section { padding-block: 88px; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 20px; }
.section-lead { font-size: 1.125rem; color: var(--muted); max-width: 36em; }

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: .9375rem; }
.btn-red { background: var(--red); color: var(--white); box-shadow: 0 10px 30px -10px rgba(220, 40, 45, .6); }
.btn-red:hover { background: var(--red-dark); box-shadow: 0 14px 34px -10px rgba(220, 40, 45, .7); }
.btn-glass {
  background: rgba(7, 17, 29, .45); color: var(--white);
  border-color: rgba(255, 255, 255, .28);
}
.btn-glass:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .5); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { background: #E8EEF5; }
.btn[disabled] { opacity: .7; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-title); font-weight: 600; font-size: 1rem;
  color: var(--ink); text-decoration: none;
}
.link-arrow .icon { color: var(--red); transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--red-dark); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Barre de progression ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  color: var(--white);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .45s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(12, 27, 44, .08);
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }

.brand { position: relative; display: block; margin-right: auto; width: 112px; height: 45px; z-index: 2; }
.brand img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .35s var(--ease); }
.brand-dark { opacity: 0; }
.is-scrolled .brand-light { opacity: 0; }
.is-scrolled .brand-dark { opacity: 1; }
.menu-open .brand-light { opacity: 1 !important; }
.menu-open .brand-dark { opacity: 0 !important; }

.header-phone {
  display: none; align-items: center; gap: .5em;
  font-family: var(--font-title); font-weight: 600; font-size: .9375rem;
  color: inherit; text-decoration: none; padding: 8px 6px;
}
.header-phone .icon { width: 1em; height: 1em; }
.header-phone:hover { color: var(--red); }
.header-cta { display: none; }

.nav-toggle {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  background: rgba(255, 255, 255, .1); color: inherit;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; cursor: pointer;
}
.is-scrolled .nav-toggle { background: var(--soft); border-color: var(--line); }
.menu-open .nav-toggle { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: var(--white); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform .35s var(--ease), background-color .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); }

/* Menu mobile : panneau plein écran */
.nav-list {
  list-style: none; margin: 0;
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
  background: var(--night); color: var(--white);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s linear .4s;
}
.nav-list.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.nav-list a {
  display: inline-block; padding: 8px 0;
  font-family: var(--font-title); font-weight: 600; font-size: clamp(2rem, 9vw, 2.75rem); letter-spacing: -.02em;
  color: var(--white); text-decoration: none;
  transform: translateY(24px); opacity: 0;
  transition: transform .6s var(--ease), opacity .6s var(--ease), color .2s;
}
.nav-list.is-open a { transform: none; opacity: 1; }
.nav-list li:nth-child(2) a { transition-delay: .05s; }
.nav-list li:nth-child(3) a { transition-delay: .1s; }
.nav-list li:nth-child(4) a { transition-delay: .15s; }
.nav-list li:nth-child(5) a { transition-delay: .2s; }
.nav-list a:hover { color: var(--blue-light); }
.nav-extra { margin-top: 24px; }
.nav-extra a { font-size: 1.25rem; color: var(--blue-light); }
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .nav-list { position: static; opacity: 1; visibility: visible; flex-direction: row; flex-wrap: wrap; gap: 0 16px; padding: 0; background: none; }
html:not(.js) .nav-list a { opacity: 1; transform: none; font-size: 1rem; }
html:not(.js) .site-header { position: absolute; }
html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
html.menu-open { overflow: hidden; }
.menu-open .site-header { color: var(--white); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--night); color: var(--white);
}
.hero-media { position: absolute; inset: 0 0 -12% 0; z-index: -2; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-media img { animation: hero-zoom 2.6s var(--ease) both; }
@keyframes hero-zoom { from { transform: scale(1.12); opacity: .4; } to { transform: none; opacity: 1; } }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 17, 29, .55) 0%, rgba(7, 17, 29, .25) 30%, rgba(7, 17, 29, .85) 78%, var(--night) 100%),
    linear-gradient(90deg, rgba(7, 17, 29, .75) 0%, rgba(7, 17, 29, .2) 100%);
}
.hero-content { padding-top: calc(var(--header-h) + 64px); padding-bottom: 72px; }
.hero-title {
  font-size: clamp(2.1rem, 8.4vw, 5.4rem);
  line-height: 1;
  letter-spacing: -.035em;
  max-width: 13ch;
  margin-bottom: 28px;
}
.hero-title em { font-style: normal; color: rgba(255, 255, 255, .5); }
.hero-lead { font-size: 1.125rem; max-width: 34em; color: rgba(255, 255, 255, .82); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 220px; }


/* ---------- Manifeste ---------- */
.manifesto { padding-block: 112px 72px; }
.manifesto-text {
  margin: 0; max-width: 22em;
  font-family: var(--font-title); font-weight: 600;
  font-size: clamp(1.65rem, 4.2vw, 3.1rem);
  line-height: 1.18; letter-spacing: -.025em;
  color: var(--ink);
}

/* ---------- Formations ---------- */
.formations { padding-top: 48px; }
.pole + .pole { margin-top: 80px; }
.pole-title {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  padding-bottom: 18px; margin-bottom: 36px; border-bottom: 1px solid var(--line);
}
.pole-mark { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pole-mark-red { background: var(--red); }
.pole-mark-blue { background: var(--blue); }
.course { display: grid; gap: 22px; }
.course + .course { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.course-media { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--soft); isolation: isolate; }
.course-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.2s var(--ease); }
.course-media:hover .course-img { transform: scale(1.05); }
.course-body h4 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -.02em; margin-bottom: 12px; }
.course-meta {
  display: inline-flex; align-items: center; gap: .5em; flex-wrap: wrap;
  margin: 0 0 16px; padding: 6px 14px; border-radius: 999px;
  background: var(--soft); color: var(--ink); font-size: .9375rem;
}
.course-body > p:not(.course-meta) { color: var(--muted); max-width: 34em; }
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; line-height: 1.45; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(30, 143, 230, .1);
}
.checks li::after {
  content: ""; position: absolute; left: 7px; top: calc(.1em + 5px); width: 6px; height: 9px;
  border-right: 1.75px solid var(--blue-ink); border-bottom: 1.75px solid var(--blue-ink); transform: rotate(45deg);
}
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

/* ---------- Sessions ---------- */
.sessions { background: var(--soft); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; display: flex; gap: 18px; padding-bottom: 26px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 1px; background: #CBD3DD;
  transform-origin: top; transition: transform 1.2s var(--ease) .4s;
}
.steps li:last-child::before { display: none; }
.step-num {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 1px solid #CBD3DD;
  font-family: var(--font-title); font-weight: 600; font-size: .875rem; color: var(--ink);
}
.steps p { margin: 0; padding-top: 9px; color: var(--muted); }
.steps strong { font-family: var(--font-title); font-weight: 600; color: var(--ink); }


.intra {
  margin-top: 40px; padding: 36px 28px;
  display: grid; gap: 24px; align-items: center;
  background: var(--night); color: var(--white);
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.intra::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 0 0 40px rgba(255, 255, 255, .025), 0 0 0 80px rgba(255, 255, 255, .02);
}
.intra h3 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: 12px; max-width: 18ch; }
.intra p { margin: 0; color: rgba(255, 255, 255, .72); max-width: 34em; }
.intra .btn { position: relative; justify-self: start; }

/* ---------- Ancrage local / formateur ---------- */
.local { position: relative; isolation: isolate; overflow: hidden; padding-block: 120px 64px; background: var(--night); }
.local-media { position: absolute; inset: -15% 0 -15% 0; z-index: -2; will-change: transform; }
.local-media img { width: 100%; height: 100%; object-fit: cover; }
.local-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 17, 29, .15), rgba(7, 17, 29, .55)); }
.local-card {
  max-width: 600px; padding: 32px 26px;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}
.local-card h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin-bottom: 20px; }
.local-card p { color: var(--muted); }
.tbc-line { font-size: .9375rem; }
.local-facts { margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.local-facts dt { font-size: .875rem; color: var(--muted); margin-bottom: 2px; }
.local-facts dd { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.local-facts mark { display: inline-block; margin-top: 4px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 48px; }
.contact-info h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 20px; }
.contact-phone {
  display: inline-flex; align-items: center; gap: .4em; margin-top: 12px;
  font-family: var(--font-title); font-weight: 600; font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.contact-phone .icon { width: .7em; height: .7em; color: var(--red); }
.contact-phone:hover { color: var(--red-dark); }
.contact-lines { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-lines li { display: flex; align-items: center; gap: 12px; color: var(--muted); overflow-wrap: anywhere; }
.contact-lines .icon { color: var(--ink); }
.contact-lines a { color: var(--ink); }

.form { background: var(--soft); border-radius: var(--radius-lg); padding: 28px 20px; }
.field { margin-bottom: 20px; min-width: 0; }
.field-row { display: grid; gap: 0 16px; }
.field label { display: block; margin-bottom: 8px; font-size: .9375rem; color: var(--ink); }
.req { color: var(--red); }
.opt { color: var(--muted); font-size: .875rem; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; min-height: 54px;
  padding: 12px 16px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white);
  border: 1px solid #CFD6DF; border-radius: var(--radius);
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover, textarea:hover { border-color: #A9B4C2; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%230C1B2C' stroke-width='1.6' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px;
}
textarea { min-height: 128px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30, 143, 230, .18); }
[aria-invalid="true"] { border-color: var(--red) !important; }
[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(220, 40, 45, .15) !important; }
.field-error { margin: 6px 0 0; color: var(--red-dark); font-size: .875rem; }
.field-error:empty { display: none; }
.field-hint { margin: 6px 0 0; font-size: .875rem; color: var(--blue-ink); }

.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: start; }
.field-check input {
  appearance: none; width: 22px; height: 22px; margin: 2px 0 0; cursor: pointer;
  border: 1px solid #A9B4C2; border-radius: 6px; background: var(--white);
  display: grid; place-items: center; transition: background-color .2s, border-color .2s;
}
.field-check input::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border-right: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(45deg) scale(0);
  transition: transform .2s var(--ease);
}
.field-check input:checked { background: var(--ink); border-color: var(--ink); }
.field-check input:checked::after { transform: rotate(45deg) scale(1); }
.field-check input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.field-check label { margin: 0; font-size: .9375rem; color: var(--muted); line-height: 1.5; }
.field-check .field-error { grid-column: 2; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit { width: 100%; margin-top: 8px; }
.form-note { margin: 14px 0 0; font-size: .8125rem; color: var(--muted); text-align: center; }
.form-status { margin-top: 18px; }
.form-status:empty { display: none; }
.form-status:focus { outline: none; }
.notice { padding: 18px 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); animation: notice-in .5s var(--ease); }
@keyframes notice-in { from { opacity: 0; transform: translateY(8px); } }
.notice p { margin: 0; color: var(--muted); }
.notice p + p { margin-top: .4em; }
.notice .notice-title { font-family: var(--font-title); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.notice-success { border-left: 4px solid #1F9D55; }
.notice-error { border-left: 4px solid var(--red); }
.notice-demo { font-size: .875rem; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--night); color: rgba(255, 255, 255, .65); font-size: .9375rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--blue-light); }
.footer-top { display: grid; gap: 40px; padding-block: 64px 48px; }
.footer-brand img { width: 150px; margin-bottom: 18px; }
.footer-brand p { max-width: 22em; margin: 0; }
.footer-cols { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-title { font-size: 1rem; letter-spacing: 0; color: var(--white); margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; overflow-wrap: break-word; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .875rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Pages légales ---------- */
.legal-page .site-header { position: sticky; background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: 0 1px 0 rgba(12, 27, 44, .08); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.legal-page .brand-light { opacity: 0; }
.legal-page .brand-dark { opacity: 1; }
.legal-page .header-phone { display: inline-flex; }
.legal { padding-block: 56px 96px; }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); margin-bottom: 12px; }
.legal h2 { font-size: 1.4rem; margin: 48px 0 14px; }
.legal p, .legal li { color: #3D4A5A; }
.legal .updated { color: var(--muted); }
.legal address { font-style: normal; }
.back-link { margin-bottom: 32px; }
.back-link .icon { transform: rotate(180deg); }
.back-link:hover .icon { transform: rotate(180deg) translateX(4px); }

/* =========================================================
   ≥ 640 px
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero-actions .btn { flex: 0 0 auto; }
    .field-row { grid-template-columns: 1fr 1fr; }
  .field-row-wide { grid-template-columns: 1fr 140px; }
  .form { padding: 36px 32px; }
  .course { grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
  .intra { grid-template-columns: 1fr auto; padding: 48px; }
  .local-card { padding: 44px; }
}

/* =========================================================
   ≥ 1024 px
   ========================================================= */
@media (min-width: 1024px) {
  :root { --gutter: 48px; --header-h: 84px; }
  .section { padding-block: 128px; }
  .brand { width: 144px; height: 58px; }

  /* Navigation horizontale */
  .nav-toggle { display: none; }
  .main-nav { margin-right: 12px; }
  .nav-list {
    position: static; inset: auto; flex-direction: row; gap: 4px; padding: 0;
    background: none; color: inherit; opacity: 1; visibility: visible; transition: none;
  }
  .nav-list a {
    position: relative; padding: 8px 14px;
    font-family: var(--font-text); font-weight: 400; font-size: .9375rem; letter-spacing: 0;
    color: inherit; opacity: .85; transform: none; transition: opacity .2s;
  }
  .nav-list a::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
  }
  .nav-list a:hover { opacity: 1; color: inherit; }
  .nav-list a:hover::after, .nav-list a.is-current::after { transform: scaleX(1); transform-origin: left; }
  .nav-extra { display: none; }
  .header-phone { display: inline-flex; }
  .header-cta { display: inline-flex; margin-left: 8px; }

  .hero-content { padding-top: calc(var(--header-h) + 64px); padding-bottom: 72px; }
  .hero-lead { font-size: 1.25rem; }
    
  .manifesto { padding-block: 160px 96px; }

  .course { grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; }
  .pole .course:nth-of-type(even) .course-img { order: 2; }


  .intra { margin-top: 72px; padding: 64px; }

  .local { padding-block: 200px 120px; min-height: 92vh; display: flex; align-items: flex-end; }
  .local-content { width: 100%; }

  .contact-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .contact-info { position: sticky; top: calc(var(--header-h) + 32px); }
  .form { padding: 48px; }

  .footer-top { grid-template-columns: 1fr 1.6fr; gap: 64px; padding-block: 88px 64px; }
}

/* =========================================================
   FAQ
   ========================================================= */
:root { interpolate-size: allow-keywords; } /* ouverture animée des <details> (navigateurs récents) */
.faq-grid { display: grid; gap: 8px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -.01em; transition: color .2s; }
.faq-item summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: translateY(-3px) rotate(45deg); transition: transform .4s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq-item summary:hover h3 { color: var(--blue-ink); }
.faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }
.faq-answer { padding: 0 32px 24px 0; color: var(--muted); }
.faq-answer p { margin: 0; max-width: 40em; }

/* =========================================================
   Barre d'action mobile
   ========================================================= */
.mobile-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px;
  padding: 8px; border-radius: 999px;
  background: rgba(7, 17, 29, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45);
  transform: translateY(140%); visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
}
.mobile-cta.is-visible { transform: none; visibility: visible; transition: transform .5s var(--ease); }
.mobile-cta .btn { min-height: 48px; padding: 0 16px; font-size: .9375rem; }
.btn-glass-dark { background: rgba(255, 255, 255, .1); color: var(--white); border-color: rgba(255, 255, 255, .2); }
.btn-glass-dark:hover { background: rgba(255, 255, 255, .18); }
.menu-open .mobile-cta { visibility: hidden; }
@media (max-width: 1023px) { .site-footer { padding-bottom: 76px; } }
@media (min-width: 1024px) {
  .mobile-cta { display: none; }
  .faq-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .faq .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
  .faq-item summary h3 { font-size: 1.25rem; }
}

/* ---------- Page 404 ---------- */
.notfound-page { background: var(--night); color: var(--white); }
.notfound { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 48px var(--gutter); max-width: 760px; margin: 0 auto; }
.notfound-logo img { width: 140px; margin-bottom: 48px; }
.notfound .notfound-code { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: clamp(5rem, 22vw, 10rem); line-height: .9; letter-spacing: -.05em; color: rgba(255, 255, 255, .45); }
.notfound h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 8px 0 16px; }
.notfound p { color: rgba(255, 255, 255, .72); max-width: 34em; margin-bottom: 32px; }

/* Sans JavaScript : le menu s'affiche en ligne sous le logo, on laisse la place au hero */
html:not(.js) .nav-extra { display: none; }
html:not(.js) .hero-content { padding-top: calc(var(--header-h) + 96px); }

/* Écrans peu hauts (petits téléphones) : le bouton principal reste visible */
@media (max-height: 700px) and (max-width: 1023px) {
  .hero-content { padding-top: calc(var(--header-h) + 28px); }
  .hero-title { margin-bottom: 18px; font-size: clamp(2.3rem, 8.5vw, 3rem); }
  .hero-lead { font-size: 1rem; margin-bottom: 22px; }
}


/* ---------- Hero : arguments de confiance ---------- */
.hero-trust { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .9375rem; color: rgba(255, 255, 255, .82); }
.hero-trust li { display: inline-flex; align-items: center; gap: 10px; }
.hero-trust li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ---------- Guide « quelle formation pour quel besoin ? » ---------- */
.chooser { margin: 0 0 80px; border-radius: var(--radius-lg); background: var(--soft); padding: 8px 20px 12px; }
.chooser-title { font-size: 1.25rem; letter-spacing: -.015em; padding: 18px 0 10px; }
.chooser-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 16px 0; border-top: 1px solid #DDE3EA; color: var(--ink); text-decoration: none;
}
.chooser-need { grid-column: 1; color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.chooser-answer { grid-column: 1; font-family: var(--font-title); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.chooser-answer small { font-family: var(--font-text); font-weight: 400; font-size: .8125rem; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.chooser-row .icon { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--red); transition: transform .3s var(--ease); }
.chooser-row:hover .chooser-answer { color: var(--red-dark); }
.chooser-row:hover .icon { transform: translateX(5px); }
@media (min-width: 768px) {
  .chooser { padding: 12px 36px 16px; }
  .chooser-row { grid-template-columns: 1.1fr 1fr auto; gap: 24px; padding: 18px 0; }
  .chooser-need { font-size: 1rem; }
  .chooser-answer { grid-column: 2; }
  .chooser-row .icon { grid-column: 3; grid-row: 1; }
}

/* ---------- Contact : étapes après l'envoi ---------- */
.next-steps { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; gap: 12px; counter-reset: n; }
.next-steps li { position: relative; padding-left: 42px; color: var(--muted); line-height: 1.45; }
.next-steps li::before {
  counter-increment: n; content: counter(n); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); color: var(--ink); font-family: var(--font-title); font-weight: 600; font-size: .875rem;
}
.next-steps strong { font-family: var(--font-title); font-weight: 600; color: var(--ink); }

/* =========================================================
   ANIMATIONS — en CSS uniquement.
   Le contenu est TOUJOURS visible : les apparitions au défilement ne s'activent
   que dans les navigateurs qui savent les jouer (animation-timeline), sinon la page
   s'affiche simplement, sans animation. Rien n'est masqué par JavaScript.
   ========================================================= */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }


/* Bandeau défilant */
.ticker { overflow: hidden; background: var(--night); color: var(--white); border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 22px; }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; flex: none; }
.ticker span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap;
  font-family: var(--font-title); font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 2rem); letter-spacing: -.02em;
}
.ticker span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.ticker span:nth-child(even)::after { background: var(--blue); }
.ticker span:nth-child(3n) { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .55); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Boutons : reflet au survol */
.btn-red, .btn-white { overflow: hidden; isolation: isolate; }
.btn-red::before, .btn-white::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn-white::before { background: linear-gradient(110deg, transparent 30%, rgba(30, 143, 230, .18) 50%, transparent 70%); }
.btn-red:hover::before, .btn-white:hover::before { transform: translateX(120%); }
.btn-outline { position: relative; overflow: hidden; isolation: isolate; transition: color .35s var(--ease-out), border-color .35s; }
.btn-outline::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out); }
.btn-outline:hover { background: transparent; color: var(--white); }
.btn-outline:hover::before { transform: scaleX(1); }
.faq-item summary h3 { transition: color .2s, transform .35s var(--ease-out); }
.faq-item summary:hover h3 { transform: translateX(4px); }

@keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes rise-title { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0 round var(--radius-lg)); } to { clip-path: inset(0 0 0 0 round var(--radius-lg)); } }
@keyframes settle { from { scale: 1.2; } to { scale: 1; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero : entrée au chargement (animations simples, sans JavaScript) */
  .hero-title { animation: rise-title 1.1s var(--ease-out) .1s both; }
  .hero-lead { animation: rise .9s var(--ease-out) .35s both; }
  .hero-actions { animation: rise .9s var(--ease-out) .5s both; }
  .hero-trust { animation: rise .9s var(--ease-out) .65s both; }

}

/* ---------- Apparitions au défilement (tous navigateurs) ----------
   Le script n'ajoute « reveal-pending » qu'aux blocs encore sous l'écran ; il les révèle
   en passant à « reveal-in ». Sans script, aucune de ces classes : tout reste visible. */
.reveal-pending { opacity: 0; transform: translateY(32px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }

/* Cascade : chaque enfant arrive un peu après le précédent */
.reveal-pending[data-reveal="stagger"], .reveal-pending[data-reveal="course"] { opacity: 1; transform: none; }
.reveal-pending[data-reveal="stagger"] > *,
.reveal-pending[data-reveal="course"] .course-body > *,
.reveal-pending[data-reveal="course"] .checks li { opacity: 0; transform: translateY(18px); }
.reveal-in[data-reveal="stagger"] > *,
.reveal-in[data-reveal="course"] .course-body > *,
.reveal-in[data-reveal="course"] .checks li {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms + .15s);
}
.reveal-pending[data-reveal="course"] .checks, .reveal-in[data-reveal="course"] .checks { opacity: 1; transform: none; }

/* Formations : la photo se dévoile de haut en bas avec un léger zoom */
.reveal-pending[data-reveal="course"] .course-media { clip-path: inset(0 0 100% 0 round var(--radius-lg)); }
.reveal-pending[data-reveal="course"] .course-img { scale: 1.2; }
.reveal-in[data-reveal="course"] .course-media { clip-path: inset(0 0 0 0 round var(--radius-lg)); transition: clip-path 1.1s var(--ease-out); }
.reveal-in[data-reveal="course"] .course-img { scale: 1; transition: scale 1.6s var(--ease-out), transform 1.2s var(--ease); }


/* Jauges des sessions : se remplissent à l'apparition */
/* « Réduire les animations » (réglage Windows, macOS, Android, iOS) : on supprime le MOUVEMENT
   (glissements, zooms, parallaxe, bandeau défilant) mais on garde des fondus doux et le surligneur. */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title { animation: fade .8s ease-out both; }
  .hero-lead { animation: fade .8s ease-out .2s both; }
  .hero-actions { animation: fade .8s ease-out .35s both; }
  .hero-trust { animation: fade .8s ease-out .5s both; }
  .hero-media img, .ticker-track { animation: none; }
  .hero-media, .local-media { transform: none !important; }
  .reveal-pending,
  .reveal-pending[data-reveal="stagger"] > *,
  .reveal-pending[data-reveal="course"] .course-body > *,
  .reveal-pending[data-reveal="course"] .checks li { transform: none; }
  .reveal-pending[data-reveal="course"] .course-media { clip-path: none; }
  .reveal-pending[data-reveal="course"] .course-img { scale: 1; }
  .btn-red::before, .btn-white::before { display: none; }
  .course-media:hover .course-img { transform: none; }
}

/* =========================================================
   SURLIGNAGE DYNAMIQUE des mots importants
   Un trait de surligneur se trace sous les mots quand ils arrivent à l'écran.
   Le texte reste toujours visible : seul le trait de couleur est animé.
   ========================================================= */
.hl {
  --hl: rgba(220, 40, 45, .22);
  padding: 0 .06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% .38em;
  transition: background-size .9s var(--ease-out);
  transition-delay: var(--hl-d, 0s);
}
.hl-blue { --hl: rgba(30, 143, 230, .22); }
.hero .hl { --hl: rgba(220, 40, 45, .78); }
.hero .hl-blue { --hl: rgba(30, 143, 230, .78); }
.hero-lead .hl { --hl: rgba(220, 40, 45, .55); }
.intra .hl { --hl: rgba(220, 40, 45, .6); }
/* Avec JavaScript, le trait part de zéro et se trace quand le mot est visible (classe hl-on) */
.js .hl { background-size: 0% .38em; transition-duration: 1.1s; }
.js .hl.hl-on { background-size: 100% .38em; }

/* ---------- Sessions mutualisées : étapes et inscription ---------- */
.sessions-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 40px; padding-top: 28px; border-top: 1px solid #DDE3EA; }
.sessions-place { display: flex; align-items: flex-start; gap: 10px; margin: 0; max-width: 36em; color: var(--muted); }
.sessions-place .icon { color: var(--red); margin-top: .2em; }
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 0; }
  .steps li { flex-direction: column; gap: 16px; padding: 26px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
  .steps li::before { display: none; }
  .steps p { padding-top: 0; }
}

/* Téléphone tenu à l'horizontale (écran peu haut) : on libère la hauteur utile */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-cta { display: none; }
  :root { --header-h: 60px; }
  .site-footer { padding-bottom: 0; }
}
