/* ELIAK RECHARGE : thème bleu marine / bleu / vert, inspiré des couleurs de l'univers 1xBet.
   Toutes les couleurs sont ici : modifie une variable pour changer tout le site. */
:root {
  --fond: #081a33;          /* bleu nuit du fond */
  --fond-2: #0c2648;        /* dégradé du fond */
  --barre: #0f2f5c;         /* barre du haut et du bas */
  --carte: #123866;         /* panneaux */
  --carte-2: #0d2c52;       /* champs, zones creuses */
  --bord: #1f4a80;
  --texte: #ffffff;
  --doux: #9db4d6;
  --bleu: #1d6fd8;          /* bleu vif (onglets, accents) */
  --bleu-clair: #5aa2ff;
  --vert: #6ab832;          /* vert des boutons d'action */
  --vert-fonce: #4e9622;
  --vert-fond: #12391f;
  --rouge: #ef4b52;
  --orange: #f5a623;
  --jaune: #ffd23f;         /* éclair du logo */
  --rayon: 14px;
  --ombre: 0 6px 18px rgba(0, 0, 0, .28);
  --police: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--texte); font-family: var(--police); }
html { background: var(--fond); }
body {
  min-height: 100vh; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, var(--fond-2) 0%, var(--fond) 340px) no-repeat, var(--fond);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--bleu-clair); }

.app { max-width: 480px; margin: 0 auto; padding: 0 16px 104px; }

