/* Autoflow — site v2. Palette tirée d'une piscine : joints clairs, carrelage profond, mosaïque, surligneur. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wdth.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --grout: #F2F5F4;      /* fond : joints clairs */
  --paper: #FFFFFF;      /* fiches de demande */
  --tile: #0C3A45;       /* carrelage profond : titres, pied de page */
  --mosaic: #1C7C8C;     /* mosaïque : liens, accents calmes */
  --ink: #0F2229;        /* texte */
  --muted: #4B6168;      /* texte secondaire */
  --line: #C8D5D6;       /* filets */
  --marker: #F5C431;     /* surligneur : la demande gardée, le bouton principal */
  --pen: #C2412D;        /* stylo rouge : seulement pour barrer, dans l'accroche */
  --radius-s: 6px;
  --radius-l: 14px;
  --measure: 64ch;
  --step--1: clamp(0.86rem, 0.83rem + 0.12vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.05rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 3rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.2vw, 4.3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--grout); color: var(--ink); font-family: "Archivo", system-ui, sans-serif; font-size: var(--step-0); line-height: 1.6; font-stretch: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mosaic); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--tile); }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { color: var(--tile); line-height: 1.08; margin: 0 0 0.5em; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-stretch: 100%; font-weight: 700; line-height: 1.25; }
p, ul, ol { margin: 0 0 1em; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 100; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--grout) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--tile); text-decoration: none; font-weight: 800; font-stretch: 118%; font-size: 1.2rem; }
.brand img { width: auto; height: 30px; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: var(--step--1); font-weight: 600; }
.nav a[aria-current="page"] { box-shadow: inset 0 -0.45em 0 var(--marker); }
.nav .btn { margin-left: 0.4rem; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.45rem 0.7rem; font: inherit; font-weight: 600; color: var(--tile); }
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; inset: 4.2rem 0 auto 0; background: var(--grout); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1rem 1rem; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
  .nav .btn { margin: 0.8rem 0 0; text-align: center; border-bottom: 0; }
}

