:root {
  --v-900: #0a0413;
  --v-800: #120825;
  --v-700: #1b0f38;
  --v-600: #2a1553;
  --v-500: #4c1d95;
  --v-400: #7c3aed;
  --v-300: #a855f7;
  --v-200: #c084fc;
  --v-100: #e9d5ff;
  --accent: #d946ef;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #fb7185;
  --text: #ede9fe;
  --muted: #a78bfa;
  --panel: rgba(24, 12, 46, 0.62);
  --border: rgba(168, 85, 247, 0.22);
  --glow: 0 0 40px rgba(124, 58, 237, 0.35);
  --radius: 18px;
  --shell: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body { min-height: 100%; }

body {
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--v-900);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- decor */

/* Fixe et derriere le contenu (.views est en z-index 2) : la pluie doit rester
   identique sur toutes les vues et ne jamais intercepter les clics. */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* L'animation du canvas est pilotee en JavaScript, pas par CSS : la regle
   globale qui coupe les animations ne doit donc pas la concerner. En revanche
   on garde le decor visible, sinon la page parait vide. */
@media (prefers-reduced-motion: reduce) {
  #particles { opacity: 0.55; }
}

/* Nappes de couleur animees : donnent la profondeur derriere les particules. */
.aurora {
  position: fixed;
  inset: -30%;
  z-index: -2;
  background:
    radial-gradient(38% 42% at 18% 22%, rgba(124, 58, 237, 0.55), transparent 62%),
    radial-gradient(34% 38% at 82% 26%, rgba(217, 70, 239, 0.42), transparent 64%),
    radial-gradient(46% 46% at 50% 88%, rgba(76, 29, 149, 0.55), transparent 66%);
  filter: blur(46px);
  animation: drift 24s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.03); }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}

/* ---------------------------------------------------------------- header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 34px;
  background: rgba(10, 4, 19, 0.55);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

/* Le bloc marque renvoie a l'accueil : curseur main et leger retour visuel
   pour signaler qu'il est cliquable. La transition ne porte que sur l'opacite,
   le .brand-mark ayant deja une animation sur filter. */
/* Conteneur porteur de la largeur. Le .brand garde sa taille naturelle a
   l'interieur : la zone cliquable et le contour de focus restent colles au
   logo au lieu de s'etirer sur toute la moitie de barre. */
.topbar-left { display: flex; align-items: center; flex: 1 1 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.brand:hover { opacity: 0.82; }

/* Focus visible au clavier, aligne sur le reste de l'interface. */
.brand:focus-visible {
  outline: 2px solid var(--v-300);
  outline-offset: 6px;
  border-radius: 10px;
}

/* Symbole detoure sur fond transparent : ni fond, ni border-radius. Le motif
   n'etant pas un disque plein, contain plutot que cover, sinon les extremites
   de la fleche seraient rognees. */
.brand-mark {
  display: block;
  width: 42px; height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
  background: transparent;
  animation: pulse-mark 3.4s ease-in-out infinite;
}

/* drop-shadow et non box-shadow : box-shadow suit la boite rectangulaire de
   l'element et dessinerait un halo carre autour d'un symbole decoupe, alors
   que drop-shadow epouse les contours reels du dessin. */
@keyframes pulse-mark {
  0%, 100% { filter: drop-shadow(0 0 7px rgba(124, 58, 237, 0.55)); }
  50%      { filter: drop-shadow(0 0 14px rgba(217, 70, 239, 0.8)); }
}

.logo {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(92deg, var(--v-100), var(--v-300) 40%, var(--accent) 70%, var(--v-200));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}

@keyframes shimmer { to { background-position: 260% 0; } }

/* ------------------------------------------------------------ navigation */

.nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border);
}

.nav-link {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.nav-link:hover { color: var(--v-100); }

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
}

/* La barre est en space-between sur trois zones. La zone droite ne contient
   plus que la pastille utilisateur, masquee tant que le profil n'est pas
   charge : sans largeur de base, la navigation se decalerait vers la droite
   puis sauterait a l'arrivee du profil. flex: 1 sur les deux zones laterales
   leur donne la meme part, ce qui centre la navigation de facon stable.
   (le flex de .brand est pose plus haut, dans sa declaration principale) */
.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 0;
}

/* ---------------------------------------------------------------- panier */

.cart-btn {
  position: relative;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  color: var(--v-200);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
}

.cart-btn svg { width: 20px; height: 20px; }

.cart-btn:hover {
  color: #fff;
  border-color: var(--v-300);
  background: rgba(124, 58, 237, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

/* L'anse du panier se souleve legerement au survol, comme si on s'appretait
   a le prendre. Le detail est minuscule mais rend l'icone vivante. */
.cart-btn svg path { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: center; }
.cart-btn:hover svg path { transform: translateY(-1.5px); }

/* Panier garni : la teinte passe au violet plein pour distinguer d'un coup
   d'oeil un panier rempli d'un panier vide. */
.cart-btn.filled {
  color: var(--v-100);
  border-color: var(--v-400);
  background: rgba(124, 58, 237, 0.18);
}

/* Halo lent autour d'un panier rempli : rappelle discretement qu'une
   selection attend, sans clignoter.
   Pas de z-index negatif ici : le halo passerait derriere le fond translucide
   de la barre du haut, qui l'effacerait. Il reste donc au-dessus du bouton,
   avec une opacite faible pour ne pas voiler l'icone. */
.cart-btn.filled::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 15px;
  box-shadow: 0 0 16px 2px rgba(217, 70, 239, 0.55);
  animation: cart-halo 3.4s ease-in-out infinite;
  pointer-events: none;
}

/* L'icone doit rester au-dessus du halo, sinon elle parait voilee. */
.cart-btn svg, .cart-count { position: relative; z-index: 1; }

@keyframes cart-halo {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.85; }
}

.cart-count {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 12px rgba(217, 70, 239, 0.6);
}

/* display: grid ci-dessus l'emporterait sur l'attribut hidden : sans cette
   regle, un panier vide afficherait quand meme une pastille a zero. */
.cart-count[hidden] { display: none; }

/* Secousse jouee a chaque ajout : le bouton est loin de la carte cliquee,
   ce signal relie le geste a son effet. */
.cart-btn.pulse { animation: cart-pulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes cart-pulse {
  0%   { transform: scale(1) rotate(0deg); }
  25%  { transform: scale(1.22) rotate(-7deg); }
  50%  { transform: scale(0.94) rotate(5deg); }
  75%  { transform: scale(1.08) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Onde qui s'echappe du bouton a l'ajout : le regard part du panier et
   comprend qu'il vient de recevoir quelque chose.
   opacity: 0 par defaut, car une animation sans fill-mode rend son element au
   style de base une fois terminee : sans cela l'anneau resterait affiche en
   bordure magenta pleine autour du bouton. */
.cart-btn.pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: cart-ring 0.6s ease-out;
  pointer-events: none;
}

@keyframes cart-ring {
  from { opacity: 0.85; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.9); }
}

/* La pastille rebondit a chaque changement de valeur. La classe est posee par
   le script, car l'element n'est jamais recree : sans cela l'animation ne
   serait jouee qu'au premier affichage de la page. */
.cart-count.bump { animation: cart-count-in 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes cart-count-in {
  from { opacity: 0; transform: scale(0.2); }
  to   { opacity: 1; transform: scale(1); }
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  background: rgba(6, 2, 12, 0.66);
  backdrop-filter: blur(6px);
  animation: fade-in 0.2s ease;
}

.cart-backdrop[hidden] { display: none; }

.cart-sheet {
  position: relative;
  overflow: hidden auto;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px 24px;
  background: linear-gradient(170deg, rgba(32, 16, 60, 0.97), rgba(14, 6, 28, 0.98));
  border-left: 1px solid var(--v-500);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5);
  /* Le ressort leger (overshoot) donne du poids au panneau : il arrive et se
     cale, au lieu de glisser mollement jusqu'a sa position. */
  animation: cart-in 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cart-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* Filet lumineux sur le bord gauche : marque la limite du panneau et lui
   donne le meme trait que les autres surfaces vitrees de l'interface. */
.cart-sheet::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent) 30%, var(--v-300) 60%, transparent);
  animation: cart-edge 0.9s ease-out backwards;
  animation-delay: 0.2s;
  pointer-events: none;
}

