/* ╔══════════════════════════════════════════════════════╗
   ║     EASYWEBCOINS — css/style.css                     ║
   ╚══════════════════════════════════════════════════════╝ */

:root {
  --or:          #F0B94A;   /* la couleur du WebCoin */
  --or-sombre:   #A8721A;
  --or-fonce:    #6b4a12;
  --fond:        #12141d;
  --fond-2:      #1a1e2b;
  --carte:       #1f2432;
  --bord:        #2f3646;
  --texte:       #e9edf5;
  --texte-doux:  #98a3b8;
  --vert:        #2eb872;
  --vert-clair:  #6ee7a8;
  --rouge:       #e05263;
  --bleu:        #4d8dd6;
  --violet:      #9b6dd6;
  --rayon:       14px;
  --ombre:       0 6px 24px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--or); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Entête ────────────────────────────────────────────── */
.entete {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #171b27, #14171f);
  border-bottom: 1px solid var(--bord);
  flex-wrap: wrap;
}
.logo {
  font-size: 21px; font-weight: 700; color: var(--texte);
  text-decoration: none; white-space: nowrap;
}
.logo b { color: var(--or); font-weight: 800; }

/* Le solde est visible en permanence : sur un portefeuille, c'est la
   première information qu'on cherche, et la seule qu'on vérifie deux fois. */
