/* ============================================================
   DEBUG SITE — style.css  v4
   Thème : terminal phosphore · RGB · CRT · glitch
   ============================================================ */

/* --- Import Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

/* ══════════════════════════════════════════════════════════════
   VARIABLES
   ══════════════════════════════════════════════════════════════ */
:root {
  --bg:          #060608;
  --bg-card:     #0d0d10;
  --border:      #1a1a22;
  --green:       #00ff88;
  --green-dim:   #00994d;
  --green-glow:  rgba(0, 255, 136, 0.18);
  --amber:       #ffb800;
  --red:         #ff3b3b;
  --blue:        #3b9eff;
  --purple:      #c060ff;
  --cyan:        #00e5ff;
  --text:        #c8ccd8;
  --text-dim:    #44475a;
  --font-mono:   'Share Tech Mono', 'Courier New', monospace;
  --font-title:  'Orbitron', sans-serif;
  --radius:      4px;
  --gap:         16px;
  --rgb-hue:     0deg;
}

@property --rgb-hue {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}

/* ══════════════════════════════════════════════════════════════
   RESET
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════ */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* Scanlines CRT */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  animation: scanlineShift 12s linear infinite;
}

/* Vignette CRT */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.55) 100%);
}

/* Ligne RGB haut du header */
header::before {
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(
    90deg,
    hsl(var(--rgb-hue), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 60deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 120deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 180deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 240deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 300deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 360deg), 100%, 60%)
  );
  animation: rgbHueSpin 4s linear infinite;
  box-shadow:
    0 0 12px hsl(var(--rgb-hue), 100%, 60%),
    0 0 30px hsl(calc(var(--rgb-hue) + 120deg), 100%, 55%);
}

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
header {
  border-bottom: 1px solid var(--border);
  padding: 28px 40px 24px;
  position: relative;
}

.header-top {
  display: flex;
  justify-content: space-between;
  color: var(--green-dim);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

#clock {
  color: var(--green);
  text-shadow: 0 0 8px rgba(0,255,136,0.5);
  font-size: 11px;
  letter-spacing: 0.2em;
}
#clock::after {
  content: 'I';
  animation: cursorBlink 1s step-end infinite;
  margin-left: 3px;
  font-size: 10px;
  opacity: 0.8;
}

h1 {
  font-family: var(--font-title);
  font-size: clamp(22px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  position: relative;
  display: inline-block;
}

h1 .accent {
  color: var(--green);
  position: relative;
  display: inline-block;
  animation: greenGlow 3s ease-in-out infinite;
}

h1 .accent::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #ff0055;
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  transform: translateX(-2px);
  animation: glitchR 5s steps(1) infinite;
  opacity: 0.7;
  pointer-events: none;
}

h1 .accent::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #00e5ff;
  clip-path: polygon(0 55%, 100% 55%, 100% 70%, 0 70%);
  transform: translateX(2px);
  animation: glitchC 5s steps(1) infinite 0.3s;
  opacity: 0.7;
  pointer-events: none;
}

.device-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.2em;
  border-radius: 2px;
  margin-left: 14px;
  vertical-align: middle;
  font-family: var(--font-mono);
  animation: fadeBadge 0.5s ease both 0.3s;
  text-shadow: 0 0 6px rgba(0,255,136,0.5);
  box-shadow: 0 0 8px rgba(0,255,136,0.08) inset;
}

.subtitle {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* ══════════════════════════════════════════════════════════════
   GRILLE
   ══════════════════════════════════════════════════════════════ */
main { padding: 32px 40px; }

#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.card-wide { grid-column: span 2; }
@media (max-width: 680px) { .card-wide { grid-column: span 1; } }

/* ══════════════════════════════════════════════════════════════
   CARTES
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Barre RGB haut de carte (visible au hover) */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--rgb-hue), 80%, 55%) 40%,
    hsl(calc(var(--rgb-hue) + 120deg), 80%, 55%) 60%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: rgbHueSpin 4s linear infinite;
}

