/* ============================================================
   UNPETITMIRACLEFRANCAIS.FR — feuille de style unifiée V4
   Charte Cauchois : bleu nuit + crème + doré + serif
   ============================================================ */

:root {
  --bg-deep:      #050818;
  --bg-base:      #0d1838;
  --bg-lift:      #1a2447;
  --bg-card:      #142042;
  --bg-card-hi:   #1d2c54;
  --text:         #f5f0e1;
  --text-dim:     rgba(245,240,225,0.78);
  --text-mute:    rgba(245,240,225,0.55);
  --gold:         #d4a857;
  --gold-soft:    rgba(212,168,87,0.55);
  --gold-line:    rgba(212,168,87,0.30);
  --border:       rgba(245,240,225,0.18);
  --err:          #ff8a8a;
  --ok:           #8aff9d;
  --maxw:         900px;
  --maxw-wide:    1100px;
  --r:            6px;
  --serif:        Georgia, 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 10%, var(--bg-lift) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 90%, #0a1230 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--bg-deep) 0%, var(--bg-base) 70%);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Étoiles fond — radial-gradients CSS purs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(245,240,225,0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 76%, rgba(245,240,225,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 32%, rgba(245,240,225,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 89%, rgba(245,240,225,0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 21%, rgba(245,240,225,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 68%, rgba(245,240,225,0.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 15% 50%, rgba(212,168,87,0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 14%, rgba(212,168,87,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 92%, rgba(245,240,225,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 45%, rgba(245,240,225,0.5) 50%, transparent 51%);
}

/* ============== BRAND HEADER (logo cliquable retour portail — item #14 V5) ============== */
.upmf-brand {
  position: relative;
  z-index: 101;
  text-align: center;
  padding: 22px 24px 14px;
  background: rgba(13, 24, 56, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.upmf-brand-link {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  border-bottom: none !important;
  padding: 4px 8px;
  transition: color 0.2s, transform 0.2s;
}
.upmf-brand-link:hover {
  color: var(--gold);
  border-bottom: none !important;
  transform: translateY(-1px);
}
.upmf-brand-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============== NAV unifiée ============== */
nav.upmf-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 24, 56, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 22px;
  display: flex;
  justify-content: center;
  gap: 18px;
  border-bottom: 1px solid var(--gold-line);
  flex-wrap: wrap;
}
nav.upmf-nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 4px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
nav.upmf-nav a:hover { color: var(--text); border-bottom-color: var(--gold-soft); }
nav.upmf-nav a.active { color: var(--gold); border-bottom-color: var(--gold); }
nav.upmf-nav a.upmf-locked { opacity: 0.45; cursor: not-allowed; }

/* ============== MAIN ============== */
main {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 50px 24px 70px;
}
main.upmf-wide { max-width: var(--maxw-wide); }

/* ============== TYPO ============== */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); text-align: center; margin-bottom: 14px; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin: 2.4rem 0 1.2rem; color: var(--gold); }
h3 { font-size: 1.25rem; margin: 2rem 0 .8rem; color: var(--text); }
h4 { font-size: 1.05rem; margin-bottom: .4rem; color: var(--gold); }
p  { margin-bottom: 1.1rem; font-size: 1rem; color: var(--text-dim); }
a  { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold-soft); transition: color .2s; }
a:hover { color: var(--text); border-bottom-color: var(--text); }

ul, ol { margin: 0 0 1.1rem 1.4rem; color: var(--text-dim); }
li { margin-bottom: .4rem; }

/* ============== INTRO / TAGLINE ============== */
.intro, .upmf-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 28px;
}

