/* ================================================================
   1. VARIABLES — Palette CRT ambre (phosphore P3/P4)
   Inspirée des vrais terminaux ambre (VT220, IBM 5151)
   ================================================================ */
:root {
  --crt-bg: #0a0500;
  --crt-amber: #ffb000;
  --crt-amber-bright: #ffcc33;
  --crt-amber-dim: #cc8800;
  --crt-amber-white: #fff4d6;
  --crt-red-glitch: #ff2244;
  --crt-cyan-glitch: #00e5ff;
}

/* ================================================================
   2. BASE — Corps de page, police, halo de texte global
   ================================================================ */
body {
  background-color: var(--crt-bg);
  color: var(--crt-amber);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
  padding: 20px;
  position: relative;
  text-shadow:
    0 0 1px rgba(255, 176, 0, 0.9),
    0 0 4px rgba(255, 176, 0, 0.5),
    0 0 10px rgba(255, 176, 0, 0.35),
    0 0 18px rgba(255, 176, 0, 0.15);
  overflow-x: hidden;
}

/* ================================================================
   3. EFFETS D'ÉCRAN — Halo central, scanlines, scintillement
   ================================================================ */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255,176,0,0.04) 0%, rgba(0,0,0,0) 65%);
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
  animation: flicker 8s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.85; }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}

/* ================================================================
   4. TITRES
   ================================================================ */
 
/* --- h1 : titre principal avec effet glitch --- */
h1 {
  color: var(--crt-amber-bright);
  border-bottom: 1px dashed var(--crt-amber);
  padding-bottom: 10px;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  position: relative;
  text-shadow:
    0 0 2px rgba(255, 204, 51, 1),
    0 0 8px rgba(255, 204, 51, 0.7),
    0 0 20px rgba(255, 204, 51, 0.4),
    0 0 32px rgba(255, 176, 0, 0.2);
  animation: subtle-flicker 4s infinite;
}
 
h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0.7;
}
 
h1::before {
  color: var(--crt-cyan-glitch);
  animation: glitch-1 3.5s infinite linear alternate-reverse;
  clip-path: inset(0 0 60% 0);
}
 
h1::after {
  color: var(--crt-red-glitch);
  animation: glitch-2 4.2s infinite linear alternate-reverse;
  clip-path: inset(40% 0 0 0);
}
 
@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0, 0); opacity: 0; }
  91% { transform: translate(-2px, -1px); opacity: 0.6; }
  93% { transform: translate(2px, 1px); opacity: 0.4; }
  95% { transform: translate(-1px, 0); opacity: 0; }
}
 
@keyframes glitch-2 {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0; }
  89% { transform: translate(2px, 1px); opacity: 0.5; }
  91% { transform: translate(-2px, -1px); opacity: 0.3; }
  94% { transform: translate(1px, 0); opacity: 0; }
}
 
@keyframes subtle-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.97; }
}

/* --- h2 : sous-titre de section --- */
h2 {
  color: var(--crt-amber-bright);
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 0 3px rgba(255, 204, 51, 0.9), 0 0 12px rgba(255, 204, 51, 0.4);
}

/* --- h3 : titre encadré façon menu VT320 (inversion vidéo) --- */
h3 {
  display: inline-block;
  background-color: var(--crt-amber);
  color: var(--crt-bg);
  padding: 4px 10px;
  letter-spacing: 2px;
  text-shadow: none;
  margin-bottom: 10px;
}

h3::selection {
  background-color: var(--crt-bg);
  color: var(--crt-amber);
}

/* ================================================================
   5. LIENS — Soulignement pointillé, inversion au survol/focus
   ================================================================ */
a {
  color: var(--crt-amber-bright);
  text-decoration: underline dotted;
  border-bottom: none;
}

a:hover,
a:focus {
  color: var(--crt-bg);
  background-color: var(--crt-amber);
  text-decoration: none;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.6);
}

a:focus {
  outline: 2px solid var(--crt-amber-bright);
  outline-offset: 2px;
}

/* ================================================================
   6. MISE EN EMPHASE — strong (gras/lumineux) et em (souligné)
   ================================================================ */
strong {
  color: var(--crt-amber-bright);
  text-shadow: 0 0 4px rgba(255, 204, 51, 0.9), 0 0 10px rgba(255, 204, 51, 0.5);
}

em {
  font-style: normal;
  text-decoration: underline;
}

/* ================================================================
   7. LISTES — Puces façon invite shell
   ================================================================ */
ul {
  list-style: none;
  padding-left: 10px;
}
 
li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 30px;
}
 
li::before {
  content: "●";
  position: absolute;
  left: 0;
  color: var(--crt-amber-dim);
}

/* ================================================================
   8. CITATIONS — Encadré façon message système VT320
   ================================================================ */
blockquote {
  display: table;
  margin: 24px auto;
  padding: 10px 20px;
  border: 2px solid var(--crt-amber);
  text-align: center;
  letter-spacing: 1px;
}

/* ================================================================
   9. CURSEUR — Bloc plein clignotant en fin de page
   ================================================================ */
.cursor::after {
  content: "█";
  animation: blink 1s steps(1) infinite;
  color: var(--crt-amber-bright);
}
 
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ================================================================
   10. ACCESSIBILITÉ — Réduction des animations, sélection de texte
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}

::selection {
  background-color: var(--crt-amber);
  color: var(--crt-bg);
  text-shadow: none;
}

::-moz-selection {
  background-color: var(--crt-amber);
  color: var(--crt-bg);
  text-shadow: none;
}

/* ================================================================
   11. SCROLLBAR — Barre de défilement ambre
   ================================================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--crt-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--crt-amber-dim);
  border: 2px solid var(--crt-bg);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--crt-amber);
}

html {
  scrollbar-color: var(--crt-amber-dim) var(--crt-bg);
  scrollbar-width: thin;
}

/* ================================================================
   12. RESPONSIVE — Ajustements pour petits écrans
   ================================================================ */
@media (max-width: 480px) {
  h3 {
    padding: 3px 6px;
    letter-spacing: 1px;
    font-size: 0.95em;
  }
}












