/* ALJOUMA
   Identité tirée de la borne « OUAGA 34 » de la N1 : chapeau rouge, corps blanc,
   lettrage de signalisation. Chaque projet est une borne numérotée sur la route. */

/* Polices hébergées sur le site (voir fonts/LICENCE.txt) */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400-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: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500-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: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600-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: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-700-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: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700-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: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/barlow-condensed-800-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/barlow-condensed-800-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; }

:root {
  --vert: #123f2b;       /* grands aplats : en-tête, accueil, pied de page */
  --vert-vif: #1c5a3e;
  --rouge: #c01c1a;      /* chapeau de la borne, action principale sur fond blanc */
  --rouge-fonce: #9c1412;
  --paille: #f2c12e;     /* herbe sèche : action sur fond vert, bandeau de participation */
  --paille-claire: #f7d05a;
  --encre: #1d211e;
  --gris: #5b625d;
  --chaux: #f4f0e6;      /* surfaces secondaires */
  --trait: #dcd6c8;
  --blanc: #fff;

  --titre: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --texte: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --rayon: 14px;
  --marge: clamp(1.15rem, 4vw, 2.5rem);
  --deborde: clamp(3rem, 6vw, 5.5rem);   /* la photo d'accueil dépasse du bandeau vert */

  /* anciens noms, encore lus par d'éventuels styles en ligne */
  --accent: var(--rouge);
  --line: var(--trait);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 400 1.0625rem/1.6 var(--texte);
  color: var(--encre);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img { display: block; max-width: 100%; }
a { color: var(--rouge); text-underline-offset: .18em; }
p { margin: 0 0 1em; white-space: pre-line; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-family: var(--titre); text-wrap: balance; }

:focus-visible {
  outline: 3px solid var(--paille);
  outline-offset: 3px;
  border-radius: 4px;
}
main :focus-visible { outline-color: var(--vert); }
.hero :focus-visible, .page-head :focus-visible { outline-color: var(--paille); }

.wrap { width: min(1200px, 100% - 2 * var(--marge)); margin-inline: auto; }
.narrow { max-width: 640px; }

/* ---------- En-tête ---------- */

.site-header {
  background: var(--vert);
  color: var(--blanc);
  view-transition-name: en-tete;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  padding-block: 1.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: 800 1.85rem/1 var(--titre);
  letter-spacing: .12em;
  color: var(--blanc);
  text-decoration: none;
}
.brand-mark { flex: none; width: 1.15rem; height: auto; }
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem clamp(.9rem, 2.4vw, 1.75rem);
}
.site-header nav a,
.site-header .nav > a:not(.brand) {
  padding: .4rem 0;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  color: var(--blanc);
  text-decoration: none;
}
.site-header nav a:hover,
.site-header .nav > a:not(.brand):hover { border-bottom-color: rgb(255 255 255 / .45); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--paille); }
.site-header nav a.nav-cta {
  padding: .45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--paille);
  color: var(--encre);
}
.site-header nav a.nav-cta:hover { background: var(--paille-claire); }
.site-header nav a.nav-cta[aria-current="page"] {
  box-shadow: 0 0 0 3px var(--vert), 0 0 0 5px var(--paille);
}

/* ---------- Boutons ---------- */

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1.45rem;
  border: 0;
  border-radius: 999px;
  background: var(--rouge);
  color: var(--blanc);
  font: 600 1.0625rem/1.2 var(--texte);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.button:hover, button:hover { background: var(--rouge-fonce); }