@keyframes cart-edge {
  from { opacity: 0; transform: scaleY(0.3); }
  to   { opacity: 1; transform: scaleY(1); }
}

/* Halo qui respire en haut du panneau : donne de la profondeur et maintient
   la surface vivante, a un rythme assez lent pour ne pas fatiguer. */
.cart-glow {
  position: absolute;
  top: -120px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.34), transparent 68%);
  animation: cart-glow-breathe 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cart-glow-breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.15); }
}

.cart-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

/* L'en-tete et le pied entrent apres le panneau, decales : le regard suit
   l'ordre de lecture au lieu de tout recevoir d'un bloc. */
.cart-head, .cart-foot, .cart-note, .cart-empty {
  animation: cart-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.cart-head  { animation-delay: 0.1s; }
.cart-note  { animation-delay: 0.24s; }
.cart-empty { animation-delay: 0.16s; }
.cart-foot  { animation-delay: 0.3s; }

@keyframes cart-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cart-head .eyebrow { margin-bottom: 8px; }

.cart-head h3 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(92deg, var(--v-100), var(--v-300) 45%, var(--accent) 75%, var(--v-200));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
/* La croix du panier suit le flux de l'en-tete plutot que le coin absolu
   herite de .modal-close, qui la superposerait au titre. */
.cart-head .modal-close { position: static; }

.cart-items { display: flex; flex-direction: column; gap: 10px; }

.cart-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(27, 15, 56, 0.5));
  border: 1px solid var(--border);
  /* Apparition en cascade : chaque ligne entre avec un leger retard, ce qui
     donne le sens de lecture du haut vers le bas. */
  animation: cart-item-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 80ms);
  transition: border-color 0.22s, background 0.22s, transform 0.22s, box-shadow 0.22s;
}

@keyframes cart-item-in {
  from { opacity: 0; transform: translateX(34px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.cart-item:hover {
  border-color: var(--v-300);
  transform: translateX(-3px);
  box-shadow: -6px 0 22px rgba(124, 58, 237, 0.3);
}

/* Lueur qui traverse la ligne au survol. Elle part du bord gauche et file
   vers la droite, ce qui souligne la ligne pointee sans la deplacer. */
.cart-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(217, 70, 239, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.cart-item:hover::after { animation: cart-item-sweep 0.75s ease-out; }

@keyframes cart-item-sweep {
  from { opacity: 1; transform: translateX(-100%); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* Liseré vertical sur la formule facturee : c'est la seule qui coute, elle
   merite un repere visuel que les lignes absorbees n'ont pas. */
.cart-item:not(.included)::before {
  content: "";
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--v-300), var(--accent));
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.7);
}

/* Ligne absorbee par un palier superieur : volontairement en retrait, elle
   informe sans se disputer l'attention avec la formule reellement facturee. */
.cart-item.included {
  background: rgba(10, 4, 19, 0.34);
  opacity: 0.66;
  transition: opacity 0.22s, border-color 0.22s, transform 0.22s;
}

/* Au survol elle redevient lisible : le client peut vouloir la relire avant
   de decider de la retirer. */
.cart-item.included:hover { opacity: 1; box-shadow: none; }

.cart-item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-item-main b { font-size: 15px; font-weight: 700; }
.cart-item-main span { font-size: 11.5px; color: var(--muted); }

.cart-item-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.cart-item-price {
  font-size: 15px;
  font-weight: 900;
  color: var(--v-100);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(217, 70, 239, 0.5);
}

.cart-item-side s { font-size: 12.5px; color: rgba(167, 139, 250, 0.5); }

.cart-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.35);
  animation: cart-tag-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--i, 0) * 80ms + 160ms);
}

@keyframes cart-tag-in {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

.cart-remove {
  position: relative;
  z-index: 1;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, transform 0.18s;
}

.cart-remove:hover {
  color: #fff;
  background: rgba(251, 113, 133, 0.28);
  transform: scale(1.15);
}

.cart-remove:active { transform: scale(0.9); }

.cart-empty, .cart-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.cart-note {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
}

.cart-empty[hidden], .cart-note[hidden] { display: none; }

/* Le pied colle en bas du panneau : le total et l'action restent visibles
   meme quand la liste s'allonge et defile. */
.cart-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cart-total { display: flex; align-items: baseline; justify-content: space-between; }
.cart-total span { font-size: 12.5px; color: var(--muted); }

/* Le degrade du total defile lentement, comme le logo et le titre de la page
   d'accueil : c'est le chiffre qui compte, il porte donc le meme traitement. */
.cart-total b {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(96deg, var(--v-100), var(--accent) 60%, var(--v-200));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  animation: shimmer 6s linear infinite;
}

/* Le bouton de paiement respire : c'est l'action attendue du panneau, elle
   doit se distinguer du reste sans clignoter. */
#cart-checkout {
  position: relative;
  overflow: hidden;
  animation: cart-cta-breathe 3.6s ease-in-out infinite;
}

@keyframes cart-cta-breathe {
  0%, 100% { box-shadow: 0 6px 22px rgba(124, 58, 237, 0.42); }
  50%      { box-shadow: 0 8px 32px rgba(217, 70, 239, 0.66); }
}

/* Lueur qui balaie le bouton par intermittence, comme sur le bloc portefeuille
   de l'ecran de paiement.
   ::before et non ::after : .btn::after porte deja le reflet joue au survol,
   le remplacer ici supprimerait cette reaction au passage de la souris. */
#cart-checkout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.26) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: cart-cta-sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cart-cta-sweep {
  0%, 55% { transform: translateX(-100%); }
  100%    { transform: translateX(100%); }
}

/* Un bouton desactive (panier vide) ne doit ni respirer ni scintiller : ces
   effets promettent une action qui n'aboutirait pas. */
#cart-checkout:disabled { animation: none; box-shadow: none; }
#cart-checkout:disabled::before { animation: none; opacity: 0; }

.cart-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.18s;
}

.cart-clear:hover { color: var(--err); }
.cart-clear[hidden] { display: none; }

@media (max-width: 520px) {
  .cart-sheet { width: 100%; }
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  white-space: nowrap;
}

.status-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 12px currentColor;
  animation: blink 1.6s ease-in-out infinite;
}

.status-pill.online .dot { background: var(--ok); animation: none; }
.status-pill.offline .dot { background: var(--err); }

@keyframes blink { 50% { opacity: 0.3; } }

/* ---------------------------------------------------------------- vues */

.views {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: var(--shell);
  /* Marge gauche plus large : la pluie de "+" occupe cette bande. */
  margin: 0 auto;
  padding: 46px 34px 60px;
}

.view { display: none; }

.view.active {
  display: block;
  animation: view-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--v-200);
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.section-head { margin-bottom: 30px; }

