/* ==========================================================================
   BR Rénovation Company — charte issue du logo
   Bleu de marque #1D49A7 · Encre #0A0E14 · Blanc
   ========================================================================== */

:root {
  /* Marque */
  --bleu: #1D49A7;
  --bleu-vif: #2A5FD0;
  --bleu-sombre: #163881;
  --bleu-nuit: #0E1D3D;

  /* Encre */
  --encre: #0A0E14;
  --encre-2: #131922;
  --encre-3: #1D2531;

  /* Neutres */
  --blanc: #ffffff;
  --gris-05: #F7F8FA;
  --gris-10: #EDEFF3;
  --gris-20: #DDE1E8;
  --gris-40: #A8B0BD;
  --gris-60: #5F6875;
  --texte: #12171F;
  --texte-doux: #525C6B;

  /* Sur fond sombre */
  --clair-doux: #A9B4C6;
  --trait-sombre: rgba(255, 255, 255, .10);

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --maxw: 1240px;
  --barre-mobile: 64px;
  --entete-h: 78px;

  --ombre-s: 0 1px 2px rgba(10, 14, 20, .06), 0 2px 8px rgba(10, 14, 20, .04);
  --ombre-m: 0 4px 12px rgba(10, 14, 20, .07), 0 12px 32px rgba(10, 14, 20, .07);
  --ombre-l: 0 18px 50px rgba(10, 14, 20, .14);

  --transi: 220ms cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--entete-h) + 16px);
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--texte);
  background: var(--blanc);
  padding-bottom: var(--barre-mobile);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1010px) { body { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); }

