/* ==========================================================================
   Niveau 3 de l'audit : le site public a son identité (enduit frais, ruban de masquage, nuancier, brique de Toulouse).
   Clair et chaleureux sur tous les appareils ; les espaces du patron et de l'ouvrier gardent le thème de l'appareil.
   ========================================================================== */
:root[data-espace="public"] {
  --bg: #f5f1ea; --surface: #fffdf9; --ink: #1d2320; --muted: #5a605a; --line: #e3dccf;
  --tape: #2c5d9e; --tape-ink: #ffffff; --ok: #2e7547; --warn: #94570b; --stop: #a3352b; --warn-bg: #fbf0df;
  --shade: rgba(64, 46, 28, .13);
  color-scheme: light;
}
:root { --brique: #b85f3c; --sauge: #a9b89a; --papier: #ebe4d7; }
body:not(.pret) footer.pied { visibility: hidden; }

/* La barre du haut du site public : la marque, trois liens, l'action principale */
:root[data-espace="public"] header.top .in { max-width: 1120px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.nav-site { display: flex; gap: 4px 22px; margin-left: 28px; }
.nav-site a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav-site a:hover { color: var(--brique); }
.btn.petit { min-height: 40px; padding: 8px 14px; font-size: .92rem; border-radius: 10px; }
header.top .connexion { font-size: .9rem; }
header.top .qui.public { display: flex; align-items: center; gap: 14px; }
.btn.petit { white-space: nowrap; }
.btn.petit .court { display: none; }
@media (max-width: 880px) { .nav-site { display: none; } }
@media (max-width: 560px) { .btn.petit .long { display: none; } .btn.petit .court { display: inline; } header.top .qui.public { gap: 10px; } }
@media (max-width: 480px) { header.top .qui .connexion { display: none; } } /* reste dans le pied de page : « Espace client ou pro » */

/* La page d'accueil prend toute la largeur, en bandes */
.wrap:has(> .plein) { max-width: none; padding: 0 0 24px; gap: 0; }
.plein { width: 100%; }
.interieur { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: grid; gap: 22px; }
.sur-titre { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brique); }
.bloc { padding-block: clamp(48px, 8vw, 96px); }
.bloc h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); max-width: 22ch; }
.bloc p { max-width: 62ch; color: var(--muted); font-size: 1.05rem; }
.bloc.teinte { background: var(--surface); border-block: 1px solid var(--line); }
.bloc.clair { background: var(--papier); }
.bloc.pro { background: var(--ink); color: var(--bg); }
.bloc.pro p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.bloc.pro .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn.grand { min-height: 56px; padding: 14px 26px; font-size: 1.08rem; border-radius: 14px; }
.deux { grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .deux { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; } }

/* En-tête : le texte à gauche, la scène en profondeur à droite ; sur téléphone, la scène passe dessous */
.hero-site { display: grid; gap: 28px; max-width: 1120px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) max(20px, env(safe-area-inset-right, 0px)) clamp(16px, 3vw, 32px) max(20px, env(safe-area-inset-left, 0px)); }
@media (min-width: 900px) { .hero-site { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 48px; } }
.deux.en-haut { align-items: start; }
.hero-texte { display: grid; gap: 18px; align-content: center; }
.hero-site h1 { font-size: clamp(2.2rem, 5.6vw, 3.9rem); letter-spacing: -.02em; line-height: 1.04; max-width: 15ch; }
.chapeau { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 52ch; }
.actions { gap: 12px; }
.garanties-courtes { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; font-weight: 600; }
.garanties-courtes li::before { content: "✓"; color: var(--ok); font-weight: 900; margin-right: 6px; }
.ouverture { font-size: .95rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brique); border-radius: 12px; padding: 12px 14px; max-width: 58ch; }
.chiffres-ligne { font-size: .95rem; color: var(--muted); }
.chiffres-ligne b { color: var(--ink); font-size: 1.15rem; }

