/* =========================================================================
   Fiche projet (single-project.php) — maquette/projet-rendu.html
   Chargée UNIQUEMENT sur une fiche projet (functions.php : is_singular('project')).
   Les jetons de design (--encre, --accent, --police-titre…) viennent de main.css.
   ========================================================================= */

.projet-page {
  padding-bottom: 24px;
}

/* --- En-tête : fil d'Ariane, pastille, titre, chapô ---------------------- */
.projet-entete {
  position: relative;
  /*
   * overflow-x:clip borne l'échappée horizontale de `.projet-entete::before` (lueur à
   * right:-120px), qui sinon crée un scroll horizontal et fait dézoomer le viewport mobile
   * (390→490px). `clip` préserve la bave verticale (top:-40px) et n'ouvre pas de conteneur de
   * défilement. Fix à la source de la décoration, pas un overflow-x:hidden global.
   */
  overflow-x: clip;
  padding-top: 64px;
  padding-bottom: 48px;
}

/* La lueur orange de la maquette, en fond du coin haut-droit. */
.projet-entete::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -120px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(255, 125, 41, 0.14), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.projet-entete > * {
  position: relative;
  z-index: 1;
}

.projet-entete__retour {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font-family: var(--police-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--texte-doux);
  margin-bottom: 34px;
}

.projet-entete__retour:hover {
  color: var(--accent);
}

.projet-entete__fleche {
  font-size: 15px;
  line-height: 1;
}

/* `display: flex` (bloc) et non `inline-flex` : en inline, la pastille se collait à la suite du
   fil d'Ariane sur la même ligne, au lieu de passer dessous comme dans la maquette. */
.projet-entete__pastille {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  font-family: var(--police-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gris);
}

.projet-entete__pastille::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.projet-entete__titre {
  margin: 0;
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.projet-entete__resume {
  margin: 26px 0 0;
  max-width: 56ch;
  font-size: 19px;
  line-height: 1.6;
  color: var(--gris-clair);
}

/* --- Visuel principal (16/9) -------------------------------------------- */
.projet-visuel {
  padding-bottom: 56px;
}

.projet-visuel__cadre {
  position: relative;
  border: 1px solid var(--bordure);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.projet-visuel__cadre img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Barre méta ---------------------------------------------------------- */
.projet-meta {
  padding-bottom: 64px;
}

.projet-meta__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: rgba(243, 239, 230, 0.08);
  border: 1px solid var(--bordure);
  border-radius: 16px;
  overflow: hidden;
}

.projet-meta__case {
  background: var(--encre);
  padding: 22px 24px;
}

.projet-meta__case--lien {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projet-meta__libelle {
  font-family: var(--police-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 8px;
}

.projet-meta__valeur {
  font-family: var(--police-titre);
  font-size: 17px;
  font-weight: 500;
}

.projet-meta__lien {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--police-titre);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.projet-meta__lien:hover {
  color: var(--accent-clair);
}

/* --- Contexte (01 le brief / 02 la réponse) ------------------------------ */
.projet-contexte {
  padding-bottom: 64px;
}

.projet-contexte__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
}

.projet-contexte__numero {
  margin: 0 0 10px;
  font-family: var(--police-mono);
  font-size: 13px;
  color: var(--accent);
}

.projet-contexte__titre {
  margin: 0 0 16px;
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.projet-contexte__texte {
  margin: 0;
  color: var(--gris-clair);
  font-size: 16px;
  line-height: 1.7;
}

/* --- Galerie ------------------------------------------------------------- */
.projet-galerie {
  padding-bottom: 64px;
}

.projet-galerie__entete {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 28px;
  font-family: var(--police-mono);
  font-size: 13px;
}

.projet-galerie__numero {
  color: var(--accent);
}

.projet-galerie__libelle {
  color: var(--gris);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projet-galerie__grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.projet-galerie__tuile {
  position: relative;
  margin: 0;
  border: 1px solid var(--bordure);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  cursor: zoom-in;
}

.projet-galerie__tuile--large {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 8;
}

.projet-galerie__tuile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.projet-galerie__tuile:hover img {
  transform: scale(1.02);
}

/* Visionneuse (projet.js) : injectée à la volée, absente du DOM sans JS. */
.projet-visionneuse {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 17, 13, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.projet-visionneuse img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  border: 1px solid var(--bordure);
}

.projet-visionneuse__fermer {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--bordure-forte);
  background: transparent;
  color: var(--papier);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.projet-visionneuse__fermer:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Citation ------------------------------------------------------------ */
.projet-citation {
  padding-bottom: 72px;
}

.projet-citation__cadre {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 24px;
  padding: clamp(36px, 5vw, 64px);
}

.projet-citation__texte {
  margin: 0;
  font-family: var(--police-titre);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  max-width: 34ch;
  text-wrap: balance;
}

.projet-citation__guillemet {
  color: var(--accent);
}

.projet-citation__signature {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.projet-citation__pastille {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c85a12);
  flex: 0 0 auto;
}

.projet-citation__auteur {
  display: block;
  font-family: var(--police-titre);
  font-size: 15px;
  font-weight: 600;
}

.projet-citation__role {
  display: block;
  font-family: var(--police-mono);
  font-size: 12px;
  color: var(--gris);
}

/* --- Projet suivant ------------------------------------------------------ */
.projet-suivant {
  padding-bottom: 64px;
}

.projet-suivant__lien {
  display: block;
  border: 1px solid var(--bordure);
  border-radius: 20px;
  padding: clamp(32px, 5vw, 56px);
  background: var(--encre);
  transition: border-color 0.3s, background 0.3s;
}

.projet-suivant__lien:hover {
  border-color: rgba(255, 125, 41, 0.4);
  background: var(--surface);
}

.projet-suivant__libelle {
  display: block;
  font-family: var(--police-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 14px;
}

.projet-suivant__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.projet-suivant__titre {
  font-family: var(--police-titre);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--papier);
}

.projet-suivant__fleche {
  font-family: var(--police-titre);
  font-size: 40px;
  color: var(--accent);
}

/* --- CTA final ----------------------------------------------------------- */
.projet-cta {
  padding-bottom: 72px;
}

.projet-cta__interieur {
  text-align: center;
  padding: 24px 0;
}

.projet-cta__titre {
  margin: 0 0 14px;
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.projet-cta__texte {
  color: var(--texte-doux);
  font-size: 17px;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 auto 28px;
}

/* --- Mobile -------------------------------------------------------------- */
@media (max-width: 680px) {
  .projet-entete {
    padding-top: 40px;
    padding-bottom: 32px;
  }

  .projet-entete::before {
    width: 320px;
    height: 320px;
    right: -100px;
  }

  .projet-entete__resume {
    font-size: 17px;
  }

  .projet-visuel,
  .projet-meta,
  .projet-contexte,
  .projet-galerie,
  .projet-citation,
  .projet-suivant {
    padding-bottom: 40px;
  }

  .projet-meta__grille {
    grid-template-columns: 1fr;
  }

  .projet-contexte__grille {
    gap: 32px;
  }

  /* Une seule colonne : la tuile large et les tuiles secondaires s'empilent. */
  .projet-galerie__grille {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .projet-galerie__tuile--large {
    aspect-ratio: 16 / 9;
  }

  .projet-suivant__fleche {
    font-size: 30px;
  }
}