.contenu { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.contenu-etroit { max-width: 820px; }

/* ---------- Typographie ---------- */

h1, h2, h3, h4 {
  color: var(--encre);
  margin: 0 0 .55em;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.14;
}

h1 { font-size: clamp(2.05rem, 5.4vw, 3.9rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); margin-top: 0; }
h3 { font-size: 1.16rem; letter-spacing: -.015em; line-height: 1.3; }

p { margin: 0 0 1.15em; }

.surtitre {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; color: var(--bleu); margin-bottom: 18px;
}
.surtitre::before {
  content: ""; width: 26px; height: 2px; background: var(--bleu); display: block;
}
.surtitre-clair { color: #7FA0E4; }
.surtitre-clair::before { background: #7FA0E4; }

.chapo { font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--texte-doux); max-width: 64ch; }
.chapo-clair { color: var(--clair-doux); }

.evitement {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--bleu); color: #fff; padding: 14px 20px; border-radius: 0 0 var(--r-s) 0;
}
.evitement:focus { left: 0; }

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

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- En-tête ---------- */

.entete {
  position: sticky; top: 0; z-index: 120;
  background: rgba(10, 14, 20, .82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--trait-sombre);
  transition: background var(--transi), border-color var(--transi);
}
.entete.condense { background: rgba(10, 14, 20, .96); }

.entete .contenu {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: var(--entete-h);
}

.logo { display: block; flex-shrink: 0; line-height: 0; }
.logo img {
  height: 40px; width: auto;
  transition: height var(--transi);
}
.entete.condense .logo img { height: 34px; }
@media (max-width: 420px) { .logo img { height: 33px; } }

.nav-bascule {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--trait-sombre);
  border-radius: var(--r-s); cursor: pointer; color: #fff;
}
.nav-bascule span {
  position: relative; display: block; width: 19px; height: 1.5px;
  background: currentColor; border-radius: 2px; transition: transform var(--transi), background var(--transi);
}
.nav-bascule span::before, .nav-bascule span::after {
  content: ""; position: absolute; left: 0; width: 19px; height: 1.5px;
  background: currentColor; border-radius: 2px; transition: transform var(--transi);
}
.nav-bascule span::before { top: -6px; }
.nav-bascule span::after { top: 6px; }
.nav-bascule[aria-expanded="true"] span { background: transparent; }
.nav-bascule[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-bascule[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.nav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(10, 14, 20, .98);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--trait-sombre);
  padding: 10px 22px 22px;
  display: none;
}
.nav.ouvert { display: block; animation: deplie 260ms cubic-bezier(.22,.61,.36,1); }
@keyframes deplie { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { border-bottom: 1px solid var(--trait-sombre); }
.nav li:last-child { border: 0; }
.nav a {
  display: block; padding: 15px 2px; color: #E7EBF1;
  text-decoration: none; font-weight: 500; font-size: 1.02rem;
  transition: color var(--transi);
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #7FA0E4; }

@media (min-width: 1010px) {
  .nav-bascule { display: none; }
  .nav {
    display: block; position: static; padding: 0; border: 0;
    background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav ul { display: flex; align-items: center; gap: 4px; }
  .nav li { border: 0; }
  .nav a {
    padding: 9px 14px; font-size: .93rem; border-radius: var(--r-s);
    color: #C3CCDA; position: relative;
  }
  .nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
  .nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
    height: 2px; background: var(--bleu-vif); border-radius: 2px;
  }
  .nav .nav-cta { margin-left: 10px; }
  .nav .nav-cta a {
    background: var(--bleu); color: #fff; padding: 11px 20px; font-weight: 650;
    box-shadow: 0 4px 16px rgba(29, 73, 167, .38);
  }
  .nav .nav-cta a:hover { background: var(--bleu-vif); color: #fff; transform: translateY(-1px); }
  .nav .nav-cta a[aria-current="page"]::after { display: none; }
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: var(--r-s);
  font-weight: 650; font-size: 1rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform var(--transi), background var(--transi), box-shadow var(--transi), color var(--transi), border-color var(--transi);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }

.btn-primaire { background: var(--bleu); color: #fff; box-shadow: 0 6px 22px rgba(29, 73, 167, .34); }
.btn-primaire:hover { background: var(--bleu-vif); box-shadow: 0 10px 30px rgba(29, 73, 167, .44); }

.btn-encre { background: var(--encre); color: #fff; }
.btn-encre:hover { background: var(--encre-3); }

.btn-fantome { background: transparent; color: var(--encre); border-color: var(--gris-20); }
.btn-fantome:hover { border-color: var(--encre); background: var(--gris-05); }

.btn-clair { background: #fff; color: var(--encre); }
.btn-clair:hover { background: var(--gris-10); }

.btn-contour-clair { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-contour-clair:hover { border-color: #fff; background: rgba(255, 255, 255, .09); }

.boutons { display: flex; flex-wrap: wrap; gap: 13px; margin: 1.9em 0 0; }

/* ---------- Héros ---------- */

.heros {
  position: relative; overflow: hidden;
  background: var(--encre);
  color: #fff;
  padding: clamp(64px, 9vw, 116px) 0 clamp(56px, 8vw, 96px);
  isolation: isolate;
}
.heros h1 { color: #fff; max-width: 17ch; }
.heros-compact { padding: clamp(48px, 6vw, 74px) 0 clamp(44px, 6vw, 64px); }
.heros-compact h1 { max-width: 22ch; }

/* Halo bleu */
.heros::after {
  content: ""; position: absolute; z-index: -1;
  width: min(860px, 105vw); height: min(860px, 105vw);
  top: -42%; right: -18%;
  background: radial-gradient(circle, rgba(29, 73, 167, .55) 0%, rgba(29, 73, 167, .16) 42%, transparent 68%);
  pointer-events: none;
}

.heros-inner { position: relative; z-index: 2; }

/* Voile placé entre le plan et le texte, pour garantir la lisibilité du titre */
@media (min-width: 1100px) {
  .heros::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(100deg,
      var(--encre) 0%, rgba(10, 14, 20, .94) 32%,
      rgba(10, 14, 20, .45) 54%, transparent 72%);
  }
}

/* Fond animé : plan d'architecte */
.fond-plan {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: .82;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
}

/* --- Appartement meublé en 3D, en rotation continue --- */

/* Trame technique discrète, en fond */
.fond-plan::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(255,255,255,.045) 59px 60px),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(255,255,255,.045) 59px 60px);
}

.scene-cadre {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0;
  perspective: 1500px;
  transform: translate(-50%, -50%) scale(var(--zoom, 1));
}

/* Le plan est posé à plat, la scène est basculée puis tourne sur elle-même */
.scene {
  position: absolute;
  width: var(--pw); height: var(--ph);
  margin-left: calc(var(--pw) / -2);
  margin-top: calc(var(--ph) / -2);
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(0deg);
  /* la rotation démarre une fois la construction terminée */
  animation: tourne 48s linear var(--rotd, 2.6s) infinite;
}

@keyframes tourne {
  from { transform: rotateX(58deg) rotateZ(0deg); }
  to   { transform: rotateX(58deg) rotateZ(360deg); }
}

/* --- Éléments à plat, posés dans le plan du sol, éventuellement surélevés --- */
.p3-dalle, .p3-plat, .p3-dessus {
  position: absolute; top: 0; left: 0;
  width: var(--w); height: var(--h2);
  transform: translate3d(var(--x), var(--y), var(--z, 0px));
}
.p3-disque {
  position: absolute; top: 0; left: 0;
  width: var(--dm); height: var(--dm); border-radius: 50%;
  transform: translate3d(var(--x), var(--y), var(--z, 0px));
}

.p3-dalle {
  background: rgba(127, 160, 228, .07);
  border: 1px solid rgba(127, 160, 228, .28);
  opacity: 0; animation: apparait .8s ease var(--d) forwards;
}

/* --- Faces verticales : parois des volumes, articulées sur l'arête basse --- */
.p3-face {
  position: absolute; top: 0; left: 0;
  width: var(--w); height: var(--fh);
  transform-origin: 0 100%;
  transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) scaleY(0);
  animation: leveFace .5s cubic-bezier(.22, .61, .36, 1) var(--d) forwards;
}
/* la paroi est légèrement assombrie pour détacher le volume de son dessus */
.p3-face::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 10, 18, .34), rgba(6, 10, 18, .06));
}

/* --- Matières --- */
.m-dalle   { background: rgba(127, 160, 228, .12); }
.m-meuble  { background: rgba(127, 160, 228, .2);  border: 1px solid rgba(150, 180, 240, .45); }
.m-latte   { background: rgba(150, 180, 240, var(--o, .16)); border: 1px solid rgba(170, 195, 245, .3); }
.m-carreau { background: rgba(127, 160, 228, .14); border: 1px solid rgba(170, 195, 245, .38); }
.m-cable   { background: rgba(190, 214, 255, .5);  border: 1px solid rgba(200, 220, 255, .35); }
.m-tuyau   { background: rgba(150, 185, 245, .48); border: 1px solid rgba(180, 205, 250, .4); }
.m-noeud   { background: rgba(157, 186, 240, .85); border: 1px solid rgba(200, 220, 255, .5); }
.m-meuble.doux, .doux { background: rgba(190, 210, 248, .22); border-color: rgba(180, 205, 250, .4); }

/* Le dessus d'un volume est plus clair que ses parois : c'est ce qui donne le relief */
.p3-dessus { filter: brightness(1.35); }
.p3-base   { opacity: .4; }

/* --- Mises en place --- */
.p3-plat, .p3-dessus, .p3-disque { opacity: 0; }

.p3-dessus { animation: monteDessus .5s cubic-bezier(.22, .61, .36, 1) var(--d) forwards; }
.p3-disque { animation: monteDisque .5s cubic-bezier(.22, .61, .36, 1) var(--d) forwards; }
.p3-plat   { animation: apparait .45s ease var(--d) forwards; }

/* Parquet : chaque latte glisse en place */
.p3-plat.m-latte   { animation: poseLatte .42s cubic-bezier(.25, .7, .35, 1) var(--d) forwards; }
/* Carrelage : chaque carreau se dépose */
.p3-plat.m-carreau { animation: poseCarreau .4s cubic-bezier(.3, .8, .4, 1) var(--d) forwards; }

/* Points d'usage : ils pulsent une fois en place */
.p3-disque.m-noeud {
  animation: monteDisque .4s ease var(--d) forwards,
             pulse 2.8s ease-in-out calc(var(--d) + .4s) infinite;
}

/* Chaque mur est un plan redressé, articulé sur son arête basse */
.p3-mur {
  position: absolute; top: 0; left: 0;
  width: var(--w); height: var(--mh, 52px);
  transform-origin: 0 100%;
  transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) scaleY(0);
  background: linear-gradient(to top, rgba(127, 160, 228, .26), rgba(127, 160, 228, .11));
  border-top: 1px solid rgba(196, 216, 255, .55);
  animation: leveMur .8s cubic-bezier(.22, .61, .36, 1) var(--d) forwards;
}

