/* National Inspection — version 004
   Entre la version 003 (sombre, néon) et la version 005 (corporative, claire).
   Couleurs tirées du logo : rouge de la feuille d'érable, bleu de la fleur de lys. */

:root {
  --navy: #0a1a30;         /* en-tête, accueil, bande sombre */
  --navy-2: #112a4b;       /* panneaux sur fond sombre */
  --ink: #13253d;          /* texte principal sur fond clair */
  --ink-soft: #4a5b72;     /* texte secondaire */
  --paper: #f2f4f7;        /* fond de page */
  --white: #ffffff;
  --rule: #d6dde6;
  --rule-strong: #b3c0d0;
  --red: #d62b37;          /* rouge du logo */
  --red-dark: #b3202b;
  --blue: #1f6fd1;         /* bleu du logo */
  --blue-light: #6bb8ff;   /* bleu sur fond sombre */
  --on-dark: #d3deeb;
  --on-dark-soft: #9db1c8;

  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 66ch;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0; font-family: var(--display); color: inherit; }
p { margin: 0; }

/* Double filet rouge et bleu, repris des traits qui encadrent « INSPECTION » dans le logo */
.hero-kicker::before,
.section-head h2::before,
.contact-text h2::before {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin-bottom: 1.1rem;
  background: linear-gradient(90deg, var(--red) 0 44%, transparent 44% 56%, var(--blue) 56% 100%);
}

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 26, 48, 0.96);
  border-bottom: 1px solid rgba(107, 184, 255, 0.18);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { height: 58px; width: auto; }
.brand-word { height: 32px; width: auto; }

.nav {
  display: flex;
  gap: 0.4rem 1.3rem;
  margin-left: auto;
}
.nav a {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--white); border-bottom-color: var(--red); }

/* Bouton de menu : visible seulement sur cellulaire */
.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(107, 184, 255, 0.45);
  border-radius: 4px;
  cursor: pointer;
}
.menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.menu-toggle .ico-fermer,
.menu-toggle[aria-expanded="true"] .ico-menu { display: none; }
.menu-toggle[aria-expanded="true"] .ico-fermer { display: block; }
.menu-toggle:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }

.header-call {
  flex-shrink: 0;
  padding: 0.5rem 0.95rem;
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Sélecteur de langue ---------- */

.lang-switch {
  flex-shrink: 0;
  padding: 0.3rem 0.55rem;
  color: var(--on-dark);
  border: 1px solid rgba(107, 184, 255, 0.45);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.lang-switch:hover { color: var(--white); border-color: var(--blue-light); }
.nav .nav-lang { display: none; }

.header-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.header-links .header-back { margin-left: 0; }

/* ---------- Accueil ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 26, 48, 0.94) 0%, rgba(10, 26, 48, 0.7) 55%, rgba(10, 26, 48, 0.45) 100%),
    url("assets/hero-bg.jpg") center 25% / cover no-repeat;
  opacity: 0.9;
}
/* Trame de plan très discrète — rappel de la version 003 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(107, 184, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 184, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.hero-kicker {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--on-dark);
}

h1 {
  margin-top: 0.9rem;
  max-width: 17ch;
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.005em;
}

.lead {
  margin-top: 1.4rem;
  max-width: 52ch;
  font-size: 1.15rem;
  color: var(--on-dark);
}

.hero-actions {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.4rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.button.primary { background: var(--red); color: var(--white); }
.button.primary:hover { background: var(--red-dark); }

.fiche {
  margin: 0;
  padding: 0.4rem 1.4rem;
  background: rgba(17, 42, 75, 0.78);
  border: 1px solid rgba(107, 184, 255, 0.28);
  border-radius: var(--radius);
}
.fiche > div {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.fiche > div:last-child { border-bottom: 0; }
.fiche dt {
  font-size: 0.85rem;
  color: var(--on-dark-soft);
}
.fiche dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
  color: var(--white);
}

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 5.75rem) 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section.dark { background: var(--navy); color: var(--white); }

.section-inner {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-head { max-width: 46rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
}
.intro {
  margin-top: 1rem;
  max-width: var(--measure);
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.dark .intro { color: var(--on-dark); }

.statement {
  margin-top: 2.25rem;
  padding: 0.3rem 0 0.3rem 1.2rem;
  border-left: 4px solid var(--red);
  max-width: 40ch;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

/* Avantages et services */

.features {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.5rem;
}
.features.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.features article {
  padding: 1.5rem 1.4rem 1.6rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
}
.section.alt .features article { background: var(--paper); }

.features h3 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}
.features p {
  margin-top: 0.55rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.ico {
  width: 34px;
  height: 34px;
  margin-bottom: 1rem;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.specialites {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.specialites h3 {
  font-size: 1.15rem;
  font-weight: 600;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
}

/* Bande sombre — photos des risques, comme sur l'affiche d'origine */

.plates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.plates figure { margin: 0; }
.plates img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(107, 184, 255, 0.4);
}
.plates figcaption {
  padding-top: 0.9rem;
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--on-dark);
}
.plates figcaption strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
}

/* Inspecteurs */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.checklist li {
  position: relative;
  padding: 1rem 0 1rem 2.1rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.35rem;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

/* Hors mandat — liste d'exclusions : un trait rouge plutôt qu'un crochet */
.section.avant-contact { padding-bottom: 0; }
.checklist.exclusions li::before {
  top: 1.6rem;
  width: 0.8rem;
  height: 0;
  border-left: 0;
  border-bottom: 2px solid var(--red);
  transform: none;
}
.exclusions-note {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--blue);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Méthode — séquence réelle, d'où la numérotation */

.etapes {
  counter-reset: etape;
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 1100px) {
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
}
.etapes li {
  counter-increment: etape;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  column-gap: 1rem;
}
.etapes li::before {
  content: counter(etape);
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}
.etapes h3 {
  align-self: center;
  font-size: 1.35rem;
  font-weight: 600;
}
.etapes p {
  grid-column: 2;
  margin-top: 0.4rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Contact */

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
}
.contact-text h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
}
.contact-text p {
  margin-top: 1rem;
  max-width: 56ch;
  color: var(--on-dark);
}
.contact-text .contact-note {
  margin-top: 1.4rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
}

.coordonnees { display: grid; gap: 0.8rem; }
.coordonnees p {
  display: grid;
  gap: 0.1rem;
  padding: 1rem 1.25rem;
  background: var(--navy-2);
  border: 1px solid rgba(107, 184, 255, 0.28);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.coordonnees span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--on-dark-soft);
}

.contact-side { display: grid; gap: 2rem; align-content: start; }

/* Formulaire de demande */

.formulaire {
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--white);
  color: var(--ink);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
}
.formulaire h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.champs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  margin-top: 1.25rem;
}
.champ { display: grid; gap: 0.3rem; align-content: end; min-width: 0; }
.champ.large { grid-column: 1 / -1; }

.champ > label,
.langue legend {
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.35;
}
.facultatif { font-weight: 400; color: var(--ink-soft); }

.formulaire input[type="text"],
.formulaire input[type="email"],
.formulaire input[type="tel"],
.formulaire select,
.formulaire textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.75rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
}
.formulaire textarea { resize: vertical; min-height: 14rem; }
.formulaire input:focus-visible,
.formulaire select:focus-visible,
.formulaire textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.langue {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.5rem;
}
.langue legend { float: left; margin-right: 0.5rem; padding: 0; }
.langue label { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.langue input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--blue); }

.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.formulaire .button {
  margin-top: 1.5rem;
  border: 0;
  cursor: pointer;
}
.formulaire .button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.formulaire .button[disabled] { opacity: 0.65; cursor: wait; }