button:disabled { opacity: .55; cursor: wait; }
.button.ghost {
  background: transparent;
  color: var(--vert);
  box-shadow: inset 0 0 0 2px var(--vert);
}
.button.ghost:hover { background: var(--vert); color: var(--blanc); }
.secondary {
  margin-top: 28px;
  background: var(--chaux);
  color: var(--encre);
  box-shadow: inset 0 0 0 1.5px var(--trait);
}
.secondary:hover { background: #e9e3d4; }

/* ---------- La borne ---------- */

.borne {
  --w: 2.7rem;
  flex: none;
  display: grid;
  place-items: end center;
  width: var(--w);
  height: calc(var(--w) * 1.32);
  padding-bottom: calc(var(--w) * .11);
  border-radius: calc(var(--w) / 2) calc(var(--w) / 2) 3px 3px;
  background: linear-gradient(var(--rouge) 0 44%, var(--blanc) 44%);
  color: var(--encre);
  font: 800 calc(var(--w) * .52)/1 var(--titre);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Accueil ---------- */

.loading {
  margin: 0;
  padding: clamp(3rem, 12vw, 8rem) var(--marge);
  background: var(--vert);
  color: var(--blanc);
  font: 700 1.5rem/1.2 var(--titre);
  text-align: center;
}

.hero { background: var(--vert); color: var(--blanc); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(2rem, 6vw, 6rem);
  padding-top: clamp(1.75rem, 4.5vw, 3.75rem);
}
.hero h1 {
  grid-area: 1 / 1 / 2 / 3;
  margin-bottom: clamp(1.75rem, 4vw, 3.25rem);
  font-size: clamp(2.9rem, 7.4vw, 6.6rem);
  font-weight: 800;
  line-height: .92;
  text-transform: uppercase;
}
.hero-text { grid-area: 2 / 1; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero-text p { max-width: 33em; font-size: 1.125rem; color: rgb(255 255 255 / .88); }
.hero-text .lead { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.42; color: var(--blanc); }
.hero-text strong { color: var(--paille); font-weight: 700; }
.hero .button { margin-top: .75rem; background: var(--paille); color: var(--encre); }
.hero .button:hover { background: var(--paille-claire); }

.hero-visual {
  grid-area: 2 / 2 / 4 / 3;
  align-self: start;
  margin: 0 0 calc(-1 * var(--deborde));
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 0 50%;
  border-radius: var(--rayon);
}

.project-count {
  grid-area: 3 / 1;
  align-self: end;
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  margin: 0;
}
.project-count .borne {
  --w: clamp(5rem, 9.5vw, 7.75rem);
  position: relative;
  height: calc(var(--w) * 1.44);
  padding-bottom: calc(var(--w) * .22);
  background: linear-gradient(var(--rouge) 0 40%, var(--blanc) 40%);
}
.project-count .borne::after {   /* le socle */
  content: "";
  position: absolute;
  inset: auto -9% 0;
  height: 10%;
  border-radius: 3px 3px 0 0;
  background: var(--blanc);
  box-shadow: 0 -2px 0 rgb(0 0 0 / .08);
}
.project-count span:last-child {
  max-width: 9.5em;
  padding-bottom: 1rem;
  font: 700 clamp(1.3rem, 2.3vw, 1.85rem)/1.08 var(--titre);
  text-transform: uppercase;
  letter-spacing: .015em;
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.25rem, 7.5vw, 6rem); }
.section-title {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 800;
  line-height: .98;
  text-transform: uppercase;
}
.latest { padding-top: calc(var(--deborde) + clamp(2.75rem, 4.5vw, 4rem)); }
.latest .button { margin-top: clamp(2.25rem, 4vw, 3.25rem); }

/* ---------- Projets ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 4vw, 3.25rem) clamp(1.25rem, 2.5vw, 2rem);
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .55rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-card .photos {
  display: grid;
  gap: 3px;
  aspect-ratio: 1;
  margin-bottom: .45rem;
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--chaux);
  outline: 1px solid rgb(0 0 0 / .09);   /* délimite les visuels à fond blanc */
  outline-offset: -1px;
}
.project-card .photos[data-count="2"] { grid-template-columns: 1fr 1fr; }
.project-card .photos[data-count="3"] { grid-template: 1fr 1fr / 2fr 1fr; }
.project-card .photos[data-count="3"] a:first-child { grid-row: 1 / 3; }
.project-card .photos a { display: block; min-width: 0; min-height: 0; cursor: zoom-in; }
.project-card .photos a:focus-visible { outline-offset: -4px; outline-color: var(--paille); }
.project-card .photos img { width: 100%; height: 100%; object-fit: cover; }
.project-card .photos .no-photo {
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 8vw, 5rem);
}
.project-card .borne {
  position: absolute;
  top: -.7rem;
  left: .9rem;
  z-index: 1;
  box-shadow: 0 6px 14px rgb(0 0 0 / .28);
  pointer-events: none;
}
.date { font-size: .95rem; font-weight: 500; color: var(--gris); }
.project-title {
  display: flex;
  align-items: baseline;
  gap: .4em;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}
