/* Fenua Renov · base structurelle (mise en page, composants partagés, boutons flottants, formulaires).
   L'identité (polices, couleurs, houles, frises, ondes de tôle, reflets) est dans fr.css. */
:root {
  /* palette Fenua Renov : le lagon et la tôle */
  --fr-night: #0B2545; --fr-night-2: #0E2C52; --fr-night-3: #13365F; --fr-abyss: #071A33;
  --fr-lagoon: #1FA2C9; --fr-sky: #6EC6F2; --fr-turq: #2EC4B6; --fr-red: #E0633F; --fr-red-2: #F08A66; --fr-red-deep: #C24A28; --fr-rose: #E0633F; --fr-rose-deep: #C24A28; --fr-rose-soft: #F9D3C4;
  --fr-pearl: #FBFAF6; --fr-sand: #F3E9D7; --fr-sand-2: #EADBC1; --fr-green: #1F6F50;
  --fr-ink: #0B2545; --fr-soft: #4D5F73; --fr-mist: #A9C3D6;
  --line-d: rgba(251, 250, 246, .14); --line-l: rgba(11, 37, 69, .14);
  --gutter: clamp(1rem, 4.4vw, 4.6rem);
  --bar: 5.2rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  color-scheme: light;
}
*, *::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(--fr-pearl); color: var(--fr-ink); 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(--fr-turq); 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(--fr-pearl); color: var(--fr-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__dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; transform: rotate(45deg); transition: transform .35s var(--ease), opacity .3s; mix-blend-mode: difference; }
.cursor.is-link .cursor__dot { transform: rotate(45deg) scale(4); opacity: .85; }
.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(--fr-pearl); transition: transform .6s var(--ease), background-color .4s, color .4s; }
.bar.is-hidden { transform: translateY(-110%); }
.menu-open .bar { color: var(--fr-pearl); 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.45fr .8fr; }
.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: 0; display: grid; }
.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 a { text-decoration: 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); }

/* ---------- 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; }
  .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) {
  * { scroll-behavior: auto !important; }
}