.section-head h2 {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-head p { color: var(--muted); max-width: 620px; line-height: 1.65; }

/* --------------------------------------------------------------- accueil */

.hero { padding: 26px 0 54px; max-width: 760px; }

.hero-title {
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}

.grad {
  background: linear-gradient(96deg, var(--v-300), var(--accent) 55%, var(--v-200));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

.hero-sub {
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 46px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.hero-stat { display: flex; flex-direction: column; gap: 3px; }

.hero-stat b {
  font-size: 30px;
  font-weight: 900;
  color: var(--v-100);
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------- cartes */

.cards-3, .cards-2 { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 960px) {
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s;
}

/* Survol sans deplacement : la carte n'est pas cliquable, la soulever la
   faisait passer pour un bouton. Seule la couleur reagit. */
.card:hover {
  border-color: var(--v-300);
  background: rgba(124, 58, 237, 0.14);
  box-shadow: 0 20px 54px rgba(124, 58, 237, 0.22);
}

/* Lisere lumineux en haut de chaque carte. */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 12%;
  width: 76%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--v-300), transparent);
  opacity: 0.7;
  transition: opacity 0.22s;
}

/* Le lisere s'intensifie au survol : c'est ce qui remplace le mouvement. */
.card:hover::before { opacity: 1; }

.card-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 900;
  color: var(--v-100);
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid var(--border);
}

.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 9px; }
.card p { font-size: 14px; line-height: 1.68; color: var(--muted); }

/* ---------------------------------------------------------------- etapes */

.steps { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }

.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  transition: transform 0.2s, border-color 0.2s;
}

.step:hover { transform: translateX(5px); border-color: var(--v-300); }

.step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
}

.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14px; line-height: 1.68; color: var(--muted); }

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(10, 4, 19, 0.7);
  border: 1px solid var(--border);
  color: var(--v-200);
}

.cta {
  text-align: center;
  padding: 42px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(217, 70, 239, 0.16));
  border: 1px solid var(--v-500);
  backdrop-filter: blur(18px);
}

.cta h3 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.cta p { color: var(--muted); margin-bottom: 22px; }

/* --------------------------------------------------------------- panneau */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.span-2 { grid-column: span 2; }

@media (max-width: 960px) {
  .panel-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 12%;
  width: 76%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--v-300), transparent);
  opacity: 0.7;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v-200);
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
}

.badge.soft {
  background: rgba(124, 58, 237, 0.2);
  color: var(--v-200);
  border: 1px solid var(--border);
}

.badge.live { background: linear-gradient(135deg, var(--ok), #16a34a); }
.badge.hold { background: linear-gradient(135deg, var(--warn), #d97706); }

/* --------------------------------------------------------------- champs */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v-200);
  margin-bottom: 8px;
}

.row { display: flex; gap: 9px; margin-bottom: 9px; }
.row > select { flex: 1; min-width: 0; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 4, 19, 0.6);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

textarea { resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  border-color: var(--v-300);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.16);
}

input::placeholder, textarea::placeholder { color: rgba(167, 139, 250, 0.5); }

select option { background: var(--v-800); color: var(--text); }

.mono { font-family: "JetBrains Mono", monospace; font-size: 13px; }

.hint { font-size: 11px; color: var(--muted); margin-top: 6px; }

.slider-row { display: flex; align-items: center; gap: 14px; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  height: 6px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--v-400), var(--accent));
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

input[type="range"]:focus { box-shadow: 0 0 16px rgba(124, 58, 237, 0.4); }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 12px var(--v-200);
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 12px var(--v-200);
}

.slider-value {
  min-width: 62px;
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--v-200);
}

/* -------------------------------------------------------------- boutons */

.btn {
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.16);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s, background 0.16s, box-shadow 0.16s, opacity 0.16s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.32);
}

.btn:active:not(:disabled) { transform: translateY(0); }

.btn:disabled { opacity: 0.38; cursor: not-allowed; }

/* Reflet qui balaye le bouton au survol. */
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s;
}

.btn:hover:not(:disabled)::after { left: 140%; }

.btn.primary {
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.45);
}

.btn.primary:hover:not(:disabled) { box-shadow: 0 10px 34px rgba(217, 70, 239, 0.55); }

.btn.danger { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.35); }
.btn.danger:hover:not(:disabled) { background: rgba(251, 113, 133, 0.28); box-shadow: 0 8px 24px rgba(251,113,133,0.3); }

.btn.small { padding: 8px 15px; font-size: 13px; }
.btn.lg { padding: 15px 30px; font-size: 15.5px; }

.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }

/* ------------------------------------------------------------ progression */

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(10, 4, 19, 0.7);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--v-400), var(--accent), var(--v-200));
  background-size: 200% 100%;
  animation: flow 2.4s linear infinite;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.6);
}

@keyframes flow { to { background-position: 200% 0; } }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  text-align: center;
  padding: 14px 6px;
  border-radius: 13px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border);
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 900;
  color: var(--v-100);
  font-variant-numeric: tabular-nums;
}

.stat-value.warn { color: var(--warn); }

.stat-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------- footer */

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 22px 34px 28px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer .sep { opacity: 0.5; }

/* --------------------------------------------------------------- toasts */

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 13px 18px;
  border-radius: 13px;
  background: var(--panel);
  border: 1px solid var(--v-300);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  max-width: 340px;
  animation: toast-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.toast.err { border-color: var(--err); color: #ffe4e6; }
.toast.ok  { border-color: var(--ok); }
.toast.out { animation: toast-out 0.28s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(60px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(60px) scale(0.94); }
}

/* Barres de defilement violettes, sinon le gris systeme casse le theme. */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--v-400), var(--accent));
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--v-300); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; padding: 14px 20px; }
  .nav { order: 3; width: 100%; justify-content: center; overflow-x: auto; }
  /* La navigation passe sur sa propre ligne : le partage en deux moities n'a
     plus lieu d'etre, la marque et la pastille se repartissent la ligne du
     haut avec le space-between du .topbar. */
  .topbar-left, .topbar-right { flex: 0 1 auto; }
  .views { padding: 32px 20px 48px; }
}

@media (max-width: 620px) {
  .nav-link { padding: 8px 13px; font-size: 12.5px; }
  .hero-actions .btn { flex: 1; }
  .actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 13px;
  border-radius: 999px;
  background: rgba(10, 4, 19, 0.55);
  border: 1px solid var(--border);
}

/* Regle generique de la pastille. Attention : son selecteur (0,1,1) l'emporte
   sur .role-tag (0,1,0), d'où les selecteurs .user-chip .role-tag plus bas
   pour reprendre la main sur la taille et la couleur de l'etiquette. */
.user-chip span {
  font-size: 12.5px;
  color: var(--v-200);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pseudo en JetBrains Mono, deja chargee pour les blocs techniques : aucune
   requete supplementaire. Le chasse fixe donne un rendu plus net et plus
   affirme que l'Outfit du reste de l'interface. */
.user-chip #user-email {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--v-100);
}

/* Owner : degrade anime applique au texte lui-meme. background-clip: text
   n'est visible que si la couleur est transparente, sinon elle recouvre le
   degrade. La taille 260% laisse de la matiere a faire defiler. */
.user-chip.is-owner #user-email {
  background: linear-gradient(92deg, var(--v-100), #fff 30%, var(--accent) 60%, var(--v-100));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: owner-shimmer 5s linear infinite;
}

@keyframes owner-shimmer { to { background-position: 260% 0; } }

@media (max-width: 860px) {
  /* Le pseudo cede la place faute de largeur, mais l'etiquette de role reste :
     le selecteur generique masquait aussi le badge owner, alors que c'est
     justement l'element a mettre en avant. */
  .user-chip span { display: none; }
  .user-chip .role-tag { display: inline-block; }
}

/* ---------------------------------------------------------------- admin */

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-counts { display: flex; gap: 9px; flex-wrap: wrap; }

/* Recherche de commandes ------------------------------------------------- */

.admin-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-search {
  position: relative;
  display: flex;
  align-items: center;
}

.order-search-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--v-300);
  pointer-events: none;
  transition: color 0.18s;
}

.order-search input {
  width: 260px;
  max-width: 100%;
  padding: 9px 34px 9px 34px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.1);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, width 0.22s;
}