/* Coin bracket bas-droite */
.card::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  border-bottom: 1px solid var(--border);
  border-right:  1px solid var(--border);
  transition: border-color 0.3s, width 0.3s, height 0.3s;
}

.card:hover {
  border-color: var(--green-dim);
  box-shadow:
    0 0 0 1px rgba(0,255,136,0.06),
    0 0 20px rgba(0,255,136,0.07),
    0 4px 24px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }
.card:hover::after  { border-color: var(--green-dim); width: 18px; height: 18px; }

/* Délais cascade */
.card:nth-child(1)  { animation-delay: 0.03s }
.card:nth-child(2)  { animation-delay: 0.06s }
.card:nth-child(3)  { animation-delay: 0.09s }
.card:nth-child(4)  { animation-delay: 0.12s }
.card:nth-child(5)  { animation-delay: 0.15s }
.card:nth-child(6)  { animation-delay: 0.18s }
.card:nth-child(7)  { animation-delay: 0.21s }
.card:nth-child(8)  { animation-delay: 0.24s }
.card:nth-child(9)  { animation-delay: 0.27s }
.card:nth-child(10) { animation-delay: 0.30s }
.card:nth-child(11) { animation-delay: 0.33s }
.card:nth-child(12) { animation-delay: 0.36s }
.card:nth-child(13) { animation-delay: 0.39s }
.card:nth-child(14) { animation-delay: 0.42s }
.card:nth-child(15) { animation-delay: 0.45s }
.card:nth-child(16) { animation-delay: 0.48s }
.card:nth-child(17) { animation-delay: 0.51s }
.card:nth-child(18) { animation-delay: 0.54s }
.card:nth-child(19) { animation-delay: 0.57s }
.card:nth-child(20) { animation-delay: 0.60s }
.card:nth-child(21) { animation-delay: 0.63s }
.card:nth-child(22) { animation-delay: 0.66s }
.card:nth-child(23) { animation-delay: 0.69s }
.card:nth-child(24) { animation-delay: 0.72s }
.card:nth-child(25) { animation-delay: 0.75s }
.card:nth-child(26) { animation-delay: 0.78s }

/* Titres de carte */
.card h2 {
  font-family: var(--font-title);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 8px rgba(0,255,136,0.35);
}

.card h2::before {
  content: '▸ ';
  color: var(--green-dim);
  font-size: 8px;
}

/* ══════════════════════════════════════════════════════════════
   LIGNES CLÉ / VALEUR
   ══════════════════════════════════════════════════════════════ */
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #0f0f14;
  transition: background 0.12s ease, padding 0.12s ease;
}
.row:last-child { border-bottom: none; }
.row:hover:not(.row-sep) {
  background: rgba(0,255,136,0.03);
  padding-left: 3px;
  padding-right: 3px;
  margin: 0 -3px;
  border-radius: 2px;
}

.key {
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
  max-width: 50%;
}

.val {
  color: var(--text);
  text-align: right;
  word-break: break-all;
  font-size: 12px;
  max-width: 65%;
  overflow-wrap: anywhere;
}

.val.ok    { color: var(--green); text-shadow: 0 0 6px rgba(0,255,136,0.4); }
.val.warn  { color: var(--amber); text-shadow: 0 0 6px rgba(255,184,0,0.3); }
.val.error { color: var(--red);   text-shadow: 0 0 6px rgba(255,59,59,0.3); }
.val.info  { color: var(--blue);  text-shadow: 0 0 6px rgba(59,158,255,0.3); }

.val.live {
  color: var(--green);
  text-shadow: 0 0 8px rgba(0,255,136,0.6);
  animation: liveFlicker 2s ease-in-out infinite;
}

/* Séparateurs */
.row-sep {
  border-bottom: 1px solid var(--border);
  margin: 8px 0 4px;
  position: relative;
}
.row-sep::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 30%;
  height: 1px;
  background: var(--green-dim);
  opacity: 0.5;
}
.row-sep .key {
  color: var(--green-dim);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-title);
}
.row-sep .val { color: transparent; }

