/* =============================================================
   Fiche projet — styles spécifiques (projet-{slug}.html).
   ----------------------------------------------------------------
   Trois sections principales :
     - .project-hero  : back-link + tags + h1 + meta + photo principale
     - .project-body  : description longue éditoriale (lede + paragraphes)
     - .project-news  : liste d'actualités datées (timeline éditoriale)

   Un fichier par projet ; les données de la carte sur la liste sont
   gérées séparément dans le tableau PROJECTS de projets.html.
   ============================================================= */

/* =========================================================
   HERO — entête éditoriale en split portrait
   ----------------------------------------------------------
   Layout : grille 2 colonnes (image portrait gauche / texte droit)
   pour donner une lecture intimiste — tout visible d'un coup d'œil.
   Sur mobile (<= 720 px), l'image passe au-dessus du texte.
   ========================================================= */
.project-hero {
  padding-block: clamp(40px, 5vw, 80px) clamp(40px, 5vw, 64px);
}

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--stone-700);
  margin-bottom: clamp(28px, 4vw, 48px);
  transition: color var(--t-fast) var(--ease-out),
              gap var(--t-base) var(--ease-out);
}
.back-link::before { content: "←"; }
.back-link:hover { color: var(--ocher-deep); gap: 12px; }

/* Grille principale du hero — 40 / 60 */
.project-hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* Photo principale en portrait 3/4 */
.project-hero .hero-image {
  margin: 0;
  border-radius: var(--r-2);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--paper-warm); /* fallback si pas d'image */
}
.project-hero .hero-image img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.project-hero figcaption {
  font-family: var(--mono); font-size: 11px;
  color: var(--stone-500);
  margin-top: 10px;
  padding: 0 4px;
}

/* Colonne texte — tags + h1 + meta + lede */
.project-hero .hero-content {
  display: flex; flex-direction: column;
}

.project-hero .hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.project-hero .tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--marine);
  background: var(--ocher-mist);
  border-radius: var(--r-pill);
}
.project-hero .status-pill { vertical-align: middle; }

.project-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  color: var(--marine);
  letter-spacing: -0.018em;
  margin-bottom: 22px;
  max-width: 16ch;
}
.project-hero h1 em {
  font-style: italic; color: var(--ocher); font-weight: 400;
}

.project-hero .hero-meta {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  align-items: center;
  font-family: var(--sans); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--stone-700);
  margin-bottom: clamp(20px, 3vw, 32px);
}
.project-hero .hero-meta .item {
  display: inline-flex; align-items: center; gap: 8px;
}
.project-hero .hero-meta svg {
  width: 14px; height: 14px; color: var(--ocher); flex: none;
}

/* Lede dans le hero — serif marine, lecture immédiate */
.project-hero .hero-lede {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--marine);
  letter-spacing: -0.008em;
  text-wrap: pretty;
  max-width: 38ch;
}
.project-hero .hero-lede em {
  font-style: italic; color: var(--ocher); font-weight: 400;
}

/* Responsive : image passe au-dessus du texte sur petit écran.
   Largeur volontairement limitée (~300 px) pour ne pas écraser le titre
   et le lede : la photo reste un repère visuel, pas un bloc dominant. */
@media (max-width: 720px) {
  .project-hero .hero-grid {
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 32px);
  }
  .project-hero .hero-image {
    aspect-ratio: 4 / 5;
    max-width: 300px;
    margin-inline: auto;
    width: 100%;
  }
  .project-hero figcaption {
    text-align: center;
  }
}

/* =========================================================
   BODY — description longue
   ----------------------------------------------------------
   Premier paragraphe en .lede (serif marine, plus grand),
   paragraphes suivants en sans stone-700.
   ========================================================= */
.project-body {
  padding-block: clamp(32px, 4vw, 64px) clamp(48px, 6vw, 96px);
}
.project-body .body-content {
  max-width: 62ch;
  display: flex; flex-direction: column; gap: 22px;
}
/* Note : la lede vit maintenant dans le .hero (.hero-lede) — visible
   au premier coup d'œil. Le body commence directement par les paragraphes
   de description longue. */
.project-body p {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.7;
  color: var(--stone-700);
  text-wrap: pretty;
}
.project-body p em {
  font-style: italic; color: var(--ocher); font-weight: 500;
}
/* Lien externe vers le site de l'asso (optionnel) */
.project-body a {
  color: var(--ocher-deep);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ocher) 50%, transparent);
  text-underline-offset: 3px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.project-body a:hover {
  color: var(--ocher);
  text-decoration-color: var(--ocher);
}

/* =========================================================
   NEWS — actualités datées
   ----------------------------------------------------------
   Liste verticale, date à gauche (mono ocre) + contenu à droite.
   Pas de cercles ni filet : sobre, juste l'espacement.
   ========================================================= */
.project-news {
  padding-block: var(--section-y);
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
}

.project-news .news-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
  max-width: 760px;
  padding: 0; margin: 0;
}

.project-news .news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: clamp(20px, 3vw, 40px);
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--rule);
}
.project-news .news-item:first-child { border-top: 0; padding-top: 0; }

.project-news .news-date {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ocher-deep);
  padding-top: 6px;
}

.project-news .news-content h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2; letter-spacing: -0.008em;
  color: var(--marine);
  margin-bottom: 12px;
}
.project-news .news-content p {
  font-size: 15px; line-height: 1.7;
  color: var(--stone-700);
  max-width: 56ch;
  text-wrap: pretty;
}
.project-news .news-content p + p { margin-top: 12px; }
.project-news .news-content em {
  font-style: italic; color: var(--ocher); font-weight: 500;
}

/* État « pas encore d'actualités » */
.project-news .news-empty {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--stone-500);
  max-width: 48ch;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 480px) {
  .project-news .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
