/* PREM'S FORMATION — site */

:root {
  --ink: #0d0d0e;
  --ink-2: #1c1c1e;
  --paper: #f6f3ec;
  --paper-2: #efeae0;
  --rule: #1c1c1e;
  --muted: #6b6a66;

  /* Brand badge colors (from PDF) */
  --c-conduite: #111111;
  --c-hauteur:  #46c8e8;
  --c-incendie: #e2342b;
  --c-secours:  #2cb066;
  --c-gestes:   #f1cf3a;
  --c-electrique: #8a8a8a;

  --serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Bebas Neue", "Helvetica Neue Condensed", "Arial Narrow", Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

/* ========== Layout primitives ========== */
.container { width: min(1280px, 92vw); margin: 0 auto; }
.tight { width: min(880px, 92vw); margin: 0 auto; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; align-items: center; }
.wrap { flex-wrap: wrap; }

/* ========== Type ========== */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 0.92;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
.lead { font-size: 19px; line-height: 1.45; color: var(--ink-2); max-width: 60ch; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ========== Header / Nav ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.site-header.tinted { background: var(--page-tint, var(--paper)); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.brand-mark .dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateY(-3px);
}
.brand-sub {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a, .nav button {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav a.is-active::after,
.nav button.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent, var(--ink));
}
.nav .pill {
  border: 1px solid var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav .pill:hover { background: var(--ink); color: var(--paper); }

/* ========== Page transitions ========== */
.page {
  animation: pagefade 360ms ease both;
}
@keyframes pagefade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ========== Hero (Home) ========== */
.hero {
  border-bottom: 1px solid var(--ink);
  padding: 56px 0 0;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(72px, 10vw, 168px);
  line-height: 0.86;
  margin: 16px 0 24px;
  letter-spacing: 0.005em;
}
.hero h1 .apos { color: var(--c-incendie); }
.hero .tagline {
  font-size: 22px;
  line-height: 1.3;
  max-width: 32ch;
  margin: 0 0 28px;
  font-weight: 400;
}
.hero .cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-meta {
  border-top: 1px solid var(--ink);
  padding: 14px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.hero-meta dt { text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-size: 10px; letter-spacing: 0.18em; }
.hero-meta dd { margin: 0; font-weight: 600; }

.hero-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--ink);
  border: 1px solid var(--ink);
  overflow: hidden;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(1.05); }
.hero-portrait .stamp {
  position: absolute;
  bottom: 14px; left: 14px;
  background: var(--paper);
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
}

/* ========== Btns ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.accent { background: var(--accent, var(--ink)); border-color: transparent; color: white; }
.btn.accent.dark { color: var(--ink); }
.btn .arrow { transition: transform 180ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ========== Section titles ========== */
.section { padding: 96px 0; border-bottom: 1px solid var(--ink); }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 120px);
  line-height: 0.9;
  margin: 12px 0 0;
}
.section-head .num {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* ========== Formations grid (the 6 badges) ========== */
.formations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.f-card {
  position: relative;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 36px 32px 32px;
  min-height: 420px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.f-card .badge-wrap {
  width: 168px;
  height: 168px;
  margin: 6px auto 24px;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.f-card:hover .badge-wrap { transform: rotate(18deg) scale(1.05); }
.f-card .badge-wrap img { width: 100%; height: 100%; object-fit: contain; }
.f-card .badge-aura {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent), transparent 72%);
  opacity: 0;
  transition: opacity 320ms ease;
  z-index: -1;
}
.f-card:hover .badge-aura { opacity: 0.18; }
.f-card .num-tag {
  position: absolute;
  top: 14px; left: 16px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--ink);
  opacity: 0.5;
}
.f-card .accent-tag {
  position: absolute;
  top: 14px; right: 16px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--ink);
}
.f-card h3 {
  font-family: var(--display);
  font-size: 30px;
  line-height: 0.95;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.f-card .sub {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 16px;
}
.f-card .more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.f-card .more .arrow { transition: transform 220ms ease; }
.f-card:hover .more .arrow { transform: translateX(6px); }

.f-card .ribbon {
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms ease;
}
.f-card:hover .ribbon { transform: scaleX(1); }

/* full-color hover state for each card */
.f-card:hover { background: color-mix(in oklab, var(--accent) 10%, var(--paper)); }
.f-card[data-key="conduite"]:hover { color: var(--ink); }

/* ========== Plus / values ========== */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
}
.value {
  border-right: 1px solid var(--ink);
  padding: 56px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.value:last-child { border-right: 0; }
.value .num {
  font-family: var(--display);
  font-size: 60px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
}
.value h4 { font-family: var(--display); font-size: 36px; margin: 0; line-height: 1; }
.value p { margin: 0; max-width: 32ch; color: var(--ink-2); }

/* ========== Tarifs ========== */
.tarif-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--ink);
}
.tarif-cell {
  padding: 40px 36px;
  border-right: 1px solid var(--ink);
}
.tarif-cell:last-child { border-right: 0; }
.tarif-cell .price {
  font-family: var(--display);
  font-size: 96px;
  line-height: 1;
  margin: 8px 0 4px;
}
.tarif-cell .ht { font-size: 14px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }
.tarif-includes {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
}
.tarif-includes > div {
  padding: 24px 28px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.tarif-includes > div:nth-child(2n) { border-right: 0; }
.tarif-includes h5 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.tarif-includes ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.tarif-includes li { margin-bottom: 6px; }

/* ========== Formation page ========== */
.f-hero {
  position: relative;
  padding: 64px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: color-mix(in oklab, var(--accent) 12%, var(--paper));
}
.f-hero .crumbs {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex; gap: 8px; align-items: center;
}
.f-hero .crumbs span { opacity: 0.6; }
.f-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
}
.f-hero h1 {
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 144px);
  line-height: 0.86;
  margin: 8px 0 20px;
}
.f-hero p.lead { font-size: 22px; max-width: 38ch; }
.f-hero .meta-pills {
  margin-top: 28px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.f-hero .meta-pills span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--paper);
}
.f-hero-badge {
  position: relative;
  width: min(440px, 100%);
  margin-left: auto;
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
}
.f-hero-badge img { width: 100%; height: 100%; object-fit: contain; animation: spinslow 60s linear infinite; }
@keyframes spinslow { to { transform: rotate(360deg); } }

