/* ==========================================================================
   Assurance Provisoire — interface 2026 : fondations et composants communs
   Chargée sur toutes les pages (voir ap-header.php); les feuilles propres à chaque vue sont listées dans BaseController.
   Mobile d'abord : les règles de base valent pour un smartphone, les blocs
   @media (min-width) adaptent la tablette puis l'ordinateur.
   ========================================================================== */

/* ---------- Police ----------
   Instrument Sans (SIL Open Font License 1.1), police variable, sous-ensemble latin,
   hébergée sur le site : aucun appel à un service tiers. Source : paquet npm
   @fontsource-variable/instrument-sans 5.3.0. */
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --navy: #1a2f4d;
  --navy-hover: #24406a;
  --sky: #3ab8e0;        /* accent uniquement : filets, états actifs — jamais pour du texte */
  --ink: #1a2f4d;
  --muted: #56667a;
  --line: #e2e7ed;
  --line-strong: #dde3ea;
  --soft: #f4f6f8;
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, fieldset, legend, figure { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 50; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 8px; }
.skip:focus { top: 8px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; }
.muted { color: var(--muted); }

/* ---------- En-tête ---------- */
.top { border-bottom: 1px solid var(--line); }
.top__bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.top__logo { display: block; }
.top__logo img { display: block; width: 148px; height: auto; }
.top__toggle { font-size: 15px; font-weight: 500; padding: 12px 0 12px 16px; }
.nav { display: none; padding-bottom: 20px; }
.nav[data-open="true"] { display: block; }
.nav__title { font-size: 13px; color: var(--muted); padding: 18px 0 2px; }
.nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Boutons ---------- */
.btn { display: flex; align-items: center; justify-content: center; height: 54px; margin-top: 18px; padding: 0 20px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--navy-hover); }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn--ghost:hover { background: var(--soft); }

/* ---------- Sections ---------- */
.sec { padding: 56px 0; }
.sec--soft { background: var(--soft); }
.sec__intro { margin-top: 8px; color: var(--muted); }
.sec__body { margin-top: 24px; }

