/* Good Brat — feuille de style unique, mobile first
   Direction : écran LCD de téléphone des années 2000, police pixel de 2001 (Silkscreen),
   photos en bichromie qui reprennent leurs couleurs quand on les regarde. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --lcd: #C6D0A2;        /* vert-gris d’écran LCD */
  --lcd-fonce: #AFBA89;  /* pixels éteints, séparations */
  --encre: #1D1D1B;      /* couleur exacte du logo */
  --pixel: "Silkscreen", "Courier New", monospace;
  --large: 1100px;
  --gouttiere: clamp(1.1rem, 5vw, 2.5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  color: var(--encre);
  background-color: var(--lcd);
  /* trame de pixels, très discrète */
  background-image: radial-gradient(rgb(29 29 27 / .07) 1px, transparent 1.2px);
  background-size: 4px 4px;
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.55;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px dashed var(--encre); outline-offset: 4px; }
::selection { background: var(--encre); color: var(--lcd); }

.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-evitement { position: absolute; left: -999px; top: .5rem; background: var(--encre); color: var(--lcd); padding: .5rem 1rem; z-index: 50; font-family: var(--pixel); }
.lien-evitement:focus { left: .5rem; }
.conteneur { width: 100%; max-width: var(--large); margin-inline: auto; padding-inline: var(--gouttiere); }

h1, h2, h3 { margin: 0; line-height: .92; }
h2 {
  font-stretch: 62%; font-weight: 800; letter-spacing: -0.01em;
  font-size: clamp(3.2rem, 17vw, 7.5rem);
  margin-bottom: 1.25rem;
}
p { margin: 0 0 1em; max-width: 58ch; }

/* Petit texte « écran » en police pixel */
.pixel, .meta, .note, figcaption, .indice, .bouton, .barre a, .formulaire label, .aide, .petites-lignes, .reseaux a {
  font-family: var(--pixel); font-weight: 400; letter-spacing: 0; line-height: 1.5;
}

/* ---------- Barre fixe, façon barre d’état ---------- */
.barre {
  position: fixed; inset: 0 0 auto; z-index: 20;
  background: var(--lcd); color: var(--encre); border-bottom: 2px solid var(--encre);
  transform: translateY(-100%); transition: transform .4s steps(6);
}
.barre.visible { transform: none; }
.barre .conteneur { display: flex; align-items: center; justify-content: space-between; height: 3.25rem; gap: 1rem; }
.barre .mini-logo { width: 78px; }
.barre ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.barre a { text-decoration: none; font-size: .8rem; }
.barre a:hover { text-decoration: underline; }

/* ---------- Ouverture ---------- */
.ouverture {
  position: relative; min-height: 100svh;
  display: grid; place-items: center; align-content: center;
  padding: 3.5rem var(--gouttiere) 6rem; text-align: center;
}
.ouverture h1 { width: min(100%, 760px); }
.ouverture h1 img { width: 100%; animation: allumage 1.2s steps(12, end) both; }
/* l’écran « s’allume » : le logo apparaît par bandes, comme un affichage qui se rafraîchit */
@keyframes allumage {
  0%   { clip-path: inset(0 0 100% 0); opacity: .2; }
  60%  { opacity: 1; }
  100% { clip-path: inset(0 0 0 0); }
}
.accroche {
  margin: 1.75rem auto 0; font-family: var(--pixel); font-size: clamp(1rem, 4.2vw, 1.35rem);
  animation: apparait .1s 1.3s both;
}
.accroche::after {        /* curseur qui clignote */
  content: ""; display: inline-block; width: .6em; height: 1em; margin-left: .25em;
  background: var(--encre); vertical-align: -0.12em; animation: clignote 1s steps(1) infinite;
}
@keyframes clignote { 50% { opacity: 0; } }
@keyframes apparait { from { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 11vw, 6.5rem); border-top: 2px solid var(--encre); }
.grille { display: grid; gap: 2rem; }
@media (min-width: 900px) { .grille { grid-template-columns: 1fr 1.15fr; gap: 4rem; align-items: center; } }