/* Cloisons : trame d'isolant visible dans l'épaisseur */
.p3-cloison {
  background:
    repeating-linear-gradient(56deg, rgba(170,195,245,.22) 0 2px, transparent 2px 9px),
    linear-gradient(to top, rgba(127, 160, 228, .2), rgba(127, 160, 228, .07));
}

/* Peinture : la couleur monte du sol vers le plafond, mur après mur */
.p3-peint {
  position: absolute; inset: 0;
  transform-origin: 50% 100%; transform: scaleY(0);
  background: linear-gradient(to top, rgba(42, 95, 208, .6), rgba(90, 140, 235, .3));
  animation: peint .85s cubic-bezier(.3, .7, .35, 1) var(--d) forwards;
}

@keyframes leveMur {
  from { transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) scaleY(0); }
  to   { transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) scaleY(1); }
}

@keyframes apparait { to { opacity: 1; } }
@keyframes peint    { to { transform: scaleY(1); } }

@keyframes leveFace {
  from { transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) scaleY(0); }
  to   { transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) scaleY(1); }
}
/* le dessus s'élève depuis le sol jusqu'à la hauteur du volume */
@keyframes monteDessus {
  from { opacity: 0; transform: translate3d(var(--x), var(--y), 0); }
  to   { opacity: 1; transform: translate3d(var(--x), var(--y), var(--z)); }
}
@keyframes monteDisque {
  from { opacity: 0; transform: translate3d(var(--x), var(--y), 0) scale(.55); }
  to   { opacity: 1; transform: translate3d(var(--x), var(--y), var(--z)) scale(1); }
}
@keyframes poseLatte {
  from { opacity: 0; transform: translate3d(calc(var(--x) - 10px), var(--y), var(--z)); }
  to   { opacity: 1; transform: translate3d(var(--x), var(--y), var(--z)); }
}
@keyframes poseCarreau {
  from { opacity: 0; transform: translate3d(var(--x), var(--y), calc(var(--z) + 14px)) scale(.5); }
  to   { opacity: 1; transform: translate3d(var(--x), var(--y), var(--z)) scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}

/* Sur mobile le plan reste centré derrière le texte ; sur grand écran il se
   décale à droite pour dégager le titre. */
@media (max-width: 900px) { .scene-cadre { --zoom: .72; } }
@media (max-width: 560px) { .scene-cadre { --zoom: .52; } }
@media (min-width: 1100px) { .scene-cadre { left: 73%; --zoom: .88; } }
@media (min-width: 1440px) { .scene-cadre { left: 72%; --zoom: 1; } }

/* Repères sous le héros */
.heros-reperes {
  list-style: none; padding: 0; margin: 2.6em 0 0;
  display: grid; gap: 14px 26px;
}
.heros-reperes li {
  display: flex; align-items: flex-start; gap: 11px;
  color: #DCE3ED; font-size: .97rem;
}
.heros-reperes svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 2px; fill: #7FA0E4; }
@media (min-width: 720px) { .heros-reperes { grid-template-columns: 1fr 1fr; } }

/* ---------- Bandeau chiffres ---------- */

.bandeau {
  background: var(--encre-2); color: #fff;
  border-top: 1px solid var(--trait-sombre);
  padding: 30px 0;
}
.bandeau ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 26px; text-align: center;
}
.bandeau .valeur {
  display: block; font-size: 1.6rem; font-weight: 800;
  letter-spacing: -.03em; color: #fff; line-height: 1.1;
}
.bandeau .valeur em { font-style: normal; color: #7FA0E4; }
.bandeau .libelle {
  display: block; margin-top: 5px; font-size: .82rem;
  color: var(--clair-doux); letter-spacing: .04em;
}
@media (min-width: 700px) { .bandeau ul { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-grise { background: var(--gris-05); border-top: 1px solid var(--gris-10); border-bottom: 1px solid var(--gris-10); }
.section-sombre { background: var(--encre); color: #fff; }
.section-sombre h2, .section-sombre h3 { color: #fff; }

.entete-section { max-width: 720px; margin-bottom: 46px; }
.entete-section p { margin-bottom: 0; }

/* ---------- Grilles / cartes ---------- */

.grille { display: grid; gap: 20px; }
@media (min-width: 660px) { .grille-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 660px) { .grille-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .grille-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 660px) { .grille-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .grille-4 { grid-template-columns: repeat(4, 1fr); } }

.carte {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--gris-20); border-radius: var(--r-m);
  padding: 30px 28px 28px;
  display: flex; flex-direction: column;
  transition: transform var(--transi), box-shadow var(--transi), border-color var(--transi);
}
.carte::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--bleu), var(--bleu-vif));
  transform: scaleX(0); transform-origin: left;
  transition: transform 320ms cubic-bezier(.22,.61,.36,1);
}
.carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-m); border-color: var(--gris-10); }
.carte:hover::before { transform: scaleX(1); }