/* La scène en couches : le mur, la bande peinte, le rouleau, le nuancier, le ruban */
.scene { position: relative; aspect-ratio: 5 / 4; width: 100%; max-width: 560px; justify-self: center; }
.scene .plan { position: absolute; will-change: transform; transition: transform .25s linear; }
.scene .mur { inset: 0; border-radius: 28px; background:
    radial-gradient(120% 90% at 20% 15%, #fffdf8 0%, transparent 55%),
    radial-gradient(90% 70% at 85% 90%, #e7dfd2 0%, transparent 60%),
    linear-gradient(160deg, #f3eee5, #e9e1d4);
  box-shadow: 0 30px 60px var(--shade), inset 0 0 0 1px rgba(255, 255, 255, .6); }
.scene .mur::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .35; background-image: radial-gradient(rgba(120, 100, 80, .18) 1px, transparent 1.2px); background-size: 7px 7px; }
.scene .bande { left: 9%; top: 16%; width: 63%; height: 48%; }
.scene .bande i { position: absolute; inset: 0; border-radius: 18px 26px 22px 30px / 26px 18px 30px 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sauge) 88%, #fff) 0%, var(--sauge) 40%, color-mix(in srgb, var(--sauge) 85%, #000) 100%);
  box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .08); animation: peindre 1.6s var(--ease) .35s both; }
