/* ═══ EREM — couche « pubs » : formulaire du hero, barre mobile, petites finitions ═══ */

/* Hero : texte à gauche, formulaire à droite (desktop) ; formulaire sous le titre (mobile) */
.hero-inner--form { gap: 32px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1100px) {
  .hero { justify-content: center; }
  .hero-inner--form { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: end; gap: 64px; }
  .hero-inner--form .hero-title { font-size: clamp(52px, 6vw, 92px); }
}
@media (max-width: 1099px) {
  .hero-inner--form .hero-ctas, .hero-inner--form .hero-badges { display: none; }
  .hero-inner--form .hero-title { font-size: clamp(40px, 10vw, 64px); }
}

.hero-form { position: relative; z-index: 2; }
.hf {
  background: var(--bg-primary);
  color: var(--ink-primary);
  border-radius: 6px;
  padding: 28px 26px 22px;
  box-shadow: 0 30px 60px -30px rgba(3, 10, 22, .6);
}
.hf-title { font-size: 28px; line-height: 1.1; margin: 0; color: var(--ink-primary); }
.hf-title em { color: var(--accent-warm); font-style: italic; }
.hf-sub { margin: 8px 0 18px; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.hf-need { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hf-need legend { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; padding: 0; }
.hf-need label { position: relative; }
.hf-need input { position: absolute; opacity: 0; pointer-events: none; }
.hf-need span {
  display: flex; align-items: center; min-height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 4px; background: #fff;
  font-size: 14px; color: var(--ink-secondary); cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.hf-need input:checked + span { border-color: var(--ink-primary); background: var(--ink-primary); color: #fff; }
.hf-need input:focus-visible + span { outline: 2px solid var(--accent-warm); outline-offset: 2px; }
.hf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 420px) { .hf-row { grid-template-columns: 1fr; } }
.hf-field span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.hf-field input {
  width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; font: inherit; font-size: 15px; color: var(--ink-primary);
}
.hf-field input:focus { outline: none; border-color: var(--ink-primary); }
.hf-field input.is-ok { border-color: var(--accent-green); }
.hf-hp { position: absolute; left: -9999px; }
.hf-submit { width: 100%; justify-content: center; min-height: 52px; }
.hf-micro { margin: 10px 0 0; font-size: 12px; text-align: center; color: var(--ink-muted); }
.hf-msg { margin: 8px 0 0; font-size: 13px; min-height: 1em; }
.hf-msg a { color: inherit; font-weight: 600; }
.hf.is-sent .hf-need, .hf.is-sent .hf-row, .hf.is-sent .hf-submit, .hf.is-sent .hf-micro, .hf.is-sent .hf-sub { display: none; }
.hf.is-sent .hf-msg { font-size: 15px; line-height: 1.55; }
.hf-google { display: block; margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, .86); text-decoration: none; }
.hf-google strong { color: #fff; font-size: 15px; }
.hf-google span { color: var(--accent-warm); letter-spacing: 2px; }

/* Boutons du hero sur fond vidéo */
.hero .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* Barre mobile : ajout WhatsApp */
.cbw-bar .cbw-bar-wa { color: #7fd6a5 !important; border: 1px solid rgba(127, 214, 165, .4) !important; background: none !important; }

/* Bandeau cookies compact sur mobile : ne doit jamais masquer le formulaire */
@media (max-width: 720px) {
  .cookie-banner { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); gap: 10px; flex-wrap: nowrap; }
  .cookie-banner-text { flex: 1 1 auto; font-size: 12px; line-height: 1.45; }
  .cookie-banner-text a { display: none; }
  .cookie-banner .btn, .cookie-banner button { padding: 8px 12px !important; font-size: 12px !important; min-height: 0 !important; white-space: nowrap; }
}

/* Section « un seul interlocuteur » : tableau éditorial, les lignes se tracent, la colonne EREM s'allume */
.us-grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; }
@media (min-width: 1000px) { .us-grid { grid-template-columns: 5fr 6fr; } }
.us-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; }
.us-micro { font-size: 13px; color: var(--ink-on-dark-muted); }
.us-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px 0; font-size: 16px; line-height: 1.5; }
.us-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-dark); transform-origin: left; transform: scaleX(0); transition: transform 900ms cubic-bezier(.2,.8,.2,1); }
.us-head { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding-top: 0; }
.us-head::after { background: rgba(200, 168, 119, .6); }
.us-row span:first-child { color: var(--ink-on-dark-muted); }
.us-row span:last-child { color: #fff; opacity: .35; transform: translateX(-8px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.8,.2,1); }
.us-head span:last-child { color: var(--accent-warm); }
.us-table.rv-in .us-row::after { transform: scaleX(1); }
.us-table.rv-in .us-row span:last-child { opacity: 1; transform: none; }
.us-table.rv-in .us-row:nth-child(2)::after, .us-table.rv-in .us-row:nth-child(2) span:last-child { transition-delay: 200ms; }
.us-table.rv-in .us-row:nth-child(3)::after, .us-table.rv-in .us-row:nth-child(3) span:last-child { transition-delay: 400ms; }
.us-table.rv-in .us-row:nth-child(4)::after, .us-table.rv-in .us-row:nth-child(4) span:last-child { transition-delay: 600ms; }
.us-table.rv-in .us-row:nth-child(5)::after, .us-table.rv-in .us-row:nth-child(5) span:last-child { transition-delay: 800ms; }
@media (max-width: 600px) { .us-row { grid-template-columns: 1fr; gap: 6px; } .us-head span:first-child { display: none; } .us-row span:first-child { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .us-row::after { transform: none; transition: none; } .us-row span:last-child { opacity: 1; transform: none; transition: none; } }

/* Photos : révélation par rideau au scroll (une seule fois) */
.js-reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms cubic-bezier(.65,0,.35,1); }
.js-reveal-img.is-shown { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .js-reveal-img { clip-path: none; transition: none; } }

/* « Quatre étapes » : plan de chantier animé dans la colonne fixe (desktop) */
.ap-plan { display: none; }
@media (min-width: 901px) {
  .ap-plan { display: grid; grid-template-columns: 140px 1fr; gap: 36px; align-items: center; margin-top: 44px; }
}
.ap-art { position: relative; width: 140px; height: 140px; border: 1px solid var(--line-dark); border-radius: 50%; }
.ap-art::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed rgba(200, 168, 119, .18); animation: apSpin 60s linear infinite; }
@keyframes apSpin { to { transform: rotate(360deg); } }
.ap-art svg { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; fill: none; stroke: var(--accent-warm); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 400ms ease; }
.ap-art svg * { stroke-dasharray: 260; stroke-dashoffset: 260; }
.ap-art svg.on { opacity: 1; }
.ap-art svg.on * { animation: apDraw 1400ms cubic-bezier(.65, 0, .35, 1) forwards; }
.ap-art svg.on *:nth-child(2) { animation-delay: 150ms; }
.ap-art svg.on *:nth-child(3) { animation-delay: 300ms; }
.ap-art svg.on *:nth-child(4) { animation-delay: 450ms; }
.ap-art svg.on *:nth-child(5) { animation-delay: 600ms; }
@keyframes apDraw { to { stroke-dashoffset: 0; } }
.ap-rail { position: relative; list-style: none; margin: 0; padding: 0 0 0 26px; }
.ap-rail::before, .ap-rail i { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line-dark); }
.ap-rail i { background: var(--accent-warm); transform-origin: top; transform: scaleY(var(--p, 0)); transition: transform 200ms linear; }
.ap-rail li { position: relative; padding: 9px 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .38); transition: color 400ms ease; }
.ap-rail li::before { content: ""; position: absolute; left: -26px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: var(--bg-dark); transition: background 400ms ease, border-color 400ms ease, box-shadow 400ms ease; }
.ap-rail li.done { color: rgba(255, 255, 255, .7); }
.ap-rail li.done::before { background: var(--accent-warm); border-color: var(--accent-warm); }
.ap-rail li.on { color: #fff; }
.ap-rail li.on::before { box-shadow: 0 0 0 5px rgba(200, 168, 119, .18); }
@media (prefers-reduced-motion: reduce) {
  .ap-art::before { animation: none; }
  .ap-art svg * { stroke-dashoffset: 0; animation: none !important; }
}

/* ═══ Motion design site-wide ═══ */
/* Vidéo de fond sur les héros des pages intérieures */
.hv-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
video.hv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1200ms ease; }
.hv-on video.hv { opacity: .62; }
.hv-on > img { opacity: 0 !important; transition: opacity 1200ms ease; }
.ab-hero-bg.hv-on::after, .rf-hero-bg.hv-on::after, .ct-hero-bg.hv-on::after { background: linear-gradient(90deg, rgba(11,30,56,.92) 0%, rgba(11,30,56,.72) 50%, rgba(11,30,56,.45) 100%), linear-gradient(180deg, rgba(11,30,56,.2) 0%, rgba(11,30,56,.75) 100%) !important; }
.tce-hero-img.hv-on video.hv, .sol-hero-media.hv-on video.hv { opacity: 1; }
.hv-bg.hv-on video.hv { opacity: .75; }

/* Titres : révélation mot par mot (masque) */
.mw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .14em; margin: 0 -.04em -.14em; }
.mw > span { display: inline-block; transform: translateY(110%); animation: mwUp 1000ms cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d, 0ms); }
@keyframes mwUp { to { transform: none; } }

/* Photos vivantes : léger zoom + décalage au scroll */
.img-live { will-change: transform; transition: transform 120ms linear; }

@media (prefers-reduced-motion: reduce) {
  video.hv { display: none; }
  .hv-on > img { opacity: 1 !important; }
  .mw > span { transform: none; animation: none; }
  .img-live { transform: none !important; }
}

/* Les colonnes « sticky » (Quatre étapes…) ne tenaient pas : overflow-x:hidden sur body crée un conteneur de défilement.
   overflow-x:clip coupe aussi le débordement horizontal sans casser position:sticky. */
html, body { overflow-x: clip !important; overflow-y: visible !important; }
#unSeul .reveal-up { transition-duration: 700ms; }
.no-loader #loader { display: none !important; }
