/* base */
* { margin: 0; box-sizing: border-box; }
body {
  background: #111; color: #ddd;
  font-family: "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column;
  min-height: 100vh;
  align-items: center; justify-content: center;
  padding: 1rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;    /* plus d'air avant les carrés */
}
h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);  /* gros sur grand écran, raisonnable sur mobile */
  font-weight: 700;         /* le gras */
  letter-spacing: .3em;
  margin-bottom: 1.2rem;    /* c'est LUI qui sépare les deux lignes */
}
header p {
  font-size: .9rem;
  color: #999;
  letter-spacing: .1em;
}

/* la grille de carrés — c'est ça qui règle les écrans */
.carre {
  aspect-ratio: 1 / 1;
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  padding: .8rem; text-decoration: none;
  border: 1px solid #333;
  background: #222 var(--img, none) center / cover;
  /* plus de grisaille : image quasi normale, légèrement assombrie */
  filter: brightness(.92);
  transition: filter .3s ease, transform .3s ease;
}

/* lisibilité du texte sur photo : voile en bas de carré */
.carre::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top,
            rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 40%);
  pointer-events: none;
}
.carre span {
  position: relative; z-index: 2;
  color: #fff; font-size: .85rem;
  letter-spacing: .15em; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
/* accent au survol / focus / retour tactile */
.carre:hover, .carre:focus-visible, .carre:active {
  filter: brightness(1.05);
  transform: scale(1.03);
  outline: none;
}

footer { margin-top: 2rem; font-size: .75rem; color: #666; }
/* liens du footer : visibles ET repérables comme liens */
footer a {
  color: #9a8cff;                 /* violet clair, accord au site */
  text-decoration: underline dotted #666;
}
footer a:hover {
  color: #fff;                    /* s'éclaircit au survol */
}

/* ===== page série ===== */
.serie { width: 100%; max-width: 900px; }
.note {
  font-size: .9rem; color: #888; font-style: italic;
  margin: 0 0 1.5rem;
}
.grille {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* mobile : 2 par rangée */
  gap: .6rem;
}

@media (min-width: 640px) {
  .grille { grid-template-columns: repeat(3, 1fr); }  /* desktop : 3 par rangée */
}
.grille a { line-height: 0; }        /* tue l'espace sous l'image */
.grille img {
  width: 100%;
  border: 1px solid #333;
  filter: brightness(.95);
  transition: filter .3s ease;
}
.grille a {
  display: block;
  transition: transform .25s ease;
}
.grille a:hover, .grille a:active {
  transform: scale(1.035) translateY(-3px);   /* la vignette se soulève */
  outline: 2px solid #9a8cff;                  /* et prend le liseré violet */
  outline-offset: -2px;
}
.grille img {
  width: 100%;
  border: 1px solid #333;
  transition: filter .25s ease;
}
.grille a:hover img, .grille a:active img {
  filter: brightness(1.12);                    /* éclaircissement marqué */
}

/* lien du h1 : comme le menu, jamais bleu-nuit */
header h1 a { color: inherit; text-decoration: none; }

/* ===== lightbox ===== */
#lightbox {
  position: fixed; inset: 0;
  display: none;
  background: rgba(0,0,0,.92);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
}
#lightbox #lb-contenu {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: default;
}
#lightbox #lb-contenu img {
  max-width: 92vw;
  max-height: 86vh;
  border: 2px solid #ccc;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
#lb-fermer {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
}
#lb-fermer:hover {
  background: rgba(0,0,0,.8);
  color: #ff00ff;
}

/* ===== fil d'Ariane ===== */
.ariane {
  font-size: .8rem;
  letter-spacing: .08em;
  color: #666;
  margin-bottom: 1.5rem;
}
.ariane a {
  color: #9a8cff;
  text-decoration: none;
}
.ariane a:hover {
  color: #fff;
  text-decoration: underline dotted #666;
}
.ariane span {
  color: #aaa;          /* la page courante, légèrement plus claire */
}
