/* ==========================================================================
   MONDES COMMUNS — feuille de style
   Grille : 12 colonnes souples, marges fines, composition asymétrique.
   Le vide structure la page ; la hiérarchie vient de la typo, des
   espacements et des dimensions d'images — pas d'éléments décoratifs.
   ========================================================================== */

@font-face { font-family: "Quicksand MC"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Quicksand-Bold.woff2") format("woff2"); }

:root {
  /* Couleurs (identité volontairement claire, un seul thème) */
  --bg: #ffffff;
  --ink: #111111;      /* titres, textes forts */
  --text: #5b5b5b;     /* texte courant (gris des maquettes) */
  --muted: #9a9a9a;    /* légendes, dates, informations */
  --rule: #cfcfcf;     /* filets */
  --logo: #6a6a6a;
  --accent: #A08629;   /* couleur de la D.A. — titres de section, détails (usage discret) */
  --accent-soft: #efe9d6;

  /* Typographies : Quicksand Bold (grands titres) / sans-serif Light (tout le reste) */
  --display: "Quicksand MC", "Quicksand", system-ui, sans-serif;
  --sans: "Helvetica Neue", "HelveticaNeue", "Inter Tight", Helvetica, Arial, sans-serif;

  /* Échelle typographique */
  --fs-title: clamp(1.95rem, 3.7vw, 4.1rem);
  --fs-h2: clamp(1.5rem, 2.55vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 1.9vw, 2rem);
  --fs-label: clamp(1.15rem, 1.65vw, 1.75rem);
  --fs-lead: clamp(1.15rem, 1.6vw, 1.7rem);
  --fs-body: clamp(.95rem, 1.05vw, 1.08rem);
  --fs-small: clamp(.8125rem, .88vw, .9375rem);
  --fs-nav: clamp(.875rem, .92vw, 1rem);
  --fs-word: clamp(2.6rem, 7.4vw, 8rem);

  /* Espacements */
  --m: clamp(16px, 2vw, 40px);        /* marge de page */
  --g: clamp(16px, 2.2vw, 36px);      /* gouttière */
  --s-xl: clamp(104px, 12vw, 220px);  /* entre grandes sections */
  --s-l: clamp(72px, 7.5vw, 140px);
  --s-m: clamp(36px, 3.6vw, 68px);
  --s-s: clamp(16px, 1.4vw, 26px);

  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
p + p { margin-top: .9em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--ink); text-wrap: balance; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.wrap { padding-inline: var(--m); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Grille
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
}
.grid > * { min-width: 0; }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg);
  transition: transform .5s var(--ease);
}
.header.is-hidden { transform: translateY(-100%); }
.header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--g);
  padding: clamp(14px, 1.5vw, 26px) var(--m);
}
.logo { display: block; color: var(--accent); line-height: 0; }
.logo svg { height: clamp(38px, 3.8vw, 60px); width: auto; fill: currentColor; }
.nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .15em clamp(10px, 1.15vw, 22px); }
.nav a {
  font-size: var(--fs-nav);
  color: var(--logo);
  transition: color .25s;
  padding-block: .2em;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }
.menu-btn { display: none; font-size: 1.05rem; color: var(--ink); padding: .25em 0; }

/* Menu mobile plein écran */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  padding: calc(env(safe-area-inset-top, 0px) + clamp(14px, 1.5vw, 26px)) var(--m) calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility 0s .35s;
  overflow-y: auto;
}
.overlay.is-open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.overlay__top { display: flex; justify-content: space-between; align-items: flex-start; }
.overlay .index { margin-top: clamp(56px, 12vh, 120px); }
.overlay .index a { font-size: clamp(1.45rem, 6.2vw, 2.2rem); }

/* --------------------------------------------------------------------------
   Titres de page
   -------------------------------------------------------------------------- */
.page { animation: pagein .6s var(--ease) both; }
@keyframes pagein { from { opacity: 0; } to { opacity: 1; } }

