/* ==========================================================================
   Perdu au pays du milieu — feuille de style
   ========================================================================== */

:root {
  --paper: #0c0f12;
  --paper-2: #101418;
  --ink: #f2efe9;
  --ink-soft: #9aa3ab;
  --ink-title: #f2efe9;
  --ink-manifest: #c9ced3;
  --red: #c1272d;          /* rouge de marque : points, filets, fonds de survol */
  --red-text: #e8565b;     /* rouge éclairci : petits textes (contraste AA sur fond sombre) */
  --line: rgba(255, 255, 255, 0.1);
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --header-h: 68px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[id] { scroll-margin-top: 72px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.6;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }

button { font: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
}
.skip-link:focus { left: 16px; top: 16px; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) {
  .wrap { padding: 0 32px; }
}

.italic { font-style: italic; }

.eyebrow {
  margin: 0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.eyebrow--red { color: var(--red-text); }

/* ---------- Entrée (animation) ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp 0.9s ease both; }
.fade-up-2 { animation: fadeUp 0.9s 0.15s ease both; }
.fade-up-3 { animation: fadeUp 0.9s 0.3s ease both; }

/* ---------- Entête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 18, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .brand-name { font-size: 16px; }
}

.acts-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
@media (min-width: 640px) {
  .acts-nav { gap: 32px; }
}

.nav-link {
  position: relative;
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 6px;
  height: 1px;
  width: 0;
  background: var(--red);
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active { color: var(--ink); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

@media (min-width: 640px) {
  .nav-link { display: inline-flex; }
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.cta:hover {
  border-color: var(--red);
  background: var(--red);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.45) 50%, var(--paper) 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  padding-top: 48px;
  padding-bottom: 56px;
}

.hero-text {
  min-width: 0;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--red);
}

.hero-title {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.2rem, 10vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.hero-sub {
  font-style: italic;
  font-weight: 400;
  color: #e8e2d6;
}

.hero-subtitle {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.hero-subtitle p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.875rem;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .hero-subtitle p { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
  .hero { min-height: calc(100svh - var(--header-h)); display: flex; align-items: flex-end; }
  .hero-inner { width: 100%; padding-top: 32px; padding-bottom: 40px; }
  .hero-text { padding-left: 32px; }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(2.9rem, 14.5vw, 4.4rem);
    line-height: 0.92;
  }
}

/* ---------- Manifeste ---------- */
.manifesto {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.manifesto-inner {
  padding-top: 56px;
  padding-bottom: 56px;
}
@media (min-width: 640px) {
  .manifesto-inner { padding-top: 64px; padding-bottom: 64px; }
}

.manifesto-text {
  margin: 20px 0 0;
  max-width: 48rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.9rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink-manifest);
}

/* ---------- Actes ---------- */
.act {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding-top: 80px;
  padding-bottom: 80px;
}
.act--alt { background: var(--paper-2); }
@media (min-width: 640px) {
  .act { padding-top: 112px; padding-bottom: 112px; }
}

.act-head {
  position: relative;
  display: grid;
  gap: 40px;
}
@media (min-width: 1024px) {
  .act-head {
    grid-template-columns: 220px 1fr;
    gap: 64px;
  }
}

.act-roman {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 110px;
  line-height: 0.75;
  color: rgba(255, 255, 255, 0.07);
  user-select: none;
}
@media (min-width: 640px) {
  .act-roman { font-size: 170px; }
}

.act-title-block { min-width: 0; }
@media (min-width: 1024px) {
  .act-title-block { margin-left: -40px; padding-top: 32px; }
}

.act-title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* ---------- Photos ---------- */
.photos {
  display: flex;
  flex-direction: column;
  gap: 96px;
  margin-top: 64px;
}
@media (min-width: 640px) {
  .photos { gap: 128px; margin-top: 80px; }
}
@media (min-width: 1024px) {
  .photos { gap: 160px; }
}

.photo {
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 92%;
}
@media (min-width: 640px) {
  .photo { width: var(--w, 70%); }
}

/* Placement horizontal (fig-left / fig-right / fig-center) */
.fig-left   { margin-left: 0; margin-right: auto; }
.fig-right  { margin-left: auto; margin-right: 0; }
.fig-center { margin-left: auto; margin-right: auto; }

.photo-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 4px;
  margin: 0 0 14px;
  padding: 0;
  text-align: left;
  justify-content: flex-start;
}
.fig-right .photo-title {
  text-align: right;
  justify-content: flex-end;
}

.photo-title .num {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
  color: var(--red-text);
}
@media (min-width: 640px) {
  .photo-title .num { font-size: 1.1rem; }
}

.photo-title .ttl {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.65rem, 3.4vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink-title);
}

.photo-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}
.photo-btn img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.4s ease;
}
.photo-btn:hover img { opacity: 0.92; }

.act-end {
  margin: 96px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
}
@media (min-width: 640px) {
  .act-end { margin-top: 128px; }
}

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #0a0d10;
}

.footer-inner {
  padding-top: 56px;
  padding-bottom: 56px;
}
@media (min-width: 640px) {
  .footer-inner { padding-top: 64px; padding-bottom: 64px; }
}

.footer-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.3;
}
@media (min-width: 640px) {
  .footer-title { font-size: 1.875rem; }
}

.credit {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ---------- Visionneuse (dialog) ---------- */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 8, 10, 0.97);
  color: var(--ink);
}
.lightbox::backdrop { background: transparent; }

.lightbox[open] { display: block; }

.lb-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 72px 32px;
}

.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  min-height: 0;
}

#lb-img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
}

#lb-cap {
  margin-top: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
}

.lb-close,
.lb-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(12, 15, 18, 0.6);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.lb-close:hover,
.lb-nav:hover {
  border-color: var(--red);
  background: var(--red);
}

.lb-close { top: 16px; right: 16px; font-size: 1.75rem; }
.lb-prev  { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 12px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lb-inner { padding: 64px 12px 24px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  #lb-img { max-height: calc(100vh - 200px); }
}

/* ---------- Réduction des animations ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
