/* =============================================================
   Eloic Foucart — pages de lecture (projet, journal, article, portfolio)

   L'accueil défile en plein écran ; ces pages-ci se lisent. Même voix que
   le site — Space Grotesk, JetBrains Mono, papier et encre, clair ou sombre
   selon l'appareil — et les deux emprunts à Matea-Wildlife : la serif
   italique des chapeaux et des accroches, l'orange braise du terrain.
   ============================================================= */

@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/sg-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/sg-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('../fonts/jbm-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-italique-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-italique-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --papier:   #fbfdfb;
  --papier-2: #eef2ee;
  --encre:    #0d1113;
  --texte-2:  #4b5359;
  --texte-3:  #6b7280;
  --filet:    rgba(13, 17, 19, .12);
  --braise:   #b4531c;   /* sur papier : 4,9:1 — le #D96B2B de Matea n'y tenait que 3,4:1 */
  --sans:  'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ease:  cubic-bezier(.2, .8, .2, 1);
  --large: min(1240px, calc(100% - 2 * clamp(16px, 5vw, 64px)));
  --etroit: min(720px, calc(100% - 2 * clamp(16px, 5vw, 64px)));
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --papier:   #0d1113;
    --papier-2: #151b1e;
    --encre:    #eef0ee;
    --texte-2:  #b9c0c4;
    --texte-3:  #8a9099;
    --filet:    rgba(255, 255, 255, .1);
    --braise:   #e0874f;   /* sur encre : 7,0:1 */
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sp {
  margin: 0; background: var(--papier); color: var(--encre);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--braise); outline-offset: 3px; }

.sp-large  { width: var(--large);  margin-inline: auto; }
.sp-etroit { width: var(--etroit); margin-inline: auto; }

.sp-evitement { position: absolute; left: 16px; top: -100px; background: var(--encre); color: var(--papier); padding: 8px 14px; z-index: 50; }
.sp-evitement:focus { top: 12px; }
.sp-apercu { margin: 0; padding: 10px 16px; background: var(--braise); color: #0d1113; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-align: center; }

/* ---- En-tête ---- */
.sp-tete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 14px clamp(16px, 5vw, 64px);
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--filet);
}
.sp-marque { font-weight: 500; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.sp-marque img { height: 28px; width: auto; }
.sp-nav { display: flex; gap: clamp(12px, 2vw, 28px); margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.sp-nav::-webkit-scrollbar { display: none; }
.sp-nav a, .sp-langues a {
  font: 400 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--texte-3); padding: 8px 0; white-space: nowrap;
}
.sp-nav a[aria-current], .sp-langues a[aria-current] { color: var(--encre); }
@media (hover: hover) { .sp-nav a:hover, .sp-langues a:hover { color: var(--encre); } }
.sp-langues { display: flex; gap: 6px; align-items: center; color: var(--texte-3); font: 12px var(--mono); }
@media (max-width: 760px) {
  .sp-tete { flex-wrap: wrap; row-gap: 4px; }
  .sp-langues { margin-left: auto; }
  .sp-nav { order: 3; width: 100%; margin-left: 0; }
}

/* ---- Typographie commune ---- */
.sp-surtitre, .sp-etiquette {
  font: 400 12px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--texte-3); margin: 0 0 12px;
}
.sp-rubrique { color: var(--braise); }
.sp-grand-titre { font-weight: 300; font-size: clamp(48px, 9vw, 120px); letter-spacing: -.035em; line-height: .95; margin: 0; }
.sp-accroche { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 24px); line-height: 1.4; color: var(--texte-2); margin: 12px 0 0; }
.sp-chapeau { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.35; margin: 0 0 1.2em; }
.sp-retour { display: inline-block; font: 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; margin-bottom: 28px; opacity: .8; }
.sp-entete { padding: clamp(48px, 10vh, 110px) 0 clamp(28px, 5vh, 48px); }
.sp-vide { color: var(--texte-3); }