.intro { padding-top: clamp(40px, 5.5vw, 108px); }
.title {
  grid-column: 1 / span 7;
  font-family: var(--display);
  font-size: var(--fs-title);
  line-height: 1.08;
  letter-spacing: -.003em;
}
.title--wide { grid-column: 1 / span 8; }
.subtitle {
  grid-column: 1 / span 7;
  margin-top: .5em;
  font-size: var(--fs-lead);
  color: var(--ink);
  line-height: 1.3;
}
.lead {
  grid-column: 1 / span 8;
  margin-top: var(--s-m);
  font-size: var(--fs-lead);
  line-height: 1.34;
  color: var(--ink);
}
.lead p + p { margin-top: .75em; }
/* Accueil : texte d'introduction mis en avant, calé à gauche */
.lead--feature { grid-column: 1 / span 8; font-size: clamp(1.45rem, 2.45vw, 2.65rem); line-height: 1.2; letter-spacing: -.005em; }
.links-block.links-block--feature { grid-column: 1 / -1; margin-top: var(--s-m); }
.links-block--feature .links { flex-direction: row; flex-wrap: wrap; gap: .4em calc(var(--g) * 1.4); }
.links-block--feature .links a { font-size: var(--fs-lead); }
.lead--body { font-size: var(--fs-body); color: var(--text); line-height: 1.45; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { margin-top: var(--s-xl); }
.section--l { margin-top: var(--s-l); }
.section--m { margin-top: var(--s-m); }

.label {
  grid-column: 1 / span 4;
  font-size: var(--fs-label);
  color: var(--ink);
  line-height: 1.25;
  padding-bottom: .4em;
  border-bottom: 1px solid var(--rule);
  font-weight: 300;
  font-family: var(--sans);
}
.label + * { margin-top: 0; }

.h2 { font-family: var(--display); font-size: var(--fs-h2); line-height: 1.12; }
.h3 { font-family: var(--display); font-size: var(--fs-h3); line-height: 1.15; }

/* Bloc titre + texte en décalé */
.split__head { grid-column: 1 / span 4; }
.split__body { grid-column: 6 / span 5; }
.split__body--wide { grid-column: 6 / span 6; }
.split__body--r { grid-column: 8 / span 4; }
.split__body--full { grid-column: 1 / -2; }
.row__body--wide { grid-column: 6 / span 5; }
.split__body .h2 { margin-bottom: .6em; }
.split + .split { margin-top: var(--s-l); }

/* Trois colonnes (maquette : Trois manières d'agir) */
.trio {
  grid-column: 1 / -2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--g);
  margin-top: .55em;
}
.trio__item { padding-bottom: 1em; border-bottom: 1px solid var(--rule); align-self: start; }
/* Les trois blocs : titres, textes et filets alignés entre eux */
.trio:not(.trio--2) { grid-template-rows: auto auto; row-gap: 0; }
.trio:not(.trio--2) .trio__item { display: grid; grid-row: span 2; grid-template-rows: subgrid; align-self: stretch; align-content: start; }
.trio:not(.trio--2) .trio__item .h2 { align-self: end; }
.trio__item .h2 { margin-bottom: .4em; }
.trio--2 { grid-column: 1 / span 9; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; column-gap: var(--g); }
/* Blocs égaux : titres, textes et filets alignés ligne à ligne */
.trio--2 .trio__item { display: grid; grid-row: span 2; grid-template-rows: subgrid; align-self: stretch; align-content: start; }
.trio--2 .trio__item .h2 { align-self: end; }
.trio--2 .trio__item:nth-child(n+3) { margin-top: var(--s-m); }

/* Lignes (projets, histoire, actions) */
.rows { grid-column: 1 / -1; }
.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
  padding-block: clamp(22px, 2.2vw, 38px);
  border-bottom: 1px solid var(--rule);
}
.row > * { min-width: 0; }
.row__head { grid-column: 1 / span 4; }
.row__body { grid-column: 6 / span 4; }
.row__aside { grid-column: 10 / -1; }
.row__head .meta { margin-top: .45em; }
.row .links { margin-top: 1.1em; }

.meta, .role { font-size: var(--fs-small); color: var(--muted); line-height: 1.4; }
.role strong { display: block; font-weight: 300; color: var(--ink); margin-bottom: .2em; }
.date { font-size: var(--fs-label); color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }

/* Liens (remplacent les boutons : pas de décor) */
.links { display: flex; flex-direction: column; align-items: flex-start; }
.links a {
  display: inline-flex;
  align-items: baseline;
  gap: .5em;
  color: var(--ink);
  padding-block: .35em;
  border-bottom: 1px solid var(--rule);
  transition: border-color .3s, color .3s;
}
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links a .arr { transition: transform .35s var(--ease); display: inline-block; color: var(--accent); }
.links a:hover .arr { transform: translateX(4px); }
.links a[target="_blank"]:hover .arr { transform: translate(2px, -2px); }
.links--row { flex-direction: row; flex-wrap: wrap; gap: 0 var(--g); }
.links--lead a { font-size: var(--fs-lead); }
.links-block { grid-column: 1 / span 8; margin-top: var(--s-m); }
.links-block--left { grid-column: 1 / span 6; }