.order-search input::placeholder { color: var(--muted); }

/* La croix native de `type="search"` doublonne avec notre bouton. */
.order-search input::-webkit-search-decoration,
.order-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.order-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.16);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.16);
}

.order-search:focus-within .order-search-icon { color: var(--accent); }

.order-search-clear {
  position: absolute;
  right: 7px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.order-search-clear:hover { color: var(--text); background: rgba(217, 70, 239, 0.2); }
.order-search-clear[hidden] { display: none; }

@media (max-width: 720px) {
  .admin-tools { width: 100%; }
  .order-search { flex: 1 1 auto; }
  .order-search input { width: 100%; }
}

.admin-note {
  margin-bottom: 16px;
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
  font-size: 13px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.14);
  color: var(--v-100);
}

.role-pill.owner {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.3), rgba(124, 58, 237, 0.3));
  border-color: var(--accent);
  color: #fae8ff;
}

.role-pill.admin { background: rgba(124, 58, 237, 0.24); border-color: var(--v-300); }
.role-pill.user  { background: rgba(10, 4, 19, 0.5); color: var(--muted); }

.role-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(124, 58, 237, 0.28);
  border: 1px solid var(--border);
  color: var(--v-100);
}

.role-tag.owner {
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  border-color: transparent;
  color: #fff;
}

/* Etiquette owner dans le header. Les selecteurs sont prefixes par .user-chip
   pour passer devant la regle generique .user-chip span (0,1,1) : sans cela
   la taille et la couleur du texte seraient celles du pseudo. */
.user-chip .role-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  max-width: none;          /* la regle generique plafonne a 170px */
  flex: 0 0 auto;           /* l'etiquette ne doit pas se comprimer */
}

.user-chip .role-tag.owner {
  position: relative;
  background: linear-gradient(135deg, var(--v-500), var(--v-400) 45%, var(--accent));
  color: #fff;
  /* Ombre portee sombre plutot que claire : sur un fond violet sature, un
     liseré blanc delaverait le texte au lieu de le detacher. */
  text-shadow: 0 1px 2px rgba(10, 4, 19, 0.55);
  box-shadow: 0 2px 12px rgba(168, 85, 247, 0.5);
  animation: owner-glow 3s ease-in-out infinite;
}

/* Reflet qui traverse l'etiquette. En ::after et non ::before, ce dernier
   etant deja utilise ailleurs sur les pastilles. overflow: hidden est porte
   par le pseudo-element via son propre border-radius, car un overflow sur le
   parent rognerait l'ombre portee. */
.user-chip .role-tag.owner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* Reflet adouci : sur le violet sature, un blanc a 0.75 delavait l'etiquette
     en gris laiteux. On garde une teinte lavande, plus juste dans le theme. */
  background: linear-gradient(100deg, transparent 30%, rgba(233, 213, 255, 0.5) 50%, transparent 70%);
  background-size: 300% 100%;
  animation: owner-sweep 3.6s ease-in-out infinite;
  pointer-events: none;     /* le reflet ne doit pas intercepter le curseur */
}

@keyframes owner-glow {
  0%, 100% { box-shadow: 0 2px 12px rgba(124, 58, 237, 0.45); }
  50%      { box-shadow: 0 2px 22px rgba(217, 70, 239, 0.8); }
}

@keyframes owner-sweep {
  0%       { background-position: 140% 0; }
  55%, 100% { background-position: -40% 0; }
}

/* La pastille entiere se pare de violet quand le compte est owner. */
.user-chip.is-owner {
  border-color: rgba(168, 85, 247, 0.6);
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.55), rgba(10, 4, 19, 0.65));
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.14), 0 6px 24px rgba(124, 58, 237, 0.28);
}

.user-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
  overflow-x: auto;
}

.user-table { width: 100%; border-collapse: collapse; min-width: 620px; }

.user-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--v-200);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.user-table td {
  padding: 14px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
  vertical-align: middle;
}

.user-table tr:last-child td { border-bottom: none; }
.user-table tbody tr { transition: background 0.18s; }
.user-table tbody tr:hover { background: rgba(124, 58, 237, 0.08); }

.user-table .row-disabled { opacity: 0.5; }

.cell-mail { word-break: break-word; }

.cell-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.cell-submail {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-all;
}
.cell-date { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.self-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(74, 222, 128, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--ok);
}

.state-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.state-tag.on   { background: rgba(74, 222, 128, 0.14); color: var(--ok); border: 1px solid rgba(74, 222, 128, 0.3); }
.state-tag.off  { background: rgba(251, 113, 133, 0.14); color: var(--err); border: 1px solid rgba(251, 113, 133, 0.3); }
.state-tag.warn { background: rgba(251, 191, 36, 0.14); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.3); }

.role-select {
  width: auto;
  min-width: 170px;
  padding: 7px 11px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.user-table td .btn { margin-right: 7px; }
.user-table td .btn:last-child { margin-right: 0; }

.user-table .empty { text-align: center; color: var(--muted); padding: 30px; }
.user-table .dash { color: rgba(167, 139, 250, 0.4); }

@media (max-width: 720px) {
  .admin-bar { flex-direction: column; align-items: stretch; }
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
  transition: color 0.18s;
}

.field-hint.good { color: var(--ok); }
.field-hint.bad  { color: var(--err); }

/* ------------------------------------------------- connexion / inscription */

.auth-body { justify-content: center; }

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px 30px 26px;
  backdrop-filter: blur(20px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), var(--glow);
  animation: auth-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.auth-head { text-align: center; margin-bottom: 24px; }
/* Page de connexion : logo centre et un peu plus grand, la carte est aeree. */
.auth-head .brand-mark { width: 56px; height: 56px; margin: 0 auto 14px; }
.auth-head .logo { font-size: 30px; margin-bottom: 8px; }

.auth-sub { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: rgba(10, 4, 19, 0.6);
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 5px 18px rgba(124, 58, 237, 0.4);
}

/* Les formulaires inactifs sortent du flux : sinon leurs champs "required"
   bloqueraient la validation du formulaire visible. */
.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-submit { width: 100%; margin-top: 4px; }

.auth-link {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.auth-link:hover:not(:disabled) { color: var(--v-100); background: rgba(124, 58, 237, 0.14); }

.auth-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
}

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: rgba(167, 139, 250, 0.62);
  text-align: center;
  line-height: 1.6;
}

.code-input {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 12px;
  padding: 15px 14px;
  text-indent: 12px;
}

/* --------------------------------------------------------- force du mot de passe */

.pwd-meter {
  height: 4px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(10, 4, 19, 0.7);
  overflow: hidden;
}

.pwd-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.28s, background 0.28s;
}

.pwd-meter span.weak   { background: var(--err); }
.pwd-meter span.medium { background: var(--warn); }
.pwd-meter span.strong { background: var(--ok); }

.pwd-rules {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
}

.pwd-rules li {
  font-size: 11.5px;
  color: rgba(167, 139, 250, 0.66);
  transition: color 0.2s;
}

.pwd-rules li::before {
  content: "○ ";
  font-size: 10px;
}

.pwd-rules li.ok { color: var(--ok); }
.pwd-rules li.ok::before { content: "● "; }

/* -------------------------------------------------------------- boutique */

.promo-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 20px;
  margin-bottom: 26px;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(217, 70, 239, 0.2), rgba(124, 58, 237, 0.14));
  border: 1px solid var(--v-500);
}

.promo-bar p { font-size: 13.5px; color: var(--v-100); }
.promo-bar b { font-family: "JetBrains Mono", monospace; color: #fff; }

.promo-tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  box-shadow: 0 4px 16px rgba(217, 70, 239, 0.5);
}

.shop-head { text-align: center; }
.shop-head p { margin: 0 auto; }

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

