/* ============================================================
   fx.css - couche d'effets conversion (20 effets)
   Ajoute 2026-06-23. Theme-aware : reutilise les variables du
   design system (--red, --brass, --green, --ink, --paper, --r).
   Tout est prefixe .fx- pour ne rien casser de l'existant.
   ============================================================ */

:root{
  /* auto-theme : prend --red (sites commune-v2) sinon --accent (sites gen_landing) sinon defaut */
  --fx-red: var(--red, var(--accent, #E5402E));
  --fx-red-dk: var(--red-dk, var(--accent-2, var(--accent, #C22A1A)));
  --fx-red-glow: var(--red-glow, rgba(var(--accent-rgb, 229,64,46), .45));
  --fx-brass: var(--brass, var(--accent, #E6B45A));
  --fx-green: var(--green, #37D399);
  --fx-ink: var(--ink, #141110);
  --fx-paper: var(--paper, #F4EFE7);
  --fx-r: var(--r, 14px);
  --fx-ease: cubic-bezier(.22,1,.36,1);
}

/* ---------- 11. Apparition au scroll (notre propre reveal) ---------- */
.fx-reveal{opacity:0;transform:translateY(22px);
  transition:opacity .7s var(--fx-ease),transform .7s var(--fx-ease)}
.fx-reveal.fx-in{opacity:1;transform:none}
.fx-reveal.d1{transition-delay:.08s}
.fx-reveal.d2{transition-delay:.16s}
.fx-reveal.d3{transition-delay:.24s}

/* ---------- 4. Hero Ken Burns (zoom lent du fond) ---------- */
.hero-bg{overflow:hidden}
.fx-kenburns{animation:fx-kenburns 22s ease-in-out infinite alternate;will-change:transform}
@keyframes fx-kenburns{from{transform:scale(1)}to{transform:scale(1.08)}}

/* ---------- 1 & 16. Bouton d'appel : pulse + icone qui vibre ---------- */
.fx-pulse{position:relative;isolation:isolate}
.fx-pulse::after{content:"";position:absolute;inset:0;border-radius:inherit;z-index:-1;
  box-shadow:0 0 0 0 var(--fx-red-glow);animation:fx-pulse 2.2s var(--fx-ease) infinite}
@keyframes fx-pulse{0%{box-shadow:0 0 0 0 var(--fx-red-glow)}
  70%{box-shadow:0 0 0 14px rgba(229,64,46,0)}100%{box-shadow:0 0 0 0 rgba(229,64,46,0)}}
.fx-ring{display:inline-block;animation:fx-ring 1.8s ease-in-out infinite;transform-origin:60% 60%}
@keyframes fx-ring{0%,72%,100%{transform:rotate(0)}76%{transform:rotate(-13deg)}
  80%{transform:rotate(11deg)}84%{transform:rotate(-9deg)}88%{transform:rotate(7deg)}92%{transform:rotate(-4deg)}}

/* ---------- 17. Ripple au tap ---------- */
.fx-ripple{position:absolute;border-radius:50%;transform:scale(0);pointer-events:none;
  background:rgba(255,255,255,.45);animation:fx-ripple .6s ease-out forwards;z-index:5}
@keyframes fx-ripple{to{transform:scale(2.6);opacity:0}}

/* ---------- 14. Barre de progression de lecture ---------- */
.fx-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:9000;
  background:linear-gradient(90deg,var(--fx-brass),var(--fx-red));
  box-shadow:0 0 8px var(--fx-red-glow);transition:width .1s linear}

/* ---------- 20. FAB click-to-call ---------- */
.fx-fab{position:fixed;right:18px;bottom:18px;z-index:8500;display:flex;align-items:center;
  gap:10px;text-decoration:none;padding:14px 18px 14px 14px;border-radius:999px;
  background:var(--fx-red);color:#fff;font-weight:800;font-size:15px;line-height:1;
  box-shadow:0 10px 30px rgba(0,0,0,.28),0 0 0 0 var(--fx-red-glow);
  transform:translateY(120px) scale(.9);opacity:0;
  transition:transform .45s var(--fx-ease),opacity .45s var(--fx-ease),background .25s;
  animation:fx-fabpulse 2.4s var(--fx-ease) infinite}
.fx-fab.fx-show{transform:none;opacity:1}
.fx-fab svg{width:22px;height:22px;flex:0 0 auto}
.fx-fab .fx-fab-ico{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;
  background:rgba(255,255,255,.18)}
.fx-fab:hover{background:var(--fx-red-dk);transform:translateY(-2px)}
@keyframes fx-fabpulse{0%{box-shadow:0 10px 30px rgba(0,0,0,.28),0 0 0 0 var(--fx-red-glow)}
  70%{box-shadow:0 10px 30px rgba(0,0,0,.28),0 0 0 16px rgba(229,64,46,0)}
  100%{box-shadow:0 10px 30px rgba(0,0,0,.28),0 0 0 0 rgba(229,64,46,0)}}
@media(min-width:900px){.fx-fab .fx-fab-txt{display:inline}}

/* ---------- 2. Barre d'appel collante (mobile) ---------- */
.fx-callbar{position:fixed;left:0;right:0;bottom:0;z-index:8400;display:flex;gap:10px;
  align-items:center;padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:rgba(20,17,16,.92);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  border-top:1px solid rgba(255,255,255,.10);transform:translateY(110%);
  transition:transform .4s var(--fx-ease)}
.fx-callbar.fx-show{transform:none}
.fx-callbar .fx-cb-info{flex:1;min-width:0;color:#fff;line-height:1.15}
.fx-callbar .fx-cb-info b{display:block;font-size:14px;font-weight:800}
.fx-callbar .fx-cb-info span{font-size:11.5px;color:var(--fx-green);font-weight:700}
.fx-callbar .fx-cb-btn{flex:0 0 auto;display:flex;align-items:center;gap:8px;
  background:var(--fx-red);color:#fff;font-weight:800;font-size:15px;text-decoration:none;
  padding:12px 18px;border-radius:999px}
.fx-callbar .fx-cb-btn svg{width:20px;height:20px}
.fx-callbar.fx-urgent .fx-cb-btn{background:var(--fx-red);animation:fx-pulse 1.3s infinite}
@media(min-width:900px){.fx-callbar{display:none}}
/* sur mobile, on remonte le FAB pour ne pas chevaucher la barre */
@media(max-width:899px){.fx-fab{display:none}}

/* ---------- Module 5 etoiles Google (a gauche de la callbar mobile) ---------- */
.fx-cb-rating{flex:0 0 auto;display:flex;flex-direction:column;gap:2px;color:#fff;line-height:1;padding-right:4px}
.fx-cb-rating .fx-cb-rtop{display:flex;align-items:center;gap:5px}
.fx-cb-rating .fx-g{width:15px;height:15px;flex:0 0 auto}
.fx-cb-rating .fx-cb-stars{display:inline-flex;gap:1px}
.fx-cb-rating .fx-cb-stars svg{width:11px;height:11px;fill:#FBBC05}
.fx-cb-rating b{font-size:13px;font-weight:800;color:#fff}
.fx-cb-rating small{font-size:9.5px;color:var(--fx-steel,#A39A8E);font-weight:600;letter-spacing:.2px}
/* sur ecran tres etroit, on masque le bloc texte central pour laisser la place */
@media(max-width:440px){.fx-callbar .fx-cb-info{display:none}}

/* ---------- Bouton "rappel" compact dans la callbar ---------- */
.fx-cb-rappel{flex:0 0 auto;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;
  border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.06);color:#fff;cursor:pointer}
.fx-cb-rappel svg{width:21px;height:21px}

/* ---------- Second FAB "Etre rappele" (desktop) ---------- */
.fx-fab2{position:fixed;right:20px;bottom:84px;z-index:8499;display:flex;align-items:center;gap:8px;
  text-decoration:none;padding:11px 16px;border-radius:999px;font-weight:700;font-size:13.5px;cursor:pointer;
  background:#fff;color:var(--fx-ink);border:1px solid rgba(0,0,0,.10);
  box-shadow:0 8px 24px rgba(0,0,0,.18);transform:translateY(120px);opacity:0;
  transition:transform .45s var(--fx-ease) .06s,opacity .45s var(--fx-ease) .06s,background .2s}
.fx-fab2.fx-show{transform:none;opacity:1}
.fx-fab2:hover{background:var(--fx-paper)}
.fx-fab2 svg{width:18px;height:18px;color:var(--fx-red)}
@media(max-width:899px){.fx-fab2{display:none}}

/* ---------- Modal "rappel gratuit" ---------- */
.fx-rappel{position:fixed;inset:0;z-index:9600;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(10,8,7,.62);backdrop-filter:blur(4px);
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}
.fx-rappel.fx-show{opacity:1;visibility:visible}
.fx-rappel-card{position:relative;max-width:400px;width:100%;background:var(--fx-paper);border-radius:20px;
  padding:28px 24px 24px;box-shadow:0 30px 80px rgba(0,0,0,.4);
  transform:translateY(16px) scale(.97);transition:transform .35s var(--fx-ease)}
.fx-rappel.fx-show .fx-rappel-card{transform:none}
.fx-rappel-card .fx-exit-x{position:absolute;top:10px;right:12px;border:0;background:transparent;font-size:26px;
  line-height:1;color:var(--fx-mut,#6A6157);cursor:pointer}
.fx-rappel-card h3{font-size:21px;line-height:1.18;margin:0 0 6px;color:var(--fx-ink)}
.fx-rappel-card p{font-size:14px;color:var(--fx-txt,#211B15);margin:0 0 16px;line-height:1.45}
.fx-rform{display:flex;gap:8px}
.fx-rform input{flex:1;min-width:0;padding:14px 14px;border-radius:12px;border:1px solid rgba(0,0,0,.16);
  font-size:16px;font-family:inherit;background:#fff;color:var(--fx-ink)}
.fx-rform input:focus{outline:none;border-color:var(--fx-red);box-shadow:0 0 0 3px var(--fx-red-glow)}
.fx-rform button{flex:0 0 auto;border:0;cursor:pointer;background:var(--fx-red);color:#fff;font-weight:800;
  font-size:15px;padding:14px 18px;border-radius:12px}
.fx-rform button:disabled{opacity:.6}
.fx-rappel-hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.fx-rappel-note{margin:12px 0 0;font-size:11.5px;color:var(--fx-mut,#6A6157);text-align:center}
.fx-rappel-ok{text-align:center;padding:10px 0}
.fx-rappel-ok .fx-rok-ico{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;
  background:rgba(55,211,153,.16);color:#1c7a57}
.fx-rappel-ok .fx-rok-ico svg{width:30px;height:30px}
.fx-rappel-ok h3{margin:0 0 6px}
.fx-rappel-alt{display:inline-flex;align-items:center;gap:7px;margin-top:14px;font-size:13px;font-weight:700;
  color:var(--fx-ink);text-decoration:none}
.fx-rappel-alt svg{width:16px;height:16px;color:var(--fx-red);flex:0 0 auto}

/* ---------- 3. ETA en direct (chip "serrurier a ~X min") ---------- */
.fx-eta{display:inline-flex;align-items:center;gap:8px;padding:7px 13px;border-radius:999px;
  background:rgba(55,211,153,.12);border:1px solid rgba(55,211,153,.30);
  color:var(--fx-green);font-weight:700;font-size:13px;margin:0 0 14px}
.fx-eta .fx-dot{width:8px;height:8px;border-radius:50%;background:var(--fx-green);
  box-shadow:0 0 0 0 rgba(55,211,153,.6);animation:fx-livedot 1.6s infinite}
.fx-eta b{color:#fff;font-weight:800}
@keyframes fx-livedot{0%{box-shadow:0 0 0 0 rgba(55,211,153,.6)}
  70%{box-shadow:0 0 0 7px rgba(55,211,153,0)}100%{box-shadow:0 0 0 0 rgba(55,211,153,0)}}
/* sur fond clair, l'ETA reste lisible */
.fx-eta.fx-eta-light{background:rgba(55,211,153,.14);color:#1c7a57}
.fx-eta.fx-eta-light b{color:var(--fx-ink)}

/* ---------- 7. Toasts "appels recents" ---------- */
.fx-toast{position:fixed;left:14px;bottom:84px;z-index:8300;max-width:300px;
  display:flex;gap:11px;align-items:center;padding:11px 14px;border-radius:var(--fx-r);
  background:#fff;color:var(--fx-ink);box-shadow:0 12px 34px rgba(0,0,0,.20);
  border:1px solid rgba(0,0,0,.06);transform:translateX(-120%);opacity:0;
  transition:transform .5s var(--fx-ease),opacity .5s var(--fx-ease)}
.fx-toast.fx-show{transform:none;opacity:1}
.fx-toast .fx-t-ico{flex:0 0 auto;width:38px;height:38px;border-radius:50%;display:grid;
  place-items:center;background:rgba(55,211,153,.16);color:#1c7a57}
.fx-toast .fx-t-ico svg{width:20px;height:20px}
.fx-toast .fx-t-txt{line-height:1.25;font-size:13px}
.fx-toast .fx-t-txt b{display:block;font-size:13.5px;font-weight:800}
.fx-toast .fx-t-txt small{color:var(--fx-mut,#6A6157);font-size:11.5px}
@media(max-width:899px){.fx-toast{bottom:76px;left:10px;max-width:74vw}}

/* ---------- 6. Etoiles Google qui se remplissent ---------- */
.fx-star{position:relative;display:inline-block;color:rgba(0,0,0,.16)}
.fx-star .fx-star-fill{position:absolute;left:0;top:0;width:0;overflow:hidden;
  color:var(--fx-brass);transition:width .4s var(--fx-ease)}
.fx-stars.fx-in .fx-star .fx-star-fill{width:100%}
.fx-stars.fx-in .fx-star:nth-child(2) .fx-star-fill{transition-delay:.10s}
.fx-stars.fx-in .fx-star:nth-child(3) .fx-star-fill{transition-delay:.20s}
.fx-stars.fx-in .fx-star:nth-child(4) .fx-star-fill{transition-delay:.30s}
.fx-stars.fx-in .fx-star:nth-child(5) .fx-star-fill{transition-delay:.40s}

/* ---------- 12. Cartes services : hover-lift + zoom image ---------- */
.svc .card,.svc-grid>*{transition:transform .3s var(--fx-ease),box-shadow .3s var(--fx-ease)}
.svc .card:hover,.svc-grid>*:hover{transform:translateY(-6px);
  box-shadow:0 18px 40px rgba(0,0,0,.14)}
.svc .card img,.svc-grid img{transition:transform .5s var(--fx-ease)}
.svc .card:hover img,.svc-grid>*:hover img{transform:scale(1.05)}

/* ---------- 10. Zone couverte : pin qui pulse ---------- */
.fx-geopulse{position:relative;display:inline-grid;place-items:center}
.fx-geopulse::before{content:"";position:absolute;width:14px;height:14px;border-radius:50%;
  background:var(--fx-red);box-shadow:0 0 0 0 var(--fx-red-glow);animation:fx-geo 2s infinite}
@keyframes fx-geo{0%{box-shadow:0 0 0 0 var(--fx-red-glow)}
  70%{box-shadow:0 0 0 22px rgba(229,64,46,0)}100%{box-shadow:0 0 0 0 rgba(229,64,46,0)}}

/* ---------- 19. Pop-up exit-intent ---------- */
.fx-exit{position:fixed;inset:0;z-index:9500;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(10,8,7,.62);backdrop-filter:blur(4px);
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}
.fx-exit.fx-show{opacity:1;visibility:visible}
.fx-exit-card{position:relative;max-width:420px;width:100%;background:var(--fx-paper);
  border-radius:20px;padding:30px 26px 26px;text-align:center;
  box-shadow:0 30px 80px rgba(0,0,0,.4);transform:translateY(16px) scale(.97);
  transition:transform .35s var(--fx-ease)}
.fx-exit.fx-show .fx-exit-card{transform:none}
.fx-exit-card .fx-exit-x{position:absolute;top:10px;right:12px;border:0;background:transparent;
  font-size:26px;line-height:1;color:var(--fx-mut,#6A6157);cursor:pointer}
.fx-exit-badge{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:800;
  color:#fff;background:var(--fx-red);padding:5px 12px;border-radius:999px;margin-bottom:14px}
.fx-exit-card h3{font-size:23px;line-height:1.15;margin:0 0 8px;color:var(--fx-ink)}
.fx-exit-card p{font-size:14.5px;color:var(--fx-txt,#211B15);margin:0 0 18px;line-height:1.45}
.fx-exit-call{display:flex;align-items:center;justify-content:center;gap:10px;
  background:var(--fx-red);color:#fff;font-weight:800;font-size:19px;text-decoration:none;
  padding:15px 22px;border-radius:999px;box-shadow:0 12px 30px var(--fx-red-glow)}
.fx-exit-call svg{width:22px;height:22px}
.fx-exit-card .fx-exit-sub{margin:12px 0 0;font-size:12px;color:var(--fx-mut,#6A6157)}

/* ---------- 18. Mode urgence (recoloration CTA) ---------- */
.fx-fab.fx-urgent{background:var(--fx-red);animation:fx-fabpulse 1.2s infinite}
.fx-fab.fx-urgent .fx-fab-txt::after{content:" URGENCE"}

/* ---------- Matrice : grille "autres prestations" ---------- */
.osvc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:8px}
.osvc{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;
  border-radius:var(--fx-r);background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.10);
  color:#fff;text-decoration:none;font-weight:700;font-size:15px;
  transition:transform .25s var(--fx-ease),background .25s,border-color .25s}
.osvc:hover{transform:translateY(-3px);background:rgba(229,64,46,.10);border-color:var(--fx-red)}
.osvc .ar{color:var(--fx-red);font-weight:800;transition:transform .2s}
.osvc:hover .ar{transform:translateX(4px)}

/* ---------- Accessibilite : on coupe tout si l'utilisateur le demande ---------- */
@media(prefers-reduced-motion:reduce){
  .fx-kenburns,.fx-pulse::after,.fx-ring,.fx-fab,.fx-eta .fx-dot,.fx-geopulse::before,
  .fx-fab.fx-urgent{animation:none!important}
  .fx-reveal{opacity:1!important;transform:none!important}
}

/* === idees appels (1 tellink / 7 icone qui sonne / 27 callbar 2 actions) === */
.tellink{color:inherit;text-decoration:none;white-space:nowrap;font-weight:inherit}
/* idee 7 : reutilise .fx-ring (applique par fx.js a tous les boutons d'appel) */
/* callbar mobile : 2 actions claires Appeler | Rappel */
.fx-callbar .fx-cb-btn{flex:1 1 auto;justify-content:center;min-width:0}
.fx-callbar .fx-cb-rappel{width:auto;height:44px;display:flex;align-items:center;gap:6px;padding:0 14px;border-radius:12px;font-weight:800;font-size:13px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);color:#fff}
.fx-callbar .fx-cb-rappel span{display:inline;white-space:nowrap}
.fx-callbar .fx-cb-rappel svg{width:19px;height:19px}
.fx-callbar .fx-cb-btn span{white-space:nowrap}
@media(max-width:430px){.fx-callbar .fx-cb-rating{display:none}}
@media(max-width:360px){.fx-callbar .fx-cb-rappel span{display:none}.fx-callbar .fx-cb-rappel{padding:0;width:44px;justify-content:center}}

/* === barre d'appel HAUTE mobile (diagnostic conversion 2026-06-27) === */
.fx-topcall{display:none}
@media(max-width:760px){
  .fx-topcall{position:fixed;top:0;left:0;right:0;z-index:8500;display:flex;align-items:center;justify-content:center;gap:8px;height:48px;background:var(--fx-red,#E5402E);color:#fff;font-weight:800;font-size:16px;text-decoration:none;box-shadow:0 3px 12px rgba(0,0,0,.3)}
  .fx-topcall .fx-tc-ic{display:inline-grid;place-items:center}
  .fx-topcall svg{width:20px;height:20px;stroke:#fff}
  .fx-topcall .fx-tc-lbl{font-weight:700}
  .fx-topcall b{font-weight:800;letter-spacing:.2px}
  .fx-topcall .fx-tc-dot{width:9px;height:9px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.6);animation:fx-tc-pulse 1.6s infinite}
  @keyframes fx-tc-pulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.6)}70%{box-shadow:0 0 0 9px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
  html.fx-hastop body{padding-top:48px}
  html.fx-hastop nav{top:48px}
}
@media(max-width:360px){.fx-topcall .fx-tc-lbl{display:none}}
