/* ═══════════════════════════════════════════════════════════════
   EBISU · egp-boost.css · correctifs mobile, simulateurs, tunnel,
   animations. Chargé en dernier, ne touche pas aux styles existants
   autrement que par surcharge ciblée.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Mobile : plus aucun débordement horizontal ─────────────── */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video, iframe { max-width: 100%; }
@media (max-width: 768px) {
  .btn-gold { white-space: normal; max-width: 100%; text-align: center; box-sizing: border-box; }
  nav#main-nav, nav { padding-left: 1.25rem !important; padding-right: 1.25rem !important; gap: .75rem; }
  nav .nav-cta { display: none !important; }              /* la barre du pouce prend le relais */
  nav .lang-switcher { margin-left: auto; }
  nav .nav-hamburger { margin-left: 0 !important; flex: none; }
  section[style*="padding:5rem 5rem"], section[style*="padding: 5rem 5rem"] { padding: 3.5rem 1.5rem !important; }
  section[style*="padding:12rem 5rem 8rem"] { padding: 7rem 1.5rem 3.5rem !important; }
  section[style*="padding:8rem 5rem"] { padding: 4rem 1.5rem !important; }
  div[style*="padding:0.75rem 5rem"] { padding: .6rem 1.5rem !important; }
  div[style*="grid-template-columns:1fr 1fr"], div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; gap: 2rem !important; }
  div[style*="padding:3rem"][style*="border:1px solid"] { padding: 1.5rem !important; }
  .produit-header { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .produit-grid { grid-template-columns: 1fr !important; gap: 2.5rem !important; }
  .sim-body { grid-template-columns: 1fr !important; }
  .sim-cta-wrap .btn-gold { display: block; }
  h1, h2 { overflow-wrap: anywhere; }
}

