/* ---------- Polices (hébergées sur le site, aucun appel à Google Fonts) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --tarmac: #15181c;
  --tarmac-2: #2b323a;
  --chalk: #f3f5f2;
  --paper: #ffffff;
  --line: #dbdfda;
  --line-strong: #aab2aa;
  --muted: #565f68;
  --hl: #f2c230;
  --hl-2: #e3b11f;

  /* échelle de pentes : la même que celle de l'image générée */
  --g0: #4AA633; --g1: #8E8E8E; --g2: #F2C230; --g3: #F39C12;
  --g4: #E67E22; --g5: #D35400; --g6: #C62828; --g7: #222222;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --font-head: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--tarmac);
  font: 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 5.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.03; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

a { color: var(--tarmac); text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--tarmac); }
:focus-visible { outline: 3px solid var(--tarmac); outline-offset: 3px; }
.announce :focus-visible, .pro :focus-visible { outline-color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tarmac); color: #fff; padding: 8px 12px; border-radius: 0 0 8px 0; z-index: 40; }
.skip:focus { left: 0; }
[hidden] { display: none !important; }

/* ---------- Bandeau d'annonce ---------- */
.announce {
  position: relative; background: var(--tarmac); color: #fff; font-size: .92rem;
  padding: 9px 52px 9px 20px; text-align: center;
}
.announce p { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; }
.announce a { color: #fff; font-weight: 600; }
.pill { background: var(--hl); color: var(--tarmac); font-weight: 700; font-size: .78rem; padding: 1px 8px; border-radius: 4px; line-height: 1.6; }
.announce-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; padding: 3px 10px; border-radius: var(--r-sm);
}
.announce-close:hover { background: rgba(255,255,255,.14); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(243,245,242,.93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ramp { display: flex; gap: 2px; height: 6px; }
.ramp i { flex: 1; transform-origin: bottom; }
.ramp i:nth-child(1) { background: var(--g0); } .ramp i:nth-child(2) { background: var(--g1); }
.ramp i:nth-child(3) { background: var(--g2); } .ramp i:nth-child(4) { background: var(--g3); }
.ramp i:nth-child(5) { background: var(--g4); } .ramp i:nth-child(6) { background: var(--g5); }
.ramp i:nth-child(7) { background: var(--g6); } .ramp i:nth-child(8) { background: var(--g7); }
@media (prefers-reduced-motion: no-preference) {
  .ramp i { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .ramp i:nth-child(2) { animation-delay: .06s; } .ramp i:nth-child(3) { animation-delay: .12s; }
  .ramp i:nth-child(4) { animation-delay: .18s; } .ramp i:nth-child(5) { animation-delay: .24s; }
  .ramp i:nth-child(6) { animation-delay: .30s; } .ramp i:nth-child(7) { animation-delay: .36s; }
  .ramp i:nth-child(8) { animation-delay: .42s; }
}
@keyframes rise { from { transform: scaleY(0); } }

.bar { display: flex; align-items: center; gap: 22px; min-height: 62px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a { color: var(--tarmac); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--hl); }
.lang { display: flex; gap: 4px; }
.lang a {
  text-decoration: none; font-size: .8rem; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 11px; background: transparent;
}
.lang a:hover { border-color: var(--tarmac); color: var(--tarmac); }
.lang a[aria-current="true"] { background: var(--tarmac); border-color: var(--tarmac); color: #fff; }

/* ---------- Accueil ---------- */
.hero { padding: 56px 0 8px; }
.hero h1 { max-width: 19ch; }
.lead { max-width: 62ch; margin-top: 18px; font-size: 1.18rem; line-height: 1.55; color: #2b323a; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-top: 20px; }
.card-drop { padding: 10px; margin-top: 30px; }
.drop {
  position: relative; display: block; text-align: center; cursor: pointer;
  background: var(--chalk); border: 2px dashed var(--line-strong); border-radius: var(--r-md);
  padding: 46px 20px; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--tarmac); background: #fff; }
.drop:focus-within { outline: 3px solid var(--tarmac); outline-offset: 3px; }
.drop strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.015em; }
.drop span { display: block; color: var(--muted); font-size: .95rem; margin-top: 4px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.error { color: #b42318; margin: 12px 10px 4px; font-weight: 600; }

.sample { margin: 34px 0 0; }
.sample img { display: block; width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: #f2f2f2; }
.sample figcaption { margin-top: 10px; color: var(--muted); font-size: .92rem; }

/* ---------- Découpe de la trace ---------- */
.crop { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.crop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crop-head h2 { font-size: 1.2rem; }
.hint { margin: 4px 0 14px; color: var(--muted); font-size: .94rem; }
.crop-body { padding: 0 9px; }
.crop-body canvas { width: 100%; height: auto; display: block; border-radius: 8px; background: #fafbf9; }
.dual { position: relative; height: 18px; margin: 8px -9px 0; }
.dual::before { content: ""; position: absolute; left: 9px; right: 9px; top: 8px; height: 2px; background: var(--line-strong); border-radius: 2px; }
.dual input[type=range] { position: absolute; left: 0; top: 0; width: 100%; height: 18px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type=range]::-webkit-slider-runnable-track { height: 18px; background: transparent; }
.dual input[type=range]::-moz-range-track { height: 18px; background: transparent; }
.dual input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--tarmac); border: 3px solid var(--hl); box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: grab;
}
.dual input[type=range]::-moz-range-thumb {
  pointer-events: auto; box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%;
  background: var(--tarmac); border: 3px solid var(--hl); box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: grab;
}
.dual input[type=range]:active::-webkit-slider-thumb { cursor: grabbing; }
.dual input[type=range]:focus-visible { outline: none; }
.dual input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--tarmac); outline-offset: 2px; }
.dual input[type=range]:focus-visible::-moz-range-thumb { outline: 3px solid var(--tarmac); outline-offset: 2px; }
.crop-info { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 14px 0 0; font-size: .93rem; color: var(--muted); }
.crop-info b { color: var(--tarmac); font-weight: 700; }

.preview { background: #f2f2f2; border-radius: var(--r-md); overflow: hidden; line-height: 0; }
.preview canvas { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: .86rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Boutons ---------- */
button, .btn {
  font: inherit; font-weight: 600; background: var(--tarmac); color: #fff; border: 0; border-radius: var(--r-sm);
  padding: 11px 20px; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s;
}
button:hover, .btn:hover { background: var(--tarmac-2); }
.btn-hl { background: var(--hl); color: var(--tarmac); }
.btn-hl:hover { background: var(--hl-2); }
button.secondary { background: transparent; color: var(--tarmac); border: 1px solid var(--line-strong); }
button.secondary:hover { background: #fff; border-color: var(--tarmac); }
button.small { padding: 6px 12px; font-size: .86rem; }
.actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
button.linklike { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 400; font-size: inherit; text-decoration: underline; border-radius: 0; }
button.linklike:hover { background: none; color: var(--tarmac); }

/* ---------- Sections de contenu ---------- */
.block { margin-top: 76px; }
.steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { counter-increment: step; border-top: 3px solid var(--g0); padding-top: 14px; }
.steps li:nth-child(2) { border-top-color: var(--g3); }
.steps li:nth-child(3) { border-top-color: var(--g6); }
.steps li::before { content: counter(step); display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.3rem; line-height: 1; letter-spacing: -0.04em; margin-bottom: 8px; }
.note { max-width: 70ch; margin-top: 28px; color: #2b323a; }

.pro { margin-top: 76px; background: var(--tarmac); color: #fff; border-radius: var(--r-lg); padding: 38px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: start; }
.pro h2 { color: #fff; margin-bottom: 10px; }
.pro p { color: #d3d9d4; }
.pro ul { list-style: none; margin: 16px 0 0; padding: 0; }
.pro li { position: relative; padding: 8px 0 8px 28px; border-top: 1px solid rgba(255,255,255,.14); }
.pro li::before { content: ""; position: absolute; left: 0; top: 17px; width: 16px; height: 7px; border-radius: 2px; background: var(--hl); }
.pro li:nth-child(1)::before { background: var(--g0); } .pro li:nth-child(2)::before { background: var(--g2); }
.pro li:nth-child(3)::before { background: var(--g3); } .pro li:nth-child(4)::before { background: var(--g5); }
.pro li:nth-child(5)::before { background: var(--g6); }
.pro-cta p { margin-bottom: 18px; }

details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-head); font-size: 1.5rem; line-height: 1; font-weight: 500; }
details[open] > summary::after { content: "\2013"; }
details p { margin-top: 10px; max-width: 68ch; color: #2b323a; }
.faq-list { margin-top: 22px; }

.site-footer { margin-top: 88px; border-top: 1px solid var(--line); padding: 38px 0 52px; color: var(--muted); font-size: .94rem; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; }
.foot-brand { margin: 0 0 8px; }
.foot-brand img { display: block; height: 34px; width: auto; }
.foot-note { max-width: 54ch; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.site-footer a { color: var(--tarmac); }

/* ---------- Fenêtre FAQ ---------- */
dialog {
  padding: 0; border: 0; border-radius: var(--r-lg); background: var(--paper); color: var(--tarmac);
  width: min(640px, calc(100vw - 24px)); max-height: min(88vh, 760px); overflow: hidden;
  box-shadow: 0 30px 80px rgba(10,12,15,.4);
}
dialog[open] { display: flex; }
dialog::backdrop { background: rgba(21,24,28,.62); }
.dialog-box { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 8px; }
.dialog-head h2 { font-size: 1.55rem; }
.dialog-x { background: transparent; color: var(--tarmac); font-size: 1.6rem; line-height: 1; padding: 3px 11px; }
.dialog-x:hover { background: var(--chalk); }
.dialog-body { overflow: auto; padding: 0 24px 12px; }
.dialog-body details:first-child { border-top: 0; }
.dialog-body details:last-of-type { border-bottom: 0; }
.dialog-foot { display: flex; justify-content: flex-end; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
body.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: pop .24s cubic-bezier(.2,.8,.2,1); }
  dialog[open]::backdrop { animation: fade .24s ease-out; }
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Partie premium (masquée tant que PREMIUM_ENABLED = false) ---------- */
.options-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.options-head h2 { font-size: 1.2rem; }
.badge { font-size: .72rem; background: var(--hl); color: var(--tarmac); font-weight: 700; border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: 2px; }
fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
fieldset:disabled { opacity: .45; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 22px; }
.field .lbl { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 5px; }
.field input[type=text], .field select { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.field input[type=range] { width: 100%; accent-color: var(--tarmac); }
.field .val { color: var(--muted); font-weight: 400; }
.check { display: flex; gap: 8px; align-items: center; font-size: .95rem; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
.swatch input { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: none; }

/* ---------- Bandeau de consentement (seulement si Google Analytics est activé) ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 640px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: 0 10px 34px rgba(0,0,0,.22); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.consent p { font-size: .93rem; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Page 404 ---------- */
.center { text-align: center; max-width: 640px; margin: 0 auto; padding: 14vh 20px 0; }
.center h1 { font-size: 4.5rem; margin-bottom: 14px; }
.center p + p { margin-top: 8px; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .brand img { height: 32px; }
  body { font-size: 1rem; }
  .hero { padding-top: 34px; }
  .lead { font-size: 1.08rem; }
  .nav a:not(.js-faq) { display: none; }
  .bar { gap: 14px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .pro { grid-template-columns: 1fr; padding: 26px; gap: 22px; }
  .foot { grid-template-columns: 1fr; }
  .block, .pro { margin-top: 56px; }
  .announce { text-align: left; padding-left: 16px; }
  .announce p { justify-content: flex-start; }
  .drop { padding: 36px 16px; }
}
.pro-alt { margin: 14px 0 0; font-size: .9rem; }
.pro-alt strong { color: #fff; font-weight: 600; }
.pro .linklike { color: var(--hl); }
.pro button.linklike:hover { color: #fff; }