/* Boutons */
.btn { display: inline-block; padding: 0.8rem 1.25rem; border-radius: var(--radius-s); font-weight: 700; text-decoration: none; line-height: 1.2; border: 2px solid transparent; }
.btn-main { background: var(--marker); color: var(--ink); }
.btn-main:hover { background: #E8B51F; color: var(--ink); }
.btn-line { border-color: var(--tile); color: var(--tile); }
.btn-line:hover { background: var(--tile); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.6rem; }

/* Sections */
section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.section-head h2 { max-width: 24ch; }
.section-head p { max-width: 52ch; }
.band { background: var(--tile); color: #DCEAEC; }
.band h2, .band h3 { color: var(--paper); }
.band a:not(.btn) { color: var(--marker); }

/* Accroche : la pile de demandes */
.hero { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .for { margin-top: 1.4rem; font-size: var(--step--1); color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.pile { position: relative; min-height: 400px; }
.slip { position: absolute; width: min(330px, 86%); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0.9rem 1rem 1rem; box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(12, 58, 69, 0.35); font-size: 0.92rem; }
.slip dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.8rem; margin: 0; }
.slip dt { color: var(--muted); }
.slip dd { margin: 0; font-weight: 600; }
.slip .slip-title { font-weight: 700; font-stretch: 110%; color: var(--tile); margin-bottom: 0.45rem; }
.slip .note { position: absolute; right: 0.9rem; top: 0.5rem; font-family: "Caveat", cursive; font-size: 1.55rem; color: var(--pen); transform: rotate(-6deg); }
.slip .strike { position: absolute; left: 0.6rem; right: 0.6rem; top: 40%; height: 3px; background: var(--pen); border-radius: 2px; transform: rotate(-8deg); transform-origin: left center; opacity: 0.85; }
.slip.s1 { left: 0; top: 0; transform: rotate(-4deg); }
.slip.s2 { right: 0; top: 58px; transform: rotate(2.5deg); }
.slip.s3 { left: 4%; top: 128px; transform: rotate(-1.5deg); }
.slip.keep { right: 3%; top: 214px; transform: rotate(1.5deg); z-index: 2; border-color: var(--tile); }
.slip.keep .ring { position: absolute; inset: -14px -12px; pointer-events: none; }
.slip.keep .ring path { fill: none; stroke: var(--marker); stroke-width: 6; stroke-linecap: round; }
.slip.keep .note { color: var(--tile); top: -1.9rem; right: 0.4rem; transform: rotate(-4deg); }
@media (max-width: 860px) { .pile { min-height: 400px; max-width: 420px; margin-top: 1rem; } }
@media (prefers-reduced-motion: no-preference) {
  .slip .strike { animation: strike 0.35s ease-out both; }
  .s1 .strike { animation-delay: 0.5s; } .s2 .strike { animation-delay: 0.8s; } .s3 .strike { animation-delay: 1.1s; }
  .slip.keep .ring path { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: ring 0.9s 1.5s ease-out forwards; }
  @keyframes strike { from { transform: rotate(-8deg) scaleX(0); } to { transform: rotate(-8deg) scaleX(1); } }
  @keyframes ring { to { stroke-dashoffset: 0; } }
}

/* La demande décortiquée */
.anatomy { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.anatomy .slip { position: static; width: 100%; transform: none; font-size: 1rem; border-color: var(--tile); }
.anatomy ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; counter-reset: f; }
.anatomy li { padding-left: 2.6rem; position: relative; max-width: 52ch; }
.anatomy li::before { counter-increment: f; content: counter(f); position: absolute; left: 0; top: 0.05rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--marker); color: var(--ink); font-weight: 800; display: grid; place-items: center; font-size: 0.95rem; }
.anatomy li strong { display: block; color: var(--tile); }
@media (max-width: 860px) { .anatomy { grid-template-columns: 1fr; } }

/* Comparaison */
.compare { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.compare th, .compare td { text-align: left; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--tile); color: var(--paper); font-stretch: 108%; }
.compare tbody th { font-weight: 600; color: var(--muted); width: 26%; }
.compare td.us { background: color-mix(in srgb, var(--marker) 16%, var(--paper)); font-weight: 600; }
.compare tr:last-child > * { border-bottom: 0; }
@media (max-width: 700px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
  .compare tbody th { padding-bottom: 0.2rem; width: 100%; }
  .compare td { border: 0; padding-top: 0.3rem; }
  .compare td::before { content: attr(data-label) " : "; color: var(--muted); font-weight: 400; }
}

/* Étapes (vraie séquence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: s; }
.steps li { border-top: 3px solid var(--marker); padding-top: 1rem; }
.steps li::before { counter-increment: s; content: "Étape " counter(s); display: block; font-size: var(--step--1); color: #9FC3C9; margin-bottom: 0.4rem; }
.steps .when { display: block; font-weight: 700; color: var(--paper); margin-bottom: 0.3rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Formules */
.plans { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 1.2rem; align-items: stretch; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 1.6rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.plan.main { border: 2px solid var(--tile); box-shadow: 0 18px 40px -26px rgba(12, 58, 69, 0.55); }
.plan .tag { align-self: flex-start; background: var(--marker); color: var(--ink); font-weight: 700; font-size: var(--step--1); padding: 0.15rem 0.6rem; border-radius: 999px; margin-bottom: 0.8rem; }
.plan h3 { font-size: var(--step-2); font-stretch: 112%; margin-bottom: 0.2rem; }
.plan .price { font-size: var(--step-3); font-weight: 800; color: var(--tile); line-height: 1; margin: 0.6rem 0 0.2rem; font-stretch: 105%; }
.plan .price small { font-size: var(--step-0); font-weight: 600; color: var(--muted); }
.plan .setup { color: var(--muted); font-size: var(--step--1); margin-bottom: 1rem; }
.plan ul { padding-left: 1.1rem; margin-bottom: 1.2rem; }
.plan li { margin-bottom: 0.35rem; }
.plan .budget { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.plan .btn { margin-top: 1rem; text-align: center; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 520px; } }

/* Qui */
.who { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; align-items: start; max-width: 820px; }
.who img { border-radius: 50%; width: 180px; height: 180px; object-fit: cover; }
@media (max-width: 640px) { .who { grid-template-columns: 1fr; } .who img { width: 120px; height: 120px; } }

/* Réalisations */
.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.ref { text-decoration: none; color: inherit; display: block; }
.ref img { border-radius: var(--radius-s); border: 1px solid var(--line); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.ref h3 { margin: 0.8rem 0 0.2rem; }
.ref p { color: var(--muted); font-size: var(--step--1); margin: 0; }
.ref:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--marker); }

/* Questions */
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; max-width: var(--measure); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--tile); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--mosaic); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.7rem 0 0; color: var(--muted); }

/* Fin de page */
.cta-end .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: end; }
.cta-end .contact-lines { list-style: none; padding: 0; margin: 0; }
.cta-end .contact-lines li { margin-bottom: 0.45rem; }
@media (max-width: 760px) { .cta-end .wrap { grid-template-columns: 1fr; } }

.foot { background: var(--tile); color: #B9D2D6; padding: 3rem 0 2rem; font-size: var(--step--1); }
.foot a { color: #DCEAEC; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.foot h2 { font-size: var(--step-0); color: var(--paper); font-stretch: 100%; margin-bottom: 0.6rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 0.35rem; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.2rem; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; } }

/* Pages intérieures */
.page-head { padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-3); max-width: 20ch; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; list-style: none; margin: 1rem 0 0; }
.facts li { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.75rem; font-size: var(--step--1); background: var(--paper); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.note-box { background: var(--paper); border-left: 4px solid var(--marker); padding: 1rem 1.2rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; max-width: var(--measure); }

/* Bandeau de consentement */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; max-width: 560px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 1.1rem 1.2rem; box-shadow: 0 16px 40px -20px rgba(12,58,69,0.5); font-size: var(--step--1); }
.consent[hidden] { display: none; }
.consent p { margin-bottom: 0.8rem; }
.consent .actions { margin-top: 0; }
.consent button { font: inherit; cursor: pointer; }
