/* Michel Rénovation · base structurelle (mise en page, composants partagés, boutons flottants, formulaires).
   L'identité (polices, couleurs, balisage, textures) est dans mr.css. */
:root {
  --carbon: #0C0C0D; --graphite: #17181A; --graphite-2: #222326;
  --signal: #F7B500; --light: #FFD54A; --ivory: #F3F0E8; --steel: #9EA3A8; --alert: #D62828;
  /* alias historiques utilisés par les modules et scripts partagés */
  --slate: var(--carbon); --slate-2: var(--graphite); --slate-3: var(--graphite-2); --bone: var(--ivory); --paper: var(--ivory);
  --ink: var(--carbon); --soft: #4c4f53; --stone: var(--steel); --flame: var(--signal); --flame-2: var(--light); --flame-deep: #B88700; --zinc: var(--steel);
  --line-d: rgba(243, 240, 232, .12); --line-l: rgba(12, 12, 13, .14);
  --gutter: clamp(1rem, 4.4vw, 4.6rem);
  --bar: 5.4rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body { margin: 0; background: var(--slate); color: var(--bone); overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--bone); color: var(--ink); padding: .6rem 1rem; }
.skip:focus { top: 1rem; }
.wrap { width: 100%; max-width: 92rem; margin-inline: auto; padding-inline: var(--gutter); }
.line-mask { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
main#contenu { overflow-x: clip; }
[data-reveal] { opacity: 0; transform: translateY(26px); }
.no-js [data-reveal], .reduced [data-reveal] { opacity: 1; transform: none; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

/* ---------- chargement ---------- */
.loader { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; }
.loader__in { display: grid; justify-items: center; gap: 1.4rem; }
.loader__n { font-variant-numeric: tabular-nums; }
.loader__bar { width: 10rem; height: 1px; overflow: hidden; }
.loader__bar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); }
.is-loaded .loader { pointer-events: none; }

/* ---------- curseur ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor__brush { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 0; transition: opacity .3s; }
.cursor.is-brush .cursor__brush { opacity: 1; }
.cursor.is-brush .cursor__dot { opacity: 0; }
.cursor__label { position: absolute; left: 22px; top: 18px; white-space: nowrap; padding: .32rem .55rem; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); }
.cursor.has-label .cursor__label { opacity: 1; transform: none; }

/* ---------- barre et menu ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 80; height: var(--bar); padding: 0 var(--gutter); display: flex; align-items: center; gap: 1.6rem; color: var(--bone); transition: transform .6s var(--ease), background-color .4s, color .4s; }
.bar.is-hidden { transform: translateY(-110%); }
.menu-open .bar { color: var(--bone); transform: none; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.bar__links { display: flex; align-items: center; gap: 1.8rem; }
.bar__links a { text-decoration: none; }
.menu-btn { display: inline-flex; align-items: center; gap: .7rem; background: none; border: 0; cursor: pointer; padding: .4rem 0; }
.menu-btn i { position: relative; width: 1.7rem; height: .7rem; display: block; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-btn i::before { top: 0; } .menu-btn i::after { top: calc(100% - 1.5px); }
.menu-open .menu-btn i::before { top: calc(50% - .75px); transform: rotate(45deg); }
.menu-open .menu-btn i::after { top: calc(50% - .75px); transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 70; clip-path: circle(0% at var(--mx, 95%) var(--my, 3%)); visibility: hidden; transition: clip-path .9s var(--ease-io), visibility 0s .9s; display: grid; grid-template-columns: 1.2fr 1fr; }
.menu-open .menu { clip-path: circle(150% at var(--mx, 95%) var(--my, 3%)); visibility: visible; transition: clip-path .9s var(--ease-io), visibility 0s 0s; }
.menu__in { overflow-y: auto; overscroll-behavior: contain; }
.menu__list { list-style: none; margin: 0; padding: calc(var(--bar) + 3vh) var(--gutter) 4vh; display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.menu__list li { overflow: hidden; }
.menu__list a { display: flex; align-items: baseline; gap: 1rem; text-decoration: none; transition: color .35s, transform .6s var(--ease); }
.menu__side { position: relative; overflow: hidden; }
.menu__side figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s var(--ease); }
.menu__side figure.is-on { opacity: 1; }
.menu__side img, .menu__side video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.menu__contact { position: absolute; z-index: 2; left: 2rem; right: 2rem; bottom: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.menu__contact a { text-decoration: none; }
.menu__mobile-extra { display: none; }

/* ---------- comparateur ---------- */
.cmp { position: relative; overflow: hidden; aspect-ratio: var(--ar, 4 / 3); --seam: 100%; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp picture { position: absolute; inset: 0; }
.cmp__before { clip-path: inset(0 calc(100% - var(--seam)) 0 0); }
.cmp__seam { position: absolute; top: 0; bottom: 0; left: var(--seam); width: 2px; margin-left: -1px; z-index: 2; }
.cmp__knob { position: absolute; z-index: 4; left: var(--seam); top: 50%; width: 3.4rem; height: 3.4rem; margin: -1.7rem 0 0 -1.7rem; border: 0; padding: 0; display: grid; place-items: center; cursor: ew-resize; }
.cmp__knob svg { width: 1.5rem; height: 1.5rem; }
.cmp__tag { position: absolute; top: 1rem; z-index: 3; }
.cmp__tag--b { left: 1rem; } .cmp__tag--a { right: 1rem; }

/* ---------- formulaires ---------- */
.fld { display: grid; gap: .45rem; }
.fld input, .fld select, .fld textarea { height: 3.2rem; padding: 0 1rem; width: 100%; min-width: 0; }
.fld textarea { height: auto; padding: .85rem 1rem; min-height: 7rem; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; }
.full { grid-column: 1 / -1; }
.wizard fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; min-width: 0; }
.wizard fieldset[hidden] { display: none; }
.wizard legend { padding: 0; }
.wizard .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; cursor: pointer; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; }
.consent input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; }
.wizard__nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.wizard__back { background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .3em; }
.recap { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.4rem; margin: 0; }
.recap dd { margin: 0; }
.steps-nav { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: .2rem; }
.steps-nav li { display: flex; align-items: center; gap: .9rem; padding: .45rem 0; transition: color .3s; }
.steps-nav li::before { content: ""; width: .5rem; height: .5rem; transform: rotate(45deg); border: 1px solid currentColor; transition: background .3s, transform .4s var(--ease); }
.steps-nav li.is-on::before { transform: rotate(45deg) scale(1.4); }