.f-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  padding: 88px 0;
}
.f-toc { position: sticky; top: 96px; align-self: start; }
.f-toc h6 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--muted);
}
.f-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: tocn; }
.f-toc li {
  counter-increment: tocn;
  padding: 10px 0;
  border-top: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  font-size: 14px;
  display: flex;
  gap: 12px;
}
.f-toc li::before {
  content: counter(tocn, decimal-leading-zero);
  font-family: var(--display);
  color: var(--accent);
  font-size: 16px;
  width: 28px;
}

.f-section { margin-bottom: 64px; }
.f-section h2 {
  font-family: var(--display);
  font-size: 56px;
  line-height: 0.95;
  margin: 0 0 24px;
}
.f-section h2 .accent-bar {
  display: inline-block;
  width: 56px; height: 6px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 18px;
}
.f-section p { font-size: 17px; line-height: 1.55; max-width: 64ch; color: var(--ink-2); }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li {
  padding: 16px 18px 16px 56px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  position: relative;
  font-size: 16px;
  line-height: 1.45;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 18px; top: 18px;
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 50%;
}
.checks li::after {
  content: "";
  position: absolute;
  left: 25px; top: 22px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.programme {
  display: grid;
  gap: 0;
  border: 1px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.prog-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  gap: 0;
  border-bottom: 1px solid var(--ink);
}
.prog-row:last-child { border-bottom: 0; }
.prog-row > * { padding: 22px 24px; }
.prog-row .num {
  font-family: var(--display);
  font-size: 30px;
  background: var(--accent);
  color: white;
  display: grid; place-items: center;
}
.prog-row .num.dark { color: var(--ink); }
.prog-row .label { font-weight: 600; font-size: 16px; }
.prog-row .label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; font-size: 13px; }
.prog-row .dur { display: grid; place-items: end center; align-content: center; font-family: var(--mono); font-size: 13px; color: var(--muted); border-left: 1px solid color-mix(in oklab, var(--ink) 14%, transparent); }

.spec-card {
  padding: 28px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: color-mix(in oklab, var(--accent) 6%, var(--paper));
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.spec-card .item h6 { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.spec-card .item p { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }

.cta-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 48px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
}
.cta-band h3 { font-family: var(--display); font-size: 48px; margin: 0 0 6px; line-height: 1; }
.cta-band p { margin: 0; color: color-mix(in oklab, var(--paper) 70%, transparent); }
.cta-band .btn { background: var(--accent); border-color: var(--accent); }

/* "next formations" rail */
.rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.rail-card {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 24px 20px;
  text-align: left;
  background: var(--paper);
  cursor: pointer;
  transition: background 180ms ease;
}
.rail-card:hover { background: color-mix(in oklab, var(--rail-c) 14%, var(--paper)); }
.rail-card .badge { width: 64px; height: 64px; margin-bottom: 14px; }
.rail-card h5 { font-family: var(--display); font-size: 20px; margin: 0; line-height: 1; }
.rail-card .more { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 8px; display: inline-block; }

/* ========== Contact / footer ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-grid h2 { font-family: var(--display); font-size: clamp(56px, 7vw, 112px); line-height: 0.9; margin: 0 0 24px; }
.contact-list dt { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.contact-list dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; }
.contact-card {
  padding: 32px;
  border: 1px solid var(--ink);
  border-radius: 8px;
}
.contact-card .field { margin-bottom: 14px; }
.contact-card label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.contact-card input, .contact-card textarea, .contact-card select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font: inherit;
  border-radius: 4px;
}
.contact-card textarea { min-height: 120px; resize: vertical; }

footer.site-footer {
  background: var(--ink);
  color: color-mix(in oklab, var(--paper) 85%, transparent);
  padding: 64px 0 28px;
  font-size: 13px;
}
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h6 { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: white; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 4px 0; }
.site-footer .legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in oklab, white 18%, transparent);
  font-size: 11px;
  line-height: 1.5;
  color: color-mix(in oklab, var(--paper) 50%, transparent);
}

/* ========== Marquee ribbon (innovation) ========== */
.marquee {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  gap: 56px;
  animation: marq 40s linear infinite;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.marquee-track .dot { width: 10px; height: 10px; border-radius: 50%; align-self: center; background: var(--c-incendie); }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ========== Responsive ========== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-portrait { max-width: 380px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .formations-grid { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: 1fr; }
  .value { border-right: 0; border-bottom: 1px solid var(--ink); }
  .f-hero-grid { grid-template-columns: 1fr; }
  .f-body { grid-template-columns: 1fr; }
  .f-toc { position: static; }
  .rail { grid-template-columns: 1fr 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .nav .hide-sm { display: none; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .tarif-table { grid-template-columns: 1fr; }
  .tarif-cell { border-right: 0; border-bottom: 1px solid var(--ink); }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .formations-grid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .spec-card { grid-template-columns: 1fr; }
}