.sp-texte { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.8; }
.sp-texte p { margin: 0 0 1.3em; }
.sp-texte h2 { font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.02em; line-height: 1.2; margin: 1.8em 0 .6em; }
.sp-texte a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
.sp-texte figure { margin: 2em 0; }
.sp-texte figcaption, .projet-photo figcaption, .portfolio-photo figcaption {
  font: 12px/1.5 var(--mono); letter-spacing: .06em; color: var(--texte-3); margin-top: 10px;
}

.sp-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.sp-filtres a {
  font: 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 10px 14px; border: 1px solid var(--filet); border-radius: 999px; color: var(--texte-2);
}
.sp-filtres a[aria-current] { background: var(--encre); color: var(--papier); border-color: var(--encre); }

.sp-bouton {
  display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; padding: 16px 22px; border-radius: 999px; background: var(--encre); color: var(--papier);
  transition: opacity 200ms var(--ease);
}
@media (hover: hover) { .sp-bouton:hover { opacity: .8; } }

/* ---- Voisins ---- */
.sp-voisins { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: clamp(48px, 8vh, 90px) auto; border-top: 1px solid var(--filet); padding-top: 28px; }
.sp-voisin { text-decoration: none; display: block; }
.sp-voisin--apres { text-align: right; }
.sp-voisin-titre { display: block; font-size: clamp(18px, 2vw, 24px); letter-spacing: -.01em; }
@media (hover: hover) { .sp-voisin:hover .sp-voisin-titre { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; } }

/* ---- Appel ---- */
.sp-appel { margin-top: clamp(56px, 10vh, 110px); padding: clamp(32px, 5vw, 56px); background: var(--papier-2); border-radius: 12px; }
.sp-appel-titre { font-weight: 300; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 24px; }

/* =============================================================
   PROJET
   ============================================================= */
.projet-hero {
  position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end;
  background-size: cover; background-position: center; color: #fff;
}
.projet-hero-voile { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 11, 12, .82) 0%, rgba(8, 11, 12, .25) 55%, rgba(8, 11, 12, .1) 100%); }
.projet-hero-texte { position: relative; padding: 64px 0 clamp(40px, 7vh, 72px); }
.projet-hero .sp-surtitre, .projet-hero .sp-retour { color: rgba(255, 255, 255, .78); }
.projet[data-univers="terrain"] .projet-hero .sp-surtitre { color: #f0a06f; }  /* braise éclaircie sur la photo */
.projet-titre { font-weight: 300; font-size: clamp(52px, 10vw, 140px); letter-spacing: -.04em; line-height: .92; margin: 0; }
.projet-hero .sp-accroche { color: rgba(255, 255, 255, .88); max-width: 46ch; }

.projet-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 0 auto; border-bottom: 1px solid var(--filet); }
.projet-meta div { padding: 22px 20px 22px 0; }
.projet-meta dt { font: 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--texte-3); margin-bottom: 4px; }
.projet-meta dd { margin: 0; font-size: 18px; }