.meta { font-size: .9rem; margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Boutons à bords en escalier, comme sur un vieil écran */
.bouton {
  --c: var(--encre);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .75rem 1.25rem; font-size: .9rem;
  background: var(--encre); color: var(--lcd); border: 0; cursor: pointer; text-decoration: none;
  box-shadow: 0 -3px 0 0 var(--c), 0 3px 0 0 var(--c), -3px 0 0 0 var(--c), 3px 0 0 0 var(--c);
  margin: 3px;
  transition: transform .15s steps(2);
}
.bouton:hover { transform: translate(-2px, -2px); box-shadow: 0 -3px 0 0 var(--c), 0 3px 0 0 var(--c), -3px 0 0 0 var(--c), 3px 0 0 0 var(--c), 5px 5px 0 0 var(--lcd-fonce), 7px 7px 0 0 var(--encre); }
.bouton:active { transform: translate(1px, 1px); }
.bouton.contour { background: var(--lcd); color: var(--encre); }

/* Photos : couleurs réduites façon photo de téléphone 2005 (filtre #retro dans la page)
   + trame de pixels et lignes d’écran par-dessus. Couleurs pleines au survol. */
.photo { position: relative; background: var(--encre); overflow: hidden; border: 2px solid var(--encre); }
.photo img { width: 100%; filter: url(#retro) saturate(1.25) contrast(1.05); }
.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px),
    radial-gradient(rgb(198 208 162 / .18) 1px, transparent 1.3px) 0 0 / 3px 3px;
  mix-blend-mode: multiply; transition: opacity .5s steps(5);
}
.photo:hover img, .photo:focus-within img { filter: saturate(1.1); }
.photo:hover::after { opacity: .35; }

/* Vidéo : chargée depuis YouTube seulement au clic */
.video { position: relative; aspect-ratio: 16 / 9; }
.video button, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; }
.video button { cursor: pointer; background: transparent; }
.video button img { width: 100%; height: 100%; object-fit: cover; }
.lecture {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  background: var(--encre); color: var(--lcd); padding: .7rem 1rem .7rem 2.4rem;
  font-family: var(--pixel); font-size: .95rem; white-space: nowrap;
}
.lecture::before {
  content: ""; position: absolute; left: 1rem; top: 50%; translate: 0 -50%;
  width: 10px; height: 14px; background: var(--lcd);
  clip-path: polygon(0 0, 30% 0, 30% 14%, 60% 14%, 60% 29%, 100% 43%, 100% 57%, 60% 71%, 60% 86%, 30% 86%, 30% 100%, 0 100%);
}
.video button:hover .lecture { animation: clignote .5s steps(1) 2; }
.note { font-size: .75rem; margin-top: .8rem; }

/* Groupe */
.photo-groupe { max-width: 460px; }

/* Bande photos : glisser horizontalement */
.photos { padding-bottom: clamp(3.5rem, 11vw, 6.5rem); }
.bande {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--gouttiere); scrollbar-width: none;
}
.bande::-webkit-scrollbar { display: none; }
.bande figure { margin: 0; flex: 0 0 84%; scroll-snap-align: center; }
.bande .photo img { aspect-ratio: 4 / 3; object-fit: cover; }
figcaption { font-size: .7rem; margin-top: .5rem; min-height: 1.5em; }
@media (min-width: 900px) { .bande figure { flex-basis: 40%; } }
.indice { padding-inline: var(--gouttiere); font-size: .75rem; margin-top: .5rem; }

/* Concerts */
.vide { border: 2px dashed var(--encre); padding: 1.5rem; max-width: 40rem; }
.vide p:last-child { margin-bottom: 0; }