/* ══════════════════════════════════════════════════════════════
   BARRES DE PROGRESSION
   ══════════════════════════════════════════════════════════════ */
.bar-wrap {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
  position: relative;
}
.bar-wrap::after {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  background: rgba(255,255,255,0.06);
  border-radius: 3px 3px 0 0;
  pointer-events: none;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  border-radius: 3px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  box-shadow: 0 0 8px rgba(0,255,136,0.5);
}
.bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.5s ease-in-out infinite 1s;
}
.bar-fill.warn  { background: linear-gradient(90deg, #cc9200, var(--amber)); box-shadow: 0 0 8px rgba(255,184,0,0.4); }
.bar-fill.error { background: linear-gradient(90deg, #cc1f1f, var(--red));   box-shadow: 0 0 8px rgba(255,59,59,0.4);  }

.mic-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.mic-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  border-radius: 3px;
  width: 0%;
  transition: width 0.04s linear;
  box-shadow: 0 0 6px rgba(0,255,136,0.5);
}

/* ══════════════════════════════════════════════════════════════
   BOUTONS D'ACTION
   ══════════════════════════════════════════════════════════════ */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action-btn {
  background: transparent;
  border: 1px solid rgba(0,255,136,0.28);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 7px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.4s ease;
  pointer-events: none;
}
.action-btn:hover:not(:disabled)::before { left: 150%; }

.action-btn:hover:not(:disabled) {
  background: rgba(0,255,136,0.1);
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.18), 0 0 14px rgba(0,255,136,0.15), inset 0 0 8px rgba(0,255,136,0.05);
  transform: translateY(-1px);
  text-shadow: 0 0 8px rgba(0,255,136,0.6);
}
.action-btn:active:not(:disabled) { transform: translateY(1px) scale(0.97); box-shadow: none; }

.action-btn.amber { border-color: rgba(255,184,0,0.28); color: var(--amber); }
.action-btn.amber:hover:not(:disabled) {
  background: rgba(255,184,0,0.1); border-color: var(--amber);
  box-shadow: 0 0 14px rgba(255,184,0,0.2);
  text-shadow: 0 0 8px rgba(255,184,0,0.6);
}
.action-btn.red { border-color: rgba(255,59,59,0.28); color: var(--red); }
.action-btn.red:hover:not(:disabled) {
  background: rgba(255,59,59,0.1); border-color: var(--red);
  box-shadow: 0 0 14px rgba(255,59,59,0.2);
}
.action-btn.blue { border-color: rgba(59,158,255,0.28); color: var(--blue); }
.action-btn.blue:hover:not(:disabled) {
  background: rgba(59,158,255,0.1); border-color: var(--blue);
  box-shadow: 0 0 14px rgba(59,158,255,0.2);
  text-shadow: 0 0 8px rgba(59,158,255,0.6);
}

.action-btn:disabled { opacity: 0.22; cursor: not-allowed; filter: grayscale(0.6); }
.action-btn.active   { background: rgba(0,255,136,0.14); border-color: var(--green); }

/* ══════════════════════════════════════════════════════════════
   STATUT + LIVE DOT
   ══════════════════════════════════════════════════════════════ */
.action-status {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  min-height: 16px;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  word-break: break-all;
  transition: color 0.2s ease;
}
.action-status.ok    { color: var(--green); text-shadow: 0 0 6px rgba(0,255,136,0.3); }
.action-status.warn  { color: var(--amber); }
.action-status.error { color: var(--red);   }

.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  box-shadow: 0 0 6px var(--green), 0 0 12px rgba(0,255,136,0.4);
  animation: livePulse 1.1s ease-in-out infinite;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    hsl(calc(var(--rgb-hue) + 180deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 240deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 300deg), 100%, 60%),
    hsl(calc(var(--rgb-hue) + 360deg), 100%, 60%)
  );
  animation: rgbHueSpin 4s linear infinite reverse;
  opacity: 0.55;
}
#perf-time { color: var(--green-dim); font-size: 10px; letter-spacing: 0.1em; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0);   }
}