.project-icon {
  flex: none;
  font: .78em/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.project-description { margin: .1rem 0 0; max-width: 62ch; color: #39403b; }

/* Page « Les projets » */

.page-head {
  background: var(--vert);
  color: var(--blanc);
  padding-block: clamp(1.75rem, 4.5vw, 3.5rem) clamp(2.25rem, 5vw, 4rem);
}
.page-head h1 {
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  font-weight: 800;
  line-height: .92;
  text-transform: uppercase;
}
.projects-heading { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .22em; }
.projects-heading .borne { --w: clamp(2.1rem, 5.4vw, 4rem); margin-bottom: .07em; }
.years {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.6rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
.years a {
  padding: .25rem 0;
  border-bottom: 3px solid transparent;
  font: 700 1.5rem/1 var(--titre);
  font-variant-numeric: tabular-nums;
  color: var(--blanc);
  text-decoration: none;
}
.years a:hover { border-bottom-color: var(--paille); }

.year {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 3vw, 2.75rem);
  padding-block: clamp(2.75rem, 5vw, 4rem);
}
.year + .year {   /* ligne discontinue de la route */
  background: repeating-linear-gradient(90deg, var(--trait) 0 2.75rem, transparent 2.75rem 4.25rem) top / 100% 3px no-repeat;
}
.year-title {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font-size: clamp(2.6rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: .9;
  font-variant-numeric: tabular-nums;
  color: var(--vert);
}

/* ---------- Équipe ---------- */

.team { background: var(--chaux); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 3rem);
}
.person { display: grid; align-content: start; gap: .3rem; }
.person img {
  width: 9.5rem;
  aspect-ratio: 1;
  margin-bottom: .9rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paille);
}
.person:nth-child(3n + 2) img { background: #a9cdb6; }
.person:nth-child(3n) img { background: #e9a98d; }
.person h3 { font-size: 1.85rem; font-weight: 700; line-height: 1; }
.person .role { margin: 0 0 .35rem; font-weight: 600; color: var(--vert-vif); }
.person p:last-child { margin: 0; max-width: 34em; }

/* ---------- Bandeau de participation ---------- */

.cta { background: var(--paille); }
.cta .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.cta .section-title { margin: 0; font-size: clamp(2.4rem, 5.8vw, 4.4rem); }
.cta .button { min-height: 3.5rem; padding-inline: 1.9rem; background: var(--vert); font-size: 1.15rem; }
.cta .button:hover { background: var(--vert-vif); }

/* ---------- Page « Participer » ---------- */

.donation-card {
  display: grid;
  grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  gap: 1.1rem clamp(2rem, 5vw, 4.5rem);
  justify-items: start;
}
.donation-card .photos { grid-area: 1 / 1 / 5 / 2; width: 100%; }
.donation-card .photos a { display: block; cursor: zoom-in; }
.donation-card .photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--rayon);
  background: var(--chaux);
}
.donation-card h3 {
  grid-column: 2;
  padding-top: .25rem;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: .98;
  text-transform: uppercase;
}
.donation-card p { grid-column: 2; margin: 0; max-width: 33em; font-size: 1.2rem; line-height: 1.55; }
.donation-card .button { grid-column: 2; min-height: 3.6rem; margin-top: .6rem; padding-inline: 2rem; font-size: 1.2rem; }

/* ---------- Pied de page ---------- */

.site-footer {
  position: relative;
  padding-block: 2.6rem 2.2rem;
  background: var(--vert);
  color: rgb(255 255 255 / .82);
}
.site-footer::before {   /* la route continue */
  content: "";
  position: absolute;
  inset: .95rem 0 auto;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .5) 0 2.75rem, transparent 2.75rem 4.25rem);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 2rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; }
.site-footer a { color: var(--blanc); }
.site-footer a:hover, .site-footer a[aria-current="page"] { text-decoration-color: var(--paille); text-decoration-thickness: 2px; }
.footer-name { font: 700 1.3rem/1 var(--titre); letter-spacing: .04em; color: var(--blanc); }

/* ---------- Agrandissement des photos ---------- */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 3.75rem 1rem 1.25rem;
  border: 0;
  background: transparent;
  color: var(--blanc);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(9 28 19 / .93); }
.lightbox figure {
  display: grid;
  justify-items: center;
  gap: .9rem;
  margin: 0;
  max-width: 100%;
}
.lightbox img {
  width: auto;
  height: auto;
  min-height: min(26rem, 55dvh);
  max-width: min(100%, 1100px);
  max-height: calc(100dvh - 10.5rem);
  object-fit: contain;
  border-radius: 8px;
}
.lightbox figcaption { max-width: 40rem; font: 700 1.4rem/1.15 var(--titre); text-align: center; text-wrap: balance; }
.lightbox figcaption small { display: block; margin-top: .3rem; font: 500 .95rem/1.3 var(--texte); color: rgb(255 255 255 / .75); }
.lightbox button {
  position: fixed;
  width: 3rem;
  min-height: 3rem;
  padding: 0;
  background: rgb(255 255 255 / .14);
  font: 400 1.9rem/1 var(--texte);
}
.lightbox button:hover { background: rgb(255 255 255 / .28); }
.lightbox :focus-visible { outline-color: var(--paille); }
.lightbox-close { top: .75rem; right: .75rem; }
.lightbox-prev { top: 50%; left: .75rem; translate: 0 -50%; }
.lightbox-next { top: 50%; right: .75rem; translate: 0 -50%; }