.trust-item {
  text-align: center;
  padding: 16px 10px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border);
}

.trust-item b {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--v-100);
  font-variant-numeric: tabular-nums;
}

.trust-item span {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 760px) {
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}

/* Cartes tarifaires : la formule mise en avant depasse volontairement des
   autres pour guider le regard sans texte supplementaire. */
.plans {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

@media (max-width: 1100px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .plans { grid-template-columns: 1fr; } }

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px 20px 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}

.plan:hover {
  transform: translateY(-6px);
  border-color: var(--v-300);
  box-shadow: 0 26px 62px rgba(124, 58, 237, 0.32);
}

.plan.featured {
  border-color: var(--accent);
  background: linear-gradient(170deg, rgba(217, 70, 239, 0.16), var(--panel) 55%);
  box-shadow: 0 22px 60px rgba(217, 70, 239, 0.3);
}

@media (min-width: 1101px) {
  .plan.featured { transform: scale(1.045); z-index: 2; }
  .plan.featured:hover { transform: scale(1.045) translateY(-6px); }
}

.plan-flag {
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  box-shadow: 0 5px 18px rgba(217, 70, 239, 0.6);
}

.plan-name { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.plan-tagline { font-size: 12.5px; color: var(--muted); line-height: 1.5; min-height: 38px; }

.plan-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0 4px;
}

.plan-old {
  width: 100%;
  font-size: 13px;
  color: rgba(167, 139, 250, 0.55);
  text-decoration: line-through;
}

.plan-amount {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(96deg, var(--v-100), var(--v-300) 55%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.plan-cur { font-size: 20px; font-weight: 700; color: var(--v-200); }
.plan-once { font-size: 11.5px; color: var(--ok); margin-bottom: 16px; }

.plan-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--v-100);
}

.plan-perks { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.plan-perks li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}

.plan-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 900;
  color: var(--ok);
}

/* Pousse le bouton en bas quelle que soit la longueur de la liste. */
.plan-btn { margin-top: auto; width: 100%; }

.plans-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 46px;
}

/* --------------------------------------------------- comparatif / preuves */

.compare-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.compare-wrap { margin-bottom: 46px; }

.compare-scroll {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
  overflow-x: auto;
}

.compare-table { width: 100%; border-collapse: collapse; min-width: 760px; }

.compare-table th, .compare-table td {
  padding: 14px 16px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.compare-table thead th {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--v-100);
  border-bottom: 1px solid var(--border);
}

.compare-table thead th em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.compare-table tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table tbody tr:hover { background: rgba(124, 58, 237, 0.07); }

.compare-table .col-featured { background: rgba(217, 70, 239, 0.09); }
.compare-table .yes { color: var(--ok); font-weight: 900; }
.compare-table .no  { color: rgba(167, 139, 250, 0.35); }

.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 46px;
}

@media (max-width: 960px) { .quotes { grid-template-columns: 1fr; } }

.quote {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  transition: transform 0.2s, border-color 0.2s;
}

.quote:hover { transform: translateY(-4px); border-color: var(--v-300); }

.quote blockquote {
  font-size: 14px;
  line-height: 1.7;
  color: var(--v-100);
  margin-bottom: 16px;
}

.quote figcaption { display: flex; flex-direction: column; gap: 2px; }
.quote figcaption b { font-size: 13.5px; }
.quote figcaption span { font-size: 11.5px; color: var(--muted); }

.faq { margin-bottom: 46px; }

.faq-item {
  padding: 16px 20px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.faq-item summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  color: var(--v-300);
  transition: transform 0.2s;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ------------------------------------------------------ modale de commande */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 2, 10, 0.72);
  backdrop-filter: blur(6px);
  animation: fade-in 0.2s ease both;
}

/* [hidden] seul ne suffirait pas : display:grid l'emporterait. */
.modal-backdrop[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 30px 28px 26px;
  border-radius: 22px;
  background: linear-gradient(170deg, rgba(42, 21, 83, 0.96), rgba(18, 8, 37, 0.97));
  border: 1px solid var(--v-500);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), var(--glow);
  animation: auth-in 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}

.modal h3 { font-size: 23px; font-weight: 900; margin-bottom: 20px; }

/* La croix doit passer au-dessus de tout le contenu de la fenetre. Sans
   z-index elle se retrouve sous les elements positionnes qui la suivent (le
   bandeau du paiement et son halo), qui interceptent alors les clics : le
   bouton parait mort alors qu'il n'est jamais atteint. */
.modal-close {
  position: absolute;
  z-index: 20;
  top: 14px; right: 16px;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease;
}

/* Seule la couleur change au survol : pas de pastille ni de rotation, qui
   alourdissaient le coin de la fenetre. */
.modal-close:hover { color: #fff; }

/* -------- confirmation maison -------- */

/* Passe au-dessus des autres fenetres : elle est toujours ouverte par-dessus
   l'une d'elles. */
.ask-backdrop { z-index: 120; padding: 20px; }

.ask-sheet {
  position: relative;
  overflow: hidden;
  width: min(410px, 100%);
  padding: 28px 26px 22px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(160deg, #1a0f33, #100722);
  border: 1px solid rgba(217, 70, 239, 0.3);
  box-shadow: 0 26px 70px rgba(3, 0, 10, 0.7);
  animation: ask-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ask-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.ask-glow {
  position: absolute;
  left: 50%;
  top: -120px;
  width: 260px;
  height: 260px;
  margin-left: -130px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(217, 70, 239, 0.3), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.ask-icon {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(217, 70, 239, 0.14);
  border: 1px solid rgba(217, 70, 239, 0.35);
}

.ask-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ask-sheet h3 {
  position: relative;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
}

.ask-text {
  position: relative;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 22px;
}

.ask-actions { position: relative; display: flex; gap: 10px; }
.ask-actions .btn { flex: 1; padding-top: 10px; padding-bottom: 10px; }

@media (max-width: 420px) {
  .ask-actions { flex-direction: column-reverse; }
}

.buy-lines { display: flex; flex-direction: column; margin-bottom: 18px; }

.buy-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.14);
}

.buy-line span { color: var(--muted); }
.buy-line b { color: var(--v-100); text-align: right; }
.buy-line.discount b { color: var(--ok); }

.buy-line.total {
  border-bottom: none;
  padding-top: 15px;
  font-size: 15px;
}

.buy-line.total b {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(96deg, var(--v-100), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.buy-note {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
}

.buy-confirm { width: 100%; }

/* -------------------------------------------------- moyens de paiement */

/* La modale de paiement porte des adresses crypto longues : elle a besoin de
   plus de largeur que le simple recapitulatif d'achat. */
.modal.wide { max-width: 540px; }

.buy-step { margin-bottom: 18px; }

.buy-step-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.pay-methods { display: flex; flex-direction: column; gap: 9px; }

.pay-method {
  position: relative;
  overflow: hidden;          /* contient le halo et le liseré animés */
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(27, 15, 56, 0.6), rgba(10, 4, 19, 0.55));
  border: 1px solid var(--border);
  color: var(--v-100);
  transition: border-color 0.22s ease, background 0.22s ease,
              transform 0.22s ease, box-shadow 0.22s ease;
}

/* Halo qui suit l'entree de la souris. Pose en ::before pour laisser ::after
   au liseré de la carte selectionnee. */
.pay-method::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              rgba(168, 85, 247, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;      /* ne doit pas intercepter le clic du bouton */
}

.pay-method:hover::before { opacity: 1; }

.pay-method:hover {
  border-color: var(--v-400);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.24);
}

.pay-method.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(217, 70, 239, 0.14));
  box-shadow: 0 0 0 1px var(--accent) inset, 0 8px 28px rgba(217, 70, 239, 0.28);
}

