/* Modules de la page d'accueil réglés dans l'admin (services/site-home.js) : bandeau d'annonce,
   animation 3D, simulateur de transfert, promotion, avis de clients, bouton WhatsApp. */

/* ── Bandeau d'annonce (au-dessus de la barre du haut) ── */
.wg-banner { position: relative; z-index: 60; color: #0a1a36; background: linear-gradient(90deg, #f5cb5c, #f0b93b); font-weight: 700; font-size: 14px; }
.wg-banner.wg-tone-vert { background: linear-gradient(90deg, #12894d, #0f6b45); color: #fff; }
.wg-banner.wg-tone-bleu { background: linear-gradient(90deg, #1d4ed8, #0c2b55); color: #fff; }
.wg-banner.wg-tone-rouge { background: linear-gradient(90deg, #dc2626, #9f1239); color: #fff; }
.wg-banner-in { width: min(1180px, 100% - 32px); margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 6px 0; }
.wg-banner p { margin: 0; flex: 1; text-align: center; line-height: 1.35; }
.wg-banner a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 800; white-space: nowrap; }
.wg-banner-x { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(0, 0, 0, 0.08); color: inherit; cursor: pointer; }
.wg-banner-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; }
.wg-banner.wg-closed { display: none; }
/* La barre du haut est fixe : avec le bandeau, elle commence sous lui tant qu'on n'a pas défilé. */
body.wg-has-banner .top:not(.scrolled) { top: var(--wg-banner-h, 42px); }

/* ── Simulation 3D : deux téléphones, l'argent passe par Wariguai (assets/site3d.js) ── */
.wg-sim-stage { display: none; position: relative; height: clamp(230px, 34vw, 380px); margin: -6px -6px 0; border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse 60% 70% at 50% 45%, rgba(29, 78, 216, 0.1), transparent 70%), linear-gradient(180deg, #eaf1fb, #f6f8fc); }
.wg-sim-stage.wg-on { display: block; }
.wg-sim-stage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease; }
.wg-sim-stage.wg-ready canvas { opacity: 1; }
.wg-sim-stage.wg-on:not(.wg-ready)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%); background-size: 200% 100%; animation: wg-shine 1.4s linear infinite; }
@keyframes wg-shine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
/* La 3D montre déjà le trajet de l'argent : la petite animation plate n'est plus utile. */
.wg-3d-ok .wg-sim-flow { display: none; }
.wg-sim-alone { max-width: 980px; }
@media (prefers-color-scheme: dark) {
  .wg-sim-stage { background: radial-gradient(ellipse 60% 70% at 50% 45%, rgba(29, 78, 216, 0.25), transparent 70%), linear-gradient(180deg, #111a2e, #0c1322); }
}

/* ── Simulateur de transfert ── */
.wg-sim { padding: 72px 0 24px; }
.wg-sim-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.wg-sim-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 10px; }
.wg-sim-head p { margin: 0; color: var(--muted); font-size: 17px; }
.wg-sim-card { max-width: 860px; margin: 0 auto; padding: 26px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 20px; }
.wg-sim-form { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 14px; }
.wg-sim-form label { display: grid; gap: 7px; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.wg-sim-form select, .wg-sim-input { height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 700 16px/1 var(--font, inherit); padding: 0 14px; width: 100%; }
.wg-sim-form select:focus, .wg-sim-input:focus-within { outline: none; border-color: var(--green, #0f6b45); box-shadow: 0 0 0 4px rgba(15, 107, 69, 0.14); }
.wg-sim-input { display: flex; align-items: center; gap: 8px; }
.wg-sim-input input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 20px; outline: none; -moz-appearance: textfield; }
.wg-sim-input input::-webkit-outer-spin-button, .wg-sim-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wg-sim-input b { color: var(--muted); font-size: 14px; }
.wg-sim-flow { display: flex; align-items: center; gap: 14px; padding: 4px 6px; }
.wg-sim-flow img { width: 48px; height: 48px; border-radius: 14px; object-fit: contain; background: #fff; box-shadow: var(--shadow-sm); flex: none; }
.wg-sim-track { position: relative; flex: 1; height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 18px); }
.wg-sim-coin { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6cf 0, #f5cb5c 35%, #c8901c 100%); box-shadow: 0 6px 14px rgba(212, 160, 42, 0.45); }
.wg-sim-coin.wg-go { animation: wg-coin 1.1s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
@keyframes wg-coin {
  0% { left: 0; transform: scale(0.6); }
  50% { transform: translateY(-14px) scale(1.1); }
  100% { left: calc(100% - 26px); transform: scale(1); }
}
.wg-sim-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.wg-sim-result > div { padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.wg-sim-result dt { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.wg-sim-result dd { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wg-sim-total { background: rgba(212, 160, 42, 0.12) !important; }
.wg-sim-get { background: rgba(18, 137, 77, 0.1) !important; }
.wg-sim-get dd { color: var(--green, #0f6b45); }
.wg-sim-note { margin: -6px 0 0; color: var(--muted); font-size: 13.5px; }
.wg-sim-note.wg-err { color: #b91c1c; font-weight: 700; }
.wg-sim-card > .btn { justify-self: start; padding: 13px 20px; font-size: 15px; background: var(--gold, #d4a02a); color: #0a1a36; }
.wg-sim-card > .btn svg { width: 18px; height: 18px; stroke-width: 2.4; }
@media (max-width: 760px) {
  .wg-sim { padding: 56px 0 8px; }
  .wg-sim-card { padding: 18px; border-radius: 22px; }
  .wg-sim-form { grid-template-columns: 1fr; }
  .wg-sim-result { grid-template-columns: 1fr 1fr; }
  .wg-sim-get { grid-column: 1 / -1; }
  .wg-sim-result dd { font-size: 19px; }
  .wg-sim-card > .btn { justify-self: stretch; }
}

/* ── Promotion avec compte à rebours ── */
.wg-promo { padding: 40px 0; }
.wg-promo-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 30px 34px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(245, 203, 92, 0.35), transparent 45%), linear-gradient(135deg, #0a1a36, #0f5d43); box-shadow: var(--shadow-lg); }
.wg-promo-text { max-width: 560px; }
.wg-promo-text h2 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.wg-promo-text p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.82); font-size: 16px; }
.wg-promo-text .btn { background: #f5cb5c; color: #0a1a36; padding: 12px 18px; }
.wg-countdown { display: flex; gap: 10px; }
.wg-countdown span { display: grid; place-items: center; min-width: 72px; padding: 12px 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.75); }
.wg-countdown b { font-size: 28px; color: #f5cb5c; font-variant-numeric: tabular-nums; line-height: 1.1; }
@media (max-width: 560px) {
  .wg-promo-card { padding: 22px; }
  .wg-countdown { width: 100%; justify-content: space-between; }
  .wg-countdown span { min-width: 0; flex: 1; }
}

/* ── Avis de clients ── */
.wg-quotes { padding: 72px 0 24px; }
.wg-quotes h2 { text-align: center; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; margin: 0 0 28px; }
.wg-quotes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.wg-quote { margin: 0; padding: 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: grid; gap: 16px; align-content: space-between; }
.wg-quote blockquote { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.wg-quote figcaption { display: flex; align-items: center; gap: 12px; }
.wg-quote figcaption b { display: block; }
.wg-quote figcaption small { color: var(--muted); }
.wg-quote-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0f6b45, #1d4ed8); flex: none; }

/* ── Bouton WhatsApp ── */
.wg-wa { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #1fa855; color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 12px 30px rgba(31, 168, 85, 0.4); text-decoration: none; transition: transform 0.15s ease; }
.wg-wa:hover { transform: translateY(-2px); text-decoration: none; }
.wg-wa svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
@media (max-width: 560px) {
  .wg-wa span { display: none; }
  .wg-wa { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .wg-sim-coin.wg-go { animation: none; left: calc(100% - 26px); }
  .wg-sim-stage { display: none !important; }
}

/* Sur téléphone, le bouton « Télécharger » fixe occupe le bas de l'écran : WhatsApp au-dessus. */
@media (max-width: 760px) {
  body:has(.sticky-cta.show) .wg-wa { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