@keyframes rgbHueSpin {
  from { --rgb-hue: 0deg;   }
  to   { --rgb-hue: 360deg; }
}

@keyframes greenGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(0,255,136,0.4); }
  50%       { text-shadow: 0 0 24px rgba(0,255,136,0.9), 0 0 48px rgba(0,255,136,0.3); }
}

@keyframes glitchR {
  0%,  94% { transform: translateX(-2px); clip-path: polygon(0 30%,100% 30%,100% 50%,0 50%); opacity: 0; }
  95%       { transform: translateX(-4px) scaleY(1.1); clip-path: polygon(0 28%,100% 28%,100% 52%,0 52%); opacity: 0.8; }
  97%       { transform: translateX(2px);  clip-path: polygon(0 10%,100% 10%,100% 30%,0 30%); opacity: 0.6; }
  99%       { transform: translateX(-1px); clip-path: polygon(0 60%,100% 60%,100% 75%,0 75%); opacity: 0.5; }
  100%      { opacity: 0; }
}

@keyframes glitchC {
  0%,  91% { transform: translateX(2px);  clip-path: polygon(0 55%,100% 55%,100% 70%,0 70%); opacity: 0; }
  92%       { transform: translateX(4px) scaleY(0.9); clip-path: polygon(0 53%,100% 53%,100% 72%,0 72%); opacity: 0.7; }
  94%       { transform: translateX(-3px); clip-path: polygon(0 20%,100% 20%,100% 35%,0 35%); opacity: 0.5; }
  96%       { transform: translateX(1px); opacity: 0.4; }
  100%      { opacity: 0; }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes liveFlicker {
  0%,  96%, 100% { opacity: 1; }
  97%             { opacity: 0.7; text-shadow: 0 0 4px rgba(0,255,136,0.3); }
  98%             { opacity: 1;   text-shadow: 0 0 16px rgba(0,255,136,0.9); }
  99%             { opacity: 0.8; }
}

@keyframes scanlineShift {
  0%   { background-position: 0 0;    }
  100% { background-position: 0 100px; }
}

@keyframes shimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

@keyframes livePulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 4px var(--green), 0 0 10px rgba(0,255,136,0.3); }
  50%       { transform: scale(1.4); box-shadow: 0 0 10px var(--green), 0 0 22px rgba(0,255,136,0.5); }
}

@keyframes fadeBadge {
  from { opacity: 0; transform: scale(0.8) translateX(8px); }
  to   { opacity: 1; transform: scale(1)   translateX(0); }
}

/* ══════════════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dim); }

/* ══════════════════════════════════════════════════════════════
   SÉLECTION
   ══════════════════════════════════════════════════════════════ */
::selection { background: rgba(0,255,136,0.2); color: var(--green); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  header, main, footer { padding-left: 20px; padding-right: 20px; }
  .header-top { flex-direction: column; gap: 4px; }
  .action-btn { font-size: 12px; padding: 9px 14px; }
  h1 { font-size: 26px; }
}

/* ══════════════════════════════════════════════════════════════
   ACCESSIBILITÉ — RÉDUCTION DE MOUVEMENT
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   MENU THEME
   ============================================================ */

.theme-menu {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-top: 8px;
  border-radius: 4px;
  display: none;
  min-width: 160px;
  z-index: 1000;
  overflow: hidden;
}

.theme-menu.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

.theme-menu div {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: background 0.2s;
}

.theme-menu div:hover {
  background: rgba(0,255,136,0.1);
}


/* ============================================================
   THEMES
   ============================================================ */

/* --- FUTURISTE (déjà actif) --- */
body.theme-futuriste {}


/* --- LIGHT --- */
body.theme-light {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --border: #ddd;
  --text: #111;
  --text-dim: #666;
  --green: #007aff;
  --green-dim: #0051aa;
  --green-glow: rgba(0,122,255,0.15);
}

body.theme-light header::before,
body.theme-light footer::before,
body.theme-light::before,
body.theme-light::after {
  display: none;
}

body.theme-light .card {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}