.form-statut {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--blue);
  background: #e8f1fb;
  font-weight: 500;
}
.form-statut.erreur { border-left-color: var(--red); background: #fcebed; }
.form-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Pied de page ---------- */

.footer {
  margin-top: clamp(1rem, 3vw, 2rem);
  background: var(--navy);
  color: var(--on-dark);
}
.footer-inner {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 2.75rem var(--gutter) 2.25rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand img { height: 40px; width: auto; }
.footer-name {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
}
.footer p:not(.footer-name) { margin-top: 0.7rem; max-width: 70ch; font-size: 0.95rem; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer p.footer-legal {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: none;
  font-size: 0.85rem;
  color: var(--on-dark-soft);
}

/* ---------- Politique de confidentialité ---------- */

.header-back {
  margin-left: auto;
  color: var(--on-dark);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.header-back:hover { color: var(--white); border-bottom-color: var(--red); }

.form-note a { color: var(--ink); }

.footer p.footer-legal a { margin-left: 0.75rem; color: var(--on-dark); }

.page-legale h1 {
  margin-top: 0;
  max-width: none;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.1;
}
.page-legale .section-head h1::before {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin-bottom: 1.1rem;
  background: linear-gradient(90deg, var(--red) 0 44%, transparent 44% 56%, var(--blue) 56% 100%);
}
.page-legale .maj { margin-top: 0.8rem; font-size: 0.93rem; color: var(--ink-soft); }

.legal { max-width: 46rem; margin-top: 2.5rem; }
.legal h2 {
  margin-top: 2.25rem;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
}
.legal h3 {
  margin-top: 1.25rem;
  font-size: 1.12rem;
  font-weight: 600;
}
.legal p { margin-top: 0.6rem; }
.legal ul { margin: 0.6rem 0 0; padding-left: 1.3rem; }
.legal li { margin-top: 0.3rem; }
.legal .bloc-contact {
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}


/* ---------- Adaptatif ---------- */

@media (max-width: 1529px) {
  html { scroll-padding-top: 140px; }
  .header-inner { flex-wrap: wrap; }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }
  .header-call { margin-left: auto; }
}

@media (max-width: 900px) {
  .hero-inner,
  .split,
  .contact-panel { grid-template-columns: 1fr; }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features.three,
  .etapes { grid-template-columns: 1fr; }
}

@media (min-width: 760px) and (max-width: 900px) {
  .coordonnees { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Cellulaire : menu repliable */
@media (max-width: 700px) {
  html { scroll-padding-top: 80px; }
  .header-inner { flex-wrap: wrap; column-gap: 0.6rem; }
  .header-call { margin-left: auto; }
  .js .menu-toggle { display: grid; order: 2; }
  .nav {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    padding: 0.25rem 0 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .js .nav { display: none; }
  .js .site-header.menu-ouvert .nav { display: flex; }
  .site-header .lang-switch { display: none; }
  .nav .nav-lang { display: block; }
  .nav a {
    padding: 0.75rem 0.25rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a:hover { border-bottom-color: rgba(255, 255, 255, 0.08); }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .header-inner { column-gap: 0.75rem; }
  .brand { gap: 0.4rem; }
  .brand-mark { height: 38px; }
  .brand-word { height: 21px; }
  .header-call { padding: 0.45rem 0.65rem; font-size: 0.85rem; }
  .plates { grid-template-columns: 1fr; }
  .button { width: 100%; }
  .champs { grid-template-columns: 1fr; }
  .contact-panel { padding: 1.75rem 1rem 1rem; }
  .contact-text { padding: 0 0.4rem; }
  .formulaire { padding: 1.25rem 1rem; }
  .formulaire textarea { min-height: 12rem; }
}

@media (max-width: 430px) {
  .header-inner { column-gap: 0.5rem; padding-left: 1rem; padding-right: 1rem; }
  .header-links { gap: 0.75rem; }
  .header-back { font-size: 0.88rem; }
  .brand { gap: 0.3rem; }
  .brand-mark { height: 32px; }
  .brand-word { height: 18px; }
  .header-call { font-size: 0.82rem; padding: 0.4rem 0.55rem; }
}

@media (max-width: 380px) {
  h1 { font-size: 2.05rem; }
  .brand-mark { height: 30px; }
  .brand-word { height: 16px; }
  .header-call { font-size: 0.78rem; padding: 0.38rem 0.5rem; }
}

@media (max-width: 330px) {
  .brand-word { display: none; }
}

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