/* =========================================================
   SATY'S CORNER — feuille de style commune à toutes les pages
   Ambiance : Frutiger Aero version nuit (verre fumé, boutons "gel")
   calée sur les couleurs du fond : ville de nuit, feuillage turquoise,
   lumière lavande du lampadaire.
   ========================================================= */

/* Les polices : Nunito (rondouillarde, très Aero) + VT323 (pixel, côté homemade) */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;800;900&family=VT323&display=swap');


/* ---------- 1. Les réglages (change une couleur ici = elle change partout) ---------- */
:root {
  --nuit:        #0a0b1a;   /* le bleu-noir du ciel */
  --immeuble:    #23263f;   /* le gris-violet des immeubles */
  --feuille:     #4fb3b0;   /* le turquoise des feuilles */
  --feuille-clair: #8fe3dd;
  --lampe:       #c9c8f5;   /* la lumière lavande du lampadaire */
  --lune:        #eceaff;   /* le blanc bleuté le plus clair */
  --texte:       #dcdcf3;   /* couleur du texte : lavande très claire */
  --texte-doux:  #9a9cc8;

  --police:       'Nunito', 'Segoe UI', 'Trebuchet MS', sans-serif;
  --police-pixel: 'VT323', 'Courier New', monospace;

  --arrondi: 20px;
}


/* ---------- 2. La base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 40px 18px 60px;
  background: var(--nuit);
  color: var(--texte);
  font-family: var(--police);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Le fond d'écran, posé sur un calque fixe derrière tout le reste.
   (plus fiable que "background-attachment: fixed", qui bug sur iPhone) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('img/background/background2.gif') no-repeat center / cover;
  image-rendering: pixelated;   /* garde les pixels bien nets quand le fond est agrandi */
}

a { color: var(--feuille-clair); font-weight: 700; text-underline-offset: 3px; }
a:hover { color: var(--lune); }

:focus-visible {
  outline: 2px solid var(--lune);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--feuille);
}


/* ---------- 3. La fenêtre centrale (verre fumé, comme Vista en thème sombre) ---------- */
.fenetre {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  border-radius: var(--arrondi);
  /* le "verre fumé" : bleu nuit transparent + flou de ce qu'il y a derrière */
  background: linear-gradient(180deg, rgba(30,33,62,.72) 0%, rgba(10,11,26,.78) 100%);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(201,200,245,.35);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    0 0 40px rgba(79,179,176,.15),          /* halo turquoise très léger */
    0 20px 50px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(236,234,255,.3);
  overflow: hidden;
  animation: apparition .6s cubic-bezier(.2,.9,.3,1.2) both;
}

@keyframes apparition {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* La barre de titre, comme une vraie fenêtre Aero */
.barre-titre {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.04) 50%, rgba(255,255,255,0) 51%),
    linear-gradient(90deg, #2c3060, #262a4a 55%, #1f5d63);
  border-bottom: 1px solid rgba(201,200,245,.3);
  color: var(--lune);
  font-family: var(--police-pixel);
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 6px rgba(201,200,245,.6);
}