.carte h3 { margin-top: 0; }
.carte p { color: var(--texte-doux); font-size: .96rem; flex: 1; margin-bottom: 1.1em; }

.carte-icone {
  width: 46px; height: 46px; border-radius: 11px;
  background: linear-gradient(140deg, rgba(29,73,167,.13), rgba(42,95,208,.07));
  border: 1px solid rgba(29, 73, 167, .16);
  display: grid; place-items: center; margin-bottom: 20px;
}
.carte-icone svg { width: 23px; height: 23px; fill: var(--bleu); }

.lien-fleche {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 650; font-size: .93rem; color: var(--bleu); text-decoration: none;
  margin-top: auto;
}
.lien-fleche svg { width: 15px; height: 15px; fill: currentColor; transition: transform var(--transi); }
.lien-fleche:hover svg { transform: translateX(4px); }

/* Toute la carte est cliquable : le lien s'étend sur la surface entière.
   Un seul lien reste dans le code, donc rien ne change pour le clavier
   ni pour les lecteurs d'écran. */
.carte .lien-fleche::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
}
.carte:focus-within {
  outline: 3px solid var(--bleu-vif); outline-offset: 3px;
  border-color: var(--gris-10);
}
.carte:focus-within::before { transform: scaleX(1); }
/* le halo du lien lui-même devient inutile : c'est la carte qui le porte */
.carte .lien-fleche:focus-visible { outline: none; }