/* ============== CITATIONS ============== */
.citation {
  margin: 2.5rem auto;
  max-width: 720px;
  padding: 24px 28px;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  background: rgba(212,168,87,0.04);
  text-align: center;
}
.citation p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 12px;
}
.citation span {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ============== TIMELINE (parcours) ============== */
.timeline { margin: 2rem 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-date {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.timeline-content h4 { color: var(--text); font-size: 1.1rem; }
.timeline-content p  { font-size: .95rem; }
@media (max-width: 700px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ============== PHOTOS / GALERIE ============== */
.about-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 2rem auto;
  max-width: 800px;
}
.about-photos img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  background: var(--bg-lift);
  cursor: pointer;
  transition: transform .25s, border-color .25s;
}
.about-photos img:hover { transform: translateY(-2px); border-color: var(--gold); }
@media (max-width: 700px) {
  .about-photos { grid-template-columns: repeat(2, 1fr); }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 2rem 0;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform .25s, border-color .25s;
}
.gallery img:hover { transform: translateY(-2px); border-color: var(--gold); }

/* V5.1.8 (item 4B) — Variante "gallery single row"
   Force 4 colonnes desktop pour la galerie réduite de realisations.html
   (4 images sur 1 seule ligne après suppression des doublons identifiés
   avec le bloc presse régionale au-dessus).
   N'IMPACTE PAS tspt.html qui utilise .gallery sans cette variante. */
.gallery.gallery--single-row {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 720px) {
  .gallery.gallery--single-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .gallery.gallery--single-row { grid-template-columns: 1fr; }
}

.hero-img, .docs-grid img, .tspt-header-images img {
  max-width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--gold-line);
  cursor: pointer;
}

/* V5.1.4 — .docs-grid : layout grille homogène pour photos documents */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 1.5rem 0;
}
.docs-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}
@media (max-width: 720px) {
  .docs-grid { grid-template-columns: 1fr; }
}

/* ============== ABOUT-TEXT ============== */
.about-text {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-dim);
  text-align: center;
}

/* ============== PARCOURS spécifique ============== */
.parcours-title { text-align: center; font-style: italic; }
.parcours-subtitle { text-align: center; color: var(--gold); margin: 1.6rem 0; }

/* ============== PROJETS — sections IHAD / réalisations / projets ============== */
.section-divider {
  margin: 3rem auto;
  max-width: 720px;
  border: none;
  border-top: 1px solid var(--gold-line);
}
.section-block { margin-bottom: 3rem; }
.section-block h2 { text-align: center; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.3rem; }

.ihad-reconnaissance {
  margin: 3rem 0 2rem;
}
.ihad-reconnaissance .ihad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ihad-reconnaissance figure {
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  overflow: hidden;
  margin: 0;
}
.ihad-reconnaissance img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.ihad-reconnaissance figcaption {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}
@media (max-width: 700px) {
  .ihad-reconnaissance .ihad-grid { grid-template-columns: 1fr; }
}

/* ============== CARTES doctrine / produits ============== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 2rem 0;
}

/* Variante forcée 4 colonnes pour la grille doctrine de a-propos
   (fix bug #10 V5 — sinon le auto-fit retombait sur 3 colonnes à
   width main 900px).
   V5.1.8 (item 3 propagation) : réduction du gap, marges et tailles
   des cards UNIQUEMENT pour ce bloc — n'impacte pas projets.html
   qui utilise aussi .card. */