/* Liste de liens séparés par des filets (remplace les grilles de cartes) */
.list { border-top: 1px solid var(--line); }
.list > a, .list > div, .list > li { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 12px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list__name { font-size: 17px; font-weight: 600; margin: 0; }
.list__price { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list__go { font-size: 17px; }
.list__desc { grid-column: 1 / -1; font-size: 14px; color: var(--muted); max-width: 46ch; }
.list > a:hover .list__name { text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* Sans prix : nom et flèche seulement */
.list--plain > a, .list--plain > div, .list--plain > li { grid-template-columns: 1fr auto; }
/* Tableau de tarifs : durée, prix par jour, prix — sur une seule ligne */
.list--dense > a, .list--dense > div, .list--dense > li { grid-template-columns: 1fr auto auto; padding: 12px 0; }
.list--dense .list__name { font-size: 16px; font-weight: 500; }
.list--dense .list__desc { grid-column: auto; grid-row: 1; grid-column: 2; max-width: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list--dense .list__price { grid-column: 3; font-weight: 600; min-width: 4.5em; text-align: right; }
.list--dense [aria-current="page"] .list__name { text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.also { margin-top: 16px; font-size: 15px; color: var(--muted); }
.also a { color: var(--ink); font-weight: 500; }

/* Étapes numérotées */
.steps { counter-reset: etape; border-bottom: 1px solid var(--line-strong); }
.steps li { counter-increment: etape; display: grid; grid-template-columns: 40px 1fr; padding: 16px 0; border-top: 1px solid var(--line-strong); }
.steps li::before { content: counter(etape); font-size: 22px; line-height: 1.25; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps p { margin-top: 2px; font-size: 15px; color: var(--muted); }

/* Texte éditorial */
.prose { max-width: 66ch; }
.prose > p:first-child { font-size: 17px; }
.prose p + p, .prose ul + p { margin-top: 14px; }
.prose h3 { margin-top: 28px; margin-bottom: 8px; font-size: 18px; }
.prose ul { margin-top: 10px; }
.prose li { position: relative; padding-left: 18px; margin-top: 8px; }
.prose li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
.more { margin-top: 16px; }
.more > summary { list-style: none; display: inline-block; font-weight: 600; text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary .more__open, .more:not([open]) > summary .more__close { display: none; }

/* Questions fréquentes (accordéon) */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; display: grid; grid-template-columns: 1fr 20px; gap: 16px; align-items: start; padding: 18px 0; cursor: pointer; font-size: 16px; font-weight: 600; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 16px; line-height: 1.4; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1.1; text-align: center; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 36px 20px 0; font-size: 15px; color: var(--muted); max-width: 66ch; }

/* Bloc d'aide */
.help { padding: 40px 0; border-top: 1px solid var(--line); }
.help p { margin-top: 6px; color: var(--muted); }
.help__links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.help__links a { font-weight: 600; }
.help__tel { font-size: 20px; font-variant-numeric: tabular-nums; text-decoration: none; }
.help__note { font-size: 14px; color: var(--muted); }

/* ---------- En-tête de page avec bloc de choix (accueil, pages produit) ---------- */
.hero { padding: 32px 0 8px; }
.hero h1 { font-size: 34px; line-height: 1.08; letter-spacing: -0.022em; font-weight: 600; max-width: 13ch; }
.hero--produit h1 { max-width: 16ch; }
.lead { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 32ch; }
.hero__help { display: none; }

.quote { margin-top: 28px; background: var(--soft); border-radius: 16px; padding: 20px; }
.quote__group + .quote__group { margin-top: 20px; }
.quote__label { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.quote__result { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.quote__note { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.quote__more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 500; }

.price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.price__amount { font-size: 52px; line-height: 1; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price__meta { font-size: 14px; line-height: 1.35; color: var(--muted); text-align: right; }
.price--text .price__amount { font-size: 28px; letter-spacing: -0.02em; white-space: normal; }

.facts { margin-top: 32px; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 1px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts strong { font-size: 15px; font-weight: 600; }
.facts span { font-size: 14px; color: var(--muted); }

/* ---------- Barre de rappel du tarif (smartphone) ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); transform: translateY(100%); transition: transform 0.2s ease; }
.bar[data-show="true"] { transform: none; }
.bar__sum { font-size: 13px; line-height: 1.25; color: var(--muted); }
.bar__sum b { display: block; font-size: 20px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar .btn { height: 46px; margin: 0; padding: 0 18px; font-size: 15px; white-space: nowrap; }

/* ---------- Pied de page ---------- */
.foot { background: var(--soft); padding: 36px 0 104px; font-size: 14px; line-height: 1.4; }
.foot__logo img { display: block; width: 148px; height: auto; }
.foot__cols { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
.foot__cols > div:first-child, .foot__cols > div:last-child { grid-column: 1 / -1; }
.foot__title { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.foot__cols a { display: block; padding: 4px 0; text-decoration: none; }
.foot__cols a:hover { text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; }
.foot__cols p { padding: 4px 0; }
.foot__legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); }
.foot__legal p + p { margin-top: 8px; }
.foot__legal a { text-decoration: underline; }

/* ---------- Bandeau de consentement aux cookies ----------
   Affiché par main.js (style.display = 'block'). Refuser et Accepter ont
   exactement le même aspect : refuser est aussi simple qu'accepter. */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line-strong); padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom)); }
.cookie__inner { max-width: var(--max); margin-inline: auto; display: grid; gap: 12px; font-size: 13px; line-height: 1.45; }
.cookie__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cookie__btn { height: 44px; border: 1.5px solid var(--navy); border-radius: 12px; background: #fff; color: var(--navy); font-weight: 600; }
.cookie__btn:hover { background: var(--soft); }

/* ---------- Tablette ---------- */
@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 44px; }
  .quote { max-width: 520px; padding: 24px; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
}

/* ---------- Ordinateur ---------- */
@media (min-width: 960px) {
  :root { --gutter: 40px; }
  h2 { font-size: 34px; }

  .top .wrap { display: flex; align-items: center; justify-content: space-between; }
  .top__bar { height: 72px; }
  .top__toggle { display: none; }
  .nav, .nav[data-open="true"] { display: flex; gap: 28px; padding: 0; }
  .nav__title, .nav__more { display: none; }
  .nav__main { display: flex; gap: 28px; }
  .nav a { padding: 6px 0; border: 0; font-size: 15px; }
  .nav a:hover { text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 6px; }

  .hero { padding: 80px 0 24px; }
  .hero__grid { display: grid; grid-template-columns: 1fr 440px; column-gap: 72px; align-items: start; }
  .hero h1 { font-size: 60px; max-width: 11ch; }
  .hero--produit h1 { font-size: 52px; max-width: 14ch; }
  .lead { font-size: 19px; margin-top: 20px; }
  .hero__help { display: block; margin-top: 40px; font-size: 15px; color: var(--muted); }
  .hero__help a { color: var(--ink); font-weight: 600; }
  .quote { margin-top: 0; max-width: none; padding: 28px; }
  .facts { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 72px; }
  .facts li { border-bottom: 0; padding: 20px 0 0; }
  .bar { display: none; }

  .sec { padding: 96px 0; }
  .split { display: grid; grid-template-columns: 1fr 2fr; column-gap: 72px; align-items: start; }
  .sec__body { margin-top: 0; }
  .help { padding: 64px 0; }

  .foot { padding-bottom: 48px; font-size: 15px; }
  .foot__cols { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; }
  .foot__cols > div:first-child, .foot__cols > div:last-child { grid-column: auto; }

  .cookie__inner { grid-template-columns: 1fr auto; align-items: center; gap: 32px; }
  .cookie__actions { min-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