/* Carte sur fond sombre */
.section-sombre .carte {
  background: rgba(255, 255, 255, .035); border-color: var(--trait-sombre);
}
.section-sombre .carte:hover { background: rgba(255, 255, 255, .06); box-shadow: none; }
.section-sombre .carte p { color: var(--clair-doux); }
.section-sombre .carte-icone {
  background: rgba(127, 160, 228, .12); border-color: rgba(127, 160, 228, .22);
}
.section-sombre .carte-icone svg { fill: #7FA0E4; }

/* ---------- Étapes ---------- */

.etapes { list-style: none; counter-reset: e; padding: 0; margin: 0; display: grid; gap: 30px; }
@media (min-width: 860px) { .etapes { grid-template-columns: repeat(4, 1fr); gap: 22px; } }

.etapes li { counter-increment: e; position: relative; padding-top: 62px; }
.etapes li::before {
  content: "0" counter(e);
  position: absolute; top: 0; left: 0;
  font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em;
  color: var(--bleu); line-height: 1;
}
.etapes li::after {
  content: ""; position: absolute; top: 12px; left: 46px; right: -22px; height: 1px;
  background: var(--gris-20);
}
.etapes li:last-child::after { display: none; }
@media (max-width: 859px) { .etapes li::after { display: none; } }
.etapes h3 { margin: 0 0 .45em; font-size: 1.06rem; }
.etapes p { font-size: .94rem; color: var(--texte-doux); margin: 0; }

.section-sombre .etapes li::before { color: #7FA0E4; }
.section-sombre .etapes li::after { background: var(--trait-sombre); }
.section-sombre .etapes p { color: var(--clair-doux); }

/* ---------- Bloc alterné texte / détail ---------- */

.duo { display: grid; gap: 40px; align-items: start; }
@media (min-width: 920px) { .duo { grid-template-columns: 1.05fr .95fr; gap: 64px; } }

.liste-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.liste-check li {
  display: flex; gap: 13px; align-items: flex-start;
  font-size: .98rem; color: var(--texte-doux);
}
.liste-check svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; fill: var(--bleu); }
.liste-check strong { color: var(--texte); font-weight: 650; }

.encadre {
  background: var(--gris-05); border: 1px solid var(--gris-20);
  border-left: 3px solid var(--bleu);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  padding: 26px 28px; margin: 2em 0;
}
.encadre :last-child { margin-bottom: 0; }
.encadre h3 { margin-top: 0; font-size: 1.04rem; }

/* ---------- Communes ---------- */

.communes { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.communes li {
  background: #fff; border: 1px solid var(--gris-20); border-radius: 100px;
  padding: 9px 19px; font-size: .93rem; font-weight: 500;
  transition: border-color var(--transi), color var(--transi), transform var(--transi);
}
.communes li:hover { border-color: var(--bleu); color: var(--bleu); transform: translateY(-2px); }
.section-sombre .communes li {
  background: rgba(255,255,255,.05); border-color: var(--trait-sombre); color: #E7EBF1;
}

/* ---------- Chantier en vidéo ---------- */

.chantier { display: grid; gap: 30px; align-items: center; }
@media (min-width: 880px) { .chantier { grid-template-columns: 330px 1fr; gap: 52px; } }

.chantier-media {
  position: relative;
  border-radius: var(--r-m); overflow: hidden;
  background: var(--encre); border: 1px solid var(--gris-20);
  box-shadow: var(--ombre-m);
  max-width: 330px; margin: 0 auto; width: 100%;
}
.chantier-media video { display: block; width: 100%; height: auto; }

.chantier-legende {
  margin-top: 12px; font-size: .86rem; color: var(--texte-doux);
  text-align: center;
}
@media (min-width: 880px) { .chantier-legende { text-align: left; } }

.chantier-faits { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; gap: 12px; }
@media (min-width: 620px) { .chantier-faits { grid-template-columns: 1fr 1fr; } }
.chantier-faits li {
  border-left: 2px solid var(--gris-20); padding-left: 14px;
  font-size: .93rem; color: var(--texte-doux);
}
.chantier-faits strong { display: block; color: var(--encre); font-weight: 650; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .09em; margin-bottom: 2px; }

/* ---------- Photos de chantier ---------- */

.photos-chantier { display: grid; gap: 20px; margin-top: 2em; }
@media (min-width: 760px) { .photos-chantier { grid-template-columns: 1fr 1fr; gap: 24px; } }

.photos-chantier figure { margin: 0; }
.photos-chantier img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-m); border: 1px solid var(--gris-20);
  background: var(--gris-05);
}
.photos-chantier figcaption {
  margin-top: 12px; font-size: .89rem; color: var(--texte-doux); line-height: 1.5;
}
.photos-chantier figcaption strong {
  display: block; color: var(--encre); font-weight: 650;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 3px;
}

