/* =====================================================================
   VB Safety · Carnet Expo CMR — feuille de style partagée
   Toutes les pages de /cmr-pompier utilisent ce fichier.
   Polices auto-hébergées, aucune ressource tierce (RGPD).
   ===================================================================== */

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

/* ---------- Tokens ---------- */
:root {
  /* Marque */
  --red: #D7261E;
  --red-strong: #B81F18;
  --red-soft: #FDECEA;
  --red-line: #F6C9C5;

  /* Neutres */
  --ink: #17191D;          /* fond hero, en-têtes sombres */
  --ink-2: #22252B;
  --text: #1F2328;
  --muted: #5B616B;
  --faint: #8A9099;
  --bg: #FAF7F2;           /* fond de page, blanc cassé */
  --surface: #FFFFFF;
  --line: #ECE6DE;
  --line-strong: #DDD5CA;

  /* Sémantique (toujours doublée d'un libellé texte) */
  --ok: #2E7D32;      --ok-soft: #E7F3E8;
  --warn: #B26A00;    --warn-soft: #FFF2DE;
  --danger: #C62828;  --danger-soft: #FDECEA;
  --info: #1F6FB2;    --info-soft: #E6F0FA;
  --teal: #1D7F74;    --teal-soft: #E3F3F1;

  /* Typo, formes, ombres */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(23, 25, 29, 0.06);
  --shadow: 0 1px 2px rgba(23, 25, 29, 0.05), 0 8px 24px -12px rgba(23, 25, 29, 0.18);
  --shadow-red: 0 10px 24px -10px rgba(215, 38, 30, 0.55);

  --container: 1560px;
  --gutter: clamp(16px, 3.6vw, 64px);
  --tap: 44px;             /* cible tactile minimale (usage avec gants) */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bandeau démo ---------- */
.demo-banner { background: var(--red-soft); color: var(--red-strong); text-align: center; font-size: 13px; font-weight: 500; padding: 7px var(--gutter); border-bottom: 1px solid var(--red-line); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 38px; height: 42px; }
.brand-name { white-space: nowrap; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; line-height: 1.05; }
.brand-sub { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { position: relative; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--muted); padding: 10px 12px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--red); border-radius: 2px; }
.header-cta { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; width: var(--tap); height: var(--tap); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .nav, .site-header .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header.open .nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; box-shadow: var(--shadow); }
  .site-header.open .nav a { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .site-header.open .nav a[aria-current="page"]::after { display: none; }
  .site-header.open .nav .btn { margin-top: 12px; }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 20px; border-radius: var(--radius); border: 1px solid transparent; font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn .icon { width: 18px; height: 18px; transition: transform .15s; }
.btn:hover .icon-arrow { transform: translateX(3px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn-primary:hover { background: var(--red-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--text); }
.btn-ghost-dark { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Titres de section ---------- */
.kicker { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin-top: 10px; }
.section-head p { color: var(--muted); font-size: 17px; margin-top: 12px; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(20px, 2.6vw, 28px); }
.card h3 { font-size: 21px; font-weight: 800; margin-top: 8px; }
.card-text { color: var(--muted); margin-top: 12px; }

/* ---------- Pastilles d'icône ---------- */
.icon-tile { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--red-soft); color: var(--red); }
.icon-tile .icon { width: 21px; height: 21px; }
.icon-tile.ok { background: var(--ok-soft); color: var(--ok); }
.icon-tile.teal { background: var(--teal-soft); color: var(--teal); }
.icon-tile.warn { background: var(--warn-soft); color: var(--warn); }
.icon-tile.info { background: var(--info-soft); color: var(--info); }
.icon-tile.plain { background: transparent; width: auto; height: auto; border-radius: 0; }

/* ---------- Étapes numérotées ---------- */
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* ---------- Badges (niveaux et statuts) ---------- */
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge-low, .badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-mod, .badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-high, .badge-late { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: #F1EEE9; color: var(--muted); }
.badge-info { background: var(--info-soft); color: var(--info); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: var(--tap); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; font: 400 16px/1.4 var(--font); color: var(--text); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(215, 38, 30, 0.15); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: 13px; color: var(--danger); font-weight: 500; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FCFAF7; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #C9CCD1; padding: 48px 0 28px; font-size: 14.5px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-col h4 { color: #8F949B; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: #8F949B; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.section-flush { padding-top: 0; }
.footer-brand { color: #fff; }
.footer-brand .brand-sub { color: #8F949B; }
.footer-tag { margin-top: 14px; max-width: 40ch; }
[id] { scroll-margin-top: 88px; }

/* ---------- Formulaire de demande (accès, version, contact) ---------- */
.req-modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px -20px rgba(23, 25, 29, .45); overflow: auto; }
.req-modal::backdrop { background: rgba(23, 25, 29, .55); }
.req-card { display: flex; flex-direction: column; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.req-head h2 { font-size: 20px; line-height: 1.25; margin: 0; }
.req-close { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.req-close:hover { background: #F4F1EC; color: var(--text); }
.req-body { display: flex; flex-direction: column; gap: 14px; padding: 8px 24px 4px; }
.req-intro { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req-modal select.input { padding-right: 36px; 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 d='M1 1l5 5 5-5' fill='none' stroke='%235B616B' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.req-modal textarea.input { resize: vertical; min-height: 84px; }
.req-opt { font-weight: 400; color: var(--faint); }
.req-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req-err { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 500; }
.req-err[hidden] { display: none; }
.req-legal { margin: 0; font-size: 12.5px; color: var(--faint); }
.req-foot { padding: 16px 24px 22px; }
.req-done { align-items: center; text-align: center; padding-top: 18px; padding-bottom: 8px; }
.req-done p { margin: 0; color: var(--muted); }
.req-done b { color: var(--text); word-break: break-all; }
.req-check { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ok-soft); color: var(--ok); font-size: 24px; font-weight: 700; }
@media (max-width: 560px) {
  .req-grid { grid-template-columns: 1fr; }
  .req-head { padding: 16px 18px 0; }
  .req-body { padding: 6px 18px 4px; gap: 12px; }
  .req-foot { padding: 14px 18px 18px; }
}

/* ---------- Téléphone (v8) ---------- */
.btn-block { white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 640px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
  .brand { min-height: 44px; }
}