/* Appel à contact */
.cta__q { grid-column: 1 / span 7; }
.cta__body { grid-column: 6 / span 5; margin-top: var(--s-m); }
.cta__body .links { margin-top: 1.4em; }

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
.fig { margin: 0; }
.fig img { width: 100%; background: #f2f2f2; }
.fig__cap { margin-top: .7em; font-size: var(--fs-small); line-height: 1.35; }
.fig__cap b { display: block; font-weight: 300; color: var(--ink); }
.fig__cap span { color: var(--muted); }
.crop-portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
.crop-square img { aspect-ratio: 1 / 1; object-fit: cover; }
.crop-wide img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Placement éditorial libre des images dans la grille */
.place { grid-column: var(--c, 1 / -1); margin-top: var(--mt, 0); }
.place--bleed { margin-right: calc(-1 * var(--m)); }
.pair { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: start; }


/* --------------------------------------------------------------------------
   Séquence photographique (en haut de chaque rubrique)
   Plus une image est à gauche, plus elle est grande : image 01 = --seq-w0,
   chaque suivante = 75 % de la précédente (78,7 % sur mobile).
   1 <li> = 1 photographie ; data-title / data-meta = légende (champs WordPress).
   -------------------------------------------------------------------------- */
:root {
  --seq-w0: calc(139.63px + 32.667vw);   /* 267 px à 390 → 610 px à 1440 */
  --seq-ratio: .75;
  --seq-g0: var(--g);
  --seq-g1: clamp(10px, calc(9.26px + .19vw), 14px);
  --seq-align: center;
  --seq-dur: 700ms;
}
@media (max-width: 640px) { :root { --seq-ratio: .787; --seq-align: flex-start; } }

.sequence { margin-top: clamp(27px, calc(26.26px + .19vw), 32px); }
.sequence__viewport { overflow: hidden; margin-right: calc(-1 * var(--m)); touch-action: pan-y; cursor: grab; }
.sequence__viewport.is-dragging { cursor: grabbing; }
.sequence__track { display: flex; align-items: var(--seq-align); will-change: transform; transition: transform var(--seq-dur) var(--ease); }
.sequence.is-instant .sequence__track, .sequence.is-instant .sequence__item { transition: none; }
.sequence__item {
  flex: none;
  width: var(--seq-w0);
  margin-right: var(--seq-g0);
  transition: width var(--seq-dur) var(--ease), margin var(--seq-dur) var(--ease);
}
.sequence__item:nth-child(2) { width: calc(var(--seq-w0) * var(--seq-ratio)); }
.sequence__item:nth-child(n+3) { width: calc(var(--seq-w0) * var(--seq-ratio) * var(--seq-ratio)); }
.sequence__item figure { margin: 0; }
.sequence__item button { display: block; width: 100%; cursor: inherit; }
.sequence__item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; background: #f2f2f2; }
.sequence__bar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--g);
  width: var(--seq-w0); max-width: 100%;
  margin-top: clamp(8px, calc(6.51px + .381vw), 14px);
  font-size: var(--fs-small); line-height: 1.35;
}
/* Légende sur 3 lignes : titre / lieu et année / crédit. Hauteur réservée par main.js sur la plus longue légende. */
.sequence__caption { flex: 1; min-width: 0; max-width: 34em; transition: opacity 250ms var(--ease); text-wrap: pretty; }
.sequence__caption span { display: block; }
.sequence__caption span:empty { display: none; }
.sequence__caption [data-cap-credit] { margin-top: .15em; }
.sequence__caption.is-changing { opacity: 0; }
.sequence__caption b { display: block; font-weight: 300; color: var(--ink); }
.sequence__caption span { color: var(--muted); }
.sequence__controls { display: flex; gap: 14px; flex: none; padding-top: .1em; color: var(--muted); }
.sequence__controls button { color: var(--accent); padding: 4px 2px; margin: -4px -2px; transition: color 150ms; }
.sequence__controls button:hover:not(:disabled) { color: var(--ink); }
.sequence__controls button:disabled { opacity: .3; cursor: default; }
.sequence:not(.is-ready) .sequence__controls { visibility: hidden; }
.after-seq { margin-top: var(--s-l); }

/* Grands mots (RIM) */
.words { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); }
.words li { grid-column: var(--c); font-size: var(--fs-word); line-height: 1.02; color: var(--ink); letter-spacing: -.02em; }
.words li.is-accent { color: var(--ink); }
.words li + li { margin-top: .12em; }

/* Adresse électronique en grand */
.mail {
  font-size: clamp(1.5rem, 3.6vw, 3.9rem);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -.01em;
  word-break: break-word;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .12em;
  display: inline-block;
  transition: border-color .3s;
}
.mail:hover { border-color: var(--accent); }
/* Adresse électronique : toujours en couleur de la D.A. */
a[href^="mailto:"] { color: var(--accent); }

/* Texte en petit (partenaires) */
.small { font-size: var(--fs-small); line-height: 1.5; }
.cols-2 { columns: 2; column-gap: var(--g); }
.cols-2 p { break-inside: avoid; }