.cards-grid-doctrine {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 1.5rem 0;
}
@media (max-width: 780px) {
  .cards-grid-doctrine { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .cards-grid-doctrine { grid-template-columns: 1fr; }
}
.cards-grid-doctrine .card { padding: 14px; }
.cards-grid-doctrine .emoji { font-size: 1.3rem; margin-bottom: 8px; }
.cards-grid-doctrine h4 { font-size: 0.92rem; }
.cards-grid-doctrine p { font-size: 0.78rem; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card .emoji { font-size: 1.6rem; margin-bottom: 8px; }
.card h4 { color: var(--text); font-size: 1rem; margin-bottom: 6px; }
.card p { font-size: .85rem; margin-bottom: 0; color: var(--text-mute); }

/* ============== BOUTONS ============== */
.btn, button {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg-deep);
}
.btn-primary:hover { background: #e6ba6a; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold-line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============== FORMULAIRES ============== */
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }

/* ============== CODE INPUT (V.I.P / cockpit / téléchargements) ============== */
.upmf-code-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto 12px;
}
.upmf-code-input {
  flex: 1;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
.upmf-code-input:focus { outline: none; border-color: var(--gold); }
.upmf-code-submit {
  padding: 11px 22px;
  background: var(--gold);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--r);
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.upmf-code-submit:hover { background: #e6ba6a; }
.upmf-code-error {
  text-align: center;
  font-size: 0.85rem;
  color: var(--err);
  min-height: 1.2em;
  margin-top: 4px;
}
.upmf-code-error.upmf-success { color: var(--ok); }

/* ============== FOOTER ============== */
footer.upmf-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 36px 24px 28px;
  border-top: 1px solid var(--gold-line);
  margin-top: 60px;
}
footer.upmf-footer p {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 6px;
}
footer.upmf-footer a {
  color: var(--text-mute);
  border-bottom: none;
  text-decoration: underline;
}
footer.upmf-footer a:hover { color: var(--gold); }

/* ============== LIGHTBOX (conservée du V3.4) ============== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 24, 0.96);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 95vw; max-height: 90vh; border: 1px solid var(--gold-line); border-radius: var(--r); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(13, 24, 56, 0.7);
  border: 1px solid var(--gold-line);
  color: var(--text);
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev  { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--gold); color: var(--gold); }

/* ============== SECTION protégée (téléchargement livre) ============== */
.secret-section, .download-section {
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  padding: 28px;
  margin: 2rem 0;
  text-align: center;
}
.secret-error, .download-error {
  display: none;
  color: var(--err);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* ============== ACCESSIBILITÉ ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ============== UTILITAIRES ============== */
.txt-center { text-align: center; }
.muted { color: var(--text-mute); }
.gold { color: var(--gold); }
.hidden { display: none !important; }

/* ============================================================
   V5.1 ajouts
   ============================================================ */


/* ===== Section Portfolio (items #8 + #8.bis V5.1) ===== */
.portfolio-intro {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-mute);
  margin-bottom: 1.8rem;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}
.portfolio-cat {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-align: center;
  margin: 2.6rem 0 1.2rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-line);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0 0 2rem;
}
@media (max-width: 1100px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .portfolio-grid { grid-template-columns: 1fr; } }

.pf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none !important;
  border-bottom: 1px solid var(--gold-line) !important;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pf-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.pf-card-img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-deep);
  position: relative;
}
.pf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}
.pf-card:hover .pf-card-img img { transform: scale(1.03); }
.pf-card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pf-card-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--gold);
  letter-spacing: 0.03em;
  margin: 0;
  word-break: break-word;
}
.pf-card-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}
.pf-card-detail {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* ===== Badge "EN COURS DE CESSION" — juifsdefrance.com (item #8.bis V5.1) ===== */
.pf-card-cession .pf-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(5, 8, 24, 0.85);
  border: 1px solid var(--gold);
  padding: 5px 10px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: pf-pulse-soft 3s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(212, 168, 87, 0.25);
}
@keyframes pf-pulse-soft {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 8px rgba(212, 168, 87, 0.18); }
  50%      { opacity: 1;    box-shadow: 0 0 22px rgba(212, 168, 87, 0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .pf-card-cession .pf-card-badge { animation: none; opacity: 0.85; }
}

/* ============================================================
   V5.1.1 — Classes orphelines en V5.1, réintroduites
   Bug critique CRITIQUE-1 de l'audit presse-citron à froid 12/05/2026.
   ============================================================ */

/* ===== DEEPSTORMING duo en exergue (projets.html) ===== */
.deepstorming-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 2.5rem;
}
@media (max-width: 720px) {
  .deepstorming-duo { grid-template-columns: 1fr; gap: 14px; }
}

.ds-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  padding: 22px 20px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.ds-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.ds-card-vignette {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-lift), var(--bg-card-hi));
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.85rem;
  margin-bottom: 14px;
  overflow: hidden; /* V5.1.7 — image enfant peut déborder sinon */
}
/* V5.1.7 — image capture site à l'intérieur de la vignette deepstorming */
.ds-card-vignette img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.35s ease;
}
.ds-card:hover .ds-card-vignette img {
  transform: scale(1.03);
}
.ds-card-label {
  font-family: var(--sans);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.ds-card-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  line-height: 1.3;
  margin: 0 0 14px;
}
.ds-card-body {
  font-family: var(--serif);
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 8px;
  flex-grow: 1;
}