/* Contact : écran rétroéclairé, en négatif */
.contact { background: var(--encre); color: var(--lcd); }
.formulaire { display: grid; gap: 1.1rem; max-width: 40rem; }
.formulaire label { display: block; font-size: .85rem; margin-bottom: .35rem; }
.formulaire input, .formulaire textarea {
  width: 100%; font: inherit; color: var(--lcd); background: transparent;
  border: 2px solid var(--lcd); border-radius: 0; padding: .85rem 1rem; caret-color: var(--lcd);
}
.formulaire input:focus, .formulaire textarea:focus { outline: none; background: rgb(198 208 162 / .1); }
.formulaire textarea { min-height: 9rem; resize: vertical; }
.aide { font-size: .7rem; opacity: .8; margin: .35rem 0 0; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact .bouton { --c: var(--lcd); background: var(--lcd); color: var(--encre); }
.contact .bouton:hover { box-shadow: 0 -3px 0 0 var(--c), 0 3px 0 0 var(--c), -3px 0 0 0 var(--c), 3px 0 0 0 var(--c), 6px 6px 0 0 var(--lcd-fonce); }
.statut { border: 2px solid var(--lcd); padding: 1rem 1.2rem; max-width: 40rem; margin-bottom: 1.5rem; }
.statut[hidden] { display: none; }

/* Pied de page */
.pied { background: var(--encre); color: var(--lcd); padding-block: 0 2.5rem; }
.pied .conteneur { border-top: 2px dashed rgb(198 208 162 / .4); padding-top: 2rem; }
.reseaux { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.reseaux a { font-size: .9rem; }
.reseaux a::before { content: "> "; }
.petites-lignes { font-size: .7rem; opacity: .8; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.petites-lignes p { margin: 0; }

/* Page de texte (mentions légales, 404) */
.page-texte { padding-block: 4rem; }
.page-texte h1 { font-stretch: 62%; font-weight: 800; font-size: clamp(3rem, 14vw, 6rem); margin-bottom: 2rem; }
.page-texte h2 { font-family: var(--pixel); font-size: 1rem; font-weight: 700; margin: 2rem 0 .75rem; }
.page-texte .logo-retour { display: inline-block; width: 120px; margin-bottom: 2rem; }

/* ---------- Effets d’écran ---------- */

/* Lignes et vignettage de l’écran, sur toute la page */
.ecran {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgb(29 29 27 / .045) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgb(29 29 27 / .18) 100%);
  animation: scintille 6s steps(1) infinite;
}
@keyframes scintille { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .6; } 98% { opacity: 1; } 99% { opacity: .8; } }
/* barre de balayage qui descend lentement, comme un écran qui se rafraîchit */
.ecran::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18vh; top: -20vh;
  background: linear-gradient(transparent, rgb(255 255 255 / .07), transparent);
  animation: balayage 7s linear infinite;
}
@keyframes balayage { to { transform: translateY(140vh); } }

/* Écran de démarrage, une fois par visite */
.demarrage { display: none; }
html.boot .demarrage {
  display: grid; position: fixed; inset: 0; z-index: 60; place-content: center; justify-items: center; gap: 1rem;
  background: var(--encre); color: var(--lcd); font-family: var(--pixel); text-align: center;
  animation: extinction .25s 1.15s steps(3) forwards;
}
.demarrage p { margin: 0; font-size: 1.1rem; }
.demarrage .petit { font-size: .7rem; opacity: .8; }
.jauge { width: 180px; height: 16px; border: 2px solid var(--lcd); padding: 2px; }
.jauge i { display: block; height: 100%; width: 0; background: var(--lcd); animation: remplit 1s steps(10) forwards; }
@keyframes remplit { to { width: 100%; } }
@keyframes extinction { to { opacity: 0; visibility: hidden; } }
html.boot .ouverture h1 img { animation-delay: 1.3s; }
html.boot .barre-etat, html.boot .touches { animation-delay: 1.4s; }

/* Barre d’état du téléphone en haut de l’ouverture */
.barre-etat, .touches {
  position: absolute; left: var(--gouttiere); right: var(--gouttiere);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--pixel); font-size: .8rem; animation: apparait .1s .2s both;
}
.barre-etat { top: 1rem; }
.reseau { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.reseau i { width: 4px; background: var(--encre); }
.reseau i:nth-child(1) { height: 4px; } .reseau i:nth-child(2) { height: 7px; }
.reseau i:nth-child(3) { height: 10px; } .reseau i:nth-child(4) { height: 14px; animation: clignote 2.4s steps(1) infinite; }
.batterie { position: relative; width: 26px; height: 13px; border: 2px solid var(--encre); padding: 1px; display: flex; gap: 1px; }
.batterie::after { content: ""; position: absolute; right: -5px; top: 2px; width: 3px; height: 5px; background: var(--encre); }
.batterie i { flex: 1; background: var(--encre); }
.batterie i:last-child { animation: clignote 1.2s steps(1) infinite; }

/* Touches du téléphone en bas de l’ouverture */
.touches { bottom: 1.25rem; }
.touches a { text-decoration: none; padding: .5rem 0; }
.touches a:hover { text-decoration: underline; }

/* Machine à écrire */
.accroche.tape { animation: none; }

/* Allumage des titres et blocs quand ils arrivent à l’écran (classe ajoutée en JS) */
.js .revele { opacity: 0; }
.js .revele.allume { animation: allume .5s steps(1) both; }
@keyframes allume {
  0% { opacity: 0; } 20% { opacity: .7; } 30% { opacity: .1; } 45% { opacity: 1; }
  55% { opacity: .4; text-shadow: 4px 0 0 rgb(29 29 27 / .25); } 70%, 100% { opacity: 1; text-shadow: none; }
}
.contact .js .revele.allume, .contact .revele.allume { text-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .revele { opacity: 1; }
  .ecran::after { display: none; }
}