/* Liseré lumineux qui balaie la carte retenue : confirme le choix sans
   ajouter de texte. La bande est large et lente pour rester discrete. */
.pay-method.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 35%,
              rgba(233, 213, 255, 0.16) 50%, transparent 65%);
  background-size: 300% 100%;
  animation: pay-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pay-sweep {
  0%        { background-position: 130% 0; }
  60%, 100% { background-position: -30% 0; }
}

.pay-method-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.pay-method-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.pay-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pay-badge.instant {
  background: rgba(74, 222, 128, 0.16);
  color: var(--ok);
  border: 1px solid rgba(74, 222, 128, 0.32);
}

/* "verification" reste ambre : c'est un code couleur d'attente, pas un element
   de theme. Le violet le confondrait avec les elements selectionnables. */
.pay-badge.manual {
  background: rgba(251, 191, 36, 0.16);
  color: var(--warn);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Le point clignote lentement pour signaler une attente cote humain. */
.pay-badge.manual::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--warn);
  vertical-align: middle;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
  50%      { opacity: 0.55; box-shadow: 0 0 0 4px rgba(251, 191, 36, 0); }
}

/* Les pastilles ne portent plus que le logo : centrees, elles forment une
   rangee compacte sous la carte du moyen de paiement. */
.pay-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
}

.pay-option {
  position: relative;
  display: grid;
  place-items: center;
  /* Carre : sans texte, un rectangle laisserait du vide autour du logo. */
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(10, 4, 19, 0.5);
  border: 1px solid var(--border);
  color: var(--v-100);
  transition: border-color 0.2s ease, background 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
  /* Apparition en cascade : le retard est pose par --i depuis le JS. backwards
     retient l'etat initial avant le demarrage, sans quoi les pastilles
     clignoteraient a pleine opacite pendant leur delai d'attente. */
  animation: option-in 0.34s ease backwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes option-in {
  from { opacity: 0; transform: translateY(7px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* Le logo est legerement desature au repos : seul le reseau retenu s'affiche
   en pleine couleur, ce qui rend la selection lisible sans texte. */
.pay-option-logo {
  display: block;
  width: 30px;
  height: 30px;
  opacity: 0.72;
  filter: saturate(0.75);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.pay-option-logo svg { display: block; width: 100%; height: 100%; }

.pay-option:hover .pay-option-logo,
.pay-option.active .pay-option-logo {
  opacity: 1;
  filter: none;
}

.pay-option.active .pay-option-logo { transform: scale(1.06); }

.pay-option:hover {
  border-color: var(--v-400);
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(124, 58, 237, 0.22);
}

.pay-option.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(217, 70, 239, 0.16));
  box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.5) inset,
              0 8px 22px rgba(217, 70, 239, 0.26);
}

/* Pastille de confirmation sur le reseau retenu : plus lisible qu'une simple
   difference de teinte, notamment pour un daltonien. */
.pay-option.active::after {
  content: "✓";
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(217, 70, 239, 0.55);
  animation: option-check 0.3s ease backwards;
}

@keyframes option-check {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

.pay-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 14px; }

/* ------------------------------------------------- ecran de paiement */

/* La fenetre de paiement est la page la plus dense de l'application : elle
   assume sa hauteur plutot que de comprimer l'information. Sur grand ecran
   elle se scinde en deux colonnes, marche a suivre a gauche, QR et suivi a
   droite. */

.pay-backdrop { padding: 24px 16px; overflow-y: auto; }

.pay-sheet {
  position: relative;
  overflow: hidden;
  width: min(920px, 100%);
  max-width: 920px;
  padding: 0;                /* les sections gerent leur propre marge */
  margin: auto;
  border-radius: 22px;
  background: linear-gradient(160deg, #1a0f33 0%, #120825 46%, #0c0519 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 30px 90px rgba(3, 0, 10, 0.75),
              0 0 0 1px rgba(217, 70, 239, 0.08) inset;
  animation: pay-sheet-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes pay-sheet-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* -------- bandeau -------- */

.pay-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px 24px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.18);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(124, 58, 237, 0.32), transparent 60%),
    radial-gradient(90% 140% at 100% 0%, rgba(217, 70, 239, 0.22), transparent 62%);
}

/* Halo lent en arriere-plan : donne de la profondeur sans distraire, car il
   reste tres peu contraste. */
.pay-hero-glow {
  position: absolute;
  inset: -60% -20% auto;
  height: 260px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(217, 70, 239, 0.35), transparent 70%);
  filter: blur(38px);
  animation: pay-glow 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pay-glow {
  0%, 100% { transform: translate(-8%, 0) scale(1); opacity: 0.75; }
  50%      { transform: translate(12%, 8%) scale(1.15); opacity: 1; }
}

.pay-hero-main { position: relative; z-index: 1; min-width: 0; }
.pay-hero-id { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.pay-chip {
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--v-100);
  background: rgba(124, 58, 237, 0.28);
  border: 1px solid rgba(217, 70, 239, 0.42);
}

.pay-chip.ghost {
  background: rgba(10, 4, 19, 0.45);
  border-color: var(--border);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.pay-hero h3 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.pay-hero-sub { font-size: 13px; color: var(--muted); }

.pay-hero-amount {
  position: relative;
  z-index: 1;
  text-align: right;
  flex: 0 0 auto;
}

/* Le montant crypto prime sur le prix en euros : c'est la valeur que le
   client doit reproduire au chiffre pres. */
.pay-crypto-amount {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  margin-bottom: 2px;
}

.pay-crypto-figure {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 22px rgba(217, 70, 239, 0.55);
}

.pay-crypto-unit {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--v-200);
}

.pay-eur { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; }

.pay-eur b {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(96deg, var(--v-100), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pay-eur span { font-size: 11.5px; color: var(--muted); }

/* -------- corps en deux colonnes -------- */

.pay-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 26px;
  padding: 24px 30px 8px;
}

/* min-width:0 est indispensable : sans lui une adresse crypto sans espace
   force la colonne a s'elargir et fait deborder la grille. */
.pay-col, .pay-col-main { min-width: 0; }

/* La colonne laterale reste groupee en haut : QR puis suivi, sans etirement. */
.pay-col-side { min-width: 0; display: flex; flex-direction: column; }

.pay-section-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v-300);
  margin-bottom: 12px;
}

/* Etapes numerotees : le compteur CSS remplace la puce native, ce qui permet
   de styler le numero comme une pastille. */
.pay-steps {
  list-style: none;
  counter-reset: pas;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.pay-steps li {
  counter-increment: pas;
  position: relative;
  padding-left: 38px;
  font-size: 13.2px;
  line-height: 1.6;
  color: var(--v-100);
  animation: pay-step-in 0.4s ease backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.pay-steps li::before {
  content: counter(pas);
  position: absolute;
  left: 0;
  top: -1px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--v-400), var(--accent));
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.45);
}

@keyframes pay-step-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

/* Le montant a recopier est mis en avant dans le texte de l'etape. */
.pay-steps b {
  font-family: var(--mono, "JetBrains Mono", monospace);
  color: #fff;
  background: rgba(217, 70, 239, 0.18);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(217, 70, 239, 0.3);
}

.pay-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

/* Chaque donnee a copier occupe sa propre carte : libelle au-dessus, valeur
   en pleine largeur en dessous. Une adresse crypto est trop longue pour tenir
   sur la meme ligne que son intitule sans devenir illisible. */
.pay-field {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label bouton" "valeur bouton";
  align-items: center;
  gap: 4px 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: linear-gradient(140deg, rgba(27, 15, 56, 0.72), rgba(10, 4, 19, 0.62));
  border: 1px solid var(--border);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.pay-field:hover {
  border-color: var(--v-400);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

/* Confirmation visuelle apres copie : un bref eclat traverse la carte. */
.pay-field.copied {
  border-color: var(--ok);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35) inset,
              0 8px 26px rgba(74, 222, 128, 0.22);
}

.pay-field.copied::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(74, 222, 128, 0.22) 50%, transparent 80%);
  animation: pay-copied 0.7s ease;
  pointer-events: none;
}

