/* ============================================================
   ΠΡΑΞΕΔ — praxed.art
   Minitel Pur — Direction A
   Police : VT323 (Google Fonts)
   Palette : CEPT 8 couleurs pures
   Grille : 40ch × 100dvh
   ============================================================ */

/* ----- Reset ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ----- Tokens CEPT ----- */
:root {
  --cept-noir    : #000000;
  --cept-blanc   : #ffffff;
  --cept-jaune   : #ffff00;
  --cept-vert    : #00ff00;
  --cept-cyan    : #00ffff;
  --cept-rouge   : #ff0000;
  --cept-magenta : #ff00ff;
  --cept-bleu    : #0000ff;
}

/* ----- Base ----- */
html {
  font-size: 16px;
  background: var(--cept-noir);
  color: var(--cept-blanc);
  font-family: 'VT323', 'Courier New', monospace;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: auto;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  line-height: 1.4;
  -webkit-font-smoothing: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation; /* supprime le délai 300ms iOS */
}

/* ----- Skip link accessibilité ----- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--cept-jaune);
  color: var(--cept-noir);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   COMPOSANT t-ecran
   Page snap scroll — unité Minitel
   ============================================================ */
.t-ecran {
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 4ch 2ch;
  position: relative;
}

/* ============================================================
   COMPOSANT t-nav
   Navigation SUITE ▶ / ◄ RETOUR
   ============================================================ */
.t-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 2ch;
  height: 3ch;
}

.t-nav__retour,
.t-nav__suite {
  color: var(--cept-cyan);
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.t-nav__retour[disabled],
.t-nav__suite[disabled] {
  color: #222222;
  pointer-events: none;
}

.t-nav__retour:focus-visible,
.t-nav__suite:focus-visible {
  outline: 1px solid var(--cept-jaune);
}

.t-nav__indicateur {
  color: #333333;
  font-size: 0.8rem;
}

/* ============================================================
   COMPOSANT t-cursor
   Curseur terminal clignotant
   ============================================================ */
.t-cursor {
  display: inline-block;
  width: 0.6ch;
  height: 1em;
  background: var(--cept-blanc);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   COMPOSANT t-image
   Visuel épisode basse définition
   ============================================================ */
.t-image {
  width: 100%;
  max-width: 20ch;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--cept-noir);
  display: block;
}

.t-image img,
.t-image video {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

/* ============================================================
   ÉCRAN 1 — ΠΡΑΞΕΔ
   Identité, dernier épisode
   ============================================================ */
#ecran-praxed {
  justify-content: flex-start;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  gap: 0;
}

.t-identite {
  display: flex;
  flex-direction: column;
  gap: 0.4ch;
  padding: 1ch 2ch 0;
}

#ecran-praxed > .t-nav {
  padding: 0 2ch;
}