/* --- CYBERPUNK --- */
body.theme-cyberpunk {
  --bg: #0a0014;
  --bg-card: #140028;
  --border: #2a004d;
  --text: #ff9cf9;
  --text-dim: #a24ccf;
  --green: #ff00cc;
  --green-dim: #990099;
  --blue: #00e5ff;
}

body.theme-cyberpunk .card {
  box-shadow: 0 0 25px rgba(255,0,200,0.2);
}


/* --- MATRIX --- */
body.theme-matrix {
  --bg: #000000;
  --bg-card: #020202;
  --border: #003300;
  --text: #00ff00;
  --text-dim: #007700;
  --green: #00ff00;
  --green-dim: #009900;
}

body.theme-matrix {
  font-family: monospace;
}

body.theme-matrix .card {
  box-shadow: 0 0 12px rgba(0,255,0,0.3);
}

/* ============================================================
   NOUVEAUX THEMES
   ============================================================ */

/* --- RAINBOW (ANIMÉ) --- */
body.theme-rainbow {
  --bg: #0a0a0a;
  --bg-card: #111;
  --border: #222;
  --text: #ffffff;
  --text-dim: #888;
  --green: #ffffff;
}

body.theme-rainbow {
  animation: rainbowBg 10s linear infinite;
}

body.theme-rainbow .card {
  border: 1px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              linear-gradient(90deg, red, orange, yellow, green, cyan, blue, violet) border-box;
}