@keyframes pay-copied {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

.pay-field-label {
  grid-area: label;
  font-size: 10px;
  font-weight: 700;
  color: var(--v-300);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Une adresse crypto ne doit jamais deborder ni etre tronquee : elle doit
   rester lisible et selectionnable en entier. */
.pay-field-value {
  grid-area: valeur;
  min-width: 0;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 12.5px;
  line-height: 1.5;
  color: #fff;
  word-break: break-all;
  user-select: all;
}

/* Bouton de copie reduit a son symbole : carre, il libere la largeur au
   profit de la valeur, souvent longue (adresse de portefeuille). */
.pay-copy {
  grid-area: bouton;
  align-self: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.16);
  color: var(--v-200);
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s;
}

.pay-copy svg { width: 17px; height: 17px; display: block; }

.pay-copy:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.34);
  border-color: var(--v-300);
  transform: translateY(-1px);
}

.pay-copy:active { transform: scale(0.92); }

/* Etat de reussite : la coche verte reprend la couleur de l'eclat qui
   traverse la carte, les deux signaux se repondent. */
.pay-copy.done {
  color: var(--ok);
  background: rgba(74, 222, 128, 0.16);
  border-color: rgba(74, 222, 128, 0.42);
}

/* La coche apparait en rebondissant : le changement de symbole se remarque
   davantage qu'une simple substitution. */
.pay-copy.done svg { animation: pay-copy-check 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes pay-copy-check {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

.pay-input { margin-top: 14px; }

/* -------- QR code -------- */

.pay-qr-card {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(27, 15, 56, 0.7), rgba(10, 4, 19, 0.6));
  border: 1px solid var(--border);
  text-align: center;
  margin-bottom: 18px;
}

.pay-qr-card .pay-section-title { text-align: left; }

/* Fond blanc obligatoire : un QR sur fond sombre n'est pas lu de maniere
   fiable par les appareils photo. */
.pay-qr {
  width: 168px;
  height: 168px;
  margin: 0 auto 10px;
  padding: 9px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.35),
              0 10px 30px rgba(124, 58, 237, 0.3);
  animation: pay-qr-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards 0.1s;
}

.pay-qr svg { display: block; width: 100%; height: 100%; }

@keyframes pay-qr-in {
  from { opacity: 0; transform: scale(0.9) rotate(-2deg); }
  to   { opacity: 1; transform: none; }
}

.pay-qr-note { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* -------- suivi du paiement -------- */

.pay-track {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(27, 15, 56, 0.7), rgba(10, 4, 19, 0.6));
  border: 1px solid var(--border);
}

.pay-track-list { list-style: none; margin: 0; padding: 0; }

.pay-track-step {
  position: relative;
  display: flex;
  gap: 13px;
  padding-bottom: 20px;
}

.pay-track-step:last-child { padding-bottom: 0; }

/* Trait vertical reliant les etapes : il s'arrete avant la derniere pastille
   pour ne pas depasser dans le vide. */
.pay-track-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: 4px;
  width: 2px;
  border-radius: 1px;
  background: rgba(168, 85, 247, 0.2);
}

.pay-track-step.done:not(:last-child)::before { background: var(--v-400); }

.pay-track-dot {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(10, 4, 19, 0.9);
  border: 2px solid rgba(168, 85, 247, 0.35);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pay-track-step.done .pay-track-dot {
  background: var(--v-400);
  border-color: var(--v-300);
}

/* L'etape en cours pulse : c'est le seul point anime de la colonne, donc le
   regard s'y pose naturellement. */
.pay-track-step.current .pay-track-dot {
  border-color: var(--accent);
  background: var(--accent);
  animation: pay-pulse 1.9s ease-in-out infinite;
}

@keyframes pay-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 70, 239, 0.55); }
  50%      { box-shadow: 0 0 0 7px rgba(217, 70, 239, 0); }
}

.pay-track-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-track-text b { font-size: 12.5px; font-weight: 700; color: var(--muted); transition: color 0.3s ease; }
.pay-track-text i { font-style: normal; font-size: 11px; color: rgba(167, 139, 250, 0.65); }

.pay-track-step.done .pay-track-text b,
.pay-track-step.current .pay-track-text b { color: var(--v-100); }
.pay-track-step.current .pay-track-text i { color: var(--v-200); }

/* -------- pied -------- */

.pay-foot {
  padding: 16px 30px 26px;
  border-top: 1px solid rgba(168, 85, 247, 0.16);
  background: rgba(10, 4, 19, 0.35);
}

.pay-hint {
  font-size: 12px;
  color: var(--v-200);
  text-align: center;
  margin-bottom: 14px;
  min-height: 17px;
}

.pay-actions { display: flex; gap: 10px; }
.pay-actions .btn { flex: 1; }

/* -------- voile de reussite -------- */

/* display:flex l'emporte sur l'attribut hidden : sans ce garde, le voile de
   reussite recouvre l'ecran des l'ouverture et le paiement devient
   impossible. Meme precaution pour les autres blocs masques par defaut. */
.pay-success[hidden],
.pay-crypto-amount[hidden],
.pay-qr-card[hidden],
.pay-track[hidden],
.pay-wallet[hidden],
.pay-fields[hidden],
.pay-manual-toggle[hidden],
.pay-field[hidden] { display: none !important; }

/* -------- repli manuel -------- */

.pay-manual-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 auto 14px;
  padding: 7px 13px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--v-200);
  background: rgba(10, 4, 19, 0.4);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pay-manual-toggle:hover {
  color: var(--v-100);
  border-color: var(--v-400);
  background: rgba(124, 58, 237, 0.16);
}

.pay-manual-toggle svg {
  width: 10px;
  height: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.pay-manual-toggle.open svg { transform: rotate(180deg); }

/* -------- paiement en un clic -------- */

/* Ce bloc precede la marche a suivre : quand il est disponible, c'est le
   chemin le plus court, les etapes manuelles deviennent un repli. */
.pay-wallet {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 17px 18px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.26), rgba(27, 15, 56, 0.66));
  border: 1px solid rgba(217, 70, 239, 0.42);
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.24);
  animation: pay-wallet-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes pay-wallet-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* Halo qui respire derriere le bloc : profondeur sans clignotement. */
.pay-wallet::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -70%;
  width: 240px;
  height: 240px;
  margin-left: -120px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(217, 70, 239, 0.3), transparent 70%);
  filter: blur(26px);
  animation: pay-wallet-breathe 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pay-wallet-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.18); }
}

/* Lueur qui balaie lentement le bloc : attire l'oeil vers le raccourci sans
   clignoter ni reclamer l'attention. */
.pay-wallet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(217, 70, 239, 0.16) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: pay-wallet-sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pay-wallet-sweep {
  0%, 55% { transform: translateX(-100%); }
  100%    { transform: translateX(100%); }
}

.pay-wallet-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }

/* L'icone du reseau flotte legerement : un mouvement lent, presque
   imperceptible, qui signale que le bloc est vivant. */
.pay-wallet-icon {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(10, 4, 19, 0.6);
  border: 1px solid rgba(217, 70, 239, 0.34);
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.22) inset;
  animation: pay-wallet-float 3.6s ease-in-out infinite;
}

@keyframes pay-wallet-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.pay-wallet-icon svg { width: 22px; height: 22px; display: block; }

