/* ==========================================================================
   Qualiplainte — feuille de style unique
   Direction : « dossier judiciaire » — papier chaud, encre charbon,
   sarcelle structurante, ambre en accent. Motif signature : les trois
   filets verticaux du picto, repris en tête de section et sur les cartes.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ink:        #1b1b1a;
  --ink-soft:   #4a4a46;
  --ink-mute:   #6d6d66;
  --paper:      #fbfaf7;
  --paper-2:    #f4f1ea;
  --surface:    #ffffff;
  --line:       #e6e1d6;
  --line-soft:  #efebe2;

  --teal:       #68b8b7;
  --teal-deep:  #2c7a79;
  --teal-ink:   #1d5c5b;
  --teal-wash:  #eaf5f5;

  --amber:      #eeb040;
  --amber-deep: #a9720b;
  --amber-wash: #fdf4e3;

  --radius:     14px;
  --radius-lg:  22px;
  --shadow:     0 1px 2px rgba(27,27,26,.05), 0 8px 24px -12px rgba(27,27,26,.18);
  --shadow-lg:  0 2px 4px rgba(27,27,26,.05), 0 24px 48px -24px rgba(27,27,26,.28);

  --font-head:  "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;

  --wrap:       1120px;
  --gutter:     clamp(18px, 5vw, 40px);

  color-scheme: light;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::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 { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.55rem); }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.35rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.32rem); letter-spacing: -.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0; }

p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--amber-deep); }

ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin-bottom: .4em; }

strong { font-weight: 650; color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--amber-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Layout helpers ------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(52px, 8vw, 92px); }
.section--paper { background: var(--paper-2); }
.section--ink   { background: var(--ink); color: #f3f1ec; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #cfcdc6; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff;
  padding: 12px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Motif signature : trois filets verticaux (echo du picto) ------------------ */
.rule-mark {
  display: flex; gap: 4px; align-items: flex-end;
  height: 22px; margin-bottom: 18px;
}
.rule-mark i { display: block; width: 3px; border-radius: 2px; background: var(--ink); }
.rule-mark i:nth-child(1) { height: 14px; background: var(--amber); }
.rule-mark i:nth-child(2) { height: 22px; }
.rule-mark i:nth-child(3) { height: 18px; background: var(--teal); }
.section--ink .rule-mark i:nth-child(2) { background: #fff; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin: 0 0 10px;
}
.section--ink .eyebrow { color: var(--teal); }

.lede {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* --- Boutons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--teal-deep); color: #fff; box-shadow: 0 6px 18px -8px rgba(44,122,121,.8); }
.btn--primary:hover { background: var(--teal-ink); color: #fff; }
.btn--accent { background: var(--amber); color: #201f1c; box-shadow: 0 6px 18px -8px rgba(169,114,11,.7); }
.btn--accent:hover { background: #e5a42c; color: #201f1c; }
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover { border-color: var(--teal-deep); color: var(--teal-ink); }
.btn--sm { padding: 10px 18px; font-size: .93rem; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,250,247,.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; }
.brand__word {
  display: block;
  font-family: var(--font-head); font-weight: 700; font-size: 1.28rem;
  letter-spacing: -.025em; line-height: 1;
}
.brand__word small {
  display: block; margin-top: 4px;
  font-weight: 600; font-size: .58rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-mute);
}
.brand--footer { color: #fff; margin-bottom: 16px; }
.brand--footer .brand__mark { box-shadow: 0 0 0 1px rgba(255,255,255,.22); }
.brand--footer .brand__word small { color: var(--teal); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-head); font-weight: 600; font-size: .97rem;
  color: var(--ink); text-decoration: none;
  padding: 9px 14px; border-radius: 9px;
}
.nav a:hover { background: var(--teal-wash); color: var(--teal-ink); }
.nav a[aria-current="page"]:not(.btn) { color: var(--teal-ink); box-shadow: inset 0 -2px 0 var(--amber); }
.nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 9px 12px;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  color: var(--ink); cursor: pointer;
}

@media (max-width: 860px) {
  .brand__word { font-size: 1.12rem; }
  .brand__mark { width: 34px; height: 34px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: .5em; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 20px;
    box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 13px 12px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(46px, 7vw, 86px) clamp(44px, 6vw, 76px);
  background:
    radial-gradient(90ch 52ch at 82% -18%, var(--teal-wash) 0%, transparent 62%),
    radial-gradient(60ch 40ch at 4% 4%, var(--amber-wash) 0%, transparent 58%);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(to top, rgba(238,176,64,.42) 0 .34em, transparent .34em);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.trust {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 30px; padding: 0; list-style: none;
}
.trust li {
  margin: 0;
  font-family: var(--font-head); font-weight: 600; font-size: .83rem;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 7px 14px; border-radius: 999px;
}

/* Carte « dossier » illustrative du hero */
.dossier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 26px 22px;
  position: relative;
}
.dossier::before {
  content: ""; position: absolute; inset: -1px -1px auto;
  height: 6px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--amber) 0 38%, var(--teal) 38% 100%);
}
.dossier h2 { font-size: 1.12rem; margin-bottom: 16px; }
.dossier ol { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
.dossier li {
  counter-increment: step;
  display: grid; grid-template-columns: 30px 1fr; gap: 14px;
  padding: 13px 0; margin: 0;
  border-top: 1px solid var(--line-soft);
}
.dossier li:first-of-type { border-top: 0; padding-top: 4px; }
.dossier li::before {
  content: counter(step);
  font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-wash); color: var(--teal-ink);
}
.dossier li strong,
.dossier li span { grid-column: 2; }
.dossier li strong { display: block; font-family: var(--font-head); font-size: .99rem; }
.dossier li span { display: block; font-size: .91rem; color: var(--ink-mute); line-height: 1.5; margin-top: 2px; }

