/* ============================================================================
   duerp-obligation.fr — CSS bespoke (DNA gravé: Spectral/Instrument Sans,
   restrained, cool, asymmetric-collage, pill-mixed, classic-stack, paper-grain)
   Aucune classe/structure reprise d'un autre site du parc. Anti-footprint.
   ========================================================================== */

:root {
  /* Neutres tintés COOL (bleu-gris froid) — fond clair */
  --paper:      #f7f8fa;
  --paper-2:    #eef1f5;
  --ink:        #1b2330;   /* near-black froid */
  --muted:      #5a6675;
  --line:       #d9dee6;
  --line-soft:  #e6eaf0;
  --card:       #ffffff;
  /* Accent : orange sécurité INRS (oklch hue ~45), parcimonie ≤10% surface */
  --accent:     oklch(0.66 0.16 48);
  --accent-ink: oklch(0.42 0.12 48);
  --accent-bg:  oklch(0.96 0.03 60);
  --ok:         #2e7d57;
  --r-card:     6px;      /* cartes rectilignes */
  --r-pill:     999px;    /* boutons pill ronds */
  --maxw:       1080px;
  --gap:        clamp(2.6rem, 6vw, 5rem);
  --fz:         clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: var(--fz);
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  /* paper-grain : grain SVG très discret, tons matière */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Spectral", Georgia, serif;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p  { text-wrap: pretty; }
a  { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 var(--r-card) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--gap); }
.section.narrow .wrap { width: min(100% - 2.4rem, 760px); }
.section.tint { background: var(--paper-2); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand {
  font-family: "Spectral", serif; font-weight: 600; font-size: 1.18rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em; margin-right: auto;
}
.brand b { color: var(--accent-ink); font-weight: 600; }
.nav { display: flex; gap: .2rem; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: var(--r-card);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav .nav-cta {
  background: var(--ink); color: #fff; border-radius: var(--r-pill);
  padding: .55rem 1.1rem; margin-left: .4rem;
}
.nav .nav-cta:hover { background: var(--accent-ink); color: #fff; }
.nav-burger {
  display: none; flex-direction: column; gap: 4px; background: none; border: 0;
  padding: .6rem; cursor: pointer; min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
}
.nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .6rem 1.2rem 1rem; gap: .1rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; min-height: 44px; display: flex; align-items: center; }
  .nav .nav-cta { margin: .5rem 0 0; justify-content: center; }
}

/* ── Buttons (pill) ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1;
  padding: .9rem 1.5rem; min-height: 48px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: .16s;
}
.btn-primary { background: var(--accent); color: #2a1605; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #0f1722; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.wide { width: 100%; }

/* ── Hero (asymmetric-collage) — CRO : H1 puis FORMULAIRE de contact ─────────
   Desktop : colonne gauche (H1 + collage fiches loi + lede) / colonne droite =
   carte formulaire compacte ; submit visible sans scroll (<768).
   Le form occupe les 2 premières lignes pour rester haut à droite. */
.hero { padding-top: clamp(2rem, 4vw, 3.2rem); padding-bottom: var(--gap); }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-areas:
    "head form"
    "more form"
    "lede form";
  gap: clamp(1.2rem, 3vw, 2.2rem) clamp(1.8rem, 4vw, 3.2rem);
  align-items: start;
}
.hero__head { grid-area: head; }
.hero__form { grid-area: form; }
.hero__more { grid-area: more; }
.hero__lede { grid-area: lede; }
.hero h1 { margin-bottom: .2rem; }
.hero .lede { font-size: 1.06rem; color: var(--muted); max-width: 56ch; margin-top: 0; }
.hero-sources { display: block; margin-top: .6rem; font-size: .86rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.hero-magnet-link { font-weight: 500; }
.hero__more .collage { margin-top: .2rem; }

/* Carte formulaire compacte du hero : champs serrés, submit au-dessus de la
   ligne de flottaison sur 1366×768 et 390×844. */
.hero-form { padding: clamp(1.1rem, 2.4vw, 1.5rem); }
.hero-form h3 { font-size: 1.18rem; margin-bottom: .2rem; }
.hero-form .hf-sub { color: var(--muted); font-size: .92rem; margin: 0 0 .9rem; }
.hero-form .form { gap: .7rem; }
.hero-form .form label { font-size: .86rem; gap: .25rem; }
.hero-form .form input, .hero-form .form select { padding: .58rem .7rem; min-height: 42px; }
.hero-form .consent { margin: .8rem 0; font-size: .84rem; }
.hero-form .btn { min-height: 46px; padding: .75rem 1.4rem; }
.hero-form .reassurance { margin-top: .7rem; font-size: .8rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-bg); padding: .35rem .8rem; border-radius: var(--r-pill); margin-bottom: 1rem;
}