.pay-wallet-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pay-wallet-text b { font-size: 13.5px; font-weight: 700; color: #fff; }

.pay-wallet-text i {
  font-style: normal;
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 11.5px;
  color: var(--v-200);
}

/* Bouton principal : plus haut que les autres, avec un reflet qui le traverse
   au survol. C'est l'action que l'on veut voir choisie. */
.pay-wallet-btn {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.2s ease;
}

.pay-wallet-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(217, 70, 239, 0.42);
  filter: brightness(1.06);
}

.pay-wallet-btn:not(:disabled):active { transform: translateY(0); }

.pay-wallet-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.pay-wallet-btn:not(:disabled):hover::after { transform: translateX(100%); }

.pay-wallet-btn:disabled { opacity: 0.75; cursor: default; }

.pay-wallet-note {
  position: relative;
  z-index: 1;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* Virement transmis : le bloc bascule au vert et la lueur s'arrete, pour
   signaler qu'il n'y a plus rien a faire ici. */
.pay-wallet.sent {
  background: linear-gradient(145deg, rgba(22, 78, 52, 0.5), rgba(10, 25, 18, 0.6));
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: 0 10px 32px rgba(74, 222, 128, 0.16);
}

.pay-wallet.sent::before { animation: none; opacity: 0; }
.pay-wallet.sent .pay-wallet-note { color: rgba(209, 250, 229, 0.8); }

.pay-success {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px;
  text-align: center;
  background: linear-gradient(160deg, rgba(15, 34, 24, 0.97), rgba(8, 5, 20, 0.98));
  animation: pay-success-in 0.4s ease;
}

@keyframes pay-success-in { from { opacity: 0; } to { opacity: 1; } }

.pay-success-burst {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(74, 222, 128, 0.28), transparent 70%);
  animation: pay-burst 1.5s ease-out;
  pointer-events: none;
}

@keyframes pay-burst {
  from { transform: scale(0.3); opacity: 0.9; }
  to   { transform: scale(1.6); opacity: 0; }
}

.pay-success-badge { position: relative; width: 78px; height: 78px; margin-bottom: 10px; }
.pay-success-badge svg { width: 100%; height: 100%; }

/* Le cercle puis la coche se tracent : le trait est dessine en animant
   stroke-dashoffset, ce qui donne l'effet d'ecriture a la main. */
.pay-success-ring {
  fill: none;
  stroke: var(--ok);
  stroke-width: 2.5;
  stroke-dasharray: 145;
  stroke-dashoffset: 145;
  animation: pay-draw 0.55s ease forwards;
}

.pay-success-check {
  fill: none;
  stroke: var(--ok);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: pay-draw 0.4s ease 0.45s forwards;
}

@keyframes pay-draw { to { stroke-dashoffset: 0; } }

.pay-success-title {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  animation: pay-step-in 0.4s ease 0.6s backwards;
}

.pay-success-sub {
  font-size: 13px;
  color: rgba(209, 250, 229, 0.75);
  animation: pay-step-in 0.4s ease 0.72s backwards;
}

/* -------- adaptation aux petits ecrans -------- */

@media (max-width: 860px) {
  /* Une seule colonne : le QR et le suivi passent sous la marche a suivre,
     dans cet ordre, car scanner vient avant attendre. */
  .pay-body { grid-template-columns: 1fr; gap: 20px; padding: 20px 20px 6px; }
  .pay-hero { padding: 22px 20px 20px; }
  .pay-hero h3 { font-size: 23px; }
  .pay-hero-amount { text-align: left; }
  .pay-crypto-amount, .pay-eur { justify-content: flex-start; }
  .pay-foot { padding: 14px 20px 22px; }
  .pay-actions { flex-direction: column; }
}

@media (max-width: 460px) {
  .pay-backdrop { padding: 12px 8px; }
  /* Sur petit ecran la valeur garde la pleine largeur, le bouton reste dans
     la colonne de droite : carre, il ne la vole plus comme le faisait le
     bouton texte, qui devait alors passer sous la valeur. */
  .pay-field { grid-template-columns: 1fr auto; grid-template-areas: "label bouton" "valeur bouton"; }
  .pay-crypto-figure { font-size: 21px; }
}

.orders-head { margin-top: 46px; }

.order-table .cell-name.mono {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.plan.locked { opacity: 0.55; }
.plan.locked .plan-btn { cursor: not-allowed; }

/* ----------------------------------------------- verrouillage du panneau */

.lock-screen {
  text-align: center;
  padding: 56px 30px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px dashed var(--v-500);
  backdrop-filter: blur(18px);
}

.lock-icon { font-size: 40px; margin-bottom: 14px; opacity: 0.85; }

.lock-screen h3 { font-size: 25px; font-weight: 900; margin-bottom: 10px; }

.lock-screen p {
  max-width: 460px;
  margin: 0 auto 24px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.plan-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 18px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
}

.plan-banner p { flex: 1; min-width: 200px; font-size: 13px; color: var(--muted); }

.plan-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--v-400), var(--accent));
  white-space: nowrap;
}

/* Chaque palier a sa teinte : le role se lit d'un coup d'oeil. */
.plan-chip.decouverte,
.role-pill.decouverte { background: rgba(148, 163, 184, 0.26); color: #e2e8f0; border-color: rgba(148,163,184,0.4); }
.plan-chip.starter,
.role-pill.starter    { background: rgba(56, 189, 248, 0.24); color: #bae6fd; border-color: rgba(56,189,248,0.42); }
.plan-chip.pro,
.role-pill.pro        { background: linear-gradient(135deg, var(--v-400), var(--accent)); color: #fff; border-color: transparent; }
.plan-chip.business,
.role-pill.business   { background: rgba(251, 191, 36, 0.24); color: #fde68a; border-color: rgba(251,191,36,0.45); }
.plan-chip.illimite,
.role-pill.illimite   { background: linear-gradient(135deg, #22d3ee, #4ade80); color: #04231c; border-color: transparent; }

.role-tag.decouverte { background: rgba(148, 163, 184, 0.3); color: #e2e8f0; }
.role-tag.starter    { background: rgba(56, 189, 248, 0.3); color: #bae6fd; }
.role-tag.pro        { background: linear-gradient(135deg, var(--v-400), var(--accent)); color: #fff; border-color: transparent; }
.role-tag.business   { background: rgba(251, 191, 36, 0.3); color: #fde68a; }
.role-tag.illimite   { background: linear-gradient(135deg, #22d3ee, #4ade80); color: #04231c; border-color: transparent; }

.plan.owned { border-color: var(--ok); box-shadow: 0 22px 60px rgba(74, 222, 128, 0.22); }

.plan-flag.owned-flag {
  background: linear-gradient(135deg, var(--ok), #16a34a);
  box-shadow: 0 5px 18px rgba(74, 222, 128, 0.5);
}

/* --------------------------------------------- owner / mouvement reduit  */

/* Place en fin de fichier a dessein : les regles owner arrivent apres le bloc
   prefers-reduced-motion general, et a specificite egale c'est la derniere
   declaration qui l'emporte. Ce correctif doit donc venir apres elles. */
@media (prefers-reduced-motion: reduce) {
  /* Le pseudo owner est peint via background-clip: text avec color:
     transparent. Animation coupee, le degrade ne defile plus et le texte
     resterait illisible : on repasse a une couleur pleine. */
  .user-chip.is-owner #user-email {
    background: none;
    color: var(--v-100);
  }

  /* Le reflet fige couvrirait l'etiquette d'un voile blanc immobile. */
  .user-chip .role-tag.owner::after { display: none; }

  /* Bloc de paiement : les decors animes sont retires plutot que figes. Un
     balayage arrete en milieu de course laisserait une bande claire posee sur
     le bouton, et un halo fige masquerait le texte. */
  .pay-wallet::before,
  .pay-wallet::after,
  .pay-wallet-btn::after { display: none; }

  .pay-wallet-icon { animation: none; }
}
