/* /modules/gateway — passerelle IA. Étend les jetons de modules.css (.mx-store).
   Un seul moment fort : le schéma de routage (module → passerelle → palier), animé par classes
   (.is-live posée par modules-gateway.js quand il est visible), statique sous prefers-reduced-motion. */
.gwl-hero,.gwl-tiers,.gwl-how,.gwl-topup,.gwl-faq,#capacites{--gw-night:#1b2834;--gw-night-2:#243443;--gw-wire:#3b5063;--gw-good:#2f7d4f;--gw-amber:var(--mx-amber,#f5a524)}
.gwl-hero{display:grid;gap:44px;padding-top:64px;padding-bottom:40px}
.gwl-hero__copy{max-width:760px}
.gwl-state{display:inline-flex;align-items:center;gap:9px;margin:0 0 22px;font-size:13px;font-weight:600;color:var(--mx-ink)}
.gwl-state span{width:9px;height:9px;border-radius:50%;background:var(--gw-amber);box-shadow:0 0 0 4px #f5a52433}
.gwl-state--on span{background:var(--gw-good);box-shadow:0 0 0 4px #2f7d4f2e}
.gwl-hero h1{margin:0 0 20px;font-size:clamp(36px,5.2vw,64px);line-height:1.02;letter-spacing:-.045em;color:var(--mx-ink)}
.gwl-lead{max-width:640px;margin:0 0 28px;font-size:17px;line-height:1.65;color:#4b5866}
.gwl-actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px}
.gwl-actions .mx-button{gap:14px}
.gwl-note{margin:18px 0 0;font-size:13px;color:var(--mx-muted)}
.gwl-disabled{background:#e4e8ee;color:#4b5565!important;box-shadow:none;cursor:not-allowed;pointer-events:none}

/* Schéma de routage */
.gwl-route{margin:0;padding:34px 34px 26px;border-radius:22px;background:radial-gradient(120% 140% at 0% 0%,var(--gw-night-2) 0%,var(--gw-night) 58%);color:#e8edf2;box-shadow:0 30px 60px -40px #17212bcc}
.gwl-route__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(44px,90px) minmax(0,1.15fr) minmax(56px,110px) minmax(0,1.15fr);align-items:center}
.gwl-node{display:grid;gap:4px;padding:18px 18px 16px;border-radius:14px;border:1px solid #3a4e61;background:#223140}
.gwl-node__kicker{font-size:12px;color:#9fb0c1}
.gwl-node strong{font:600 17px/1.25 "Space Grotesk",sans-serif;color:#fff;letter-spacing:-.01em}
.gwl-node small{font-size:12.5px;color:#b9c6d3}
.gwl-node--core{border-color:var(--gw-amber);background:#16212c;box-shadow:0 0 0 6px #f5a52414}
.gwl-ledger{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.gwl-ledger li{display:flex;align-items:center;gap:9px;padding:6px 9px;border-radius:8px;font-size:13px;color:#c5d0db}
.gwl-ledger li:before{content:'';flex:none;width:7px;height:7px;border-radius:50%;background:#5d7387}
.gwl-wire{display:block;width:100%;overflow:visible}
.gwl-wire--in{height:10px}
.gwl-wire--fan{height:100%;min-height:210px;align-self:stretch}
.gwl-wire path{fill:none}
.gwl-wire__base{stroke:var(--gw-wire);stroke-width:2;transition:stroke .3s}
.gwl-wire__packet{stroke:var(--gw-amber);stroke-width:5;stroke-linecap:round;stroke-dasharray:.07 2;stroke-dashoffset:.07;opacity:0}
.gwl-route[data-lane=low] .gwl-wire__base.gwl-fan--low,.gwl-route[data-lane=mid] .gwl-wire__base.gwl-fan--mid,.gwl-route[data-lane=high] .gwl-wire__base.gwl-fan--high{stroke:#8a6a2e}
.gwl-lanes{list-style:none;margin:0;padding:0;display:grid;grid-template-rows:repeat(3,1fr);gap:10px;align-self:stretch}
.gwl-lane{display:grid;align-content:center;gap:2px;padding:10px 14px;border-radius:12px;border:1px dashed #4a6075;background:#1f2d3a;transition:border-color .3s,background-color .3s}
.gwl-lane.is-on{border-style:solid;border-color:#3f6f58}
.gwl-lane__tier{font-size:12px;font-weight:600;color:var(--gw-amber)}
.gwl-lane strong{font:500 14.5px/1.3 "IBM Plex Mono",monospace;color:#fff;overflow-wrap:anywhere}
.gwl-lane small{font-size:12px;color:#a9b8c6}
.gwl-lane.is-on small{color:#8fd3ad}
.gwl-route[data-lane=low] .gwl-lane[data-lane=low],.gwl-route[data-lane=mid] .gwl-lane[data-lane=mid],.gwl-route[data-lane=high] .gwl-lane[data-lane=high]{border-color:var(--gw-amber);background:#2a3540}
.gwl-route figcaption{margin:22px 0 0;max-width:720px;font-size:13px;line-height:1.6;color:#aebccb}
/* Une demande toutes les 6 s : entrée (0–18 %), réservation, appel vers le palier (30–50 %), rapprochement. */
.gwl-route.is-live .gwl-wire--in .gwl-wire__packet{opacity:1;animation:gwl-in 6s linear infinite}
.gwl-route.is-live[data-lane=low] .gwl-wire__packet.gwl-fan--low,.gwl-route.is-live[data-lane=mid] .gwl-wire__packet.gwl-fan--mid,.gwl-route.is-live[data-lane=high] .gwl-wire__packet.gwl-fan--high{opacity:1;animation:gwl-out 6s linear infinite}
.gwl-route.is-live .gwl-ledger li:nth-child(1){animation:gwl-reserve 6s infinite}
.gwl-route.is-live .gwl-ledger li:nth-child(2){animation:gwl-call 6s infinite}
.gwl-route.is-live .gwl-ledger li:nth-child(3){animation:gwl-settle 6s infinite}
.gwl-route.is-live[data-lane=low] .gwl-lane[data-lane=low],.gwl-route.is-live[data-lane=mid] .gwl-lane[data-lane=mid],.gwl-route.is-live[data-lane=high] .gwl-lane[data-lane=high]{animation:gwl-lane 6s infinite}
@keyframes gwl-in{0%{stroke-dashoffset:.07}18%,100%{stroke-dashoffset:-1}}
@keyframes gwl-out{0%,30%{stroke-dashoffset:.07}50%,100%{stroke-dashoffset:-1}}
@keyframes gwl-reserve{0%,13%,34%,100%{background:transparent;color:#c5d0db}16%,31%{background:#f5a52424;color:#fff}}
@keyframes gwl-call{0%,31%,62%,100%{background:transparent;color:#c5d0db}34%,59%{background:#f5a52424;color:#fff}}
@keyframes gwl-settle{0%,62%,96%,100%{background:transparent;color:#c5d0db}66%,92%{background:#2f7d4f40;color:#fff}}
@keyframes gwl-lane{0%,46%,100%{box-shadow:0 0 0 0 #f5a52400}52%{box-shadow:0 0 0 6px #f5a52438}68%{box-shadow:0 0 0 0 #f5a52400}}

/* En-têtes de section : titre à gauche, explication à droite */
.gwl-head{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:20px 48px;align-items:end;margin-bottom:30px}
.gwl-head h2{margin:0;font-size:clamp(30px,3.6vw,46px);line-height:1.05;letter-spacing:-.035em}
.gwl-head p{margin:0;max-width:460px;font-size:15px;line-height:1.65;color:var(--mx-muted)}
.gwl-small{margin:16px 0 0;max-width:760px;font-size:13px;line-height:1.6;color:var(--mx-muted)}

/* Paliers */
.gwl-pending{max-width:760px;margin:0 0 22px;padding:20px 24px;border:1px dashed #c9b27b;border-radius:14px;background:#fffaf0}
.gwl-pending strong{display:block;font:600 19px/1.3 "Space Grotesk",sans-serif;letter-spacing:-.015em}
.gwl-pending p{margin:6px 0 0;color:#5a5140}
.gwl-pending--inline{font-size:14.5px;color:#5a5140}
.gwl-tier-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.gwl-tier{display:flex;flex-direction:column;gap:12px;padding:24px;border:1px solid var(--mx-line);border-radius:18px;background:#fff}
.gwl-tier.is-planned{background:#fbfcfd;border-style:dashed;border-color:#c6cfd8}
.gwl-tier--default{border-color:#253746;box-shadow:0 18px 40px -30px #17212bb0}
.gwl-tier header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.gwl-tier h3{margin:0;font-size:30px;letter-spacing:-.035em}
.gwl-badge{font-size:12px;font-weight:600;border-radius:999px;padding:4px 11px;background:#253746;color:#fff;white-space:nowrap}
.gwl-badge--soon{background:#fff3d9;color:#6b4b00}
.gwl-tier__tag{margin:-6px 0 0;font-size:14px;font-weight:500;color:var(--mx-ink)}
.gwl-model{display:grid;gap:2px;padding:12px 14px;border-radius:12px;background:var(--mx-paper)}
.gwl-model span{font-size:12px;color:var(--mx-muted)}
.gwl-model strong{font:500 15px/1.35 "IBM Plex Mono",monospace;color:var(--mx-ink);overflow-wrap:anywhere}
.gwl-tier__usage{margin:0;font-size:14px;line-height:1.6;color:#4b5866}
.gwl-prices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:auto 0 0}
.gwl-prices>div{padding:12px 14px;border-radius:10px;background:var(--mx-paper)}
.gwl-prices dt{font-size:12.5px;color:var(--mx-muted)}
.gwl-prices dd{margin:4px 0 0;font:600 22px/1.15 "Space Grotesk",sans-serif;letter-spacing:-.02em}
.gwl-prices dd small{font:400 12px "IBM Plex Sans",sans-serif;color:var(--mx-muted);letter-spacing:0}
.gwl-prices--images{grid-template-columns:repeat(3,minmax(0,1fr));margin:0}
.gwl-price-soon{margin:auto 0 0;padding:12px 14px;border-radius:10px;border:1px dashed #c9b27b;background:#fffaf0;font-size:14px;font-weight:600;color:#6b4b00}
.gwl-chips{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.gwl-chips li{font-size:12px;border:1px solid var(--mx-line);border-radius:999px;padding:3px 10px;color:var(--mx-ink)}
.gwl-images{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:28px;align-items:center;margin-top:26px;padding:24px 26px;border:1px dashed #c6cfd8;border-radius:18px;background:#fbfcfd}
.gwl-images.is-on{border-style:solid;border-color:var(--mx-line);background:#fff}
.gwl-images h3{margin:0 0 8px;font-size:23px;letter-spacing:-.025em}
.gwl-images p{margin:0;font-size:14px;line-height:1.6;color:var(--mx-muted)}
.gwl-images__soon{display:grid;gap:8px;justify-items:start}

/* Capacités */
.gwl-table-wrap{overflow-x:auto;border:1px solid var(--mx-line);border-radius:16px;background:#fff}
.gwl-table-wrap:focus-visible{outline:3px solid var(--gw-amber);outline-offset:3px}
.gwl-table{width:100%;min-width:640px;border-collapse:collapse;font-size:14px}
.gwl-table th,.gwl-table td{padding:14px 18px;text-align:left;vertical-align:top;border-top:1px solid var(--mx-line)}
.gwl-table thead th{border-top:0;font-size:13px;font-weight:600;color:var(--mx-muted);background:var(--mx-paper)}
.gwl-table tbody th{width:44%;font-weight:400}
.gwl-table tbody th strong{display:block;font-size:15px;color:var(--mx-ink)}
.gwl-table tbody th small{display:block;margin-top:3px;font-size:13px;line-height:1.5;color:var(--mx-muted)}
.gwl-cell{color:var(--mx-muted);white-space:nowrap}
.gwl-cell.is-yes{color:var(--gw-good);font-weight:600}
.gwl-cap--off th strong{color:#4b5866}

/* Fonctionnement et exemple */
.gwl-steps{list-style:none;margin:0 0 22px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;counter-reset:gwl;border-top:2px solid var(--mx-ink)}
.gwl-steps li{counter-increment:gwl;padding:20px 22px 0 0}
.gwl-steps li:before{content:counter(gwl);display:block;margin-bottom:10px;font:600 15px/1 "Space Grotesk",sans-serif;color:var(--gw-amber)}
.gwl-steps strong{display:block;font-size:17px;letter-spacing:-.01em}
.gwl-steps p{margin:6px 0 0;font-size:14px;line-height:1.6;color:var(--mx-muted)}
.gwl-example{margin-top:34px;padding:26px 28px;border:2px dashed #d7b56a;border-radius:18px;background:#fffdf7}
.gwl-example__flag{display:inline-block;margin:0 0 10px;padding:4px 11px;border-radius:999px;background:#fff1cf;font-size:12.5px;font-weight:600;color:#6b4b00}
.gwl-example h3{margin:0 0 8px;font-size:22px;letter-spacing:-.02em}
.gwl-example>p{margin:0;max-width:720px;font-size:14.5px;line-height:1.65;color:#4b5866}
.gwl-formula{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin:16px 0 0!important;padding:14px 16px;border-radius:12px;background:#fff;border:1px solid #efe2c2;font:14px/1.5 "IBM Plex Mono",monospace;color:var(--mx-ink)}
.gwl-formula b{font-weight:600}
.gwl-estimate{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px;padding-top:18px;border-top:1px solid #efe2c2}
.gwl-estimate__title{grid-column:1/-1;margin:0;font-weight:600;font-size:14.5px}
.gwl-estimate label{display:grid;gap:6px;font-size:13px;color:#4b5866}
.gwl-estimate input,.gwl-estimate select{width:100%;min-width:0;min-height:44px;padding:9px 12px;border:1px solid #8b97a8;border-radius:10px;background:#fff;font-size:15px;color:var(--mx-ink)}
.gwl-estimate input:focus,.gwl-estimate select:focus{outline:0;border-color:#9a6100;box-shadow:0 0 0 3px #f5a52466}
.gwl-estimate__out{grid-column:1/-1;font-size:14.5px;font-weight:500;color:var(--mx-ink)}

/* Recharges */
.gwl-packs{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.gwl-packs li{display:grid;gap:4px;padding:20px;border:1px solid var(--mx-line);border-radius:16px;background:#fff}
.gwl-packs strong{font:600 30px/1 "Space Grotesk",sans-serif;letter-spacing:-.03em}
.gwl-packs span{font-size:13px;color:var(--mx-muted)}
.gwl-packs .mx-text-link{margin-top:8px}
.gwl-gift{display:grid;gap:6px;margin-top:22px;padding:20px 22px;border-radius:16px;border:1px solid #cfe5db;background:#f2f9f5}
.gwl-gift strong{font-size:16px}
.gwl-gift p{margin:0;font-size:14px;color:#3f4b57}

/* FAQ */
.gwl-faq{max-width:860px}
.gwl-faq h2{margin:0 0 24px;font-size:clamp(30px,3.6vw,46px);letter-spacing:-.035em}
.gwl-faq details{border-top:1px solid var(--mx-line);padding:16px 0}
.gwl-faq details:last-of-type{border-bottom:1px solid var(--mx-line)}
.gwl-faq summary{cursor:pointer;font-weight:600;font-size:16px}
.gwl-faq summary:focus-visible{outline:2px solid var(--gw-amber);outline-offset:4px;border-radius:4px}
.gwl-faq details p{margin:10px 0 0;max-width:720px;color:var(--mx-muted);line-height:1.65}

@media(max-width:980px){
 .gwl-tier-grid{grid-template-columns:minmax(0,1fr)}
 .gwl-head,.gwl-images{grid-template-columns:minmax(0,1fr)}
 .gwl-packs{grid-template-columns:repeat(2,minmax(0,1fr))}
 .gwl-estimate{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
 .gwl-hero{padding-top:40px;gap:30px}
 .gwl-route{padding:22px 18px 18px}
 .gwl-route__grid{grid-template-columns:minmax(0,1fr)}
 .gwl-wire--in{width:44px;height:10px;margin:17px auto;transform:rotate(90deg)}
 .gwl-wire--fan{display:none}
 .gwl-lanes{margin-top:14px;grid-template-rows:none}
 .gwl-steps{grid-template-columns:minmax(0,1fr)}
 /* Capacités empilées : une carte par capacité, l'état de chaque palier en ligne. */
 .gwl-table-wrap{overflow:visible}
 .gwl-table{min-width:0}
 .gwl-table thead{display:none}
 .gwl-table,.gwl-table tbody,.gwl-table tr,.gwl-table th{display:block}
 .gwl-table tr{display:flex;flex-wrap:wrap;gap:8px;padding:16px 16px 14px;border-top:1px solid var(--mx-line)}
 .gwl-table tbody tr:first-child{border-top:0}
 .gwl-table tbody th{width:100%;padding:0 0 4px;border:0}
 .gwl-table td{display:inline-flex;gap:6px;padding:4px 10px;border:1px solid var(--mx-line);border-radius:999px;font-size:12.5px;white-space:normal}
 .gwl-table td:before{content:attr(data-tier);font-weight:600;color:var(--mx-ink)}
 .gwl-steps li{padding:18px 0 0}
}
@media(max-width:540px){
 .gwl-prices--images,.gwl-packs,.gwl-estimate{grid-template-columns:minmax(0,1fr)}
 .gwl-tier,.gwl-example,.gwl-images{padding:20px 18px}
}
@media(prefers-reduced-motion:reduce){
 .gwl-route *,.gwl-route *:before{animation:none!important;transition:none!important}
 .gwl-wire__packet{opacity:0!important}
}