body.theme-rainbow h1 .accent {
  background: linear-gradient(90deg, red, orange, yellow, green, cyan, blue, violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* --- SUNSET (chill orange/purple) --- */
body.theme-sunset {
  --bg: #1a0f1f;
  --bg-card: #2a132f;
  --border: #3a1d40;
  --text: #ffd6a5;
  --text-dim: #c77dff;
  --green: #ff9e00;
  --green-dim: #ff6d00;
}

body.theme-sunset .card {
  box-shadow: 0 0 20px rgba(255,100,0,0.15);
}


/* --- ICE (bleu froid) --- */
body.theme-ice {
  --bg: #0a1a2f;
  --bg-card: #102840;
  --border: #1e3a5f;
  --text: #cceeff;
  --text-dim: #6aaed6;
  --green: #00cfff;
  --green-dim: #0099cc;
}

body.theme-ice .card {
  box-shadow: 0 0 20px rgba(0,200,255,0.15);
}


/* --- BLOOD (dark rouge) --- */
body.theme-blood {
  --bg: #0a0000;
  --bg-card: #140000;
  --border: #2a0000;
  --text: #ffcccc;
  --text-dim: #aa4444;
  --green: #ff1a1a;
  --green-dim: #990000;
}

body.theme-blood .card {
  box-shadow: 0 0 20px rgba(255,0,0,0.2);
}


/* --- TERMINAL AMBER (old school) --- */
body.theme-amber {
  --bg: #0a0800;
  --bg-card: #141000;
  --border: #2a2200;
  --text: #ffb800;
  --text-dim: #997000;
  --green: #ffb800;
  --green-dim: #cc9200;
}

body.theme-amber {
  font-family: monospace;
}


/* ============================================================
   ANIMATION RAINBOW
   ============================================================ */

@keyframes rainbowBg {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ============================================================
   THEMES ORIGINAUX
   ============================================================ */


/* --- HARD RGB (AGRESSIF) --- */
body.theme-hardrgb {
  --bg: #000;
  --bg-card: #050505;
  --border: #111;
  --text: #fff;
  --text-dim: #aaa;
  --green: #fff;
}

body.theme-hardrgb {
  animation: rgbFlash 0.5s linear infinite;
}

body.theme-hardrgb .card {
  border: 2px solid;
  border-image: linear-gradient(90deg, red, lime, blue) 1;
  box-shadow: 0 0 20px red, 0 0 40px lime, 0 0 60px blue;
}

body.theme-hardrgb h1 {
  animation: glitchRGB 0.2s infinite;
}


/* --- GALAXY --- */
body.theme-galaxy {
  --bg: #000;
  --bg-card: rgba(20, 20, 40, 0.7);
  --border: #222;
  --text: #e0e0ff;
  --text-dim: #8888aa;
  --green: #8ab4ff;

  background: radial-gradient(circle at 20% 30%, #1a1a40, #000);
}

body.theme-galaxy::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("https://www.transparenttextures.com/patterns/stardust.png");
  opacity: 0.4;
  pointer-events: none;
}


/* --- NEON GRID --- */
body.theme-neon {
  --bg: #050510;
  --bg-card: #0d0d20;
  --border: #1a1aff;
  --text: #cfd2ff;
  --text-dim: #6a6cff;
  --green: #4d79ff;
}

body.theme-neon {
  background:
    linear-gradient(#0a0a1a 1px, transparent 1px),
    linear-gradient(90deg, #0a0a1a 1px, transparent 1px);
  background-size: 40px 40px;
}

body.theme-neon .card {
  box-shadow: 0 0 20px rgba(77,121,255,0.2);
}


/* --- BACKGROUND IMAGE (cyber city) --- */
body.theme-city {
  --bg: #000;
  --bg-card: rgba(0, 0, 0, 0);
  --border: #333;
  --text: #fff;
  --text-dim: #aaa;
  --green: #00e5ff;

  background: url("https://cdn.discordapp.com/attachments/1481785503027302405/1487197499558199456/Snapchat-898237479.jpg?ex=69c8441a&is=69c6f29a&hm=f4ffaebeb1ad0433988640ac762c22e21dd692fa27e0e7c2c99f3a0ba8c86032") center/cover;
}

body.theme-city::before {
  display: none; /* enlève CRT */
}

/* AI */
body.theme-ai {
  --bg: #000;
  --bg-card: rgba(20, 20, 40, 0.7);
  --border: #222;
  --text: #e0e0ff;
  --text-dim: #8888aa;
  --green: #8ab4ff;

  background: radial-gradient(circle at 30% 50%, #1a1a40, #2e2b2b);
}

body.theme-ai::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("https://www.transparenttextures.com/patterns/robots.png");
  opacity: 0.4;
  pointer-events: none;
}

/* --- WINDOWS XP (nostalgie) --- */
body.theme-xp {
  --bg: #3a6ea5;
  --bg-card: #ece9d8;
  --border: #999;
  --text: #000;
  --text-dim: #333;
  --green: #0055aa;
    font-family: Tahoma, Arial, sans-serif;
}

body.theme-xp .card {
  border: 2px outset #fff;
  box-shadow: none;
}

body.theme-xp::before {
  display: none; /* enlève CRT */
}


/* --- TROLL 2.0 (fun mais utilisable) --- */
body.theme-troll {
  --bg: #111;
  --bg-card: #1a1a1a;
  --border: #ff00ff;
  --text: #00ffff;
  --text-dim: #ffcc00;
  --green: #ff00ff;
}

/* Texte qui "vibre" légèrement */
body.theme-troll * {
  animation: trollText 0.2s infinite alternate;
}

/* Cartes légèrement de travers */
body.theme-troll .card:nth-child(odd) {
  transform: rotate(-1deg);
}
body.theme-troll .card:nth-child(even) {
  transform: rotate(1deg);
}

/* Boutons random couleurs */
body.theme-troll .action-btn {
  background: linear-gradient(45deg, red, yellow, lime, cyan, blue, magenta);
  color: black;
  border: none;
}

/* Hover débile */
body.theme-troll .card:hover {
  transform: scale(1.05) rotate(0deg);
}

/* Animation légère */
@keyframes trollText {
  from { transform: translate(0,0); }
  to   { transform: translate(1px,-1px); }
}


/* ============================================================
   ANIMATIONS BONUS
   ============================================================ */

@keyframes rgbFlash {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes glitchRGB {
  0% { transform: translate(0); }
  20% { transform: translate(-2px,2px); }
  40% { transform: translate(2px,-2px); }
  60% { transform: translate(-1px,1px); }
  80% { transform: translate(1px,-1px); }
  100% { transform: translate(0); }
}

@keyframes trollSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}