/* collage de fiches loi décalées (pas de photo dans la niche) */
.collage { position: relative; }
.collage .card-law { position: relative; }
.collage .card-law + .card-law {
  margin-top: -1.2rem; margin-left: 1.6rem; box-shadow: -8px -8px 0 -1px var(--paper);
}
@media (max-width: 860px) {
  /* CRO mobile : eyebrow+H1 -> FORMULAIRE -> collage/trust -> sous-titre (lede sous le form) */
  .hero .wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "form" "more" "lede";
    gap: .75rem;
  }
  .hero { padding-top: .8rem; padding-bottom: clamp(2.2rem, 6vw, 3rem); }
  .hero h1 { font-size: 1.42rem; line-height: 1.12; margin-bottom: 0; }
  .hero .eyebrow { margin-bottom: .45rem; font-size: .68rem; }
  .hero__lede {
    font-size: .98rem; line-height: 1.55; margin-top: .2rem;
    padding-top: 1rem; border-top: 1px solid var(--line-soft);
  }
  .hero__more { margin-top: .2rem; }
  .collage .card-law + .card-law { margin-left: 0; }
  /* form encore plus compact en mobile pour garder le submit au-dessus du fold */
  .hero-form { padding: .9rem 1rem 1rem; }
  .hero-form h3 { font-size: 1.08rem; }
  .hero-form .hf-sub { margin-bottom: .6rem; font-size: .88rem; }
  .hero-form .form { gap: .55rem; }
  .hero-form .form input, .hero-form .form select { min-height: 40px; padding: .5rem .65rem; }
  .hero-form .form label { font-size: .82rem; }
  .hero-form .consent { margin: .6rem 0; font-size: .8rem; }
  .hero-form .reassurance { margin-top: .55rem; }
}

/* ── « La règle en clair » (signature) ──────────────────────────────────── */
.rule-clear {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden;
}
.rule-clear .rc-head {
  font-family: "Spectral", serif; font-weight: 600; font-size: .98rem;
  padding: .8rem 1.1rem; border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
}
.rule-clear .rc-head .stamp { font-family: "Instrument Sans"; font-size: .76rem; color: var(--muted); font-weight: 500; }
.rule-clear dl { margin: 0; }
.rule-clear .rc-row { display: grid; grid-template-columns: 1fr; gap: .15rem; padding: .85rem 1.1rem; }
.rule-clear .rc-row + .rc-row { border-top: 1px solid var(--line-soft); }
.rule-clear dt {
  font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink);
}
.rule-clear dd { margin: 0; }
.rule-clear dd .ans { font-family: "Spectral", serif; font-size: 1.06rem; }
.rule-clear dd .ref { display: block; font-size: .82rem; color: var(--muted); margin-top: .1rem; }