.barre-titre img { width: 22px; object-fit: contain; }
.barre-titre .titre-fenetre { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* les 3 petits boutons décoratifs de la fenêtre */
.boutons-fenetre { display: flex; gap: 5px; }
.boutons-fenetre i {
  width: 26px; height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,.6);
  background: linear-gradient(180deg, #5a5e8c 0%, #3a3d66 48%, #262948 50%, #3b3f6a 100%);
  box-shadow: inset 0 1px 0 rgba(236,234,255,.4);
}
.boutons-fenetre i:last-child {
  width: 40px;
  background: linear-gradient(180deg, #e88a8a 0%, #b8363f 48%, #8c1f2b 50%, #b84450 100%);
}

.contenu { padding: 26px 40px 30px; }


/* ---------- 4. L'en-tête ---------- */
.entete {
  display: grid;
  grid-template-columns: auto 1fr auto;   /* bouton | titre (prend la place qui reste) | logo */
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.entete .bouton-gel { justify-self: start; white-space: nowrap; }

.entete h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 900;
  text-align: center;
  min-width: 0;
  overflow-wrap: anywhere;   /* un titre très long passe à la ligne au lieu de déborder */
  letter-spacing: .5px;
  line-height: 1;
  /* texte "gel" : dégradé lavande → turquoise coupé net au milieu */
  background: linear-gradient(180deg, #ffffff 0%, var(--lampe) 48%, #6fc9c4 52%, var(--feuille) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(201,200,245,.45)) drop-shadow(0 3px 2px rgba(0,0,0,.6));
}

/* Le logo dans une bulle qui brille comme le lampadaire */
.logo {
  justify-self: end;
  position: relative;
  width: 118px; height: 118px;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 32% 25%, rgba(255,255,255,.7) 0 8%, rgba(255,255,255,0) 20%),
    radial-gradient(circle at 50% 55%, #4a4e85 0%, #2a2d52 55%, #15172e 100%);
  border: 2px solid rgba(201,200,245,.7);
  box-shadow:
    0 0 24px rgba(201,200,245,.45),        /* la lueur lavande */
    0 8px 20px rgba(0,0,0,.5),
    inset 0 -8px 16px rgba(79,179,176,.35);
  animation: flotter 4s ease-in-out infinite;
}

.logo img {
  height: 92px;
  margin-top: 6px;
  filter: drop-shadow(0 4px 3px rgba(0,0,0,.5));
}

@keyframes flotter {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.sous-titre {
  margin: 4px 0 26px;
  text-align: center;
  font-family: var(--police-pixel);
  font-size: 24px;
  font-weight: 400;
  color: var(--texte-doux);
}


/* ---------- 5. Les sections de texte ---------- */
section { margin: 0 0 30px; }

section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--lune);
}

/* petite perle turquoise devant chaque titre, couleur des feuilles */
section h2::before {
  content: '';
  flex: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--feuille-clair) 30%, var(--feuille) 70%, #1f5d63 100%);
  box-shadow: 0 0 8px rgba(79,179,176,.7);
}

section p { margin: 0 0 12px; text-align: justify; hyphens: auto; }


/* ---------- 6. Les boutons "gel" ---------- */
/* bouton par défaut : turquoise, comme le feuillage */
.bouton-gel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.55);
  background: linear-gradient(180deg, #b5efea 0%, #5cc2bd 48%, #2a8a88 52%, #45aaa6 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 8px rgba(0,0,0,.45);
  color: #fff;
  font-family: var(--police);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0,40,45,.7);
  cursor: pointer;
  transition: filter .15s, transform .15s, box-shadow .15s;
}

.bouton-gel:hover {
  color: #fff;
  filter: brightness(1.12);
  box-shadow: inset 0 1px 0 #fff, 0 0 16px rgba(143,227,221,.7), 0 3px 8px rgba(0,0,0,.45);
}

.bouton-gel:active { transform: translateY(1px); filter: brightness(.95); }

/* variante "vert" (pour les liens externes) : devenue lavande, la couleur de la lampe */
.bouton-gel.vert {
  background: linear-gradient(180deg, #f3f2ff 0%, #c4c3f0 48%, #8786c9 52%, #a6a5e0 100%);
  color: #1a1b38;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.bouton-gel.vert:hover {
  color: #1a1b38;
  box-shadow: inset 0 1px 0 #fff, 0 0 16px rgba(201,200,245,.8), 0 3px 8px rgba(0,0,0,.45);
}

.rangee-boutons { display: flex; flex-wrap: wrap; gap: 12px; }


/* ---------- 7. Le pied de page ---------- */
footer {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 2px dashed rgba(143,227,221,.35);   /* ta ligne pointillée d'origine */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 15px;
}

footer .tampon {
  font-family: var(--police-pixel);
  font-size: 20px;
  color: var(--texte-doux);
}


/* ---------- 8. Le menu tiroir ---------- */
#menu {
  position: fixed;
  top: 0; left: 0;
  z-index: 20;
  width: 270px;
  height: 100%;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(35,38,72,.88) 0%, rgba(10,11,26,.94) 100%);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-right: 1px solid rgba(201,200,245,.35);
  box-shadow: 8px 0 30px rgba(0,0,0,.6);
  transform: translateX(-105%);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.1);
}

