/* ---------------------------------------------------------------
   MAISON NOIRE — feuille de style unique
   Noir absolu · machine à écrire · blanc · centré, non justifié
   --------------------------------------------------------------- */

:root {
  --noir: #000000;
  --blanc: #f2f0ed;
  --blanc-doux: rgba(242, 240, 237, 0.62);
  --ligne: rgba(242, 240, 237, 0.22);

  --mono: "Courier Prime", "Courier New", Courier, monospace;

  --texte: clamp(0.78rem, 0.72rem + 0.28vw, 0.94rem);
  --interligne: 2.05;

  /* Espace au-dessus du manifeste : pousse le texte vers le milieu de l'écran */
  --respiration-haut: clamp(2.5rem, 15vh, 8rem);

  --espace-1: 0.5rem;
  --espace-2: 1rem;
  --espace-3: 1.75rem;
  --espace-4: 3rem;
  --espace-5: 5rem;
  --espace-6: 7rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--noir);
  color: var(--blanc);
  font-family: var(--mono);
  font-size: var(--texte);
  line-height: var(--interligne);
  text-align: center;      /* centré */
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Jamais justifié */
p, h1, h2, h3, li { text-align: center; }

a {
  color: var(--blanc);
  text-decoration: none;
  border-bottom: 1px solid var(--ligne);
  padding-bottom: 1px;
  transition: border-color 220ms ease, opacity 220ms ease;
}
a:hover,
a:focus-visible { border-color: var(--blanc); }

:focus-visible {
  outline: 1px solid var(--blanc);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------------
   Structure
   --------------------------------------------------------------- */

.shell {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: var(--espace-6) var(--espace-3) var(--espace-5);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--espace-6);
}

.page-home .shell {
  min-height: calc(100vh - 12rem);
  padding-top: var(--respiration-haut);
}

/* ---------------------------------------------------------------
   Manifeste
   --------------------------------------------------------------- */

.manifeste .line {
  margin: 0 0 var(--espace-2);
  letter-spacing: 0.01em;
}

/* Lignes 2 à 5 : fondu doux, révélé par le script après la frappe */
.manifeste .line--fondu {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 900ms ease, transform 900ms ease;
}
.manifeste .line--fondu.est-visible {
  opacity: 1;
  transform: none;
}

/* Première ligne : frappe machine à écrire */
.manifeste .line--frappe {
  min-height: calc(var(--interligne) * 1em);
}
.manifeste .line--frappe .curseur {
  display: inline-block;
  width: 0.62ch;
  margin-left: 0.12ch;
  border-bottom: 1px solid var(--blanc);
  vertical-align: baseline;
  animation: clignote 900ms steps(1, end) infinite;
}
.manifeste .line--frappe.est-finie .curseur { animation: none; opacity: 0; }

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

@media (prefers-reduced-motion: reduce) {
  .manifeste .line--fondu { opacity: 1; transform: none; transition: none; }
  .manifeste .line--frappe .curseur { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------
   Porte (mot de passe)
   --------------------------------------------------------------- */

.acces-tagline {
  margin: 0 0 var(--espace-3);
  color: var(--blanc-doux);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9em;
}

.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espace-2);
}

.gate-label {
  color: var(--blanc-doux);
  letter-spacing: 0.02em;
}

.gate-field {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4ch;
  color: var(--blanc-doux);
}

.bracket { font-size: 1em; }

#password {
  width: 15ch;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ligne);
  color: var(--blanc);
  font: inherit;
  text-align: center;
  letter-spacing: 0.25em;
  padding: 0 0 2px;
  caret-color: var(--blanc);
  transition: border-color 220ms ease;
}
#password::placeholder {
  color: rgba(242, 240, 237, 0.3);
  letter-spacing: 0.04em;
}
#password:focus {
  outline: none;
  border-bottom-color: var(--blanc);
}

.gate-submit {
  background: transparent;
  border: 1px solid var(--ligne);
  color: var(--blanc-doux);
  font: inherit;
  font-size: 0.85em;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  padding: 0.35rem 1.4rem;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease;
}
.gate-submit:hover,
.gate-submit:focus-visible {
  border-color: var(--blanc);
  color: var(--blanc);
}

.gate-error {
  min-height: 1.5em;
  margin: 0;
  font-size: 0.85em;
  color: var(--blanc-doux);
  letter-spacing: 0.04em;
}
.gate.is-wrong { animation: secousse 320ms ease; }
@keyframes secousse {
  0%, 100% { transform: translateX(0); }
  25%  { transform: translateX(-4px); }
  75%  { transform: translateX(4px); }
}

/* ---------------------------------------------------------------
   Contacts
   --------------------------------------------------------------- */

.contacts p {
  margin: 0 0 var(--espace-1);
  color: var(--blanc-doux);
}
.contacts a { color: var(--blanc); }

/* ---------------------------------------------------------------
   Pied de page + logo
   --------------------------------------------------------------- */

.footer {
  padding: var(--espace-4) var(--espace-3) var(--espace-5);
  display: flex;
  justify-content: center;
}