/* ===== Bloc Collaboration (projets.html) ===== */
.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 1.5rem 0 2rem;
}
@media (max-width: 720px) {
  .collab-grid { grid-template-columns: 1fr; gap: 16px; }
}
.collab-box {
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  padding: 22px 22px 18px;
}
.collab-box h4 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.collab-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.collab-box li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.collab-box li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--gold);
}

/* ============================================================
   V5.1.1 — Modal "accès spécifique" sur les 16 blocs projets
   Doctrine §2.7 — "Friction assumée sur V.I.P"
   "Personne ne fait l'amour à l'œil !"
   ============================================================ */

/* Overlay plein écran — caché par défaut */
.pmodal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 8, 24, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow-y: auto;
}
.pmodal-overlay.is-open { display: flex; }

.pmodal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  padding: 38px 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.pmodal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-mute);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r);
  transition: color 0.2s, background 0.2s;
}
.pmodal-close:hover { color: var(--gold); background: rgba(212,168,87,0.08); }

.pmodal-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--gold);
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.pmodal-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-dim);
  text-align: center;
  margin: 0 0 22px;
}
.pmodal-warning {
  text-align: center;
  background: rgba(212,168,87,0.06);
  border: 1px solid var(--gold-line);
  padding: 10px 16px;
  border-radius: var(--r);
  margin: 0 0 20px;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.pmodal-form-row { margin-bottom: 14px; }
.pmodal-form-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: var(--text-dim);
}
.pmodal-required { color: var(--err); }
.pmodal-form-input,
.pmodal-form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-lift);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.pmodal-form-textarea { min-height: 110px; resize: vertical; }
.pmodal-form-input:focus,
.pmodal-form-textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.pmodal-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.pmodal-form-submit {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--bg-deep);
  border: none;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.pmodal-form-submit:hover:not(:disabled) { background: #e6ba6a; }
.pmodal-form-submit:disabled { opacity: 0.6; cursor: wait; }

.pmodal-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--r);
  background: rgba(138,255,157,0.08);
  border: 1px solid rgba(138,255,157,0.3);
  text-align: center;
}
.pmodal-result h3 {
  color: var(--ok);
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.pmodal-result.is-error {
  background: rgba(255,138,138,0.08);
  border-color: rgba(255,138,138,0.3);
}
.pmodal-result.is-error h3 { color: var(--err); }

.pmodal-fermer {
  display: block;
  margin: 20px auto 0;
  background: transparent;
  border: 1px solid var(--gold-line);
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 9px 22px;
  border-radius: var(--r);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.pmodal-fermer:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212,168,87,0.06);
}

/* Bloquer scroll body quand modal ouvert */
body.pmodal-locked { overflow: hidden; }

/* ============================================================
   V5.1.5 — REFONTE COMBAT.HTML + MODE VISITEUR
   ============================================================ */

/* --- Mode visiteur conditionnel — convention CSS réutilisable --- */
body.mode-conventionnel .deepstorming-only,
body.mode-conventionnel .singe-deepstorming-only { display: none !important; }
body.mode-deepstorming .conventionnel-only { display: none !important; }