/* ---------- barre du haut */
.entete {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: 0 -16px 14px;
  background: var(--barre); border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 12;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.logo { width: 38px; height: 38px; border-radius: 10px; display: block; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.entete h1 { font-size: 17px; letter-spacing: .06em; margin: 0; font-weight: 900; }
.entete h1 span { color: var(--jaune); letter-spacing: .16em; font-size: 11px; font-weight: 800; margin-left: 3px; }
.entete small { display: block; color: var(--doux); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.entete .droite { margin-left: auto; }
.entete .lien { color: var(--doux); font-size: 12px; text-decoration: none; border: 1px solid var(--bord); border-radius: 8px; padding: 6px 10px; margin: 0 0 0 auto; }

h2 { font-size: 21px; margin: 6px 0 4px; font-weight: 800; }
.sous { color: var(--doux); margin: 0 0 16px; font-size: 14px; line-height: 1.45; }

/* ---------- panneaux */
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--ombre);
}
.etiquette { font-size: 12px; color: var(--doux); font-weight: 700; margin-bottom: 8px; display: block; text-transform: uppercase; letter-spacing: .04em; }
.aide { font-size: 12px; color: var(--doux); margin-top: 6px; line-height: 1.45; }

/* ---------- champs */
input, select, textarea {
  width: 100%; background: var(--carte-2); border: 1px solid var(--bord); border-radius: 10px;
  padding: 13px 12px; outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #6f8bb3; }
input:focus, textarea:focus, select:focus { border-color: var(--bleu-clair); box-shadow: 0 0 0 3px rgba(90, 162, 255, .18); }
.gros-montant { display: flex; align-items: baseline; gap: 8px; }
.gros-montant input { font-size: 30px; font-weight: 800; border: none; background: transparent; padding: 2px 0; box-shadow: none; }
.gros-montant span { color: var(--doux); font-weight: 700; }

/* ---------- puces (montants rapides, filtres) */
.puces { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.puce { border: 1px solid var(--bord); background: var(--carte-2); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.puce.active { background: var(--vert); color: #fff; border-color: var(--vert); }

/* ---------- choix Flooz / Mixx */
.operateurs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.operateur { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 2px solid var(--bord); background: var(--carte-2); cursor: pointer; text-align: left; }
.operateur.active { border-color: var(--vert); background: #10331f; }
.operateur.active::after { content: "✓"; position: absolute; right: -6px; top: -6px; background: var(--vert); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.pastille { width: 52px; height: 38px; display: grid; place-items: center; flex: none; }
.pastille img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.op-titre { display: flex; align-items: center; gap: 8px; }
.op-titre .pastille { width: 40px; height: 28px; }
.operateur b { display: block; font-size: 14px; }
.operateur small { color: var(--doux); font-size: 11px; }

.joueur-ok { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--vert-fond); border: 1px solid #2b6b33; color: #a5e27c; font-size: 13px; font-weight: 800; }
.joueur-ok small { color: #86b779; font-weight: 500; }
.erreur-ligne { color: #ff8a8f; font-size: 13px; margin-top: 8px; }

/* ---------- boutons : vert = action principale */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; border-radius: 10px; border: none; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; letter-spacing: .02em; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn-bleu { background: linear-gradient(180deg, #7cc63f 0%, var(--vert-fonce) 100%); color: #fff; box-shadow: 0 4px 14px rgba(106, 184, 50, .3); text-transform: uppercase; }
.btn-bleu:hover { filter: brightness(1.06); }
.btn-bleu:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); }
.btn-ligne { background: var(--carte-2); border: 1px solid var(--bord); color: var(--texte); }
.btn-rouge { background: transparent; border: 1px solid var(--rouge); color: #ff8a8f; }
.btn + .btn { margin-top: 10px; }
.lien { background: none; border: none; color: var(--doux); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 10px; display: block; margin: 0 auto; }

/* ---------- étapes du dépôt */
.etapes { display: flex; justify-content: space-around; margin: 2px 0 16px; font-size: 11px; color: var(--doux); }
.etapes div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.etapes i { width: 26px; height: 26px; border-radius: 50%; background: var(--carte-2); border: 1px solid var(--bord); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; }
.etapes .fait i { background: var(--vert); border-color: var(--vert); color: #fff; }
.etapes .actif i { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 0 0 4px rgba(29, 111, 216, .25); }

/* ---------- écran de paiement */
.ussd { display: flex; gap: 8px; margin: 10px 0 8px; }
.ussd code { flex: 1; background: var(--carte-2); border: 1px dashed var(--bleu-clair); border-radius: 10px; padding: 12px; font-size: 17px; font-weight: 700; letter-spacing: .03em; word-break: break-all; line-height: 1.4; color: var(--jaune); }
.ussd .btn { width: auto; padding: 0 14px; }
.attente { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--bord); background: var(--carte-2); border-radius: 12px; margin: 12px 0; }
.rond { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bord); border-top-color: var(--vert); animation: tourne 1s linear infinite; flex: none; margin-top: 2px; }
@keyframes tourne { to { transform: rotate(360deg); } }
.attente b { font-size: 14px; }
.attente .compteur { color: var(--vert); font-weight: 800; }
.attente p { margin: 4px 0 0; font-size: 12px; color: var(--doux); }

.succes { text-align: center; padding: 28px 16px; }
.succes .icone { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-size: 34px; background: var(--vert); color: #fff; box-shadow: 0 0 0 8px rgba(106, 184, 50, .18); }
.succes .icone.ko { background: var(--rouge); box-shadow: 0 0 0 8px rgba(239, 75, 82, .18); }
.succes .icone.att { background: var(--orange); box-shadow: 0 0 0 8px rgba(245, 166, 35, .18); }

/* ---------- historique */
.onglets { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.onglets .puce { white-space: nowrap; margin: 0; }
.onglets .puce.active { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.recherche { display: flex; gap: 8px; margin-bottom: 12px; }
.recherche .btn { width: auto; padding: 0 16px; }

.ligne-tx { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; margin-bottom: 8px; cursor: pointer; width: 100%; text-align: left; box-shadow: var(--ombre); }
.ligne-tx .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--vert-fond); color: #a5e27c; display: grid; place-items: center; flex: none; font-weight: 900; }
.ligne-tx .ico.ret { background: #102a50; color: var(--bleu-clair); }
.ligne-tx .milieu { flex: 1; min-width: 0; }
.ligne-tx .haut { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; flex-wrap: wrap; }
.ligne-tx small { color: var(--doux); font-size: 11px; display: block; }
.ligne-tx .montant { font-weight: 900; white-space: nowrap; font-size: 15px; }
.badge { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: var(--carte-2); color: var(--doux); text-transform: uppercase; letter-spacing: .03em; }
.badge.vert { background: var(--vert-fond); color: #a5e27c; }
.badge.orange { background: #3a2a0c; color: var(--orange); }
.badge.rouge { background: #3a1216; color: #ff8a8f; }
.badge.bleu { background: #102a50; color: var(--bleu-clair); }
.vide { text-align: center; color: var(--doux); padding: 30px 0; font-size: 14px; }

/* ---------- fenêtre du bas (détail) */
.fenetre { position: fixed; inset: 0; background: rgba(2, 10, 24, .7); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.fenetre .contenu { background: var(--carte); border-top: 3px solid var(--vert); width: 100%; max-width: 480px; border-radius: 18px 18px 0 0; padding: 18px 16px 22px; max-height: 90vh; overflow-y: auto; }
.fenetre h3 { margin: 0 0 12px; display: flex; justify-content: space-between; }
.fenetre h3 button { background: none; border: none; color: var(--doux); font-size: 20px; cursor: pointer; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.details dt { color: var(--doux); }
.details dd { margin: 0; text-align: right; font-weight: 700; word-break: break-word; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deux .btn + .btn { margin-top: 0; }

/* ---------- barre du bas */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--barre); border-top: 1px solid var(--bord); display: flex; justify-content: center; z-index: 10; box-shadow: 0 -2px 12px rgba(0, 0, 0, .25); }
.nav div { display: flex; max-width: 480px; width: 100%; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.nav button { flex: 1; min-width: 0; background: none; border: none; color: var(--doux); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 7px 4px; border-radius: 12px; cursor: pointer; }
.nav button span { font-size: 20px; line-height: 1; }
.nav button.active { background: var(--vert); color: #fff; }

/* ---------- accueil */
.banniere {
  position: relative; overflow: hidden; border-radius: 16px; padding: 18px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, #1d6fd8 0%, #12407e 55%, #0c2c58 100%); border: 1px solid #2f6cba; box-shadow: var(--ombre);
}
.banniere::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.banniere h2 { margin: 0 0 4px; }
.banniere p { margin: 0; color: #cfe0ff; font-size: 14px; position: relative; z-index: 1; }
.banniere .eclair { color: var(--jaune); }
.accueil-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.action { border-radius: var(--rayon); padding: 16px 14px; text-align: left; cursor: pointer; border: none; color: #fff; box-shadow: var(--ombre); }
#a-depot { background: linear-gradient(160deg, #7cc63f, var(--vert-fonce)); }
#a-retrait { background: linear-gradient(160deg, #2a7de6, #1653a5); }
.action span { font-size: 24px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .18); }
.action b { display: block; margin-top: 10px; font-size: 16px; text-transform: uppercase; letter-spacing: .03em; }
.action small { color: rgba(255, 255, 255, .85); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--vert); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 800; font-size: 14px; z-index: 30; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.toast.ko { background: var(--rouge); }
.cache { display: none !important; }

/* ---------- WhatsApp */
.whatsapp { position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 15; width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
.whatsapp svg { width: 30px; height: 30px; fill: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }

/* ---------- vitrine de l'accueil : code promo, image de l'appli, publicités */
.tuiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tuiles2.seule { grid-template-columns: 1fr; }
.tuile-promo, .tuile-image { position: relative; min-height: 112px; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.tuile-promo {
  display: flex; flex-direction: column; justify-content: space-between; text-align: left; cursor: pointer; padding: 14px;
  background: #fbf1de; border: 1px dashed #d9b46c; color: #7a5410;
}
.tuile-promo small { font-family: 'Space Mono', ui-monospace, monospace; letter-spacing: .18em; text-transform: uppercase; font-size: 11px; font-weight: 700; }
.tuile-promo b { font-size: 22px; font-weight: 900; color: #3b2a07; letter-spacing: .02em; word-break: break-all; }
.tuile-promo .copie { font-size: 12px; font-weight: 800; color: #9a6b12; }
.tuile-promo::before, .tuile-promo::after { content: ''; position: absolute; right: 44px; width: 14px; height: 14px; border-radius: 50%; background: var(--fond); }
.tuile-promo::before { top: -7px; } .tuile-promo::after { bottom: -7px; }
.tuile-image { display: block; background: var(--carte); border: 1px solid var(--bord); }
.tuile-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.carrousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; border-radius: 16px; box-shadow: var(--ombre); scrollbar-width: none; margin-bottom: 8px; }
.carrousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 16 / 7; background: var(--carte); display: block; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.points { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.points i { width: 7px; height: 7px; border-radius: 99px; background: #b7c5da; transition: width .25s, background .25s; }
.points i.on { width: 24px; background: #12306a; }

/* =====================================================================
   THÈME CLAIR (fond blanc). Activé par <html data-theme="clair">.
   ===================================================================== */
:root[data-theme="clair"] {
  --fond: #eef2f8;
  --fond-2: #e4ebf5;
  --carte: #ffffff;
  --carte-2: #f3f6fb;
  --bord: #d5deeb;
  --texte: #0d2240;
  --doux: #5f7190;
  --bleu-clair: #1d6fd8;
  --vert-fond: #e7f6dc;
  --ombre: 0 4px 14px rgba(13, 34, 64, .08);
}
:root[data-theme="clair"] body { background: var(--fond); }
/* la barre du haut reste bleue, avec le texte en blanc */
:root[data-theme="clair"] .entete { --texte: #ffffff; --doux: #b9cdeb; --bord: #24508a; color: #fff; border-bottom: none; }
:root[data-theme="clair"] .entete .lien { color: #dbe7fa; }
/* la barre du bas devient blanche */
:root[data-theme="clair"] .nav { background: #ffffff; border-top: 1px solid var(--bord); box-shadow: 0 -2px 12px rgba(13, 34, 64, .08); }
:root[data-theme="clair"] input::placeholder, :root[data-theme="clair"] textarea::placeholder { color: #9aa9c0; }
:root[data-theme="clair"] .operateur.active { background: #eef8e6; }
:root[data-theme="clair"] .joueur-ok { background: #e7f6dc; border-color: #b7df99; color: #3d7a17; }
:root[data-theme="clair"] .joueur-ok small { color: #5d8a43; }
:root[data-theme="clair"] .ussd code { color: #0f3c78; background: #eef4fd; border-color: #1d6fd8; }
:root[data-theme="clair"] .erreur-ligne { color: #d1343b; }
:root[data-theme="clair"] .btn-rouge { color: #d1343b; }
:root[data-theme="clair"] .ligne-tx .ico { color: #3d7a17; }
:root[data-theme="clair"] .ligne-tx .ico.ret { background: #e6effc; color: #1d6fd8; }
:root[data-theme="clair"] .badge.vert { background: #e7f6dc; color: #3d7a17; }
:root[data-theme="clair"] .badge.orange { background: #fdf0d9; color: #a86a00; }
:root[data-theme="clair"] .badge.rouge { background: #fde4e5; color: #c62a31; }
:root[data-theme="clair"] .badge.bleu { background: #e6effc; color: #1d6fd8; }
:root[data-theme="clair"] .fenetre { background: rgba(13, 34, 64, .45); }
:root[data-theme="clair"] .banniere { color: #fff; }

/* ---------- accueil compact : tout l'essentiel tient sur un écran de téléphone */
.banniere { padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; }
.banniere h2 { font-size: 18px; margin: 0 0 2px; }
.banniere p { font-size: 13px; line-height: 1.35; }
.accueil-actions { gap: 10px; margin-bottom: 10px; }
.action { padding: 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.action span { width: 34px; height: 34px; font-size: 18px; grid-row: span 2; }
.action b { margin-top: 0; font-size: 15px; }
.action small { font-size: 11px; }
.tuiles2 { margin-bottom: 10px; }
.tuile-promo, .tuile-image { min-height: 0; height: 92px; }
.tuile-promo { padding: 10px 12px; }
.tuile-promo b { font-size: 20px; }
.slide { aspect-ratio: 16 / 6.5; }
.points { margin-bottom: 12px; }
/* le bouton WhatsApp rond est masqué sur l'accueil (l'encadré « Contacter l'agent » y est déjà) */
/* (la bulle WhatsApp est aussi affichée sur l'accueil) */

/* ---------- accueil sur UN écran : la publicité prend la place qui reste */
body.page-accueil .app { padding-bottom: 0; }
body.page-accueil #ecran {
  display: flex; flex-direction: column;
  /* hauteur de l'écran - barre du haut (63 + 14) - barre du bas (66 + bord de l'iPhone) */
  height: calc(100dvh - 77px - 74px - env(safe-area-inset-bottom));
  min-height: 430px; /* très petits écrans : on autorise alors un léger défilement */
}
body.page-accueil #vitrine { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.page-accueil .carrousel { flex: 1 1 auto; min-height: 90px; margin-bottom: 6px; }
body.page-accueil .slide { aspect-ratio: auto; height: 100%; }
body.page-accueil .points { margin-bottom: 8px; }
.ligne-agent {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border-radius: 12px;
  background: #e8f9ef; border: 1px solid #b8e8c9; color: #155c33; text-decoration: none; font-size: 13px; flex: none;
}
.ligne-agent .wa-rond { width: 28px; height: 28px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 14px; flex: none; }
.ligne-agent i { margin-left: auto; font-style: normal; font-size: 20px; color: #25a35a; }
:root:not([data-theme="clair"]) .ligne-agent { background: #10331f; border-color: #2b6b33; color: #a5e27c; }

/* ---------- petits écrans (≤ 360 px de large) */
.entete h1 { white-space: nowrap; }
.ligne-agent span:not(.wa-rond) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.action small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action > * { min-width: 0; }
@media (max-width: 360px) {
  .entete { gap: 8px; padding: 10px 12px; margin: 0 -16px 10px; }
  .logo { width: 32px; height: 32px; }
  .entete h1 { font-size: 15px; }
  .entete h1 span { font-size: 9px; letter-spacing: .12em; }
  .entete .lien { font-size: 11px; padding: 5px 8px; }
  .banniere p { font-size: 12px; }
  .action { padding: 10px; column-gap: 8px; }
  .action span { width: 28px; height: 28px; font-size: 15px; }
  .action b { font-size: 14px; }
  .tuile-promo b { font-size: 17px; }
  .ligne-agent { font-size: 12px; }
  body.page-accueil #ecran { height: calc(100dvh - 66px - 74px - env(safe-area-inset-bottom)); }
}
/* la publicité ne devient jamais plus haute que son format (≈ 16:7) : l'image n'est pas rognée,
   l'espace en trop va sous la ligne WhatsApp */
body.page-accueil .carrousel { flex: 0 1 auto; height: calc((min(100vw, 480px) - 32px) * 7 / 16); }
body.page-accueil .ligne-agent { margin-top: auto; }
@media (max-width: 360px) { .action small { display: none; } }
@media (max-width: 360px) { .action span { grid-row: auto; } }

/* ---------- réglage des hauteurs de l'accueil (20/11) :
   Dépôt / Retrait plus hautes ; code promo, téléchargement et publicité plus basses */
.action { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 128px; padding: 14px; }
.action span { width: 40px; height: 40px; font-size: 22px; grid-row: auto; }
.action b { margin-top: 12px; font-size: 18px; }
.action small { font-size: 12px; display: block; white-space: normal; }
.tuile-promo, .tuile-image { height: 70px; }
.tuile-promo { padding: 8px 12px; justify-content: center; gap: 2px; }
.tuile-promo small { font-size: 10px; }
.tuile-promo b { font-size: 18px; }
.tuile-promo .copie { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.tuile-promo::before, .tuile-promo::after { right: 64px; }
/* publicité au format bandeau (≈ 16:5, ex. 1600×500) */
body.page-accueil .carrousel { height: calc((min(100vw, 480px) - 32px) * 5 / 16); min-height: 70px; }
@media (max-width: 360px) {
  .action { min-height: 108px; padding: 12px; }
  .action span { width: 34px; height: 34px; font-size: 18px; }
  .action b { font-size: 16px; margin-top: 8px; }
  .action small { display: block; font-size: 11px; }
  .tuile-promo b { font-size: 15px; }
  .tuile-promo .copie { font-size: 11px; right: 8px; }
}
/* l'espace libre de l'écran va aux tuiles Dépôt / Retrait (entre 128 et 200 px de haut) */
body.page-accueil .accueil-actions { flex: 1 1 auto; min-height: 118px; max-height: 200px; }
body.page-accueil .action { min-height: 0; height: 100%; }
.tuile-promo b { padding-right: 70px; }
@media (max-width: 360px) {
  .tuile-promo b { padding-right: 26px; }
  .tuile-promo .copie { font-size: 0; }
  .tuile-promo .copie::before { content: '⧉'; font-size: 18px; }
}
.tuile-promo b { white-space: nowrap; word-break: normal; padding-right: 0; max-width: calc(100% - 66px); overflow: hidden; text-overflow: ellipsis; }
body.page-accueil #vitrine { flex: 0 0 auto; }
@media (max-width: 360px) { .tuile-promo b { max-width: calc(100% - 26px); } }
body.page-accueil .banniere, body.page-accueil .tuiles2, body.page-accueil .points { flex: none; }
.tuile-promo .copie { font-size: 0; right: 10px; }
.tuile-promo .copie::before { content: '⧉'; font-size: 20px; }
.tuile-promo b { max-width: calc(100% - 26px); }
.tuile-promo::before, .tuile-promo::after { right: 36px; }
/* écrans très courts (ex. iPhone SE) */
@media (max-height: 600px) {
  body.page-accueil #ecran { min-height: 0; }
  body.page-accueil .banniere { padding: 9px 14px; }
  body.page-accueil .banniere p { display: none; }
  body.page-accueil .accueil-actions { min-height: 100px; }
  body.page-accueil .carrousel { height: 72px; min-height: 0; }
  body.page-accueil .ligne-agent { padding: 6px 10px; }
  body.page-accueil .ligne-agent .wa-rond { width: 24px; height: 24px; }
}

/* ---------- proportions fixes (celles de l'iPhone 13, choisies le 20/11) sur TOUS les téléphones :
   Dépôt/Retrait 5:4, code promo/Télécharger 5:2, publicité 16:5. L'espace en trop reste au-dessus de WhatsApp. */
body.page-accueil .accueil-actions { flex: none; min-height: 0; max-height: none; }
body.page-accueil .action { height: auto; aspect-ratio: 5 / 4; }
.tuile-promo, .tuile-image { height: auto; aspect-ratio: 5 / 2; }
body.page-accueil .carrousel { height: auto; aspect-ratio: 16 / 5; min-height: 0; }
body.page-accueil .slide { height: 100%; }
@media (max-height: 600px) {
  body.page-accueil .action { aspect-ratio: 16 / 9; }
  body.page-accueil .carrousel { aspect-ratio: 16 / 4; height: auto; }
}
@media (max-height: 600px) {
  body.page-accueil .action { aspect-ratio: 5 / 4; }
  body.page-accueil .carrousel { aspect-ratio: 16 / 5; }
}
@media (max-height: 600px) { body.page-accueil .banniere p { display: block; } body.page-accueil .banniere { padding: 10px 14px; } }

/* ---------- bouton « œil » pour voir le mot de passe */
.champ-mdp { position: relative; display: block; }
.champ-mdp input { padding-right: 50px; }
.oeil { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: none; background: none;
  border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--doux); }
.oeil:hover, .oeil:focus-visible { color: var(--texte); background: rgba(127, 150, 190, .12); outline: none; }
.oeil svg { width: 22px; height: 22px; fill: currentColor; }
.oeil .ferme, .champ-mdp.visible .oeil .ouvert { display: none; }
.champ-mdp.visible .oeil .ferme { display: block; }

/* ---------- bulle WhatsApp : petite fenêtre au-dessus du bouton vert */
.wa-popup {
  position: fixed; right: 16px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 25;
  width: min(300px, calc(100vw - 32px)); background: var(--carte); color: var(--texte);
  border: 1px solid var(--bord); border-radius: 16px; padding: 14px; box-shadow: 0 12px 34px rgba(13, 34, 64, .28);
  animation: wa-entree .18s ease-out;
}
@keyframes wa-entree { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.wa-popup::after { content: ''; position: absolute; right: 22px; bottom: -8px; width: 14px; height: 14px; background: var(--carte);
  border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); transform: rotate(45deg); }
.wa-popup p { font-size: 13px; line-height: 1.45; color: var(--doux); margin: 10px 0 12px; }
.wa-tete { display: flex; gap: 10px; align-items: center; }
.wa-tete b { display: block; font-size: 14px; }
.wa-tete small { color: #25a35a; font-size: 12px; font-weight: 700; }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 18px; }
.wa-fermer { position: absolute; top: 8px; right: 8px; border: none; background: none; color: var(--doux); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.whatsapp { border: none; cursor: pointer; }
body.page-accueil .whatsapp { bottom: calc(84px + env(safe-area-inset-bottom)); }

.code-6 { font-size: 26px; letter-spacing: .5em; text-align: center; font-weight: 800; }
/* avant connexion (pas de barre du bas) : la bulle et sa fenêtre descendent en bas de l'écran */
body:not(.connecte) .whatsapp { bottom: calc(16px + env(safe-area-inset-bottom)); }
body:not(.connecte) .wa-popup { bottom: calc(82px + env(safe-area-inset-bottom)); }
body:not(.connecte) .app { padding-bottom: 90px; }

/* ---------- parrainage */
.facultatif { font-weight: 400; color: var(--doux); text-transform: none; letter-spacing: 0; }
.parrain-code { font-size: 34px; font-weight: 900; letter-spacing: .18em; color: var(--bleu-fonce, #0f2f5c); text-align: center; padding: 10px; border: 2px dashed #1d6fd8; border-radius: 12px; background: #eef4fd; margin-top: 6px; }
.parrain-lien { font-size: 13px; word-break: break-all; padding: 10px 12px; border-radius: 10px; background: #f3f6fb; border: 1px solid var(--bord); color: #0f3c78; user-select: all; -webkit-user-select: all; }
.parrain-stat { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.parrain-nb { font-size: 30px; font-weight: 900; color: var(--vert); min-width: 44px; text-align: center; }
.btn-contour { background: transparent; color: var(--bleu); border: 2px solid var(--bleu); }
.parrain-code { color: #0f2f5c; }
.parrain-gains { margin-top: 12px; margin-bottom: 84px; } /* place pour la bulle WhatsApp */
.gains-ligne { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--bord); font-size: 14px; }
.gains-ligne.fort b { color: var(--vert-fonce); font-size: 18px; }

/* ---------- présentation sur les pages connexion / inscription */
.vitrine-accueil { background: linear-gradient(135deg, #0f2f5c 0%, #1d5fc4 100%); color: #fff; border-radius: 16px; padding: 18px 18px 14px; margin: 4px 0 18px; box-shadow: 0 8px 24px rgba(15,47,92,.18); }
.va-titre { font-size: 21px; font-weight: 900; line-height: 1.2; }
.va-titre span { color: #ffc400; }
.va-sous { font-size: 14px; opacity: .9; margin-top: 6px; }
.va-ops { display: flex; gap: 10px; margin: 12px 0; }
.va-ops img { height: 34px; width: auto; background: #fff; border-radius: 8px; padding: 3px 6px; }
.va-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.va-points li { background: rgba(255,255,255,.12); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.va-points b { font-size: 13px; }
.va-points span { font-size: 11px; opacity: .9; line-height: 1.25; }
.va-comment { margin-top: 18px; margin-bottom: 90px; }
.va-comment h3 { font-size: 16px; margin: 0 0 8px; color: #0f2f5c; }
.va-comment h3 + ol, .va-comment h3 + ul { margin-bottom: 14px; }
.va-comment ol, .va-comment ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.va-comment ul { list-style: none; padding-left: 0; }
.va-comment li { margin-bottom: 6px; }
@media (max-width: 360px) { .va-points { grid-template-columns: 1fr; } .va-titre { font-size: 19px; } }

.va-comment { padding: 4px 16px; }
.va-comment details { border-bottom: 1px solid #e3e8f0; }
.va-comment details:last-child { border-bottom: 0; }
.va-comment summary { list-style: none; cursor: pointer; font-size: 16px; font-weight: 800; color: #0f2f5c; padding: 14px 0; display: flex; justify-content: space-between; align-items: center; }
.va-comment summary::-webkit-details-marker { display: none; }
.va-comment summary::after { content: '+'; font-size: 22px; font-weight: 700; color: #1d5fc4; transition: transform .2s; }
.va-comment details[open] summary::after { transform: rotate(45deg); }
.va-comment details > ol, .va-comment details > ul { margin: 0 0 14px; }