/* ── 2. Barre du pouce : bilan, WhatsApp, appel ────────────────── */
.sticky-mobile-cta { padding: 0 !important; background: var(--deep, #13141A) !important; border-top: 1px solid rgba(184,153,90,.35); box-shadow: 0 -6px 24px rgba(0,0,0,.45) !important; }
.sticky-mobile-cta .egp-bar { display: flex; align-items: stretch; padding-bottom: env(safe-area-inset-bottom); }
.sticky-mobile-cta .egp-bar a, .sticky-mobile-cta .egp-bar button { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; background: transparent; border: 0; border-right: 1px solid rgba(184,153,90,.18); color: var(--gold-lt, #D4BC8A); font-family: var(--sans, 'DM Sans', sans-serif); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; text-decoration: none; cursor: pointer; width: auto; }
.sticky-mobile-cta .egp-bar > *:last-child { border-right: 0; }
.sticky-mobile-cta .egp-bar .egp-main { background: var(--gold, #B8995A); color: var(--ink, #0B0C0F); font-weight: 600; flex: 1.4; }
.sticky-mobile-cta .egp-bar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sticky-mobile-cta .egp-bar [data-egp-wa] { color: #25D366; }
.sticky-mobile-cta .egp-bar [data-egp-wa] .egp-wa-logo, .egp-cta-wa .egp-wa-logo, .egs-btn .egp-wa-logo { width: 20px; height: 20px; stroke: none; fill: currentColor; }
@media (max-width: 768px) { body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); } }

/* ── 3. WhatsApp flottant (ordinateur) ─────────────────────────── */
.egp-wa { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 390; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .3s ease; text-decoration: none; }
.egp-wa:hover { transform: translateY(-2px) scale(1.04); }
.egp-wa svg { width: 30px; height: 30px; }
.egp-wa span { position: absolute; right: 66px; white-space: nowrap; background: var(--deep, #13141A); color: var(--gold-lt, #D4BC8A); font-family: var(--sans, sans-serif); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; padding: .55rem .9rem; border: 1px solid rgba(184,153,90,.3); opacity: 0; transform: translateX(6px); transition: all .3s; pointer-events: none; }
.egp-wa:hover span { opacity: 1; transform: none; }
@media (max-width: 768px) { .egp-wa { display: none; } }
/* Chat HubSpot (bulle en bas à droite) : le bouton WhatsApp se place au-dessus sur ordinateur, la bulle remonte au-dessus de la barre du pouce sur mobile */
@media (min-width: 769px) { .egp-wa { bottom: 6.6rem; } }
@media (max-width: 768px) { #hubspot-messages-iframe-container { bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important; } }
.egp-cta-wa { display: inline-flex; align-items: center; gap: .6rem; border: 1px solid #25D366; color: #25D366; padding: .85rem 2rem; text-decoration: none; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--sans, sans-serif); }
.egp-cta-wa svg { width: 18px; height: 18px; }
.egp-cta-wa:hover { background: #25D366; color: #fff; }

/* ── 4. Simulateurs (moteur commun) ────────────────────────────── */
.egs { position: relative; background: var(--deep, #13141A); border: 1px solid rgba(184,153,90,.25); padding: clamp(1.6rem, 4vw, 3.5rem); margin: 3.5rem 0 0; color: rgba(255,255,255,.9); overflow: hidden; }
.egs::before { content: ""; position: absolute; top: -120px; right: -120px; width: 380px; height: 380px; background: radial-gradient(circle, rgba(184,153,90,.09) 0%, transparent 70%); pointer-events: none; }
.produit-dark .egs, .egs.egs--light { background: var(--charcoal, #1E1F27); }
.egs-eyebrow { font-family: var(--sans, sans-serif); font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold, #B8995A); margin-bottom: .8rem; }
.egs-title { font-family: var(--serif, Georgia, serif); font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.15; color: #fff; margin: 0 0 .8rem; }
.egs-title em { font-style: italic; color: var(--gold-lt, #D4BC8A); }
.egs-sub { font-family: var(--sans, sans-serif); font-size: .85rem; line-height: 1.8; color: rgba(255,255,255,.55); max-width: 620px; margin: 0 0 2rem; }
.egs-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 880px) { .egs-body { grid-template-columns: 1fr; } }
.egs-field { padding: 1rem 0; border-top: 1px solid rgba(184,153,90,.15); }
.egs-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-family: var(--sans, sans-serif); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: .5rem; }
.egs-field output { font-family: var(--serif, serif); font-size: 1.35rem; color: var(--gold-lt, #D4BC8A); white-space: nowrap; font-variant-numeric: tabular-nums; }
.egs-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.egs-range::-webkit-slider-runnable-track { height: 2px; background: rgba(184,153,90,.3); }
.egs-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold, #B8995A); border: 3px solid var(--deep, #13141A); margin-top: -11px; box-shadow: 0 0 0 1px rgba(184,153,90,.6); }
.egs-range::-moz-range-track { height: 2px; background: rgba(184,153,90,.3); }
.egs-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold, #B8995A); border: 3px solid var(--deep, #13141A); }
.egs-seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.egs-seg button { min-height: 42px; padding: .5rem .9rem; background: transparent; border: 1px solid rgba(184,153,90,.3); color: rgba(255,255,255,.6); font-family: var(--sans, sans-serif); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: all .25s; }
.egs-seg button[aria-pressed="true"] { background: var(--gold, #B8995A); color: var(--ink, #0B0C0F); border-color: var(--gold, #B8995A); }
.egs-result { position: sticky; top: 5.5rem; background: rgba(11,12,15,.6); border: 1px solid rgba(184,153,90,.2); padding: clamp(1.3rem, 3vw, 2.2rem); display: grid; gap: 1.1rem; }
.egs-big-label { font-family: var(--sans, sans-serif); font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold, #B8995A); }
.egs-big { font-family: var(--serif, serif); font-weight: 300; font-size: clamp(2.8rem, 6vw, 4.4rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.egs-big small { font-size: .38em; color: var(--gold-lt, #D4BC8A); margin-left: .3rem; }
.egs-mini { width: 100%; height: auto; display: block; }
.egs-mini path { fill: none; stroke: var(--gold, #B8995A); stroke-width: 2; }
.egs-mini .ghost { stroke: rgba(255,255,255,.25); }
.egs-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; height: 110px; align-items: end; }
.egs-bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: .4rem; }
.egs-bar i { display: block; background: rgba(255,255,255,.14); flex: 0 0 var(--h, 10%); min-height: 3px; transition: flex-basis .8s cubic-bezier(.22,1,.36,1); }
.egs-bar i.hi { background: var(--gold, #B8995A); }
.egs-bar b { font-family: var(--sans, sans-serif); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); font-weight: 500; }
.egs-kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5.5rem, auto); gap: .45rem 1rem; font-family: var(--sans, sans-serif); font-size: .8rem; color: rgba(255,255,255,.55); padding-top: 1rem; border-top: 1px solid rgba(184,153,90,.15); }
.egs-kv em { font-style: normal; color: #fff; text-align: right; font-variant-numeric: tabular-nums; }
.egs-cap { display: grid; gap: .55rem; padding-top: 1.1rem; border-top: 1px solid rgba(184,153,90,.15); }
.egs-cap p { margin: 0; font-family: var(--sans, sans-serif); font-size: .74rem; color: rgba(255,255,255,.6); }
.egs-cap input { width: 100%; min-height: 48px; padding: .6rem .9rem; background: rgba(255,255,255,.04); border: 1px solid rgba(184,153,90,.3); color: #fff; font-family: var(--sans, sans-serif); font-size: .9rem; box-sizing: border-box; }
.egs-cap input::placeholder { color: rgba(255,255,255,.3); }
.egs-cap .egs-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
@media (max-width: 480px) { .egs-cap .egs-row2 { grid-template-columns: 1fr; } }
.egs-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.egs-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .7rem 1.4rem; background: var(--gold, #B8995A); color: var(--ink, #0B0C0F); border: 1px solid var(--gold, #B8995A); font-family: var(--sans, sans-serif); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .25s; }
.egs-btn:hover { background: var(--gold-lt, #D4BC8A); }
.egs-btn svg { width: 16px; height: 16px; flex: none; }
.egs-btn[data-wa] { background: #25D366; border-color: #25D366; color: #fff; }
.egs-btn[data-wa]:hover { background: #1EBE5A; }
.egs-btn--line { background: transparent; color: var(--gold-lt, #D4BC8A); }
.egs-btn--line:hover { background: rgba(184,153,90,.12); }
.egs-note { font-family: var(--sans, sans-serif); font-size: .7rem; color: rgba(255,255,255,.45); min-height: 1em; }
.egs-exits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .6rem; margin-top: 1.8rem; }
.egs-exit { display: grid; gap: .35rem; padding: 1.1rem 1.2rem; border: 1px solid rgba(184,153,90,.22); color: #fff; text-decoration: none; transition: all .3s; cursor: pointer; background: transparent; text-align: left; font-family: inherit; }
.egs-exit:hover { border-color: var(--gold, #B8995A); background: rgba(184,153,90,.06); }
.egs-exit b { font-family: var(--serif, serif); font-weight: 400; font-size: 1.15rem; color: #fff; }
.egs-exit span { font-family: var(--sans, sans-serif); font-size: .76rem; line-height: 1.6; color: rgba(255,255,255,.55); }
.egs-exit em { font-style: normal; font-family: var(--sans, sans-serif); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold, #B8995A); }
.egs-legal { font-family: var(--sans, sans-serif); font-size: .66rem; line-height: 1.7; color: rgba(255,255,255,.35); margin: 1.4rem 0 0; }
/* capture greffée sous l'ancien simulateur PER */
.per-simulateur .egs-cap { margin-top: 1.5rem; }
.per-simulateur .egs-exits { margin-top: 1.4rem; }
.per-simulateur .egs-legal { text-align: center; }

/* ── 5. Animations d'apparition ────────────────────────────────── */
.egp-rise { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); transition-delay: var(--egp-d, 0s); will-change: opacity, transform; }
.egp-rise.egp-in { opacity: 1; transform: none; }
.egp-line { position: relative; }
.egp-line::after { content: ""; position: absolute; left: 0; bottom: -.6rem; width: 56px; height: 1px; background: var(--gold, #B8995A); transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.22,1,.36,1) .25s; }
.egp-in.egp-line::after { transform: scaleX(1); }
.egp-count { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .egp-rise { opacity: 1; transform: none; transition: none; } .egp-line::after { transform: none; } }

/* ── 6. Actualités : état du flux ──────────────────────────────── */
.egp-news-state { font-family: var(--sans, sans-serif); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.35); margin-top: .6rem; }
.egp-news-state i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold, #B8995A); margin-right: .5rem; animation: egp-pulse 2s infinite; }
@keyframes egp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── 7. Barre haute : plus de retours à la ligne sur ordinateur ── */
@media (min-width: 769px) { nav .nav-links a, nav .nav-cta, nav .logo-sub, nav .top-nav-btn { white-space: nowrap; } nav .nav-links { flex-wrap: nowrap; } }

/* ── 8. Cartes « Nos solutions » (accueil raccourci) ───────────── */
.egp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 2px; }
.egp-card { position: relative; display: grid; gap: .8rem; align-content: start; padding: 2.2rem 1.8rem 1.8rem; background: var(--surface-card, rgba(255,255,255,.025)); border: 1px solid var(--gold-border-subtle, rgba(184,153,90,.12)); text-decoration: none; color: inherit; transition: border-color .35s, transform .35s, background .35s; overflow: hidden; }
.egp-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold, #B8995A); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.egp-card:hover { border-color: var(--gold-border, rgba(184,153,90,.25)); background: var(--surface-hover, rgba(255,255,255,.04)); transform: translateY(-3px); }
.egp-card:hover::after { transform: scaleX(1); }
.egp-card .n { font-family: var(--serif, serif); font-style: italic; font-size: 1.1rem; color: var(--gold, #B8995A); }
.egp-card h3 { margin: 0; font-family: var(--serif, serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; color: var(--text-primary, #fff); }
.egp-card p { margin: 0; font-family: var(--sans, sans-serif); font-size: .8rem; line-height: 1.8; color: var(--text-secondary, rgba(255,255,255,.55)); }
.egp-card .go { margin-top: auto; padding-top: .8rem; display: flex; gap: 1.2rem; flex-wrap: wrap; font-family: var(--sans, sans-serif); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-lt, #D4BC8A); }
.egp-card .go span::after { content: " ›"; }
.produit-section.egp-light .egp-card h3 { color: var(--ink, #0B0C0F); }
.produit-section.egp-light .egp-card p { color: var(--mid, #6E7080); }
.produit-section.egp-light .egp-card { background: #fff; border-color: rgba(184,153,90,.25); }
.service-tile[data-href] { cursor: pointer; }
.service-tile[data-href]:hover .service-name { color: var(--gold-lt, #D4BC8A); }
@media (min-width: 769px) and (max-width: 1750px) {
  nav .nav-links { gap: 1.15rem; }
  nav .nav-links a[data-i18n="nav-services"] { display: none; }   /* les cartes « Nos solutions » couvrent ce lien */
  nav .nav-app-btn span, nav .mode-label { display: none; }
}
@media (min-width: 769px) and (max-width: 1250px) { nav .nav-links { gap: .9rem; } nav .nav-links a { font-size: .6rem; } }
@media (min-width: 769px) and (max-width: 1120px) { nav .nav-app-btn, nav .mode-toggle { display: none; } }

/* ── 9. « Ce qui se passe ensuite », au-dessus des boutons de rendez-vous ── */
.egp-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.2rem 2rem; max-width: 900px; margin: 0 auto 2.2rem; text-align: left; }
.egp-next b { display: block; font-family: var(--serif, serif); font-weight: 400; font-size: 1.15rem; color: var(--gold-lt, #D4BC8A); margin-bottom: .3rem; }
.egp-next span { display: block; font-family: var(--sans, sans-serif); font-size: .8rem; line-height: 1.7; color: rgba(255,255,255,.55); }