.logo {
  width: clamp(96px, 14vw, 148px);
  height: auto;
  opacity: 0.85;
  transition: opacity 300ms ease;
}
.logo:hover { opacity: 1; }

/* ---------------------------------------------------------------
   Page : Choix (Les artistes / Les créations)
   --------------------------------------------------------------- */

.page-choix .shell {
  max-width: 34rem;
  min-height: calc(100vh - 12rem);
  justify-content: center;
  gap: var(--espace-4);
  padding-top: var(--respiration-haut);
}

.choix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--espace-2);
}

.case {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8.5rem;
  padding: var(--espace-3) var(--espace-2);
  border: 1px solid var(--ligne);
  color: var(--blanc-doux);
  text-decoration: none;
  transition: border-color 260ms ease, color 260ms ease, background-color 260ms ease;
}
.case:hover,
.case:focus-visible {
  border-color: var(--blanc);
  color: var(--blanc);
  background: rgba(242, 240, 237, 0.03);
}

.case-titre {
  letter-spacing: 0.14em;
  text-transform: lowercase;
}

.sortie-ligne {
  margin: 0;
}
.sortie-ligne .retour {
  font-size: 0.8em;
  letter-spacing: 0.16em;
  color: var(--blanc-doux);
  border-bottom: none;
}
.sortie-ligne .retour:hover { color: var(--blanc); }

/* ---------------------------------------------------------------
   Page : Les artistes
   --------------------------------------------------------------- */

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.page-artistes .shell {
  max-width: 50rem;
  padding-top: var(--espace-2);
  gap: var(--espace-4);
  justify-content: flex-start;
}

.cartes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--espace-2);
}

.carte {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 9rem;
  padding: var(--espace-3) var(--espace-2);
  border: 1px solid var(--ligne);
  transition: border-color 260ms ease;
}
.carte:hover { border-color: rgba(242, 240, 237, 0.45); }

.carte-nom {
  margin: 0;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.carte-domaine {
  margin: 0;
  font-size: 0.85em;
  line-height: 1.6;
}
.carte-surnom {
  margin: 0;
  font-size: 0.8em;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--blanc-doux);
}

.carte-liens {
  margin: 0.5rem 0 0;
  display: flex;
  justify-content: center;
  gap: var(--espace-2);
}
.carte-liens a {
  border-bottom: none;
  padding: 0;
  color: rgba(242, 240, 237, 0.55);
  transition: color 220ms ease, transform 220ms ease;
}
.carte-liens a:hover,
.carte-liens a:focus-visible {
  color: var(--blanc);
  transform: translateY(-1px);
}

.ico {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------
   Page : Les créations
   --------------------------------------------------------------- */

.entete {
  padding: var(--espace-5) var(--espace-3) var(--espace-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espace-2);
}

.entete h1 {
  margin: 0;
  font-size: 0.95em;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--blanc);
}

.entete .retour {
  font-size: 0.8em;
  letter-spacing: 0.16em;
  color: var(--blanc-doux);
  border-bottom: none;
}
.entete .retour:hover { color: var(--blanc); }

.page-creations .shell {
  max-width: 48rem;
  padding-top: var(--espace-3);
  gap: var(--espace-6);
  justify-content: flex-start;
}

/* Bloc générique */
.bloc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espace-2);
}

.bloc h2 {
  margin: 0;
  font-size: clamp(1.22rem, 0.97rem + 1vw, 1.82rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bloc .meta {
  margin: 0;
  font-size: 0.8em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blanc-doux);
}

.bloc p.texte {
  margin: 0 auto;
  max-width: 36rem;
  color: rgba(242, 240, 237, 0.86);
}

/* Média : vidéo Vimeo en 16/9 */
.media {
  width: 100%;
  margin-top: var(--espace-1);
}

.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border: 1px solid var(--ligne);
  overflow: hidden;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Média : image */
.image img {
  width: 100%;
  border: 1px solid var(--ligne);
  filter: grayscale(0);
}

.legende {
  margin: var(--espace-1) 0 0;
  font-size: 0.8em;
  letter-spacing: 0.04em;
  color: var(--blanc-doux);
}

.legende.credits p {
  margin: 0;
  line-height: 1.9;
}

.legende.credits-top {
  font-size: 0.9em;
  letter-spacing: 0.03em;
  color: var(--blanc-doux);
}

/* Séparateur discret entre les blocs */
.bloc + .bloc::before {
  content: "·";
  display: block;
  color: var(--ligne);
  margin-bottom: var(--espace-4);
  letter-spacing: 0.6em;
}

@media (max-width: 640px) {
  :root { --interligne: 1.95; --respiration-haut: clamp(2.5rem, 14vh, 7rem); }
  .shell { gap: var(--espace-5); }
  .page-creations .shell { padding-top: var(--espace-3); }
  .choix { grid-template-columns: 1fr; }
  .case { min-height: 6.5rem; }
  .cartes { grid-template-columns: 1fr; }
  .carte { min-height: 0; padding: var(--espace-3) var(--espace-2); }
  .entete h1 { letter-spacing: 0.3em; }
}