.t-titre-principal {
  font-size: 3rem;
  color: var(--cept-magenta);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.t-sous-titre {
  font-size: 1rem;
  color: var(--cept-cyan);
}

.t-musique-exp {
  font-size: 0.9rem;
  color: var(--cept-blanc);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* ============================================================
   ÉCRAN INTRO — Logo Mutable Instruments plein écran Minitel
   ============================================================ */
.t-ecran--intro {
  padding: 2ch;
  justify-content: flex-start;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

.praxede-logo-pre,
.mi-logo-pre {
  font-size: 0.88rem;
  line-height: 1.1;
  font-family: 'VT323', 'Courier New', monospace;
  white-space: pre;
  margin-bottom: 0.5ch;
  display: block;
  width: 100%;
  overflow: hidden;
}

.t-intro-passer {
  position: absolute;
  bottom: 3ch;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--cept-cyan);
  animation: blink 1s step-end infinite;
  opacity: 0;
  transition: opacity 0s;
}

.t-intro-passer--visible {
  opacity: 1;
}

.t-dernier-episode {
  margin-top: 4ch;
}

.t-dernier-episode__label {
  font-size: 0.8rem;
  color: var(--cept-bleu);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.t-dernier-episode__titre {
  font-size: 1rem;
  color: var(--cept-cyan);
  margin-top: 0.5ch;
  text-transform: uppercase;
}

/* ============================================================
   ÉCRAN 2 — MUSIQUE
   Liste épisodes + player
   ============================================================ */
#ecran-musique {
  gap: 0;
}

.t-ecran-titre {
  font-size: 1.5rem;
  color: var(--cept-blanc);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2ch;
  border-bottom: 1px solid #333333;
  padding-bottom: 1ch;
}

/* ----- t-manifeste ----- */
.t-manifeste {
  display: flex;
  flex-direction: column;
  gap: 2ch;
  flex: 1;
  justify-content: center;
}

.t-manifeste__titre {
  font-size: 1.4rem;
  color: var(--cept-magenta);
  margin-bottom: 1ch;
}

.t-manifeste__annee {
  color: var(--cept-cyan);
}

.t-manifeste__bloc {
  font-size: 1rem;
  color: var(--cept-blanc);
  line-height: 1.5;
}

.t-manifeste__bloc--accent {
  color: var(--cept-jaune);
  border-left: 2px solid var(--cept-jaune);
  padding-left: 1ch;
}

.t-manifeste__signature {
  font-size: 1.1rem;
  color: var(--cept-cyan);
  margin-top: 1ch;
}

/* ----- t-player ----- */
.t-player {
  margin-bottom: 2ch;
  border: 1px solid var(--cept-blanc);
  padding: 1ch;
}

.t-player[hidden] {
  display: none;
}

.t-player__image {
  display: block;
  width: 100%;
  max-height: 40vh;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 1ch;
}

.t-player__image[hidden] {
  display: none;
}

.t-player__titre {
  font-size: 1rem;
  color: var(--cept-jaune);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.t-player__controls {
  display: flex;
  align-items: center;
  gap: 1ch;
  margin-top: 1ch;
}

.t-player__btn {
  color: var(--cept-cyan);
  font-size: 1rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cept-cyan);
}

.t-player__btn:focus-visible {
  outline: 1px solid var(--cept-jaune);
}

.t-player__barre {
  flex: 1;
  height: 1ch;
  background: #333333;
  position: relative;
  cursor: pointer;
}

.t-player__progres {
  height: 100%;
  background: var(--cept-cyan);
  width: 0%;
  pointer-events: none;
}

.t-player__temps {
  font-size: 0.8rem;
  color: var(--cept-bleu);
  white-space: nowrap;
  min-width: 5ch;
  text-align: right;
}

.t-player__loading {
  color: var(--cept-vert);
  font-size: 1rem;
  animation: blink 0.5s step-end infinite;
}

/* ----- t-episode — item liste ----- */
.t-episodes {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.t-episodes::-webkit-scrollbar {
  display: none;
}

.t-episode {
  display: grid;
  grid-template-columns: 5ch 1fr 5ch;
  gap: 1ch;
  padding: 0.5ch 0;
  border-bottom: 1px solid #222222;
  align-items: baseline;
  cursor: pointer;
  min-height: 44px;
  align-items: center;
}

.t-episode:focus-visible {
  outline: 1px solid var(--cept-jaune);
}

.t-episode__num {
  font-size: 1rem;
  color: var(--cept-jaune);
  text-transform: uppercase;
}

.t-episode__titre {
  font-size: 1rem;
  color: var(--cept-blanc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.t-episode__duree {
  font-size: 0.8rem;
  color: var(--cept-bleu);
  text-align: right;
  white-space: nowrap;
}

.t-episode--actif .t-episode__titre {
  color: var(--cept-cyan);
}

.t-episode--chargement .t-episode__titre {
  color: #444444;
}

/* Liens podcast */
.t-podcast-liens {
  display: flex;
  gap: 2ch;
  margin-top: 1ch;
}

.t-rss {
  display: block;
  font-size: 0.8rem;
  color: var(--cept-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5ch 0;
}

.t-rss--xml {
  color: var(--cept-blanc);
  opacity: 0.5;
}

.t-rss:focus-visible {
  outline: 1px solid var(--cept-jaune);
}

/* ============================================================
   ÉCRAN 3 — INSTRUMENTS
   Rack Mutable Instruments
   ============================================================ */

.t-instruments-info {
  padding: 1ch 2ch 0;
}

.t-instruments-titre {
  font-size: 1rem;
  color: var(--cept-cyan);
  letter-spacing: 0.1em;
  margin-bottom: 1ch;
}

.t-rack-liste {
  font-size: 1rem;
  color: var(--cept-blanc);
  opacity: 0.7;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ============================================================
   ÉCRAN 4 — ORACLE
   Seuil de passage — t-seuil en magenta intégral
   ============================================================ */
#ecran-oracle {
  justify-content: center;
}

/* ----- t-seuil ----- */
.t-seuil {
  border: 1px solid var(--cept-magenta);
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.15);
  padding: 2ch;
  display: flex;
  flex-direction: column;
  gap: 1ch;
}

.t-seuil__titre {
  font-size: 1.5rem;
  color: var(--cept-magenta);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.t-seuil__desc {
  font-size: 1rem;
  color: var(--cept-magenta);
  line-height: 1.4;
}

.t-seuil__cta {
  display: inline-block;
  font-size: 1rem;
  color: var(--cept-noir);
  background: var(--cept-magenta);
  padding: 0.5ch 1ch;
  text-transform: uppercase;
  margin-top: 1ch;
  min-height: 44px;
  display: flex;
  align-items: center;
  align-self: flex-start;
}

.t-seuil__cta:focus-visible {
  outline: 1px solid var(--cept-jaune);
}

/* ============================================================
   ÉCRAN 4 — CONTACT
   Formulaire minimal, une ligne
   ============================================================ */
#ecran-contact {
  justify-content: center;
}

.t-contact-label {
  font-size: 1rem;
  color: var(--cept-blanc);
  text-transform: uppercase;
  margin-bottom: 1ch;
}

.t-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1ch;
  width: 100%;
}

.t-contact-input {
  background: var(--cept-noir);
  border: none;
  border-bottom: 1px solid var(--cept-blanc);
  color: var(--cept-blanc);
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1rem;
  padding: 0.5ch 0;
  width: 100%;
  outline: none;
}

.t-contact-input::placeholder {
  color: #444444;
}

.t-contact-input:focus {
  border-bottom-color: var(--cept-jaune);
}

.t-contact-submit {
  color: var(--cept-cyan);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
  padding: 0.5ch 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.t-contact-submit:focus-visible {
  outline: 1px solid var(--cept-jaune);
}

.t-contact-erreur {
  color: var(--cept-rouge);
  font-size: 1rem;
  display: none;
}

.t-contact-erreur--visible {
  display: block;
}

.t-contact-succes {
  color: var(--cept-vert);
  font-size: 1rem;
  text-transform: uppercase;
  display: none;
}

.t-contact-succes--visible {
  display: block;
}

/* ============================================================
   DESKTOP — colonne Minitel flottante sur fond noir
   ============================================================ */
@media (min-width: 600px) {
  body {
    background: var(--cept-noir);
  }

  .t-ecran {
    border-left: 1px solid #111111;
    border-right: 1px solid #111111;
  }
}

/* ----- Très petits écrans ----- */
@media (max-width: 359px) {
  html {
    font-size: 14px;
  }
}

/* ============================================================
   ACCESSIBILITÉ — mouvement réduit
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .t-cursor {
    animation: none;
    opacity: 1;
  }

  * {
    scroll-behavior: auto !important;
  }
}
