/* © 2026 Yoann Crom — Vicious Studio. Logiciel propriétaire, tous droits réservés (LICENSE). Réf. VS-2026-8EFE48 */
:root {
  --fond: #0a0809;
  --surface: #141013;
  --surface-2: #1c171a;
  --surface-3: #261e23;
  --bord: #33282e;
  --texte: #f7eef2;
  --doux: #b39ca8;
  --tres-doux: #7f6b75;
  --accent: #fa056e;
  --accent-fonce: #d1005b;
  --ok: #3ecf8e;
  --alerte: #f5b14c;
  --erreur: #ff5d5d;
  --rayon: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 15px; margin: 26px 0 10px; color: var(--doux); }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }

/* ---------- Barre du haut ---------- */
.barre { display: flex; align-items: center; gap: 24px; padding: 10px 18px; border-bottom: 1px solid var(--bord); background: var(--surface); flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.sous-marque { color: var(--accent); font-weight: 600; }
.logo { width: 31px; height: 26px; background: url("../embleme.png") center / contain no-repeat; }   /* le logo de Yoann, V + chat (2026-10-13) */
.onglets { display: flex; gap: 4px; flex-wrap: wrap; }
.onglets button { background: none; border: 0; padding: 7px 12px; border-radius: 8px; color: var(--doux); font-weight: 600; }
.onglets button:hover { background: var(--surface-2); color: var(--texte); }
.onglets button.actif { background: var(--surface-3); color: var(--texte); }
.qui { margin-left: auto; color: var(--doux); }

/* ---------- Contenu ---------- */
main { padding: 22px 24px 60px; max-width: 1200px; margin: 0 auto; }
.outils { display: flex; align-items: center; gap: 10px; }
.espace { flex: 1; }
.aide { color: var(--tres-doux); font-size: 13px; margin: 4px 0 14px; font-weight: 400; }
.defile { overflow-x: auto; }

.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 14px 0; }
.tuile { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; }
.tuile .chiffre { font-size: 30px; font-weight: 700; }
.tuile .libelle { color: var(--doux); }
.alertes { display: flex; flex-direction: column; gap: 8px; }
.alerte { background: rgba(245,177,76,.08); border: 1px solid rgba(245,177,76,.35); border-radius: var(--rayon); padding: 10px 14px; }
/* les crédits des services (2026-10-08) : rouge quand c'est presque vide ou épuisé */
.alerte.grave { background: rgba(240,80,90,.1); border-color: rgba(240,80,90,.55); }
.alerte a, .ligne-credit a { color: var(--accent); white-space: nowrap; }
.ligne-credit { margin: 6px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }
.ligne-credit.alerte-credit { color: #f5b14c; }
/* les e-mails de facture à régler (2026-10-12) : une ligne par recharge, ses boutons à côté, le résultat écrit après eux */
.factures-a-regler { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.factures-a-regler li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.factures-a-regler .actions-facture { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.factures-a-regler li.facture-reglee .etat-facture { color: var(--ok); font-weight: 600; font-size: 13.5px; }
.note { background: var(--surface); border: 1px dashed var(--bord); border-radius: var(--rayon); padding: 10px 14px; color: var(--doux); }

.tableau { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.tableau th { text-align: left; font-weight: 600; color: var(--doux); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; border-bottom: 1px solid var(--bord); background: var(--surface-2); }
.tableau td { padding: 10px 12px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tr.cliquable { cursor: pointer; }
.tableau tr.cliquable:hover td { background: var(--surface-2); }
.tableau .vide { text-align: center; color: var(--tres-doux); padding: 22px; }
.petit-texte { color: var(--tres-doux); font-size: 12px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.active, .badge.ok { background: rgba(62,207,142,.12); color: var(--ok); }
.badge.suspendue, .badge.ko { background: rgba(255,93,93,.12); color: var(--erreur); }
.badge.neutre { background: var(--surface-3); color: var(--doux); }

.fiche { margin-top: 18px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 18px; }
.fiche h2 { margin-top: 18px; }
.fiche .tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fiche .tete h3 { margin: 0; font-size: 18px; }

.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.carte h3 { margin: 0; font-size: 15px; }
.carte form { display: flex; flex-direction: column; gap: 8px; }

.montant-plus { color: var(--ok); font-weight: 600; }
.cases { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 400; color: var(--texte); }
.cases label { display: inline-flex; gap: 6px; align-items: center; }
.ajustement { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.ajustement .champ { width: auto; }

/* ---------- Champs et boutons ---------- */
.champ { width: 100%; background: var(--surface-2); border: 1px solid var(--bord); border-radius: 8px; padding: 9px 11px; color: var(--texte); font: inherit; }
.champ:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
select.champ { width: auto; min-width: 190px; }
textarea.champ { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.etiquette { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; color: var(--doux); font-weight: 600; }
.bouton { background: var(--surface-3); border: 1px solid var(--bord); border-radius: 8px; padding: 8px 14px; font-weight: 600; }
.bouton:hover { border-color: var(--doux); }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton.principal:hover { background: var(--accent-fonce); }
.bouton.discret { background: none; }
.bouton.danger { color: var(--erreur); }
.bouton.petit { padding: 4px 10px; font-size: 13px; }
.lien { background: none; border: 0; color: var(--accent); padding: 0 0 0 8px; text-decoration: underline; }
.lien.retour { align-self: center; padding: 0; text-decoration: none; color: var(--doux); }
.lien.retour:hover { color: var(--texte); }
.retour-haut { color: var(--doux); text-decoration: none; font-weight: 600; margin-right: 6px; }
.retour-haut:hover { color: var(--texte); }
.ligne { display: flex; gap: 8px; align-items: center; }
.ligne.fin { justify-content: flex-end; margin-top: 14px; }
.erreur { color: var(--erreur); min-height: 1.2em; margin: 6px 0 0; }

/* ---------- Connexion, dialogues, messages ---------- */
.connexion { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fond); }
.carte-connexion { width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--bord); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.dialogue { background: var(--surface); color: var(--texte); border: 1px solid var(--bord); border-radius: 14px; padding: 22px; width: min(520px, calc(100vw - 32px)); }
.dialogue::backdrop { background: rgba(0,0,0,.6); }
.dialogue h2 { margin: 0 0 8px; color: var(--texte); font-size: 18px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 10; }
.toast { background: var(--surface-3); border: 1px solid var(--bord); border-left: 4px solid var(--ok); padding: 10px 14px; border-radius: 8px; max-width: 420px; }
.toast.erreur { border-left-color: var(--erreur); }
.toast.info { border-left-color: var(--alerte); }

/* Prix de l'IA (2026-10-07) */
.petit-champ { width: 90px; padding: 5px 8px; }
.tableau-prix-ia td { vertical-align: middle; white-space: nowrap; }
.prix-textes { display: flex; flex-direction: column; gap: 8px; }
.negatif { color: var(--erreur); font-weight: 600; }
/* Demandes : les commandes d'iPhones des clients (2026-10-07) */
.onglets button.a-faire { color: var(--accent); }
.liste-livrer { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 8px 0; }
.choix-livrer { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 8px; cursor: pointer; }
.choix-livrer.nouveau { border-color: var(--accent); }
.choix-livrer:has(input:checked) { background: var(--surface-3); }
.etapes-telegram { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 700px) {
  main { padding: 16px 16px 60px; }
  .barre { gap: 12px; }
}
/* Les abonnements (2026-10-08) : le lien de vente, les liens directs, les paiements sans compte */
.carte-vente { margin: 0 0 14px; }
.carte-vente .ligne-lien { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.carte-vente .ligne-lien .champ { flex: 1; min-width: 240px; width: auto; }
.carte-vente details summary { cursor: pointer; color: var(--doux); font-size: 13px; }
.carte-vente details .tableau { margin-top: 8px; }
.prix-abo .champ { max-width: 120px; }
.carte-vente a.bouton { color: var(--texte); text-decoration: none; }
.ligne-gmail { flex-wrap: wrap; }
.ligne-gmail .bouton { white-space: nowrap; }
/* Les annonces aux agences (2026-10-09) : publiées, qui les a lues, « Retirer » */
.liste-annonces { display: flex; flex-direction: column; gap: 10px; max-width: 620px; margin-top: 12px; }
.annonce-console { overflow-wrap: anywhere; }
#form-annonce textarea.champ { font-family: inherit; font-size: 14px; }   /* un message aux clients, pas un code à copier */
/* Ce que chaque agence te rapporte (2026-10-09) : une marge négative, et Stripe muet */
.montant-moins { color: #f5b14c; }
.alerte-texte { color: #f5b14c; }
/* Les tutos vidéo (2026-10-10) */
.liste-tutos-console { display: flex; flex-direction: column; gap: 10px; max-width: 620px; margin-top: 12px; }
.titre-tuto-console { overflow-wrap: anywhere; min-width: 0; }
.onglet-tuto-console { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2, rgba(255,255,255,.06)); color: var(--doux, inherit); white-space: nowrap; }
#tuto-progression { width: 220px; max-width: 100%; accent-color: #dc3c80; }
.video-tuto-console { display: block; width: 100%; max-height: 50vh; margin-top: 8px; background: #000; border-radius: 8px; }
/* 🎬 La vidéo de la page de vente (2026-10-13) : déposer, la progression, l'aperçu, remplacer, retirer */
.video-vente-console { max-width: 620px; margin-bottom: 26px; border-color: rgba(250,5,110,.45); }
.video-vente-console h2 { margin: 0; font-size: 17px; color: var(--texte); }
.video-vente-console .aide { margin: 0; }
.apercu-video-vente { display: block; width: 100%; max-height: 50vh; background: #000; border-radius: 8px; }
.video-vente-infos { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.video-vente-infos .etiquette { margin: 0; }
.video-vente-infos .ligne .champ { flex: 1; min-width: 0; }
.boutons-video-vente { flex-wrap: wrap; }
.boutons-video-vente a.bouton { color: var(--texte); text-decoration: none; }
.confirmer-video-vente { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid rgba(255,93,93,.5); background: rgba(255,93,93,.08); font-weight: 600; }
.form-video-vente { gap: 6px; }
.fichier-cache { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.depot-video-vente { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px;
  border: 2px dashed var(--bord); border-radius: 12px; text-align: center; cursor: pointer; font-weight: 600; }
.depot-video-vente:hover, .depot-video-vente:focus-visible, .depot-video-vente.survol { border-color: var(--accent); background: rgba(250,5,110,.07); outline: none; }
.depot-icone { font-size: 30px; line-height: 1; }
#video-vente-progression { width: 220px; max-width: 100%; accent-color: #dc3c80; }
.etat-video-vente { font-weight: 600; }
.bravo-video-vente.rate { color: var(--erreur); }   /* un refus du titre, sous le champ (test de l'ado, 2026-10-13) */
#video-vente-erreur.neutre { color: var(--doux); }