#menu.ouvert { transform: translateX(0); }

#menu .haut-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--lune);
  font-family: var(--police-pixel);
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 0 6px rgba(201,200,245,.6);
}

#menu .bouton-gel { padding: 4px 12px; flex: none; }

#menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(201,200,245,.2);
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.03) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,.05) 100%);
  color: var(--texte);
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .15s, border-color .15s;
}

#menu a:hover {
  background-color: rgba(143,227,221,.12);
  border-color: rgba(143,227,221,.5);
  transform: translateX(4px);
}

/* la page sur laquelle on est = lien en surbrillance turquoise */
#menu a.actif {
  border-color: rgba(143,227,221,.8);
  background: linear-gradient(180deg, #b5efea 0%, #5cc2bd 48%, #2a8a88 52%, #45aaa6 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,40,45,.7);
}

/* le voile derrière le menu (cliquer dessus ferme le menu) */
.voile {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(5,6,16,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.voile.visible { opacity: 1; pointer-events: auto; }


/* ---------- 9. La galerie photo ---------- */
.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 28px;    /* de l'air avant le pied de page */
}

.galerie img {
  width: 100%;
  aspect-ratio: 1 / 1;        /* toujours carré */
  object-fit: cover;          /* rempli sans déformer */
  border-radius: 16px;
  border: 3px solid rgba(201,200,245,.75);
  box-shadow: 0 6px 16px rgba(0,0,0,.55);
  cursor: zoom-in;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

/* petite inclinaison "posé à la main", différente une image sur deux/trois */
.galerie img:nth-child(3n+1) { transform: rotate(-1.5deg); }
.galerie img:nth-child(3n+2) { transform: rotate(1deg); }
.galerie img:nth-child(3n)   { transform: rotate(-.5deg); }

.galerie img:hover,
.galerie img:focus-visible {
  transform: rotate(0) scale(1.05);
  border-color: var(--feuille-clair);
  box-shadow: 0 0 18px rgba(143,227,221,.5), 0 12px 24px rgba(0,0,0,.6);
}


/* ---------- 10. La visionneuse (image agrandie) ---------- */
.visionneuse {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 70px;
  background: rgba(5,6,16,.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.visionneuse.visible { opacity: 1; pointer-events: auto; }

.visionneuse figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: scale(.92);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
.visionneuse.visible figure { transform: scale(1); }

.visionneuse img {
  max-width: min(90vw, 1000px);
  max-height: 70vh;
  border-radius: 18px;
  border: 3px solid rgba(201,200,245,.8);
  box-shadow: 0 0 40px rgba(201,200,245,.2), 0 20px 60px rgba(0,0,0,.7);
  background: var(--immeuble);
}

/* la légende : une pastille de verre fumé */
.visionneuse figcaption {
  max-width: min(90vw, 640px);
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(50,54,95,.9), rgba(25,27,52,.9));
  border: 1px solid rgba(201,200,245,.45);
  box-shadow: inset 0 1px 0 rgba(236,234,255,.25), 0 4px 14px rgba(0,0,0,.5);
  color: var(--lune);
  font-weight: 700;
  text-align: center;
}
.visionneuse figcaption:empty { display: none; }

.visionneuse .compteur {
  font-family: var(--police-pixel);
  font-size: 22px;
  color: var(--texte-doux);
}

/* boutons ronds façon "orbe" pour fermer / précédent / suivant */
.orbe {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.6);
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.8) 0 16%, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 75%, #8fe3dd 0%, #3a9e9a 60%, #1f5d63 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,.5), inset 0 -4px 8px rgba(0,40,45,.4);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,40,45,.8);
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.orbe:hover { filter: brightness(1.15); transform: scale(1.08); }

.orbe.fermer  { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 18px; }
.orbe.prec    { left: 14px;  top: 50%; margin-top: -26px; }
.orbe.suiv    { right: 14px; top: 50%; margin-top: -26px; }


/* ---------- 11. Petits écrans (téléphone) ---------- */
@media (max-width: 600px) {
  body { padding: 18px 10px 40px; }
  .contenu { padding: 20px 20px 24px; }

  .entete {
    grid-template-columns: 1fr auto;
    grid-template-areas: "bouton logo" "titre titre";
  }
  .entete .bouton-gel { grid-area: bouton; }
  .entete .logo       { grid-area: logo; width: 90px; height: 90px; }
  .entete .logo img   { height: 70px; }
  .entete h1          { grid-area: titre; text-align: center; margin-top: 8px; }

  .galerie { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .visionneuse { padding: 70px 12px 90px; }
  .orbe.prec, .orbe.suiv { top: auto; bottom: 18px; margin-top: 0; }
  .orbe.prec { left: calc(50% - 64px); }
  .orbe.suiv { right: calc(50% - 64px); }
}


/* ---------- 12. Si la personne a demandé "moins d'animations" dans son système ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- 13. La page musique ---------- */
/* titre de section + bouton vers la plateforme, sur la même ligne */
.titre-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.titre-section h2 { margin: 0; }

.bouton-gel.petit { padding: 5px 14px; font-size: 14px; }

/* la grille de lecteurs : 2 par ligne sur ordi */
.lecteurs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* une carte = un lecteur + une petite barre d'infos en dessous */
.lecteur {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;                 /* arrondit aussi les coins du lecteur */
  background: rgba(10,11,26,.6);
  border: 1px solid rgba(201,200,245,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 1px 0 rgba(236,234,255,.12);
  transition: border-color .2s, box-shadow .2s;
}
.lecteur:hover {
  border-color: rgba(143,227,221,.6);
  box-shadow: 0 0 18px rgba(143,227,221,.25), 0 6px 16px rgba(0,0,0,.45);
}

.lecteur iframe {
  display: block;
  width: 100%;
  height: 200px;
  border: 0;
  background: var(--immeuble);      /* couleur visible le temps que le lecteur charge */
}

/* le son "à la une" prend toute la largeur et plus de hauteur */
.lecteur.une { grid-column: 1 / -1; }
.lecteur.une iframe { height: 300px; }

/* Bandcamp : lecteurs en bandeau, un par ligne */
.lecteur.bandcamp { grid-column: 1 / -1; }
.lecteur.bandcamp iframe { height: 120px; }

.infos-lecteur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 9px 14px;
  font-size: 15px;
  text-align: left;
  border-top: 1px solid rgba(201,200,245,.15);
}
.infos-lecteur > span { min-width: 0; display: flex; align-items: baseline; }
.infos-lecteur strong {
  color: var(--lune);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;          /* titre trop long = "..." au lieu de casser la carte */
}
.infos-lecteur a { flex: none; font-size: 14px; }

.etiquette {
  flex: none;
  margin-right: 8px;
  font-family: var(--police-pixel);
  font-size: 19px;
  color: var(--feuille-clair);
}

.note {
  margin: 0 0 24px;
  text-align: center;
  font-family: var(--police-pixel);
  font-size: 21px;
  color: var(--texte-doux);
}

@media (max-width: 600px) {
  .lecteurs { grid-template-columns: 1fr; }
  .lecteur.une iframe { height: 240px; }
}


/* ---------- 14. Galerie "vitrine" (page web) ---------- */
/* Une image par ligne, en pleine largeur, sans recadrage ni inclinaison */
.galerie.vitrine {
  grid-template-columns: 1fr;
  gap: 22px;
}

.galerie.vitrine img {
  aspect-ratio: auto;     /* on garde la vraie forme de l'image */
  height: auto;
  object-fit: contain;
  transform: none;        /* pas de penché "posé à la main" ici */
  border-radius: 14px;
}

.galerie.vitrine img:hover,
.galerie.vitrine img:focus-visible {
  transform: scale(1.015);
}

/* Dans la visionneuse : image cliquable quand elle a un lien */
.visionneuse img.cliquable { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.visionneuse img.cliquable:hover {
  border-color: var(--feuille-clair);
  box-shadow: 0 0 30px rgba(143,227,221,.4), 0 20px 60px rgba(0,0,0,.7);
}

/* les rangées : images côte à côte, même hauteur (largeurs réglées par script.js) */
.rangee {
  display: flex;
  gap: 16px;
}

.rangee img {
  flex: 1 1 0;            /* largeur de départ 0, puis chacun prend sa part */
  min-width: 0;
  height: auto;
  align-self: stretch;    /* même hauteur pour toute la ligne */
  object-fit: cover;      /* évite tout écart de quelques pixels */
  object-position: top;   /* si ça rogne un poil, on garde le haut des pages */
}

@media (max-width: 600px) {
  .rangee { gap: 10px; }
  .galerie.vitrine { gap: 14px; }
}

/* le bouton "Visiter le site" (caché quand il n'y a pas de lien) */
.lien-visionneuse[hidden] { display: none; }


/* ---------- 15. Petites galeries au milieu d'un texte (page reco) ---------- */
/* Même comportement que la page Images, mais les vignettes restent
   de taille raisonnable et se centrent, même s'il n'y en a qu'une. */
.galerie.dans-texte {
  grid-template-columns: repeat(auto-fit, minmax(140px, 190px));
  justify-content: center;
  margin: 18px 0 22px;
}


/* Variante "entiere" : l'image garde sa vraie forme (pas de carré recadré).
   Elle reste centrée et limitée en hauteur pour ne pas envahir la page,
   et garde tout le reste : bordure, inclinaison, clic pour agrandir. */
.galerie.entiere { grid-template-columns: 1fr; }

.galerie.entiere img {
  justify-self: center;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 380px;
  aspect-ratio: auto;
  object-fit: contain;
}

/* inclinaison plus discrète pour les grandes images (sinon les bords dépassent),
   un coup à gauche, un coup à droite */
.galerie.entiere img { transform: rotate(-.6deg); }
.galerie.entiere:nth-of-type(even) img { transform: rotate(.6deg); }
.galerie.entiere img:hover,
.galerie.entiere img:focus-visible { transform: rotate(0) scale(1.02); }


/* ---------- 16. Le sommaire de l'accueil ---------- */
.sommaire {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.sommaire li {
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(10,11,26,.45);
  border: 1px solid rgba(201,200,245,.18);
  transition: border-color .2s, background .2s;
}
.sommaire li:hover {
  border-color: rgba(143,227,221,.5);
  background: rgba(79,179,176,.1);
}

.sommaire a { text-decoration: none; margin-right: 4px; }


/* ---------- 17. Le terminal (page playground) ---------- */
.terminal {
  position: relative;
  margin-bottom: 28px;
  padding: 16px 20px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #070816 0%, #0d1026 100%);
  border: 1px solid rgba(143,227,221,.45);
  box-shadow:
    inset 0 0 40px rgba(79,179,176,.12),
    0 0 20px rgba(79,179,176,.18),
    0 8px 20px rgba(0,0,0,.5);
  color: var(--feuille-clair);
  font-family: var(--police-pixel);
  font-size: 22px;
  line-height: 1.25;
  text-shadow: 0 0 6px rgba(143,227,221,.5);
  overflow: hidden;
  cursor: text;
  transition: box-shadow .2s, border-color .2s;
}

/* les fines lignes horizontales d'un vieil écran */
.terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,.2) 2px 3px);
  pointer-events: none;
}

/* le terminal s'allume quand on écrit dedans */
.terminal:focus-within {
  border-color: var(--feuille-clair);
  box-shadow:
    inset 0 0 40px rgba(79,179,176,.18),
    0 0 28px rgba(79,179,176,.35),
    0 8px 20px rgba(0,0,0,.5);
}

.ecran {
  height: 320px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.ecran p { margin: 2px 0; word-break: break-word; }
.ecran .moi    { color: var(--lampe); text-shadow: 0 0 6px rgba(201,200,245,.5); }
.ecran .erreur { color: #f09a9a;      text-shadow: 0 0 6px rgba(240,120,120,.4); }

/* la barre de chargement, en gel turquoise */
.barre-chargement {
  height: 18px;
  margin: 8px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(143,227,221,.6);
  background: rgba(79,179,176,.08);
  overflow: hidden;
}
.barre-chargement span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(180deg, #b5efea 0%, #5cc2bd 48%, #2a8a88 52%, #45aaa6 100%);
  box-shadow: 0 0 10px rgba(143,227,221,.6);
  transition: width .15s linear;
}

/* la ligne où l'on tape */
.ligne-saisie {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(143,227,221,.3);
}

.ligne-saisie label { color: var(--lampe); white-space: nowrap; }

#saisie {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--lune);
  font: inherit;
  text-shadow: inherit;
  caret-color: var(--feuille-clair);
}
#saisie:focus,
#saisie:focus-visible { outline: none; box-shadow: none; }
#saisie:disabled { opacity: .35; }

/* le logo "The Playground" dans le coin, seulement sur grand écran */
.logo-coin {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 0;
  width: min(220px, 16vw);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(201,200,245,.35));
}
@media (max-width: 1200px) { .logo-coin { display: none; } }

@media (max-width: 600px) {
  .terminal { padding: 12px 14px; font-size: 20px; }
  .ecran { height: 280px; }
}


/* ---------- 18. Les effets du terminal ---------- */

/* "/kill" : l'écran s'éteint */
.terminal.eteint {
  background: #000;
  border-color: #222;
  box-shadow: inset 0 0 40px #000, 0 8px 20px rgba(0,0,0,.5);
}
.terminal.eteint .ecran,
.terminal.eteint .ligne-saisie { visibility: hidden; }

/* "corrupt" : tout le site se casse (la classe est ajoutée sur <body> par le script) */
body.site-casse::before {
  animation: fond-casse 1.2s steps(3) infinite;
}
@keyframes fond-casse {
  0%   { transform: translateX(0);                 filter: none; }
  33%  { transform: translateX(-14px) scaleY(1.03); filter: hue-rotate(90deg) contrast(1.4); }
  66%  { transform: translateX(10px);               filter: hue-rotate(220deg) saturate(2); }
}

body.site-casse .fenetre {
  animation: tremble .2s steps(2) infinite, teinte 4s linear infinite;
}
@keyframes tremble {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3px, 1px) skewX(-1deg); }
  50%  { transform: translate(2px, -2px); }
  75%  { transform: translate(-1px, 2px) skewX(1.5deg); }
  100% { transform: translate(1px, 0); }
}
@keyframes teinte {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg) saturate(1.8); }
}

/* les couleurs qui se dédoublent (rouge à gauche, cyan à droite) */
body.site-casse .fenetre * {
  text-shadow: -2px 0 rgba(255,0,70,.75), 2px 0 rgba(0,255,230,.75) !important;
}

/* la fenêtre qui blanchit, comme un programme Vista qui "ne répond pas" */
body.site-casse .fenetre::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.14);
  pointer-events: none;
  animation: blanchir 2s steps(2) infinite;
}
@keyframes blanchir { 50% { background: rgba(255,255,255,.04); } }

body.site-casse .barre-titre {
  background: linear-gradient(180deg, #d9d9e6, #9a9ab4);
  color: #2a2a3a;
}

/* les bandes de couleur qui défilent par-dessus l'écran */
.bandes-glitch {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(180deg,
    transparent 0 40px, rgba(79,179,176,.10) 40px 44px,
    transparent 44px 90px, rgba(255,0,80,.08) 90px 93px);
  mix-blend-mode: screen;
  animation: bandes .5s steps(4) infinite;
}
@keyframes bandes { to { background-position: 0 180px; } }