/* ---------- Avis clients ---------- */

.avis-liste { display: grid; gap: 20px; }
@media (min-width: 720px)  { .avis-liste { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .avis-liste { grid-template-columns: repeat(3, 1fr); } }

.avis-carte {
  position: relative;
  background: #fff; border: 1px solid var(--gris-20); border-radius: var(--r-m);
  padding: 28px 26px 24px;
  display: flex; flex-direction: column;
  transition: transform var(--transi), box-shadow var(--transi);
}
.avis-carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-m); }

.avis-etoiles {
  display: flex; gap: 3px; margin-bottom: 16px;
}
.avis-etoiles svg { width: 17px; height: 17px; fill: #E8A33D; }

.avis-carte blockquote {
  margin: 0 0 20px; padding: 0; flex: 1;
  font-size: .98rem; line-height: 1.62; color: var(--texte);
}
.avis-carte blockquote::before { content: "«\00a0"; color: var(--gris-40); }
.avis-carte blockquote::after  { content: "\00a0»"; color: var(--gris-40); }

.avis-signature {
  display: flex; align-items: center; gap: 12px;
  padding-top: 18px; border-top: 1px solid var(--gris-10);
}
.avis-initiale {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(140deg, var(--bleu), var(--bleu-vif));
  color: #fff; font-weight: 700; font-size: .95rem;
  display: grid; place-items: center;
}
.avis-signature cite { font-style: normal; font-weight: 650; font-size: .94rem; color: var(--encre); display: block; }
.avis-signature .avis-meta { font-size: .84rem; color: var(--texte-doux); }

.avis-note {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--gris-20); border-radius: 100px;
  padding: 9px 18px; font-size: .9rem; color: var(--texte-doux);
}
.avis-note strong { color: var(--encre); font-size: 1.05rem; }
.avis-note svg { width: 16px; height: 16px; fill: #E8A33D; }

/* ---------- FAQ ---------- */

.faq { max-width: 860px; }
.faq details {
  border-bottom: 1px solid var(--gris-20);
  background: none;
}
.faq details[open] summary { color: var(--bleu); }
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 1.05rem; color: var(--encre);
  padding: 22px 44px 22px 0; position: relative;
  list-style: none; transition: color var(--transi);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--transi);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--bleu); }