/* ---------- recherche de commune et carte ---------- */
.search { position: relative; margin-top: 2.4rem; max-width: 30rem; }
.search label { display: block; margin-bottom: .7rem; }
.search input { width: 100%; height: 3.8rem; padding: 0 1.3rem; }
.suggest { list-style: none; margin: .5rem 0 0; padding: .4rem; position: absolute; left: 0; right: 0; z-index: 5; max-height: 17rem; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest li { padding: .7rem .9rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; }
.zone__out { margin-top: 2rem; min-height: 5.5rem; }
.map { position: relative; }
.map svg { width: 100%; height: auto; overflow: visible; }
.map .dot { cursor: pointer; transition: opacity .25s; }
.map .ring, .m-ring { fill: none; transform-box: fill-box; transform-origin: center; animation: ring 2.8s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.map__tip { position: absolute; pointer-events: none; padding: .3rem .6rem; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.map__tip.on { opacity: 1; }
.v-map svg { width: 100%; height: auto; display: block; }
.m-trip { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease-io) .2s; }
.v-map.is-on .m-trip { stroke-dashoffset: 0; }

/* ---------- boutons flottants ---------- */
.fabs { position: fixed; inset: auto 0 0 0; z-index: 65; pointer-events: none; opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.fabs.is-in { opacity: 1; transform: none; }
.menu-open .fabs { opacity: 0; pointer-events: none; }
.fabs > *, .fab-r > * { pointer-events: auto; }
.fab-meteo { position: fixed; left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 2.3rem auto; grid-template-rows: auto auto; column-gap: .65rem; align-items: center; padding: .45rem 1.1rem .45rem .5rem; cursor: pointer; text-align: left; transition: border-color .3s, transform .5s var(--ease); }
.fab-meteo:hover { transform: translateY(-2px); }
.fab-meteo__ico { grid-row: 1 / 3; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; }
.fab-meteo__ico svg { width: 1.6rem; height: 1.6rem; }
.fab-r { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .7rem; align-items: flex-end; }
.fab-btn { position: relative; height: 3.5rem; min-width: 3.5rem; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: transform .5s var(--ease), padding .5s var(--ease); }
.fab-btn svg { width: 1.4rem; height: 1.4rem; flex: none; }
.fab-btn:hover { transform: translateY(-2px); }
.fab-call { padding: 0 1.05rem; gap: 0; overflow: hidden; }
.fab-call__n { max-width: 0; opacity: 0; white-space: nowrap; transition: max-width .55s var(--ease), opacity .3s, margin .55s var(--ease); }
.fab-call:hover .fab-call__n, .fab-call:focus-visible .fab-call__n { max-width: 9rem; opacity: 1; margin-left: .7rem; }
.fab-badge { position: absolute; top: -.2rem; right: -.2rem; width: 1.3rem; height: 1.3rem; font-style: normal; font-size: .7rem; font-weight: 700; display: grid; place-items: center; transition: transform .4s var(--ease); }
.fab-chat.is-seen .fab-badge { transform: scale(0); }
.fab-panel { position: fixed; bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 4.6rem); width: min(25rem, calc(100vw - 2rem)); overflow: hidden; transform-origin: bottom center; }
.fab-panel[hidden] { display: none; }
.fab-panel--meteo { left: max(1rem, env(safe-area-inset-left)); }
.fab-panel--chat { right: max(1rem, env(safe-area-inset-right)); bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 8.8rem); height: min(34rem, calc(100svh - 12rem)); display: flex; flex-direction: column; }
.fab-panel--chat[hidden] { display: none; }
.mt { padding: 1.3rem; display: grid; gap: 1.1rem; }
.mt__now { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .9rem; align-items: center; }
.mt__ico { width: 3.4rem; height: 3.4rem; display: grid; place-items: center; }
.mt__ico svg { width: 2.4rem; height: 2.4rem; }
.mt__now span, .mt__now small { display: block; }
.mt__days { list-style: none; margin: 0; padding: .8rem 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.mt__days li { display: grid; justify-items: center; gap: .15rem; font-size: .8rem; }
.mt__days svg { width: 1.7rem; height: 1.7rem; }
.mt__tip { display: grid; gap: .55rem; padding: 1rem 1.05rem 1.1rem; }
.mt__tip .btn { justify-self: start; }
.chat__head { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: .8rem; align-items: center; padding: 1rem 1rem 1rem 1.1rem; }
.chat__head img { width: 2.6rem; height: auto; }
.chat__head span { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; }
.chat__head span i { width: .45rem; height: .45rem; border-radius: 50%; background: #4CC38A; box-shadow: 0 0 0 3px rgba(76, 195, 138, .18); }
.chat__x { width: 2.2rem; height: 2.2rem; background: none; display: grid; place-items: center; cursor: pointer; }
.chat__x svg { width: 1rem; height: 1rem; }
.chat__log { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .55rem; overscroll-behavior: contain; scrollbar-width: thin; }
.msg { max-width: 86%; padding: .7rem .95rem; font-size: .93rem; line-height: 1.45; }
.msg--bot { align-self: flex-start; }
.msg--me { align-self: flex-end; }
.msg--typing { display: flex; gap: .3rem; padding: .85rem 1rem; }
.msg--typing i { width: .42rem; height: .42rem; border-radius: 50%; animation: typing 1s infinite ease-in-out; }
.msg--typing i:nth-child(2) { animation-delay: .15s; } .msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem .8rem; }
.chat__chips:empty { display: none; }
.chat__chips button { background: none; padding: .45rem .8rem; font-size: .82rem; cursor: pointer; transition: background .25s, color .25s; }
.chat__in { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .8rem; }
.chat__in input { height: 2.9rem; padding: 0 1.1rem; font-size: 16px; min-width: 0; }
.chat__in input:focus { outline: none; }
.chat__in button { width: 2.9rem; height: 2.9rem; border: 0; display: grid; place-items: center; cursor: pointer; }
.chat__in button svg { width: 1.2rem; height: 1.2rem; }

@media (max-width: 860px) {
  :root { --bar: 4.4rem; }
  .menu { grid-template-columns: 1fr; }
  .menu__side { display: none; }
  .menu__list { justify-content: flex-start; padding-top: calc(var(--bar) + 1.5rem); min-height: 0; }
  .menu__mobile-extra { display: grid; gap: .4rem; padding: 1.6rem var(--gutter) 2.4rem; }
  .wizard .row { grid-template-columns: 1fr; }
  .fab-meteo { padding: .35rem .85rem .35rem .4rem; grid-template-rows: auto; }
  .fab-meteo__l { display: none; }
  .fab-meteo__ico { grid-row: auto; }
  .fab-r { flex-direction: row-reverse; align-items: center; }
  .fab-btn { height: 3.2rem; min-width: 3.2rem; }
  .fab-call { padding: 0 .9rem; }
  .fab-panel, .fab-panel--meteo, .fab-panel--chat { left: .6rem; right: .6rem; width: auto; bottom: calc(max(.6rem, env(safe-area-inset-bottom)) + 4.2rem); }
  .fab-panel--chat { height: min(34rem, calc(100svh - 9rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .map .ring, .m-ring { animation: none; }
  .m-trip { transition: none; stroke-dashoffset: 0; }
  * { scroll-behavior: auto !important; }
}