@keyframes peindre { from { clip-path: inset(0 100% 0 0 round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
.scene .rouleau { left: 70%; top: 14%; width: 21%; height: 72%; animation: rouler 1.6s var(--ease) .35s both; filter: drop-shadow(0 14px 18px var(--shade)); }
.scene .rouleau svg { width: 100%; height: 100%; display: block; overflow: visible; }
@keyframes rouler { from { translate: -240% 0; } to { translate: 0 0; } }
.scene .nuancier { left: -4%; bottom: -6%; width: 44%; height: 50%; }
.scene .nuancier span { position: absolute; left: var(--x); bottom: 0; width: 44%; height: 86%; border-radius: 12px; background: #fffdf9; transform: rotate(var(--r)); transform-origin: 20% 100%;
  box-shadow: 0 16px 30px var(--shade), 0 2px 0 rgba(0, 0, 0, .04); overflow: hidden; display: flex; align-items: flex-end; }
.scene .nuancier span::before { content: ""; position: absolute; inset: 8px 8px 34px; border-radius: 7px; background: var(--c); }
.scene .nuancier b { position: relative; font-size: .62rem; font-weight: 800; color: #3a3f3a; padding: 0 9px 10px; line-height: 1.1; }
.scene .ruban { right: 4%; top: 6%; width: 24%; height: 7%; rotate: 32deg; opacity: .9; border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 45%), #7ea6da;
  box-shadow: 0 3px 8px rgba(44, 93, 158, .2); clip-path: polygon(0 12%, 3% 0, 97% 0, 100% 15%, 98% 35%, 100% 55%, 97% 75%, 100% 100%, 3% 100%, 0 82%, 2% 60%, 0 40%); }
@media (max-width: 899px) { .scene { max-width: 460px; } .scene .nuancier { left: 2%; } }

/* Comment ça marche : trois étapes numérotées */
.trois { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: etape; }
@media (min-width: 820px) { .trois { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.trois li { counter-increment: etape; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px 24px; display: grid; gap: 8px; align-content: start; box-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 18px 40px -26px var(--shade); }
.trois li::before { content: counter(etape); font: 800 2.4rem/1 var(--font-display); color: var(--brique); }
.trois b { font-size: 1.1rem; }
.trois span { color: var(--muted); }

/* La teinte : l'avant / après */
.teinte-chip i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .12); }
.chip.teinte-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.avant-apres { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px var(--shade); touch-action: pan-y; user-select: none; cursor: ew-resize; background: var(--papier); }
.avant-apres .calque { position: absolute; inset: 0; }
.avant-apres svg { width: 100%; height: 100%; display: block; }
.avant-apres .m { transition: fill .6s var(--ease); }
.avant-apres .poignee { position: absolute; top: 0; bottom: 0; width: 44px; translate: -50% 0; display: grid; place-items: center; outline-offset: -6px; }
.avant-apres .poignee::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; translate: -50% 0; background: #fffdf9; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.avant-apres .poignee span { position: relative; width: 40px; height: 40px; border-radius: 50%; background: #fffdf9; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.avant-apres .poignee span::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: #2b3238; letter-spacing: 2px; }
.avant-apres .etiquette { position: absolute; top: 12px; font-size: .75rem; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: rgba(255, 253, 249, .9); color: #2b3238; }
.avant-apres .etiquette.g { left: 12px; } .avant-apres .etiquette.d { right: 12px; }

/* Ce que nous vérifions */
.quatre { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.carte-verif { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 8px; align-content: start; box-shadow: 0 18px 40px -28px var(--shade); }
.carte-verif span:not(.pastille) { color: var(--muted); font-size: .95rem; }
.pastille { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--tape); }
.lien-suite { font-weight: 700; }
.suivi { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.suivi li { background: var(--surface); border-radius: 14px; padding: 16px 18px; border: 1px solid var(--line); }

/* Questions fréquentes */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq details p { padding: 0 0 16px; }

/* Apparitions au défilement (coupées si l'appareil demande moins d'animations) */
.apparait { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease) var(--retard, 0ms), translate .7s var(--ease) var(--retard, 0ms); }
.apparait.vu { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .apparait { opacity: 1; translate: none; transition: none; }
  .scene .plan, .scene .bande i, .scene .rouleau { animation: none !important; transition: none; }
}

/* Le pied de page du site */
:root[data-espace="public"] footer.pied { max-width: 1120px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ==========================================================================
   Les guides (guides.js) : formules, erreurs à éviter, prix, mots du métier, vos droits.
   Une colonne de lecture d'environ 70 caractères ; les cartes passent en grille sur grand écran.
   ========================================================================== */
.guide { display: grid; gap: 22px; max-width: 820px; margin: 0 auto; padding-block: clamp(20px, 4vw, 40px); }
.guide h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); max-width: 20ch; }
.guide h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.guide h3 { font-size: 1.12rem; margin-top: 6px; }
.guide h4 { margin: 0; font-size: 1rem; }
.guide p, .guide li, .guide dd { line-height: 1.55; }
.guide ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.guide .msg { background: color-mix(in srgb, var(--tape) 8%, var(--surface)); border-left: 4px solid var(--tape); }
.formule { gap: 14px; }
.formule > .btn { justify-self: start; }
.prix-formule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prix-formule > div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.prix-formule b { font-size: 1.15rem; }
.prix-formule > div:last-child { border-color: var(--tape); }
@media (max-width: 420px) { .prix-formule { grid-template-columns: minmax(0, 1fr); } }
.qui-fait { display: grid; gap: 10px; }
@media (min-width: 700px) { .qui-fait { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qui-fait > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; background: var(--bg); }
.qui-fait p { margin: 0; font-size: .95rem; }
ol.erreurs { margin: 10px 0 0; padding-left: 1.6em; display: grid; gap: 14px; }
ol.erreurs li { display: grid; gap: 3px; }
ol.erreurs li::marker { font-weight: 800; color: var(--brique); }
ol.erreurs span { color: var(--muted); }
ol.erreurs .reflexe { color: var(--ink); }
.lexique { margin: 0; display: grid; gap: 10px; }
.lexique > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.lexique dt { font-weight: 800; }
.lexique dd { margin: 4px 0 0; color: var(--muted); }
.univers-guide { display: grid; gap: 12px; margin-top: 10px; }
@media (min-width: 640px) { .univers-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-autres { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 18px; }
.guide-autres a { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 600; font-size: .93rem; }
.trois-facons { display: grid; gap: 14px; }
@media (min-width: 820px) { .trois-facons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.carte-facon { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 18px 40px -28px var(--shade); transition: transform .2s, border-color .2s; }
.carte-facon:hover { transform: translateY(-2px); border-color: var(--brique); }
.carte-facon b { font-size: 1.1rem; }
.carte-facon span { color: var(--muted); }
.guides-liens a { font-weight: 600; }
footer.pied .pied-guides { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .carte-facon { transition: none; } .carte-facon:hover { transform: none; } }
