/* Portfolio Jeanne Potié
   Mobile d'abord, puis tablette/ordinateur (à partir de 768 px).
   Accueil : containers à effet ralenti, deux colonnes décalées sur grand écran.
   Pages projet : titre + infos, texte, visuels deux par deux, fiches techniques dépliables. */

/* Forma DJR Text : police sous licence. Déposer les fichiers dans /fonts puis décommenter.
@font-face { font-family: "Forma DJR Text"; src: url("fonts/FormaDJRText-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Forma DJR Text"; src: url("fonts/FormaDJRText-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Forma DJR Display"; src: url("fonts/FormaDJRDisplay-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
*/

:root {
  --bordeaux: #60121a;
  --bordeaux-deep: #4d0e15;
  --rose: #dcc8ca;        /* le gris rosé des sous-titres anglais du book */
  --rose-on-dark: #b98c92;
  --ink: #1d1416;
  --paper: #ffffff;
  --mist: #f4f1f1;
  --text: "Forma DJR Text", "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display: "Forma DJR Display", "Forma DJR Text", "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; }
.on-dark a:focus-visible, .menu a:focus-visible, .menu button:focus-visible { outline-color: #fff; }

/* ---------- Header (non sticky) ---------- */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  color: var(--bordeaux);
}
.logo { display: block; width: 52px; color: var(--bordeaux); }
.logo svg { display: block; width: 100%; height: auto; }
.menu-btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: 500 13px/1 var(--text); letter-spacing: .08em; text-transform: uppercase;
  color: var(--bordeaux); padding: 10px 0 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.menu-btn .bars { display: grid; gap: 5px; width: 22px; }
.menu-btn .bars i { display: block; height: 1.5px; background: currentColor; }

.runner {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 0 var(--gutter) 0;
  font-size: 12px; color: var(--bordeaux);
}
.runner b { font-weight: 700; }

/* ---------- Menu plein écran ---------- */
.menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bordeaux); color: #fff;
  display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu-top { display: flex; justify-content: space-between; align-items: center; }
.menu .logo { color: #fff; }
.menu-close { appearance: none; border: 0; background: none; color: #fff; cursor: pointer; font: 500 13px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; padding: 10px 0 10px 16px; }
.menu nav { margin-top: 56px; display: grid; gap: 14px; }
.menu nav a {
  font: 800 clamp(26px, 7vw, 40px)/1.05 var(--display);
  text-transform: uppercase; letter-spacing: -.01em;
  transform: translateY(14px); opacity: 0; transition: transform .5s ease, opacity .5s ease;
}
.menu.open nav a { transform: none; opacity: 1; }
.menu.open nav a:nth-child(2) { transition-delay: .06s; }
.menu.open nav a:nth-child(3) { transition-delay: .12s; }
.menu nav a small { display: block; font: 400 12px/1.6 var(--text); letter-spacing: .08em; color: var(--rose-on-dark); margin-bottom: 4px; }
.menu-foot { margin-top: auto; padding-top: 40px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; color: var(--rose-on-dark); }
.menu-foot a { color: #fff; }

/* ---------- Libellés bilingues (comme le book) ---------- */
.label {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--bordeaux); margin: 0;
}
.label span { color: var(--rose); font-weight: 700; margin-left: 4px; }
.on-dark .label { color: #fff; }
.on-dark .label span { color: var(--rose-on-dark); }

/* ---------- Accueil : réalisations ---------- */
.projects { display: grid; gap: 10px; padding: 0 10px; }
.card { position: relative; display: block; overflow: hidden; background: var(--mist); aspect-ratio: 6 / 5; max-width: 100%; isolation: isolate; }
/* L'image dépasse le container (effet fenêtre) et se déplace plus lentement que lui au scroll. */
.card-media { position: absolute; left: 0; right: 0; top: -40%; bottom: -40%; will-change: transform; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card::after { content: ""; position: absolute; inset: 0; background: rgba(20, 6, 8, .2); pointer-events: none; z-index: 1; }
.card--light::after { background: rgba(20, 6, 8, .42); }  /* couverture claire (dessin) : voile plus fort pour lire le titre */
.card-title {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--gutter); text-align: center; color: #fff;
}
.card-title strong { display: block; font: 800 clamp(40px, 13vw, 72px)/.9 var(--display); letter-spacing: -.015em; text-transform: uppercase; }
.card-title em { display: block; font-style: normal; font-weight: 300; font-size: 14px; letter-spacing: .02em; margin-top: 10px; }


/* ---------- Bas de page (toutes les pages) : fond blanc, fine ligne bordeaux ---------- */
.work { padding: 0 0 10px; }
.contact { margin-top: 64px; padding: 48px var(--gutter) 28px; border-top: 1px solid var(--bordeaux); background: var(--paper); color: var(--bordeaux); }
.contact h2 { margin: 14px 0 24px; font: 800 clamp(22px, 6.4vw, 34px)/1.05 var(--display); text-transform: uppercase; letter-spacing: -.015em; color: var(--bordeaux); text-wrap: balance; }
.contact ul { list-style: none; margin: 0; padding: 0; }
.contact li { border-top: 1px solid var(--rose); }
.contact li:last-child { border-bottom: 1px solid var(--rose); }
.contact li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; font-size: 14px; color: var(--ink); }
.contact li a span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--bordeaux); }
.contact-foot { margin-top: 40px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--bordeaux); }