/* ---------- Pages de texte et administration ---------- */

.page { padding-block: clamp(2.25rem, 5vw, 4rem) clamp(3.5rem, 7vw, 6rem); }
.page > h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.6rem, 7vw, 4.25rem);
  font-weight: 800;
  line-height: .95;
  text-transform: uppercase;
}
.page h2 { margin: 2.5rem 0 1rem; font-size: clamp(1.7rem, 3.5vw, 2.1rem); font-weight: 700; line-height: 1.05; }
.page h3 { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.page a { color: var(--rouge); }

label { display: block; margin-bottom: 1rem; font-weight: 600; }
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .7rem .85rem;
  border: 1.5px solid #b3ad9d;
  border-radius: 10px;
  background: var(--blanc);
  color: inherit;
  font: 400 1rem/1.5 var(--texte);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--paille);
  outline-offset: 1px;
  border-color: var(--vert);
  border-radius: 10px;
}
textarea { resize: vertical; }
details {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 1.5px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--chaux);
}
summary { font-weight: 700; cursor: pointer; }
details[open] summary { margin-bottom: 1.1rem; }
[role="status"]:empty { display: none; }
[role="status"], #demo {
  padding: .7rem 1rem;
  border-left: 4px solid var(--paille);
  border-radius: 0 8px 8px 0;
  background: var(--chaux);
  font-weight: 500;
}
details [role="status"] { background: var(--blanc); margin: 0; }

.narrow :is(form, fieldset, input, select, textarea) { min-width: 0; max-width: 100%; }
.project-month { margin: 0; padding: 0; border: 0; }
.project-month legend { margin-bottom: 4px; padding: 0; font-weight: 700; }
.project-month > div { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; }
#preview { margin-top: 24px; }
#card { max-width: 22rem; padding-top: 1rem; }
#publish { margin-top: 20px; }
#project-list {
  max-height: 28rem;
  overflow: auto;
  padding-inline: 1rem;
  border: 1.5px solid var(--trait);
  border-radius: var(--rayon);
}
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--trait);
}
.project-row:last-child { border-bottom: 0; }
.project-row > span { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.project-row small { display: block; font-weight: 500; }
.project-row button { min-height: 2.4rem; margin: 0; padding: .4rem 1rem; font-size: .95rem; }
.project-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#edit-project { margin-top: 20px; }

/* ---------- Écrans intermédiaires ---------- */

@media (max-width: 1020px) {
  .year { grid-template-columns: minmax(0, 1fr); }
  .year-title { position: static; }
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .person { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 1.25rem; }
  .person img { grid-row: 1 / span 3; width: 6.5rem; margin: 0; }
  .person > :not(img) { grid-column: 2; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .hero h1, .hero-text, .project-count, .hero-visual { grid-area: auto; }
  .hero-text { padding-bottom: 2.25rem; }
  .hero-visual { margin: 2.25rem 0 calc(-1 * var(--deborde)); }
  .hero-visual img { aspect-ratio: 4 / 3; object-position: 0 62%; }
  .donation-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .donation-card > * { grid-area: auto !important; }
  .donation-card .photos { max-width: 26rem; margin-top: .25rem; }
}

/* ---------- Téléphone : une ligne par projet ---------- */

@media (max-width: 600px) {
  .nav { justify-content: center; padding-block: .95rem .85rem; }
  .site-header .nav:has(nav) .brand { flex-basis: 100%; justify-content: center; font-size: 2rem; }
  .site-header nav { justify-content: center; }

  .projects-grid { grid-template-columns: minmax(0, 1fr); gap: 1.9rem; }
  .project-card {
    display: grid;
    grid-template-columns: 7.25rem minmax(0, 1fr);
    align-content: start;
    gap: .3rem 1rem;
  }
  .project-card .photos { grid-row: 1 / span 4; align-self: start; margin: 0; border-radius: 10px; }
  .project-card > :not(.photos, .borne) { grid-column: 2; }
  .project-card .borne { --w: 2.1rem; top: -.5rem; left: .5rem; }
  .project-title { font-size: 1.4rem; }
  .project-description { font-size: 1rem; line-height: 1.5; }
  #card .project-card { display: flex; }

  .cta .button, .donation-card .button { width: 100%; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Transitions entre les pages ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  ::view-transition-old(root) { animation: 140ms ease-out both vt-out; }
  ::view-transition-new(root) { animation: 260ms ease-out 60ms both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