/* --- Combat.html : bandeau intro singe vignette --- */
.intro-bandeau {
  max-width: 220px;
  margin: 2rem auto 1rem;
  text-align: center;
}
.singe-vignette {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.singe-vignette:hover {
  border-color: var(--gold);
  transform: scale(1.02);
}

/* --- Intro 30 ans sous Scholl --- */
.intro-30-ans {
  max-width: 760px;
  margin: 0 auto 2rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.6;
  text-align: center;
}
.intro-30-ans strong {
  color: var(--gold);
  font-weight: 700;
  font-style: italic;
}

/* --- Ombrelle Scholl --- */
.citation-ombrelle {
  margin: 3rem auto 2.5rem;
  max-width: 900px;
  padding: 28px 32px;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  background: rgba(212,168,87,0.07);
  text-align: center;
}
.citation-ombrelle p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.5;
}
.citation-ombrelle span {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

/* --- Grid 2 colonnes frises --- */
.frises-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}
.frises-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: var(--gold-line);
}
@media (max-width: 900px) {
  .frises-grid { grid-template-columns: 1fr; gap: 0; }
  .frises-grid::before { display: none; }
}
.frise-col { min-width: 0; }
.frise-col h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin: 0 0 1.4rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-line);
  text-align: center;
}

/* --- Entrée de frise --- */
.frise-entry { margin-bottom: 14px; }
.frise-date {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--gold);
  margin-bottom: 4px;
  padding-left: 4px;
}
.frise-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  transition: border-color 0.2s, transform 0.2s;
}
a.frise-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.frise-card:hover {
  border-color: var(--gold);
  transform: translateX(3px);
}
.frise-titre {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
}
.frise-desc {
  font-size: 0.85rem;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.4;
}
.frise-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Citation intégrée dans card --- */
.frise-quote {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  background: rgba(212,168,87,0.10);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
  text-align: center;
}
.frise-quote-author {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

/* --- Citation Nietzsche en clôture (avant bloc livre) --- */
.citation-cloture {
  margin: 3rem auto 1rem;
  max-width: 760px;
}

/* --- Bloc livre Chambre 206 --- */
.livre-bloc {
  max-width: 760px;
  margin: 3rem auto 2rem;
  text-align: center;
}
.livre-bloc h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
}
.livre-bloc .livre-couverture {
  max-width: 280px;
  width: 100%;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  margin: 1rem auto;
  display: block;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.livre-bloc .livre-couverture:hover {
  border-color: var(--gold);
  transform: scale(1.02);
}
.livre-bloc p {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text-dim);
  margin: 1rem auto;
  max-width: 600px;
  line-height: 1.6;
}

/* --- Footnote TA Dossier — bas de page --- */
.mention-ta-footer {
  max-width: 760px;
  margin: 4rem auto 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gold-line);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

/* --- Lien FNAC + Téléchargement désactivé (depuis V3, migré dans style global V5.1.5) --- */
.fnac-link {
  display: inline-block;
  margin: 1rem 0;
  padding: 12px 22px;
  background: var(--gold);
  color: var(--bg-deep);
  border-radius: var(--r);
  font-weight: 600;
  text-decoration: none;
  border-bottom: none;
  transition: background 0.2s;
}
.fnac-link:hover { background: #e6ba6a; color: var(--bg-deep); }

.download-disabled {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-mute);
  font-style: italic;
  font-size: 0.9rem;
}

/* ============================================================
   V5.1.6 — Timeline photos cliquables (parcours.html) + overlay AFP riche
   ============================================================ */

/* Photos intégrées dans les cards timeline (Djibouti, IHAD, AFP face).
   Toutes partagent le même style ; la distinction de classe sert au JS
   pour différencier déclencheur lightbox (.timeline-photo) vs déclencheur
   overlay (.timeline-afp-trigger). */
.timeline-photo,
.timeline-afp-trigger {
  display: block;
  margin-top: 0.9rem;
  max-width: 160px; /* V5.1.7 — réduit ~50% (était 320px). La lightbox conserve la taille originale. */
  width: 100%;
  height: auto;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.timeline-photo:hover,
.timeline-afp-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

/* Overlay AFP riche — fond plein écran, contenu centré scrollable */
.afp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 24, 0.96);
  z-index: 900; /* sous lightbox (1000) pour que la lightbox passe par-dessus */
  overflow-y: auto;
  padding: 60px 24px 40px;
}
.afp-overlay.active { display: block; }