/* ---------- Pages projet ---------- */
.back { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--bordeaux); padding: 0 var(--gutter); margin-top: 28px; font-weight: 500; }
.p-top { padding: 22px var(--gutter) 0; display: flex; flex-direction: column; gap: 22px; }
.p-top h1 { margin: 0; color: var(--bordeaux); font: 800 clamp(44px, 14vw, 80px)/.9 var(--display); letter-spacing: -.03em; text-transform: uppercase; text-wrap: balance; }
.p-by { margin: 8px 0 0; font-size: 18px; font-weight: 300; color: var(--bordeaux); }
.p-info { margin: 16px 0 0; font-size: 16px; line-height: 1.35; font-weight: 700; color: var(--bordeaux); }

/* Petit lien bordeaux en gras : « Fiches techniques » et « Projet suivant » */
.fiches-btn, .fiches-close, .next-link a {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: left;
  font: 700 16px/1.3 var(--text); color: var(--bordeaux);
}
.fiches-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; }
.fiches-btn::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; transition: transform .25s ease; }
.fiches-btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.fiches-btn:hover, .next-link a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.fiches { padding: 28px 10px 0; display: grid; gap: 10px; }
.fiches[hidden] { display: none; }
.fiches img { width: 100%; border: 1px solid var(--mist); }
.fiches-close { justify-self: start; margin: 8px var(--gutter) 0; font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

.p-desc { padding: 32px var(--gutter) 0; display: grid; gap: 32px; }
.p-hero { margin: 0 -10px; }
.p-hero img { width: 100%; }
.fiches-rows { display: grid; gap: 10px; }
.p-text p { margin: 0 0 1.1em; font-size: 14px; line-height: 1.6; font-weight: 300; color: var(--bordeaux); max-width: 62ch; }
.p-text p:last-child { margin-bottom: 0; }

/* Poème (HEBE) */
.poem { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rose); display: flex; gap: 20px; align-items: flex-start; color: var(--bordeaux); font-size: 14px; line-height: 1.6; font-weight: 300; font-style: italic; }
.poem img { width: 90px; height: 90px; object-fit: cover; flex: none; }
.poem h2 { margin: 0 0 12px; font: 700 15px/1.3 var(--text); font-style: normal; }
.poem p { margin: 0 0 1em; }
.poem .poem-src { font-style: normal; font-size: 12px; margin-top: 16px; }

/* Mobile : texte, image représentative puis visuels, empilés dans l'ordre (les colonnes s'effacent) */
.p-cols { display: grid; gap: 10px; padding: 32px 10px 0; }
.p-cols .col { display: contents; }
.p-cols .p-text { padding: 0 10px 22px; }
.p-cols .p-hero, .p-cols .g-fig { margin: 0; }
.p-cols .p-hero img, .p-cols .g-fig img { width: 100%; height: auto; }
/* Inspirations en petit : 4 vignettes carrées regroupées */
.p-cols .g-group, .p-cols .p-hero.g-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-cols .g-group img { aspect-ratio: 1 / 1; object-fit: cover; }
/* Légende sous une image (mots-clés des inspirations) */
.g-fig { position: relative; }
/* Légende posée sur le bas de l'image (n'ajoute pas d'écart entre les images) */
.g-fig figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(to top, rgba(20,6,8,.55), rgba(20,6,8,0)); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
/* Image en pleine largeur tout en bas du projet */
.p-end { margin: 10px 10px 0; }
.p-end img { width: 100%; height: auto; }