/* ── Fiche article daté (latérale) ──────────────────────────────────────── */
.card-law {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.1rem 1.2rem;
}
.card-law .cl-art { font-family: "Spectral", serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.card-law .cl-quote { font-style: italic; color: var(--muted); margin: .5rem 0; font-size: .96rem; }
.card-law .cl-meta {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--ok); font-weight: 600;
}
.card-law .cl-meta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ── Prose ──────────────────────────────────────────────────────────────── */
.prose > * + * { margin-top: 1.05rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .4rem; }
.prose strong { font-weight: 600; }
.lead-p { font-size: 1.12rem; color: var(--muted); }

/* ── Cards grid ─────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.3rem 1.4rem;
}
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card a.card-link { font-weight: 600; text-decoration: none; }
.card a.card-link::after { content: " →"; }

/* ── Table (échéances) → cards <640 ─────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--card); }
table.data th, table.data td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data th { font-family: "Spectral", serif; font-weight: 600; background: var(--paper-2); }
table.data tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  table.data, table.data thead, table.data tbody, table.data tr, table.data th, table.data td { display: block; }
  table.data thead { position: absolute; left: -9999px; }
  .table-wrap { overflow: visible; border: 0; }
  table.data tr { border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: .8rem; background: var(--card); padding: .3rem .2rem; }
  table.data td { border-bottom: 1px solid var(--line-soft); padding-left: 42%; position: relative; min-height: 44px; }
  table.data td:last-child { border-bottom: 0; }
  table.data td::before {
    content: attr(data-label); position: absolute; left: .9rem; top: .7rem; width: 36%;
    font-weight: 600; font-size: .8rem; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .03em;
  }
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq details { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); margin-bottom: .7rem; }
.faq summary {
  cursor: pointer; padding: 1rem 1.2rem; font-family: "Spectral", serif; font-weight: 600; font-size: 1.04rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq details > p { padding: .3rem 1.2rem 1.1rem; margin: 0; color: var(--muted); }

/* ── Form ───────────────────────────────────────────────────────────────── */
.form-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.4rem, 3vw, 2.2rem); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; font-weight: 500; }
.form label.wide { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  font: inherit; font-size: .98rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--paper); color: var(--ink); min-height: 44px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); background: #fff; }
.form textarea { min-height: 96px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 1.1rem 0; }
.consent input { margin-top: .25rem; min-width: 20px; min-height: 20px; accent-color: var(--accent); }
.field-opt { color: var(--muted); font-weight: 400; }
.reassurance { font-size: .86rem; color: var(--muted); margin-top: .9rem; text-align: center; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ── Magnet (secondaire) ────────────────────────────────────────────────── */
.magnet { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.4rem 1.6rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.magnet .magnet-txt { flex: 1 1 260px; }
.magnet h3 { margin: 0 0 .3rem; }
.magnet p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding-block: 2.6rem; margin-top: 2rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .7rem; }
.site-footer a { display: block; color: var(--ink); text-decoration: none; font-size: .94rem; padding: .25rem 0; }
.site-footer a:hover { color: var(--accent-ink); }
.site-footer .foot-brand { font-family: "Spectral", serif; font-size: 1.1rem; font-weight: 600; }
.site-footer .foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.2rem; font-size: .82rem; color: var(--muted); }
.site-footer .foot-legal a { display: inline; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ── CTA band ───────────────────────────────────────────────────────────── */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--r-card); padding: clamp(1.8rem, 4vw, 2.8rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c4ccd6; max-width: 52ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ── Consent banner ─────────────────────────────────────────────────────── */
.consent-banner { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 520px; margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem 1.2rem; box-shadow: 0 10px 40px #1b233022; z-index: 60; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.consent-banner p { margin: 0; flex: 1 1 200px; font-size: .9rem; }
.consent-banner .btn { padding: .55rem 1.1rem; min-height: 40px; font-size: .9rem; }

/* ── breadcrumb / kicker ────────────────────────────────────────────────── */
.kicker { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .6rem; }
.note-source { font-size: .86rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: .9rem; margin-top: 1.4rem; }