.solde-entete {
  display: flex; align-items: baseline; gap: 5px;
  margin-left: auto;
  padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(135deg, #33280f, #443417);
  border: 1px solid var(--or-fonce);
}
.solde-entete-valeur { font-size: 18px; font-weight: 800; color: var(--or); }
.solde-entete-unite  { font-size: 12px; color: var(--texte-doux); font-weight: 700; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-lien {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  color: var(--texte-doux); text-decoration: none; font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.nav-lien:hover { background: var(--fond-2); color: var(--texte); text-decoration: none; }
.nav-lien.actif { background: var(--or-sombre); color: #fff; }
.nav-acheter { background: var(--vert); color: #06210f; }
.nav-acheter:hover { background: #26a463; color: #06210f; }
.pastille {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--rouge); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}

/* Sur petit écran la navigation passe sous le logo et devient une barre
   d'onglets : les libellés disparaissent, les émojis suffisent. */
@media (max-width: 860px) {
  .entete { padding: 8px 10px; gap: 8px; }
  .logo span { display: none; }
  .solde-entete { margin-left: auto; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav-lien span { display: none; }
  .nav-lien { padding: 8px 10px; font-size: 18px; }
}

/* ── Structure ─────────────────────────────────────────── */
.vue { max-width: 1080px; margin: 0 auto; padding: 22px 16px 60px; min-height: 62vh; }
.chargement { text-align: center; color: var(--texte-doux); padding: 60px 0; }
h1 { font-size: 27px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 30px 0 12px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
.sous-titre { color: var(--texte-doux); margin: 0 0 20px; }

.pied {
  border-top: 1px solid var(--bord); padding: 22px 16px 44px;
  color: var(--texte-doux); font-size: 14px; text-align: center;
}

/* ── Blocs ─────────────────────────────────────────────── */
.bloc {
  background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 18px; margin-bottom: 16px;
}
.bloc h2:first-child, .bloc h3:first-child { margin-top: 0; }
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.deux-colonnes { display: grid; gap: 20px; grid-template-columns: 1.3fr 1fr; align-items: start; }
@media (max-width: 860px) { .deux-colonnes { grid-template-columns: 1fr; } }

/* ── Le solde, en grand ────────────────────────────────── */
.solde {
  background: linear-gradient(135deg, #2b2210, #3d3016);
  border: 1px solid var(--or-fonce); border-radius: var(--rayon);
  padding: 24px; margin-bottom: 18px; text-align: center;
}
.solde-valeur { font-size: 46px; font-weight: 800; color: var(--or); line-height: 1.1; }
.solde-equiv  { color: var(--texte-doux); font-size: 14px; margin-top: 4px; }
.solde-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.solde.negatif { background: linear-gradient(135deg, #33161c, #451d26); border-color: var(--rouge); }
.solde.negatif .solde-valeur { color: #ffb3bd; }

/* ── Mouvements ────────────────────────────────────────── */
.mouvement {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px; border-bottom: 1px solid var(--bord);
}
.mouvement:last-child { border-bottom: 0; }
.mvt-icone {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  background: var(--fond-2); display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.mvt-texte { flex: 1; min-width: 0; }
.mvt-titre { font-weight: 600; }
.mvt-date  { font-size: 13px; color: var(--texte-doux); }
.mvt-montant { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mvt-montant.plus  { color: var(--vert-clair); }
.mvt-montant.moins { color: var(--texte); }
.mvt-solde { font-size: 12px; color: var(--texte-doux); text-align: right; }

/* ── Packs d'achat ─────────────────────────────────────── */
.pack {
  background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 20px; text-align: center; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.pack:hover, .pack.choisi { border-color: var(--or); transform: translateY(-2px); }
.pack.choisi { background: linear-gradient(135deg, #2b2210, #262b3a); }
.pack .coins { font-size: 30px; font-weight: 800; color: var(--or); }
.pack .prix  { font-size: 19px; font-weight: 700; margin: 6px 0 2px; }
.pack .bonus { font-size: 13px; color: var(--vert-clair); font-weight: 700; }

/* ── Récapitulatif d'un paiement ───────────────────────── */
.recap { background: var(--fond-2); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.recap-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.recap-ligne.total {
  border-top: 1px solid var(--bord); margin-top: 8px; padding-top: 10px;
  font-weight: 800; font-size: 18px;
}
.recap-ligne .valeur { font-variant-numeric: tabular-nums; }
.recap-ligne.commission .valeur { color: var(--texte-doux); }

/* ── Boutons et formulaires ────────────────────────────── */
.bouton, button.bouton, a.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 999px;
  background: var(--or-sombre); color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.bouton:hover { background: #c58a20; text-decoration: none; }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton-vert   { background: var(--vert); color: #06210f; }
.bouton-vert:hover { background: #26a463; color: #06210f; }
.bouton-rouge  { background: var(--rouge); }
.bouton-rouge:hover { background: #c8455a; }
.bouton-fantome { background: transparent; border: 1px solid var(--bord); color: var(--texte); }
.bouton-fantome:hover { background: var(--fond-2); }
.bouton-petit { padding: 7px 14px; font-size: 13px; }
.bouton-large { width: 100%; }

label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--bord); border-radius: 10px;
  background: var(--fond-2); color: var(--texte); font-size: 15px;
  font-family: inherit;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--or); border-color: var(--or); }
.champ-montant { font-size: 26px !important; font-weight: 800; text-align: center; letter-spacing: 1px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.aide { font-size: 13px; color: var(--texte-doux); margin-top: 5px; }
.ligne-cases { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
.ligne-cases input { width: auto; margin-top: 4px; }
.ligne-cases label { margin: 0; font-weight: 400; }
.champs-2 { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .champs-2 { grid-template-columns: 1fr; } }

.erreur { background: rgba(224,82,99,.14);  border: 1px solid var(--rouge); color: #ffc3cb; padding: 12px 14px; border-radius: 10px; margin: 14px 0; }
.succes { background: rgba(46,184,114,.14); border: 1px solid var(--vert);  color: #a8f0cb; padding: 12px 14px; border-radius: 10px; margin: 14px 0; }
.avert  { background: rgba(240,185,74,.12); border: 1px solid var(--or);    color: #f8ddab; padding: 12px 14px; border-radius: 10px; margin: 14px 0; }
.vide   { text-align: center; color: var(--texte-doux); padding: 46px 20px; }
.vide-emoji { font-size: 50px; margin-bottom: 10px; }

/* ── Étiquettes d'état ─────────────────────────────────── */
.etiquette {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.et-attente  { background: rgba(240,185,74,.16); color: #f5cf8a; }
.et-paye,
.et-payee,
.et-viree    { background: rgba(46,184,114,.16); color: var(--vert-clair); }
.et-demande,
.et-validee  { background: rgba(77,141,214,.16); color: #a5c9f0; }
.et-annule,
.et-annulee,
.et-refusee,
.et-expire,
.et-expiree  { background: rgba(152,163,184,.16); color: var(--texte-doux); }
.et-test     { background: rgba(155,109,214,.18); color: #c4a3f0; }

/* ── Tableaux ──────────────────────────────────────────── */
.tableau-defilant { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--bord); white-space: nowrap; }
th { color: var(--texte-doux); font-weight: 600; font-size: 13px; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.stat { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; }
.stat b { display: block; font-size: 23px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--texte-doux); font-size: 13px; }
.stat.alerte { border-color: var(--rouge); }
.stat.alerte b { color: #ffb3bd; }

/* ── Blocs de code (documentation développeur) ─────────── */
pre.code {
  background: #0d0f16; border: 1px solid var(--bord); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; color: #d8e0ee;
}
pre.code .c { color: #6f7c93; }   /* commentaire */
pre.code .s { color: #8fd6a4; }   /* chaîne */
pre.code .k { color: var(--or); } /* mot-clé */

.cle-secrete {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #0d0f16; border: 1px dashed var(--or); border-radius: 10px;
  padding: 12px 14px; margin: 12px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  word-break: break-all;
}

/* ── Coordonnées de virement ───────────────────────────── */
.rib { background: var(--fond-2); border-radius: 10px; padding: 4px 14px; margin: 14px 0; }
.rib-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
             border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.rib-ligne:last-child { border-bottom: 0; }
.rib-ligne .cle { color: var(--texte-doux); font-size: 13px; }
.rib-ligne .val { font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; }
.rib-ligne.reference .val { color: var(--or); font-size: 17px; letter-spacing: 1px; }

/* ── Toasts et modale ──────────────────────────────────── */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1200;
          display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  background: var(--carte); border: 1px solid var(--bord); border-left: 4px solid var(--or);
  border-radius: 10px; padding: 12px 16px; box-shadow: var(--ombre);
  animation: entree .2s ease;
}
.toast.err { border-left-color: var(--rouge); }
.toast.ok  { border-left-color: var(--vert); }
@keyframes entree { from { opacity: 0; transform: translateY(12px); } }

.modale {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modale[hidden] { display: none; }
.modale-boite {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 22px; width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  box-shadow: var(--ombre);
}

/* Réduction d'animation : réglage système respecté. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
