/* ==========================================================================
   project.css — gabarit fiche projet
   1. titre + statut  2. description courte  3. bloc info
   4. captures (1 à 3)  5. contenu détaillé
   ========================================================================== */

.project-hero { padding: 4.5rem 0 3rem; }
.project-hero h1, .project-summary { max-width: none; }
.project-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-top: 1.2rem; }
.project-summary { margin-top: 2.4rem; }

/* Bloc info technique : cartes à liseré de la couleur du thème */
.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 1px;
  margin: 3rem 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.info div {
  position: relative;
  padding: 1.3rem 1.4rem 1.2rem;
  background: var(--paper);
}
.info div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bar, var(--blue));
}
.info dt { margin-bottom: 0.5rem; }
.info dd { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.45; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.tags li {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-deep);
}

/* Captures / médias : 1 à 3 max */
.media { display: grid; gap: 1.5rem; margin: 3rem 0 0; }
.media.count-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.media.count-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.media .placeholder { aspect-ratio: 4 / 3; }
.media figcaption { margin-top: 0.7rem; }

/* Contenu détaillé : colonne de lecture, intertitres à barre */
.project-body { padding: 4rem 0 1rem; border-top: 1px solid var(--line); margin-top: 4rem; }
.project-body section, .project-body p { max-width: none; }
.project-body section + section { margin-top: 3.2rem; }
.project-body h2 { font-size: 1.9rem; }
.project-body ul:not([class]) { padding-left: 1.2rem; max-width: var(--max-text); }
.project-body li + li { margin-top: 0.4rem; }

/* Schéma de pipeline en HTML */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  margin-top: 1.5rem;
  counter-reset: step;
  border-top: 1px solid var(--ink);
}
.pipeline li {
  position: relative;
  padding: 1rem 1.2rem 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.pipeline li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-label);
  color: var(--blue);
  margin-bottom: 0.4rem;
}
.pipeline li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: 0.9rem;
  top: 0.95rem;
  font-family: var(--mono);
  color: var(--muted);
}
.pipeline .t { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.pipeline .d { margin-top: 0.3rem; font-size: 0.95rem; color: var(--ink-soft); }

/* Rangée de chiffres clés */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.figures div { border-top: 1px solid var(--ink); padding-top: 0.8rem; }
.figures .n { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--blue); }
.figures .label { display: block; margin-top: 0.5rem; }

.callout {
  padding: 1.2rem 0 1.2rem 1.2rem;
  border-left: 3px solid var(--ink);
  max-width: var(--max-text);
}

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 0;
  margin-top: 4rem;
  border-top: 1px solid var(--line);
}
.project-nav a { text-decoration: none; }
.project-nav a:hover { color: var(--ink); }

/* Galeries dans le contenu détaillé */
.gallery { display: grid; gap: 1.2rem; margin-top: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.gallery.phones { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.gallery.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.gallery figcaption { margin-top: 0.6rem; text-align: left; }
@media (max-width: 520px) { .gallery.phones { gap: 0.6rem; } }

/* Texte à énumération dense (noms propres, sigles) : justifier crée des
   espacements irréguliers, on garde un alignement à gauche plus lisible. */
.align-left { text-align: left; }