/* Visuels deux par deux (fiches techniques), sans recadrage */
.gallery { padding: 10px 10px 0; display: grid; gap: 10px; }  /* même écart que entre les images : l'image sous le texte fait partie de la grille */
.g-row { display: grid; gap: 10px; }
.g-row figure { margin: 0; min-width: 0; }
.g-row img { width: 100%; height: auto; }

.next-link { padding: 48px var(--gutter) 0; display: flex; justify-content: flex-end; }
.next-link a span { font-weight: 300; margin-right: 6px; }

@media (min-width: 768px) {
  .back { padding: 0 4.5vw; }
  .p-top { padding: 26px 4.5vw 0; flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .p-top h1 { font-size: clamp(56px, 6.5vw, 104px); }
  .p-info { font-size: clamp(16px, 1.5vw, 21px); }
  .p-by { font-size: clamp(18px, 1.6vw, 24px); }
  .fiches-btn { align-self: flex-end; font-size: clamp(16px, 1.5vw, 21px); }

  .fiches { padding: 40px 4.5vw 0; gap: 24px; }
  .fiches img { max-width: 1400px; margin: 0 auto; }
  .fiches-close { margin: 0 auto; }

  /* Deux colonnes décalées : texte + images | image représentative + images */
  .p-cols { display: flex; align-items: flex-start; gap: 24px; padding: 48px 4.5vw 0; }
  .p-cols .col { display: flex; flex-direction: column; gap: 24px; flex: 1 1 0; min-width: 0; }
  .p-cols .p-text { padding: 0 4vw 0 0; margin-bottom: 88px; }  /* un peu d'air sous le texte, sans fermer complètement */
  .p-cols .p-hero, .p-cols .g-fig { margin: 0; }
  /* (ancienne mise en page, conservée inutilisée) */
  .p-desc { padding: 48px 4.5vw 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .p-text { padding-right: 4vw; }
  .p-text p { max-width: none; font-size: clamp(14px, 1.05vw, 16.5px); line-height: 1.6; }
  .p-hero { margin: 0; align-self: end; }  /* calée en bas : écart identique avec la grille en dessous */
  .p-text { align-self: start; }
  .poem { font-size: clamp(13px, 1vw, 15px); }
  .fiches-rows { gap: 24px; }
  .p-cols .g-group { gap: 24px; }
  .p-end { margin: 24px 4.5vw 0; }
  .fiches-rows .g-row { display: flex; gap: 24px; align-items: flex-start; }

  .gallery { padding: 24px 4.5vw 0; gap: 24px; }
  .g-row { display: flex; gap: 24px; align-items: flex-start; }
  .g-row--half figure { flex: 0 0 calc(50% - 12px) !important; }
  .g-row--wide figure { flex: 1 1 100% !important; }

  .next-link { padding: 72px 4.5vw 0; }
  .next-link a { font-size: clamp(16px, 1.5vw, 21px); }
  .contact { margin-top: 96px; }
}

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

/* ---------- Mobile : une seule colonne, ordre d'origine ---------- */
.projects .col { display: contents; }

/* ---------- Tablette et ordinateur : deux colonnes décalées (façon Pauline Deltour) ---------- */
@media (min-width: 768px) {
  .projects { display: flex; align-items: flex-start; gap: 24px; padding: 8px 4.5vw 0; }
  .projects .col { display: flex; flex-direction: column; gap: 24px; flex: 1 1 0; min-width: 0; }
  /* Les deux colonnes démarrent au même niveau ; c'est l'alternance des formats qui crée le décalage. */
  .col-left .tile:nth-child(3n+1) .card { aspect-ratio: 4 / 5; }
  .col-left .tile:nth-child(3n+2) .card { aspect-ratio: 4 / 3; }
  .col-left .tile:nth-child(3n) .card   { aspect-ratio: 4 / 5; }
  .col-right .tile:nth-child(3n+1) .card { aspect-ratio: 1 / 1; }
  .col-right .tile:nth-child(3n+2) .card { aspect-ratio: 2 / 3; }
  .col-right .tile:nth-child(3n) .card   { aspect-ratio: 4 / 3; }
  .card-media { top: -25%; bottom: -25%; }
  .card-title strong { font-size: clamp(40px, 4.6vw, 72px); }
  .card-title strong::after { content: ""; display: block; height: 1px; background: rgba(255,255,255,.7); margin: 14px auto 0; width: 100%; }
  .card-title em { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
  .work { padding-bottom: 80px; }
  .header, .contact { padding-left: 4.5vw; padding-right: 4.5vw; }
}


/* ---------- À propos (reprend la page CV du portfolio) ---------- */
.about-page { color: var(--bordeaux); }
.cv { padding: 28px var(--gutter) 0; display: grid; gap: 0 18px; grid-template-columns: 40% minmax(0, 1fr); align-items: end; }
.cv-main { display: contents; }
/* Mobile : photo réduite à gauche, nom et fonction à côté ; le reste en pleine largeur dessous */
.cv-photo { margin: 0; grid-column: 1; grid-row: 1; }
.cv-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.cv-main h1 { grid-column: 2; grid-row: 1; align-self: end; }
.cv-role { grid-column: 2; grid-row: 2; }
.cv-contact, .cv-sec { grid-column: 1 / -1; }
.cv-main h1 { margin: 0; font: 800 clamp(30px, 9vw, 72px)/.9 var(--display); letter-spacing: -.03em; text-transform: uppercase; }
.cv-role { margin: 12px 0 0; font-size: 16px; font-weight: 700; }
.cv-contact { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.cv-c h3 { margin: 0 0 2px; font: 700 11px/1.3 var(--text); letter-spacing: .08em; text-transform: uppercase; }
.cv-c p { margin: 0; font-size: 14px; line-height: 1.45; font-weight: 300; }
.cv-sec { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--bordeaux); }
.cv-sec h2 { margin: 0 0 16px; font: 800 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.cv-item { margin-bottom: 18px; }
.cv-item:last-child { margin-bottom: 0; }
.cv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 3px; }
.cv-head h3 { margin: 0; font: 700 14px/1.35 var(--text); }
.cv-date { font-size: 13px; font-style: italic; font-weight: 300; white-space: nowrap; }
.cv-head h3 + .cv-date { margin-left: auto; }
.cv-item p { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 300; }
.cv-item p + p { margin-top: 4px; }
@media (min-width: 900px) {
  /* Même grille de 4 colonnes que la page CV du portfolio :
     photo = 1re colonne, nom + contact sur les 3 suivantes, puis les 4 rubriques alignées dessous. */
  .about-page .cv { padding: 40px 4.5vw 0; display: block; }
  .cv-main { display: contents; }
  .cv { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr auto auto auto; column-gap: 32px; row-gap: 0; align-items: end; }
  .cv-photo { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  .cv-main h1 { grid-column: 2 / 5; grid-row: 1; font-size: clamp(52px, 5.4vw, 88px); }
  .cv-role { grid-column: 2 / 5; grid-row: 2; font-size: clamp(16px, 1.3vw, 19px); }
  .cv-contact { grid-column: 2 / 5; grid-row: 3; margin-top: 22px; }
  .cv-sec { grid-row: 4; grid-column: auto; align-self: start; margin-top: 48px; }
  .cv-sec h2 { min-height: 2.4em; }
  .cv-head { display: block; }
  .cv-head h3 + .cv-date { margin-left: 0; }
  .cv-date { display: block; }
  .cv-c p, .cv-item p { font-size: clamp(13px, .95vw, 15px); }
  .cv-head h3 { font-size: clamp(13px, .95vw, 15px); }
}
}

/* Accueil : photos seules, sans titre ni voile (demande de Jeanne, 26 oct.) */
.card::after { display: none; }
.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; }

/* Accueil : légende discrète posée en bas à gauche de la photo (cartel), petite, en blanc,
   sur un léger dégradé pour rester lisible — à l'opposé du grand titre centré du site de référence */
.tile { display: block; }
.card::after { display: block !important; content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 38%;
  background: linear-gradient(to top, rgba(20, 6, 8, .5), rgba(20, 6, 8, 0)); pointer-events: none; z-index: 1; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: baseline; gap: 10px;
  padding: 0 16px 14px; color: #fff; font-size: 14px; line-height: 1.3; letter-spacing: .04em; }
.tile-cap b { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.tile-kind { font-weight: 300; }
.tile-year { margin-left: auto; font-weight: 300; font-variant-numeric: tabular-nums; }
.tile:hover @media (min-width: 768px) {
  .tile-cap { padding: 0 22px 20px; font-size: 16px; }
}
