/* jeudirole — thème Cyberpunk RED « RED_MERC_NET » (gabarit dossier de contrat)
   Composants partagés par les index de scénario (et réutilisables ailleurs).
   La palette RED (#e11d48 …) reste définie par le tailwind.config de chaque page ;
   ce fichier ne fournit que les EFFETS/COMPOSANTS (overlays, cartes, glitch, chamfer).
   S'utilise avec shared/cyberpunkred-nav.js (top-bar mutualisée). */

:root {
  /* Accents narratifs par personnage (référence) */
  --acc-epsilon: #FCEE0A;
  --acc-beta:    #3cddc7;
  --acc-alpha:   #ffb3b6;
  --acc-delta:   #ffb4ab;
  --acc-crow:    #c9a84c;
  --acc-gamma:   #ff7a8f;
  --acc-mj:      #e11d48;
  --cpr-red:     #e11d48;
  --cpr-cyan:    #3cddc7;
}

/* ---- Overlays CRT ------------------------------------------------------- */
.crt-overlay {
  position: fixed; inset: 0;
  background:
    linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.25) 50%),
    linear-gradient(90deg, rgba(255,0,0,0.06), rgba(0,255,0,0.02), rgba(0,0,255,0.06));
  background-size: 100% 4px, 3px 100%;
  pointer-events: none; z-index: 9999; opacity: 0.15;
}
.scan-line {
  position: fixed; top: 0; left: 0; width: 100vw; height: 2px;
  background-color: #e11d48; opacity: 0.2;
  box-shadow: 0 0 10px #e11d48, 0 0 20px #e11d48;
  animation: cpr-scan 9s linear infinite; z-index: 9998; pointer-events: none;
}
@keyframes cpr-scan {
  0%   { top: -10px; opacity: 0; }
  5%   { opacity: 0.2; }
  95%  { opacity: 0.2; }
  100% { top: 100vh; opacity: 0; }
}

/* ---- Formes angulaires -------------------------------------------------- */
.chamfer-clip {
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

/* ---- Glitch titre ------------------------------------------------------- */
.glitch-text:hover { text-shadow: 2px 0 rgba(60,221,199,0.7), -2px 0 rgba(225,29,72,0.85); }

/* ---- Carte dossier (terminal-card) -------------------------------------- */
/* Chaque carte pose --card-accent (couleur perso) et éventuellement
   --card-accent-ink (couleur du texte du header au hover ; défaut sombre). */
.terminal-card {
  --card-accent: #e11d48;
  --card-accent-ink: #131313;
  background-color: #131313;
  transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out, border-color 0.1s ease-in-out;
}
.terminal-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--card-accent) !important;
  box-shadow: 6px 6px 0 0 var(--card-accent);
}
.terminal-card:hover .card-header {
  background-color: var(--card-accent);
  color: var(--card-accent-ink);
}
/* Boîte d'icône de rôle + ligne de statut */
.cpr-role-box {
  width: 3rem; height: 3rem; flex-shrink: 0;
  border: 2px solid var(--card-accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--card-accent); background: #131313;
}
.cpr-role-box .material-symbols-outlined { font-size: 24px; }

/* ---- Flicker / curseur -------------------------------------------------- */
@keyframes cpr-flicker {
  0% { opacity: 1; } 5% { opacity: 0.8; } 10% { opacity: 1; } 15% { opacity: 0.9; }
  20% { opacity: 1; } 50% { opacity: 1; } 55% { opacity: 0.7; } 60% { opacity: 1; } 100% { opacity: 1; }
}
.flicker-active { animation: cpr-flicker 2s infinite; }
.blinking-cursor::after {
  content: '█'; animation: cpr-blink 1s step-end infinite; color: #ffb3b6; margin-left: 4px;
}
@keyframes cpr-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ---- Vignette du log MJ (image + REC / fallback NO_SIGNAL) -------------- */
.mj-vignette {
  position: relative; flex-shrink: 0;
  width: 33%; min-width: 200px; height: 8rem;
  border: 2px solid #5c3f40; overflow: hidden; background: #0a0a0a;
}
.mj-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mj-vignette .rec-badge {
  position: absolute; top: 0; right: 0; margin: 4px;
  background: #e11d48; color: #1a0006;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em;
  padding: 0 4px;
}
/* Placeholder tant qu'aucune image n'est déposée */
.mj-vignette.no-signal {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(225,29,72,0.06) 0 8px, transparent 8px 16px),
    #0a0a0a;
  color: rgba(225,29,72,0.55);
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.25em;
}
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