.faq details p { margin: 0 0 22px; color: var(--texte-doux); max-width: 78ch; }

/* ---------- Tableau ---------- */

.tableau-enveloppe { overflow-x: auto; border: 1px solid var(--gris-20); border-radius: var(--r-m); }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: #fff; font-size: .95rem; }
th, td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--gris-10); }
th { background: var(--gris-05); font-weight: 650; color: var(--encre); }
tbody tr:last-child td { border-bottom: 0; }
caption { caption-side: bottom; padding: 14px 4px 0; font-size: .85rem; color: var(--texte-doux); text-align: left; }

/* ---------- Onglets entre prestations ---------- */

.onglets {
  position: sticky; top: var(--entete-h); z-index: 110;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--gris-20);
}
.onglets .contenu { padding-right: 0; }
.onglets ul {
  list-style: none; margin: 0; padding: 0 22px 0 0;
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.onglets ul::-webkit-scrollbar { display: none; }
.onglets li { flex: 0 0 auto; scroll-snap-align: start; }
.onglets a {
  display: block; position: relative;
  padding: 16px 15px; white-space: nowrap;
  font-size: .91rem; font-weight: 550; color: var(--texte-doux);
  text-decoration: none; transition: color var(--transi);
}
.onglets a::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 0;
  height: 2px; background: var(--bleu); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transform-origin: center;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1);
}
.onglets a:hover { color: var(--encre); }
.onglets a:hover::after { transform: scaleX(.55); }
.onglets a[aria-current="page"] { color: var(--bleu); font-weight: 700; }
.onglets a[aria-current="page"]::after { transform: scaleX(1); }

/* Ombre portée pour signaler qu'il reste des onglets à droite */
.onglets::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 1px; width: 46px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.95));
  pointer-events: none;
}
@media (min-width: 1180px) { .onglets::after { display: none; } }

/* ---------- Fil d'ariane ---------- */

.ariane { padding: 15px 0; font-size: .86rem; border-bottom: 1px solid var(--gris-10); background: var(--gris-05); }
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 0; }
.ariane li { color: var(--texte-doux); }
.ariane li:not(:last-child)::after { content: "/"; margin-left: 9px; color: var(--gris-40); }
.ariane a { color: var(--texte-doux); text-decoration: none; }
.ariane a:hover { color: var(--bleu); }

/* ---------- CTA final ---------- */

.cta-final {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--encre); color: #fff;
  padding: clamp(56px, 8vw, 100px) 0; text-align: center;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 100% at 50% 118%, rgba(29, 73, 167, .55), transparent 68%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.028) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.028) 39px 40px);
}
.cta-final h2 { color: #fff; margin-bottom: .35em; }
.cta-final p { color: var(--clair-doux); max-width: 56ch; margin: 0 auto; }
.cta-final .boutons { justify-content: center; }

/* ---------- Formulaire ---------- */

.formulaire { max-width: 680px; }
.formulaire-carte {
  background: #fff; border: 1px solid var(--gris-20); border-radius: var(--r-l);
  padding: clamp(26px, 4vw, 42px); box-shadow: var(--ombre-m);
}
.champ { margin-bottom: 22px; }
.champ label { display: block; font-weight: 650; margin-bottom: 8px; font-size: .95rem; color: var(--encre); }
.champ .aide { display: block; font-weight: 400; color: var(--texte-doux); font-size: .86rem; margin-top: 3px; }
.champ .obl { color: var(--bleu); }

input, select, textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--gris-20); border-radius: var(--r-s);
  background: var(--gris-05); color: var(--texte);
  transition: border-color var(--transi), background var(--transi), box-shadow var(--transi);
}
input:hover, select:hover, textarea:hover { border-color: var(--gris-40); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--bleu); background: #fff;
  box-shadow: 0 0 0 4px rgba(29, 73, 167, .12);
}
textarea { min-height: 140px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235F6875'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 22px;
  padding-right: 42px;
}
input[type="file"] {
  padding: 11px 14px; cursor: pointer;
  border-style: dashed; border-width: 1.5px;
}
input[type="file"]::file-selector-button {
  margin-right: 14px; padding: 9px 16px;
  border: 0; border-radius: var(--r-s); cursor: pointer;
  background: var(--bleu); color: #fff;
  font: inherit; font-size: .9rem; font-weight: 600;
}
input[type="file"]::file-selector-button:hover { background: var(--bleu-vif); }