.projet-film { margin-top: clamp(40px, 7vh, 72px); }
.projet-film video { width: 100%; border-radius: 8px; background: #000; }

.projet-corps { margin-top: clamp(48px, 8vh, 90px); }
.projet-corps.avec-colonne { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: clamp(32px, 6vw, 96px); }
.projet-corps .sp-texte { max-width: 68ch; }
.projet-colonne div { padding: 18px 0; border-top: 1px solid var(--filet); }
.projet-colonne p { margin: 0; color: var(--texte-2); font-size: 15px; line-height: 1.6; }
.projet-colonne .sp-etiquette { margin-bottom: 6px; }
@media (max-width: 860px) { .projet-corps.avec-colonne { grid-template-columns: 1fr; } }

.projet-carnet { margin-top: clamp(56px, 9vh, 100px); }
.projet-carnet-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.projet-note { padding-top: 16px; border-top: 1px solid var(--filet); }
.projet-note-date { font: 12px var(--mono); letter-spacing: .1em; color: var(--braise); margin: 0 0 8px; }
.projet-note-texte { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.45; margin: 0; }

.projet-galerie { margin-top: clamp(56px, 9vh, 100px); columns: 2 360px; column-gap: clamp(14px, 2vw, 24px); }
.projet-photo { margin: 0 0 clamp(14px, 2vw, 24px); break-inside: avoid; }
.projet-photo img { width: 100%; border-radius: 4px; background: var(--papier-2); }
.projet-exif { display: block; opacity: .75; }

/* =============================================================
   JOURNAL
   ============================================================= */
.journal-une { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: end; padding-bottom: clamp(40px, 6vh, 64px); border-bottom: 1px solid var(--filet); }
.journal-une-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.journal-une-titre { font-weight: 300; font-size: clamp(32px, 4vw, 54px); letter-spacing: -.025em; line-height: 1.05; margin: 0; }
.journal-une-titre a, .journal-ligne-titre a { text-decoration: none; }
@media (max-width: 760px) { .journal-une { grid-template-columns: 1fr; } }

.journal-liste { list-style: none; margin: 0 0 clamp(56px, 10vh, 110px); padding: 0; }
.journal-ligne { display: grid; grid-template-columns: minmax(120px, 260px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding: clamp(24px, 4vh, 40px) 0; border-bottom: 1px solid var(--filet); }
.journal-ligne-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.journal-ligne-titre { font-weight: 400; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
@media (hover: hover) { .journal-ligne-titre a:hover, .journal-une-titre a:hover { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; } }
@media (max-width: 640px) { .journal-ligne { grid-template-columns: 1fr; } }

.article-tete { padding: clamp(48px, 9vh, 100px) 0 clamp(24px, 4vh, 40px); }
.article-titre { font-weight: 300; font-size: clamp(38px, 6vw, 72px); letter-spacing: -.03em; line-height: 1.02; margin: 0 0 .5em; }
.article-image { margin: 0 0 clamp(32px, 6vh, 56px); }
.article-image img { width: 100%; border-radius: 6px; }
.article-pied { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--filet); }
.article-partage { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; }
.article-partage a, .sp-copier { font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.sp-copier { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

/* =============================================================
   PORTFOLIO
   ============================================================= */
.portfolio-grille { columns: 3 280px; column-gap: clamp(12px, 1.6vw, 20px); margin-bottom: clamp(56px, 10vh, 110px); }
.portfolio-photo { margin: 0 0 clamp(12px, 1.6vw, 20px); break-inside: avoid; }
.portfolio-photo img { width: 100%; border-radius: 3px; background: var(--papier-2); }
.portfolio-photo figcaption span { color: var(--braise); margin-left: 6px; }
.portfolio-photo[hidden] { display: none; }

/* ---- Visionneuse ---- */
.sp-visionneuse { position: fixed; inset: 0; z-index: 100; background: rgba(8, 11, 12, .94); display: grid; place-items: center; padding: 24px; }
.sp-visionneuse img { max-width: 100%; max-height: calc(100vh - 96px); width: auto; object-fit: contain; }
.sp-visionneuse button {
  position: absolute; background: none; border: 0; color: #fff; font: 12px var(--mono); letter-spacing: .14em;
  text-transform: uppercase; padding: 14px; cursor: pointer;
}
.sp-visionneuse .fermer { top: 8px; right: 8px; }
.sp-visionneuse .avant  { left: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.sp-visionneuse .apres  { right: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.sp-visionneuse p { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .75); font: 12px var(--mono); margin: 0; }

/* ---- Pied ---- */
.sp-pied { border-top: 1px solid var(--filet); padding: 32px clamp(16px, 5vw, 64px) 40px; font: 12px/1.6 var(--mono); letter-spacing: .08em; color: var(--texte-3); }
.sp-pied-ligne { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.sp-pied-liens { justify-content: flex-start; margin-top: 12px; }
.sp-pied a { text-decoration: none; }
@media (hover: hover) { .sp-pied a:hover { color: var(--encre); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
