/* Partie projets sous l'intro, d'après bruno.co :
   l'accueil laisse voir le haut de la grille, puis la page défile normalement. */

body { overflow-x: hidden; overflow-y: auto; }
html, body { height: auto; }

/* L'intro occupe l'écran moins la bande qui annonce les projets */
.stage {
  position: relative;
  inset: auto;
  min-height: calc(100svh - var(--peek));
}
:root { --peek: clamp(28px, 4svh, 44px); }

/* ---------- En-tête : se cache en descendant, revient en remontant ---------- */
.header {
  transition: transform 0.5s var(--ease), background-color 0.4s;
  padding-bottom: 14px;
}
/* Après l'intro, bandeau resserré : moitié moins haut */
.is-past-intro .header {
  background: var(--paper);
  padding-top: 10px;
  padding-bottom: 10px;
  row-gap: 0;
}
.is-header-hidden .header { transform: translateY(-100%); }

/* Après l'intro, l'accroche laisse place au Ξ rouge */
.tagline { position: relative; transition: opacity 0.4s; }
.is-past-intro .tagline { opacity: 0; height: 0; overflow: hidden; }
.header-mark {
  position: absolute;
  left: 50%;
  top: clamp(22px, 3.6vw, 64px);
  width: 22px;
  margin-left: -11px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.header-mark rect { fill: var(--red); }
.is-past-intro .header-mark {
  top: 5px;
  width: 13px;
  margin-left: -6.5px;
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Grille ---------- */
.projets {
  position: relative;
  padding: 0 var(--gutter) clamp(60px, 10vw, 160px);
  background: var(--paper);
}

.grille {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.grille__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.carte {
  display: block;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.carte.is-in { opacity: 1; transform: none; }

.carte__media {
  position: relative;
  overflow: hidden;
  background: #f3f3f3;
  aspect-ratio: var(--ratio);
}
.carte__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carte__titre {
  margin: 10px 0 2px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}
.carte__texte {
  margin: 0;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.3;
  color: #767676;
}

/* survol : titre et texte s'éclaircissent pour montrer que la carte se clique */
.carte__titre, .carte__texte { transition: color 0.35s; }
.carte:hover .carte__titre { color: #8c8c8c; }
.carte:hover .carte__texte { color: #b0b0b0; }

@media (max-width: 759px) { .grille, .grille__col { gap: 12px; } .grille__col { gap: 24px; } }

@media (prefers-reduced-motion: reduce) {
  .carte { opacity: 1; transform: none; transition: none; }
  .header { transition: none; }
}