.champ-cache { position: absolute; left: -9999px; }
.mention-rgpd { font-size: .87rem; color: var(--texte-doux); margin: 0 0 22px; }

/* ---------- Pied de page ---------- */

.pied { background: var(--encre); color: var(--clair-doux); padding: 66px 0 30px; font-size: .94rem; }
.pied a { color: var(--clair-doux); text-decoration: none; transition: color var(--transi); }
.pied a:hover { color: #fff; }
.pied h3 {
  color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .13em;
  margin: 0 0 18px; font-weight: 700;
}
.pied-grille { display: grid; gap: 40px; }
@media (min-width: 800px)  { .pied-grille { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; } }
@media (min-width: 1080px) { .pied-grille { grid-template-columns: 1.5fr 1fr 1fr .9fr 1fr; gap: 36px; } }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 11px; }
.pied-logo img { height: 40px; width: auto; margin-bottom: 20px; }
.pied-marque p { max-width: 34ch; margin-bottom: 20px; }

.pied-social { display: flex; gap: 10px; }
.pied-social a {
  width: 40px; height: 40px; border-radius: var(--r-s);
  border: 1px solid var(--trait-sombre); background: rgba(255,255,255,.04);
  display: grid; place-items: center;
  transition: background var(--transi), border-color var(--transi), transform var(--transi);
}
.pied-social a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); transform: translateY(-2px); }
.pied-social svg { width: 18px; height: 18px; fill: #fff; }

.pied-bas {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--trait-sombre);
  font-size: .85rem; color: var(--gris-60);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
}

/* ---------- Barre mobile ---------- */

.barre-mobile {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 140;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(10, 14, 20, .95);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--trait-sombre);
  padding-bottom: env(safe-area-inset-bottom);
}
.barre-mobile a {
  color: #fff; text-decoration: none; text-align: center;
  padding: 11px 4px; font-size: .76rem; font-weight: 600; letter-spacing: .01em;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.barre-mobile a + a { border-left: 1px solid var(--trait-sombre); }
.barre-mobile a.devis { background: var(--bleu); }
.barre-mobile a.devis:active { background: var(--bleu-vif); }
.barre-mobile svg { width: 20px; height: 20px; fill: currentColor; }
@media (min-width: 1010px) { .barre-mobile { display: none; } }

/* ---------- Révélation au défilement ---------- */

/* Par défaut le contenu est visible : il ne doit jamais dépendre du JS.
   La classe .js n'est posée que si le script s'exécute réellement. */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.vu {
  opacity: 1; transform: none;
  transition: opacity 620ms cubic-bezier(.22,.61,.36,1), transform 620ms cubic-bezier(.22,.61,.36,1);
}
.js .reveal:nth-child(2) { transition-delay: 70ms; }
.js .reveal:nth-child(3) { transition-delay: 140ms; }
.js .reveal:nth-child(4) { transition-delay: 210ms; }
.js .reveal:nth-child(5) { transition-delay: 280ms; }
.js .reveal:nth-child(6) { transition-delay: 350ms; }
.js .reveal:nth-child(7) { transition-delay: 420ms; }
.js .reveal:nth-child(8) { transition-delay: 490ms; }

/* ---------- Accessibilité : mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* Plan figé sur un angle lisible, sans rotation ni construction */
  .scene { animation: none !important; transform: rotateX(58deg) rotateZ(-24deg) !important; }
  .p3-dalle, .p3-plat, .p3-dessus, .p3-disque {
    animation: none !important; opacity: 1 !important;
    transform: translate3d(var(--x), var(--y), var(--z, 0px)) !important;
  }
  .p3-peint { transform: scaleY(1) !important; }
  .p3-mur, .p3-face {
    animation: none !important;
    transform: translate3d(var(--x), var(--y), 0) rotateZ(var(--a)) rotateX(-90deg) !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .carte:hover, .communes li:hover { transform: none !important; }
}