/* --- Grilles de cartes ---------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card--top { border-top: 4px solid var(--teal); }
.card--top-amber { border-top: 4px solid var(--amber); }
.card h3 { margin-bottom: .45em; }
.card p { font-size: .97rem; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }

.feature {
  background: transparent;
  border: 0; box-shadow: none; padding: 0;
}
.feature h3 { display: flex; align-items: baseline; gap: .55em; }
.feature h3::before {
  content: ""; flex: 0 0 auto;
  width: 10px; height: 10px; border-radius: 3px; background: var(--amber);
}

/* --- Liste d'infractions (nuage de mots-clés) ----------------------------- */
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.tags li {
  margin: 0;
  font-size: .94rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--ink-soft);
}
.section--ink .tags li {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: #ddd9d2;
}

/* --- Conseils numérotés --------------------------------------------------- */
.advice { list-style: none; padding: 0; margin: 0; counter-reset: tip; display: grid; gap: 2px; }
.advice li {
  counter-increment: tip;
  margin: 0; padding: 20px 4px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 54px 1fr; gap: 18px; align-items: start;
}
.advice li:last-child { border-bottom: 1px solid var(--line); }
.advice li::before {
  content: counter(tip, decimal-leading-zero);
  font-family: var(--font-head); font-weight: 700; font-size: 1.28rem;
  color: var(--amber-deep);
  line-height: 1.1;
}
.advice h3 { font-size: 1.05rem; margin-bottom: .3em; }
.advice p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

/* --- FAQ ------------------------------------------------------------------ */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq details[open] { border-color: var(--teal); }
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 600; font-size: 1.03rem;
  padding: 18px 52px 18px 22px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px; margin-top: -6px;
  border-right: 2px solid var(--teal-deep);
  border-bottom: 2px solid var(--teal-deep);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { background: var(--teal-wash); }
.faq .faq__body { padding: 0 22px 20px; color: var(--ink-soft); font-size: .98rem; }

/* --- Bandeau CTA ---------------------------------------------------------- */
.cta-band {
  background: var(--ink);
  color: #f3f1ec;
  border-radius: var(--radius-lg);
  padding: clamp(30px, 5vw, 48px);
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 26px; align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #c9c6be; margin: 0; max-width: 54ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* --- Fil d'Ariane --------------------------------------------------------- */
.crumbs {
  font-size: .88rem; color: var(--ink-mute);
  padding-block: 20px 0;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5em; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: .5em; color: var(--line); }

/* --- Pages intérieures ---------------------------------------------------- */
.page-head { padding-block: clamp(28px, 4vw, 44px) clamp(28px, 4vw, 40px); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }

.callout {
  background: var(--amber-wash);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  font-size: .96rem;
  color: var(--ink-soft);
  margin: 28px 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}
.contact-card .label {
  font-family: var(--font-head); font-weight: 600; font-size: .76rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
  margin: 0 0 6px;
}
.contact-card .value {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.05rem, .95rem + .6vw, 1.35rem);
  margin: 0 0 4px; word-break: break-word;
}
.contact-card .value a { text-decoration: none; }
.contact-card .value a:hover { text-decoration: underline; }
.contact-card + .contact-card { margin-top: 16px; }

/* --- Maillage interne « lire aussi » -------------------------------------- */
.links-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding: 0; list-style: none; }
.links-inline li { margin: 0; }
.links-inline a {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 18px;
  color: var(--ink);
}
.links-inline a:hover { border-color: var(--teal-deep); color: var(--teal-ink); }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #b9b6ae;
  padding-block: clamp(42px, 6vw, 64px) 30px;
  font-size: .94rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 34px;
}
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

.site-footer p { color: #a5a29a; max-width: 46ch; font-size: .92rem; }
.site-footer h2 {
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase;
  color: #fff; margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #ddd9d2; text-decoration: none; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.site-footer__bar {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .86rem; color: #8d8a83;
}

/* --- 404 ------------------------------------------------------------------ */
.notfound { padding-block: clamp(60px, 10vw, 120px); text-align: center; }
.notfound .btn { margin-top: 20px; }

/* --- Responsive hero ------------------------------------------------------ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}