/* --------------------------------------------------------------------------
   Pied de page (maquette : index des rubriques)
   -------------------------------------------------------------------------- */
.footer { margin-top: var(--s-xl); padding-bottom: calc(var(--s-m) + env(safe-area-inset-bottom, 0px)); }
.index a {
  display: block;
  font-size: var(--fs-label);
  color: var(--ink);
  line-height: 1.25;
  padding-block: .38em;
  border-bottom: 1px solid var(--rule);
  transition: color .25s;
}
.index li:last-child a { border-bottom: 0; }
.index a:hover { color: var(--muted); }
.index a[aria-current="page"] { color: var(--muted); }
.footer .index { grid-column: 1 / span 4; }
.footer__about { grid-column: 9 / -1; align-self: end; font-size: var(--fs-small); }
.footer__about .logo svg { height: clamp(30px, 2.6vw, 40px); }
.footer__about p { margin-top: 1em; max-width: 34ch; }
.footer__base {
  grid-column: 1 / -1;
  margin-top: var(--s-l);
  display: flex;
  flex-wrap: wrap;
  gap: .4em var(--g);
  font-size: var(--fs-small);
  color: var(--muted);
}
.footer__base a { transition: color .25s; }
.footer__base a:hover { color: var(--ink); }
.footer__base .spacer { flex: 1; }

/* Bandeau fin en couleur de la D.A. : © + LinkedIn, sur une ligne, pleine largeur */
.footer { padding-bottom: 0; }
.footer__base.footer__base {
  margin-inline: calc(-1 * var(--m));
  padding: .7em var(--m) calc(.7em + env(safe-area-inset-bottom, 0px));
  background: var(--accent);
  color: #fff;
  flex-direction: row;
  align-items: baseline;
}
.footer__base.footer__base .spacer { display: block; flex: 1; }
.footer__base.footer__base a { color: #fff; }
.footer__base.footer__base a:hover { color: var(--ink); }


/* --------------------------------------------------------------------------
   Apparition discrète au défilement (état visible par défaut)
   -------------------------------------------------------------------------- */
.js .rv { opacity: 0; transform: translateY(14px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; }
  .page { animation: none; }
  .header { transition: none; }
}

/* --------------------------------------------------------------------------
   Tablette
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .title, .title--wide, .subtitle, .cta__q { grid-column: 1 / span 9; }
  .lead, .links-block { grid-column: 1 / span 10; }
  .split__body, .split__body--wide, .cta__body, .row__body--wide { grid-column: 5 / -1; }
  .split__body--r { grid-column: 7 / -1; }
  .split__body--full { grid-column: 1 / -1; }
  .row__head { grid-column: 1 / span 4; }
  .row__body { grid-column: 5 / span 5; }
  .row__aside { grid-column: 10 / -1; }
  .trio { grid-column: 1 / -1; }
  .trio--2 { grid-column: 1 / -1; }
  .footer .index { grid-column: 1 / span 5; }
  .footer__about { grid-column: 8 / -1; }
}

/* --------------------------------------------------------------------------
   Mobile (maquette mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .intro { padding-top: clamp(36px, 10vw, 64px); }
  .title, .title--wide, .subtitle, .lead, .links-block, .links-block--left,
  .label, .trio, .trio--2, .split__head, .split__body, .split__body--wide, .split__body--r, .split__body--full, .row__body--wide,
  .cta__q, .cta__body, .row__head, .row__body, .row__aside,
  .footer .index, .footer__about { grid-column: 1 / -1; }
  .lead { margin-top: 1.4em; }
  .trio, .trio--2 { grid-template-columns: 1fr; row-gap: 0; }
  .trio__item { padding-block: .55em 1em; }
  .trio .trio__item, .trio--2 .trio__item { display: block; grid-row: auto; margin-top: 0 !important; }
  .links-block--feature .links { flex-direction: column; }
  .trio__item + .trio__item { margin-top: 0; }
  .split__body { margin-top: 1em; }
  .row__body { margin-top: 1em; }
  .row__aside { margin-top: 1em; }
  .cta__body { margin-top: 1.2em; }
  .place { grid-column: var(--cm, 1 / -1); margin-top: var(--mtm, 0); }
  .place--bleed { margin-right: 0; }
  .words li { grid-column: 1 / -1 !important; }
  .words li:nth-child(2) { padding-left: 12%; }
  .words li:nth-child(3) { padding-left: 24%; }
  .words li:nth-child(4) { padding-left: 36%; }
  .cols-2 { columns: 1; }
  .footer__about { margin-top: var(--s-l); }
  .footer__base .spacer { display: none; }
  .footer__base { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   WordPress : barre d'administration (utilisateurs connectés)
   -------------------------------------------------------------------------- */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .header { top: 0; } }