.afp-overlay-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  padding: 2.2rem 1.8rem 2.4rem;
  position: relative;
  color: var(--text);
}
.afp-overlay-inner h2 {
  margin-top: 0.4rem;
  margin-bottom: 1.2rem;
  text-align: center;
}
.afp-overlay-inner .citation {
  margin-bottom: 2rem;
}

.afp-overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: rgba(13, 24, 56, 0.7);
  border: 1px solid var(--gold-line);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease, color .2s ease;
}
.afp-overlay-close:hover { border-color: var(--gold); color: var(--gold); }

/* Galerie 9 photos AFP dans l'overlay — 3 colonnes desktop, 2 tablette, 1 mobile */
.afp-overlay-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.afp-overlay-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.afp-overlay-gallery img:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

/* Quand l'overlay est ouvert, on bloque le scroll du body en arrière-plan */
body.afp-overlay-open { overflow: hidden; }

@media (max-width: 900px) {
  .afp-overlay-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .afp-overlay-gallery { grid-template-columns: 1fr; }
  .timeline-photo,
  .timeline-afp-trigger { max-width: 50%; } /* V5.1.7 — était 100%, réduit ~50% sur mobile aussi */
  .afp-overlay { padding: 50px 14px 30px; }
  .afp-overlay-inner { padding: 1.6rem 1rem 1.8rem; }
}

/* ============================================================
   V5.1.7 — Bloc presse régionale (realisations.html)
   Articles d'époque I Havre A Dream, placés AVANT la galerie photos café.
   - Premier sous-bloc : 2 visuels côte à côte (vue + zoom texte) sur l'article
     "Le rêve havrais de Manu" (Le Havre Presse, 18 janvier 2012).
   - Suivants : 3 images presse simples, centrées (Le Havre Infos +
     Magazine Office Tourisme x2).
   - Toutes cliquables → lightbox (scope ajouté dans script.js).
   ============================================================ */
.ihad-presse-bloc {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ihad-presse-cote-a-cote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.ihad-presse-cote-a-cote img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.ihad-presse-cote-a-cote img:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}
.ihad-presse-single {
  display: block;
  max-width: 720px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.ihad-presse-single:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}
@media (max-width: 720px) {
  .ihad-presse-cote-a-cote { grid-template-columns: 1fr; gap: 1rem; }
  .ihad-presse-single { max-width: 100%; }
}

/* V5.1.8 (item 4A) — Variante "réduit + passe-partout B1"
   Couples côte à côte plus discrets (max-width 700px centré),
   chaque image dans une CELLULE de largeur égale (passe-partout),
   hauteur fixe 440px pour respecter "même hauteur" — l'image
   conserve son ratio naturel et est centrée dans sa cellule.
   Lightbox intacte (clic charge image source pleine résolution). */
.ihad-presse-cote-a-cote--reduit {
  max-width: 700px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.ihad-presse-cell {
  background: var(--bg-card);
  border: 1px solid var(--gold-line);
  border-radius: var(--r);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ihad-presse-cell:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.ihad-presse-cell img {
  display: block;
  height: 440px;
  width: auto;
  max-width: 100%;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 auto;
  /* le cadre passe-partout est porté par .ihad-presse-cell ;
     on neutralise donc le hover translate hérité du pattern parent
     en n'ajoutant rien ici. */
}

/* V5.1.8 (item 4A bis) — Single zoom rêve havrais réduit (au-dessus
   du "bloc des 4") : max-width 520px centré pour cohérence visuelle
   avec les couples côte à côte du dessous. */
.ihad-presse-single--reduit {
  max-width: 520px;
}

@media (max-width: 720px) {
  .ihad-presse-cote-a-cote--reduit { grid-template-columns: 1fr; }
  .ihad-presse-cell img { height: auto; max-height: 60vh; width: 100%; max-width: 100%; object-fit: contain; }
  .ihad-presse-single--reduit { max-width: 100%; }
}
