/* ==========================================================================
   loskov.ch - Feuille de style (v2 : DA reprise du CV)
   Mobile-first. Couleurs et typos en variables (section 2).

   Principes :
   - le bleu #0057FF structure la page : bandeaux pleins (compétences, contact),
     titres de section en petites capitales bleues soulignées d’un filet, comme le CV ;
   - on alterne blanc / bleu / bleu très clair pour éviter les grandes surfaces blanches ;
   - boutons arrondis (pilule).
   ========================================================================== */

/* 1. Polices ------------------------------------------------------------------ */
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Zalando Sans Expanded"; src: url("../fonts/zalando-expanded-black.woff2") format("woff2"); font-weight: 900; font-display: block; } /* logo « SL » de l’intro */
@font-face { font-family: "Zalando Sans SemiExpanded"; src: url("../fonts/zalando-semiexpanded.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

/* 2. Variables ----------------------------------------------------------------- */
:root {
  --blue: #0057FF;
  --blue-deep: #0044CC;        /* survol des boutons bleus */
  --blue-tint: #EDF2FF;        /* fonds clairs teintés */
  --blue-line: #C9D8FF;
  --on-blue: #FFFFFF;
  --on-blue-soft: #E3ECFF;     /* texte secondaire sur bleu : 4,6:1 */
  --bg: #FFFFFF;
  --ink: #111111;
  --muted: #757575;            /* sur blanc : 4,6:1 */
  --muted-tint: #5C6270;       /* sur --blue-tint : 5,6:1 (#757575 n’y passe pas) */
  --line: #DDDDDD;
  --field: #8C8C8C;            /* bordures de champs : 3,4:1 sur blanc */
  --error: #C62828;

  --f-title: "Zalando Sans SemiExpanded", "Helvetica Neue", Arial, sans-serif;
  --f-logo: "Zalando Sans Expanded", "Arial Black", Arial, sans-serif;
  --f-text: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Échelle typographique : une taille par rôle, partout sur le site */
  --fs-label: 0.8125rem;                                  /* titres façon kicker, mots-clés */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;                                   /* tous les paragraphes de lecture */
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);     /* phrase d’introduction sous un grand titre */
  --fs-h3: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);     /* titres d’éléments : compétences, cartes, chapitres des projets, formulaire */
  --fs-h2: clamp(1.625rem, 1.1rem + 1.8vw, 2.5rem);       /* sous-titres de section */
  --fs-cta: clamp(2.25rem, 1.2rem + 3.4vw, 4.5rem);       /* titres d’appel au contact */
  --fs-display: clamp(2.5rem, 1.3rem + 4.8vw, 5.75rem);   /* titres de page */

  --gutter: clamp(20px, 4vw, 64px);
  --gap: clamp(16px, 2.2vw, 32px);
  --max: 1440px;
  /* Espacements : un seul système pour toute la page
     --section       : entre deux sections (bord de section → titre suivant)
     --section-tight : entre deux blocs liés (À propos → Parcours, compétences → outils, landing → compétences)
     --head-gap      : entre un titre de section et son contenu, et entre deux blocs d’une même section
     --title-gap     : entre un titre (ou petit titre en capitales) et ce qui le suit directement */
  --section: clamp(64px, 8vw, 112px);
  --section-tight: clamp(40px, 4.5vw, 64px);
  --head-gap: clamp(28px, 3.5vw, 48px);
  --title-gap: 20px;
  --header-h: 72px;
  --radius: 20px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Mobile (< 600 px) : seuls les textes de lecture rapetissent (le site paraissait chargé) ; titres, slogan et petits
   titres en capitales gardent leur taille, ce qui accentue la hiérarchie. Repères suivis : texte de lecture à 16 px
   (taille de référence d’iOS et d’Android), petits textes jamais sous 12 px, champs de formulaire jamais sous 16 px
   (en dessous, iOS zoome sur la page au toucher). */
@media (max-width: 599px) {
  :root {
    --fs-small: 0.8125rem;    /* 13 px (14 sur grand écran) */
    --fs-body: 1rem;          /* 16 px (17 sur grand écran) */
  }
}

/* 3. Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1px);   /* = hauteur exacte de l’en-tête : rien de la section du dessus ne dépasse */ scrollbar-gutter: stable; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-text); font-size: var(--fs-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.on-blue :focus-visible, .skills :focus-visible, .contact :focus-visible, .cta-band :focus-visible { outline-color: #FFFFFF; }
::selection { background: var(--blue); color: #FFFFFF; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 300; background: var(--blue); color: #FFFFFF; padding: 12px 18px; border-radius: 999px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* 4. Titres de section « façon CV » --------------------------------------------- */
.kicker {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); line-height: 1.2;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue);
}
.kicker::after { content: ""; flex: 1; height: 2px; background: currentColor; }
.kicker--plain::after { display: none; }
.kicker--light { color: #FFFFFF; }
.section-lead {
  font-family: var(--f-title); font-weight: 600;
  font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.02em;
}

/* 5. Boutons (pilules) ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: var(--f-text); font-size: 1rem; font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--ease-out);
}
/* Survol sobre : le bouton se soulève légèrement et sa couleur change d’un ton. Ni anneau, ni ombre, jamais de noir. */
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.btn--primary { background: var(--blue); color: #FFFFFF; }
.btn--primary:hover { background: var(--blue-deep); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--white { background: #FFFFFF; color: var(--blue); }
.btn--white:hover { background: #E3ECFF; color: var(--blue-deep); }
.btn--light-outline { border-color: #FFFFFF; color: #FFFFFF; }
.btn--light-outline:hover { background: rgba(255, 255, 255, .14); }

/* 6. En-tête ----------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); padding-top: 5px; border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
/* Barre bleue du haut = progression du scroll (--progress posé par main.js, 0 → 1).
   Sans JavaScript, elle reste pleine comme avant. */
.site-header::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 5px;
  background: var(--blue); transform-origin: left; transform: scaleX(var(--progress, 1));
}
.js .site-header { background: linear-gradient(var(--blue-tint), var(--blue-tint)) top / 100% 5px no-repeat, var(--bg); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: calc(var(--header-h) - 5px); }
.brand {
  font-family: var(--f-title); font-weight: 700; font-size: 1.3125rem; letter-spacing: -0.01em;
  color: var(--blue); text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 40px); }
.site-nav__list { display: flex; gap: clamp(16px, 2vw, 32px); }
.site-nav__list a { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.site-nav__arrow { display: none; }
.site-nav__list a:hover { color: var(--blue); }
.site-nav__side { display: flex; align-items: center; gap: 16px; }
/* Langues : la langue active en noir, soulignée d’un court filet bleu ; l’autre en gris, le filet apparaît au survol */
.lang-switch { display: flex; gap: 4px; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; }
.lang-switch > * { position: relative; padding: 8px 6px; text-decoration: none; }
.lang-switch > *::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 3px; height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease);
}
.lang-switch [aria-current] { color: var(--ink); }
.lang-switch [aria-current]::after { transform: scaleX(1); }
.lang-switch a { color: var(--muted); transition: color .2s; }
.lang-switch a:hover { color: var(--blue); }
.lang-switch a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; }

@media (max-width: 959px) {
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: 12px; }
  .no-js .site-nav { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .no-js .site-nav__list { flex-wrap: wrap; gap: 14px; }

  /* Bouton Menu : pas de fond ; « Menu » en noir, deux traits bleus (le second plus court) qui forment une croix à l’ouverture */
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 2px 0 8px; margin-right: -2px;
    background: none; color: var(--ink); border: 0; font-weight: 600; font-size: 0.9375rem; cursor: pointer;
  }
  .menu-toggle__icon { display: grid; justify-items: end; gap: 5px; width: 22px; color: var(--blue); }
  .menu-toggle__icon span { display: block; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease-out), width .25s var(--ease-out); }
  .menu-toggle__icon span:last-child { width: 65%; }
  .js .menu-toggle:hover .menu-toggle__icon span:last-child { width: 100%; }
  .menu-open .menu-toggle__icon span:last-child { width: 100%; }
  .menu-open .menu-toggle__icon span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-open .menu-toggle__icon span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 32px;
    padding: 24px var(--gutter) calc(28px + env(safe-area-inset-bottom));
    background: var(--bg); overflow-y: auto;
    /* Ouverture : le panneau se déroule depuis la barre de navigation… */
    visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path .45s var(--ease), visibility 0s .45s;
  }
  .js.menu-open .site-nav { visibility: visible; clip-path: inset(0 0 0 0); transition-delay: 0s; }
  /* …puis les liens arrivent l’un après l’autre */
  .js .site-nav__list li, .js .site-nav__side { opacity: 0; transform: translateY(14px); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
  .js.menu-open .site-nav__list li, .js.menu-open .site-nav__side { opacity: 1; transform: none; transition-duration: .5s; }
  .js.menu-open .site-nav__list li:nth-child(1) { transition-delay: .12s; }
  .js.menu-open .site-nav__list li:nth-child(2) { transition-delay: .18s; }
  .js.menu-open .site-nav__list li:nth-child(3) { transition-delay: .24s; }
  .js.menu-open .site-nav__side { transition-delay: .32s; }
  .js.menu-open body { overflow: hidden; }
  .js .site-nav__list { flex-direction: column; gap: 0; }
  .js .site-nav__list li { border-bottom: 1px solid var(--line); }
  .js .site-nav__list li:first-child { border-top: 1px solid var(--line); }
  .js .site-nav__list a {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0;
    font-family: var(--f-title); font-weight: 600; font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink);
  }
  .js .site-nav__arrow { display: inline; font-family: var(--f-text); font-size: 1.5rem; color: var(--blue); transition: transform .25s var(--ease-out); }
  .js .site-nav__list a:hover .site-nav__arrow, .js .site-nav__list a:active .site-nav__arrow { transform: translateX(6px); }
  .js .site-nav__side { justify-content: space-between; }
}

/* 7. Intro (≈ 2 s) : « SL » s’écarte, le reste du nom apparaît, puis le nom se range dans la navigation */
.intro-screen { display: none; }
.intro .intro-screen, .intro-screen.is-leaving {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 400; background: var(--bg); pointer-events: none;
}
.intro-screen__name {
  display: flex; align-items: flex-start;
  font-family: var(--f-logo); font-weight: 900; letter-spacing: -0.035em; line-height: 0.86; color: var(--blue);
  font-size: clamp(2.5rem, 10vw, 9rem); white-space: nowrap; opacity: 0; will-change: transform;
}
.intro-screen__name.is-ready { opacity: 1; }
.intro-screen__name .r, .intro-screen__name .gap { display: inline-block; overflow: hidden; }
.intro-screen__name .r { padding-bottom: 0.08em; margin-bottom: -0.08em; }
.intro-screen__name .r__in, .intro-screen__name .ch { display: inline-block; }
.intro { overflow: hidden; }
.intro .brand { visibility: hidden; }
.intro .site-nav, .intro .menu-toggle, .intro [data-hero-item] { opacity: 0; }
.intro-done .site-nav, .intro-done .menu-toggle { animation: fade .5s var(--ease-out) both; }
.intro-done [data-hero-item] { animation: rise .6s var(--ease-out) both; }
.intro-done [data-hero-item]:nth-child(2) { animation-delay: .05s; }
.intro-done [data-hero-item]:nth-child(3) { animation-delay: .1s; }
.intro-done [data-hero-item]:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 8. Landing : slogan en grand, phrase d’accompagnement sur toute la largeur, CTA à la suite ----------- */
/* La landing occupe exactement la hauteur visible sous l’en-tête. Le groupe (kicker, slogan, phrase, CTA) y est
   posé au centre optique : un peu plus d’espace dessous que dessus (≈ 44 % / 56 %), ce qui paraît centré à l’œil.
   Même espacement --hero-gap entre chaque élément du groupe. */
.hero__inner {
  display: flex; flex-direction: column; justify-content: center;
  min-height: min(calc(100svh - var(--header-h)), 900px);
  padding-block: 24px clamp(48px, 8vh, 80px);
}
.hero__main { --hero-gap: clamp(24px, 3.6vh, 40px); display: grid; justify-items: start; gap: var(--hero-gap); }
.hero__kicker { justify-self: stretch; white-space: nowrap; letter-spacing: 0.12em; }   /* une seule ligne, filet jusqu’à la marge */
.hero__slogan {
  font-family: var(--f-title); font-weight: 700;
  /* Toujours sur deux lignes (« …idées » / « …digital ») : la taille suit la largeur disponible,
     plafonnée à 7 rem (≈ 90 % de la largeur sur grand écran). 10,5 em ≈ « Donner vie aux idées ». */
  font-size: min(7rem, calc((100vw - 2 * var(--gutter) - 16px) / 10.5));
  line-height: 0.98; letter-spacing: -0.045em;
}
.hero__slogan-a, .hero__slogan-b { display: block; white-space: nowrap; }
.hero__slogan em { font-style: normal; color: var(--blue); }   /* seul « digital » est en bleu */
/* Fond : reflets de lumière (caustiques, WebGL, main.js section 8) sur toute la landing, très pâles ; dessinés en basse
   résolution puis agrandis, ce qui adoucit les reflets. Rien sans WebGL ; image fixe en mouvement réduit. */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero__light { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.hero__light.is-on { opacity: 1; }
.hero .btn--outline { background: var(--bg); }   /* bouton contour opaque : les lignes ne passent pas derrière son texte */
/* Phrase d’accompagnement : une ligne sous le slogan sur grand écran, puis les CTA directement à la suite */
.hero__sub { font-size: var(--fs-lead); line-height: 1.5; color: #333333; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Mobile : sur deux lignes, le slogan tombait à ~30 px. Trois lignes (« Donner vie / aux idées / par le digital »)
   permettent ~75 % plus grand. Diviseur = largeur de la plus longue des trois lignes, mesurée :
   FR « par le digital » ≈ 5,8 em → 6 ; EN « through digital » ≈ 7,1 em → 7,3. La phrase dessous passe en gris pour le contraste. */
@media (max-width: 599px) {
  .hero__slogan { font-size: calc((100vw - 2 * var(--gutter) - 8px) / 6); line-height: 1; }
  .hero__slogan:lang(en) { font-size: calc((100vw - 2 * var(--gutter) - 8px) / 7.3); }
  .hero__slogan-a > span { display: block; }
  .hero__sub { color: #555555; }
}

/* 9. Compétences (bandeau bleu) ----------------------------------------------------------------- */
.skills { background: var(--blue); color: #FFFFFF; padding-top: var(--section); overflow: hidden; }
.skills .kicker { color: #FFFFFF; }
.skills__head { display: grid; gap: var(--title-gap); margin-bottom: var(--head-gap); }
/* Indication : « Survolez… » à la souris, « Touchez… » sur écran tactile, rien sans JavaScript.
   Taille des autres indications du site (note du formulaire) : --fs-small. */
.skills__hint { font-size: var(--fs-small); color: var(--on-blue-soft); }
.skills__hint-touch { display: none; }
@media (hover: none) { .skills__hint-hover { display: none; } .skills__hint-touch { display: inline; } }
.no-js .skills__hint { display: none; }

.skill {
  position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 12px; align-items: start;
  padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .35); cursor: default;
}
.skill:last-child { border-bottom: 1px solid rgba(255, 255, 255, .35); }
.skill:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 4px; }
.skill__num {
  justify-self: start; padding: 2px 8px; margin-top: 4px; border-radius: 999px;
  font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); line-height: 1.6; color: var(--on-blue-soft);
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
}
.skill__name {
  font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h3);
  line-height: 1.15; letter-spacing: -0.02em; color: rgba(255, 255, 255, .7);
  transition: color .35s var(--ease-out), transform .45s var(--ease-out);
}
/* Compétence ouverte (survol, toucher ou clavier) : filet blanc tracé, numéro en pastille blanche,
   nom en blanc qui avance légèrement ; la phrase se dévoile, puis les mots-clés arrivent un à un. */
.skill::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: #FFFFFF;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease);
}
.skill.is-active::before { transform: scaleX(1); }
.skill.is-active .skill__num { background: #FFFFFF; color: var(--blue); }
.skill.is-active .skill__name { color: #FFFFFF; transform: translateX(8px); }
/* Mobile : la description se déplie (pas d’espace vide réservé) */
.skill__desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.skill.is-active .skill__desc { grid-template-rows: 1fr; }
.skill__more { overflow: hidden; min-height: 0; }
.skill__desc p {
  padding-top: 10px; font-size: var(--fs-body); line-height: 1.5; color: #FFFFFF;
  clip-path: inset(0 0 100% 0); opacity: 0; transform: translateY(6px);
  transition: clip-path .45s var(--ease) .06s, opacity .35s var(--ease-out) .06s, transform .45s var(--ease-out) .06s;
}
.skill.is-active .skill__desc p { clip-path: inset(0 0 0 0); opacity: 1; transform: none; }
/* Mots-clés : des étiquettes, pas des boutons (17 octobre 2026 : aux tests, les pastilles blanches pleines passaient pour
   des boutons cliquables ; le texte seul séparé par « · » a été rejeté). Même forme que les pastilles d’origine (pilule), mais
   fond blanc translucide et texte blanc, au lieu du blanc plein à texte bleu des boutons du site. */
.skill__tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 2px; }
.skill__tags li {
  padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #FFFFFF;
  font-size: var(--fs-label); font-weight: 600; line-height: 1.3;
  opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease-out), transform .4s var(--ease-out);
}
.skill.is-active .skill__tags li { opacity: 1; transform: none; transition-delay: calc(.2s + var(--i, 0) * .07s); }
.no-js .skill__name { color: #FFFFFF; }
.no-js .skill__desc { grid-template-rows: 1fr; }
.no-js .skill__desc p, .no-js .skill__tags li { clip-path: none; opacity: 1; transform: none; }
@media (min-width: 960px) {
  .skill { grid-template-columns: 3.5rem 1fr; padding: 26px 0; }
  /* Grand écran : la phrase et ses mots-clés s’affichent à droite du nom, place réservée (aucun saut au survol) */
  .skill__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); align-items: start; }
  .skill__desc { grid-template-rows: 1fr; }
  .skill__desc p { padding-top: 4px; }
}

/* Outils : bande défilante d’icônes blanches */
.tools { padding-block: var(--section-tight) var(--section); }
.tools .kicker { margin-bottom: var(--head-gap); }
/* Icônes seules, sans cadre ; le nom apparaît au-dessus au survol (et reste lu par les lecteurs d’écran).
   Vitesse ≈ 90 px/s : durée = largeur d’une liste (23 × (36 + 48) px) ÷ 90. */
.tools__track { display: flex; width: max-content; animation: marquee 20s linear infinite; }
.tools__track:hover { animation-play-state: paused; }
.tools__list { display: flex; gap: 48px; padding: 8px 48px 8px 0; }
.tool { position: relative; display: grid; place-items: center; }
.tool__icon { width: 36px; height: 36px; flex: none; transition: transform .25s var(--ease-out); }
.tool:hover .tool__icon { transform: scale(1.15); }
.tool__name {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px);
  padding: 6px 12px; border-radius: 999px; background: #FFFFFF; color: var(--blue);
  font-size: var(--fs-small); font-weight: 600; line-height: 1.2; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease-out);
}
.tool:hover .tool__name { opacity: 1; transform: translate(-50%, 0); }
.tool--text .tool__name { position: static; opacity: 1; transform: none; background: none; color: #FFFFFF; padding: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 10. Sections génériques ----------------------------------------------------------------- */
.section { padding-top: var(--section); }
/* Arrivée par un lien (menu, « Tous les projets »…) : le titre de la section se pose à --head-gap sous la barre de navigation,
   au lieu de laisser toute la marge haute de la section (--section) visible. */
.section[id], .contact[id] { scroll-margin-top: calc(var(--head-gap) - var(--section)); }
.section.path[id] { scroll-margin-top: calc(var(--head-gap) - var(--section-tight)); }
/* Le parcours prolonge « À propos » : il s’en rapproche. Il ferme la série de sections blanches avant le contact. */
.path { padding-top: var(--section-tight); padding-bottom: var(--section); }
.section__head { display: grid; gap: var(--title-gap); margin-bottom: var(--head-gap); }

/* 11. Projets ------------------------------------------------------------------------------ */
.projects { background: var(--bg); }
.projects__grid { display: grid; gap: var(--gap); }
.project-card {
  position: relative; display: grid; align-content: start; gap: 0;
  background: #FFFFFF; border-radius: var(--radius); padding: 12px; border: 1px solid var(--line);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(0, 68, 204, .45); }
.project-card__body { display: grid; gap: 10px; padding: 20px 12px 14px; }
.project-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--fs-small); color: var(--muted); }
.project-card__cat { font-family: var(--f-title); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.project-card__title { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -0.02em; }
.project-card__title a { text-decoration: none; }
/* Logos à la place des titres (fichiers rognés à ras du dessin) : chaque emplacement a une boîte de hauteur fixe, logo centré
   dedans. Les textes qui suivent démarrent ainsi à la même hauteur d’un projet à l’autre, et une marge laisse respirer le logo.
   --logo : hauteur de base ; --k (posé par project_name()) corrige la taille optique selon la forme du logo (0,7 à 1,4). */
.plogo { display: block; width: auto; height: calc(var(--logo) * var(--k, 1)); max-width: 100%; max-height: 100%; object-fit: contain; object-position: left center; }
.project-card__title, .phero__title, .pnext__title { --logo: 0px; }
.project-card__title:has(.plogo), .phero__title:has(.plogo), .pnext__title:has(.plogo) { display: flex; align-items: center; height: calc(var(--logo) * 1.4); }
.project-card__title:has(.plogo) > a, .project-card__title:has(.plogo) > a > span, .phero__title:has(.plogo) > span { display: flex; align-items: center; height: 100%; }
.project-card__title { --logo: 36px; }
.project-card__title:has(.plogo) { margin-block: 10px 6px; }
.project-card--featured .project-card__title { --logo: clamp(40px, 3.6vw, 52px); }
.phero__title { --logo: clamp(48px, 5.5vw, 76px); }
.phero__head:has(.plogo) { margin-block: 8px; }
.pnext__title { --logo: 32px; }
.pnext__title:has(.plogo) { margin-block: 6px; }
.project-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: var(--radius); }
.project-card__title a:focus-visible { outline: none; }
.project-card:has(a:focus-visible) { outline: 2px solid var(--blue); outline-offset: 4px; }
.project-card__summary { color: #333333; max-width: 52ch; }
.project-card__more { display: inline-flex; gap: 8px; margin-top: 4px; font-weight: 500; color: var(--blue); }
.project-card__more .arrow { transition: transform .3s var(--ease-out); }
.project-card:hover .project-card__more .arrow { transform: translateX(5px); }
.badge-fictional { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--blue-tint); color: var(--muted-tint); font-size: 0.75rem; line-height: 1.6; }
@media (min-width: 800px) {
  .projects__grid { grid-template-columns: 1fr 1fr; }
  .project-card--featured { grid-column: 1 / -1; grid-template-columns: 7fr 5fr; align-items: center; }
  .project-card--featured .project-card__body { padding: 24px clamp(16px, 3vw, 48px); }
  .project-card--featured .project-card__title { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); }
}
/* 1 projet mis en avant + 3 : les trois suivants sur une rangée (pas de carte orpheline) */
@media (min-width: 800px) and (max-width: 1099px) {
  .projects__grid--trio .project-card:last-child { grid-column: 1 / -1; grid-template-columns: 7fr 5fr; align-items: center; }
}
@media (min-width: 1100px) {
  .projects__grid--trio { grid-template-columns: repeat(3, 1fr); }
}

/* Visuels (sans animation d’apparition : le rideau bleu a été retiré le 7 octobre 2026) */
.media { position: relative; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: var(--ratio, 16 / 10); background: #F5F5F5; isolation: isolate; }
.media__inner { position: absolute; inset: 0; }
.media__inner > svg, .media__inner > img { width: 100%; height: 100%; object-fit: cover; }
.media:hover .media__inner > * { transform: scale(1.03); transition: transform .6s var(--ease-out); }
.ratio-badge {
  position: absolute; right: 8px; bottom: 8px; z-index: 1;
  padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92);
  font-size: 0.6875rem; line-height: 1.2; color: #5C5C5C;
}
.v-t { font-family: var(--f-text); font-weight: 500; }
.v-h { font-family: var(--f-title); font-weight: 700; letter-spacing: -0.02em; }
.v-b { font-family: var(--f-title); font-weight: 700; letter-spacing: -0.02em; }

/* 12. À propos (avec la photo) ---------------------------------------------------------------------- */
.about .kicker { margin-bottom: var(--head-gap); }
.about__grid { display: grid; gap: clamp(24px, 4vw, 56px); }
.about__photo { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--blue-tint); aspect-ratio: 4 / 5; max-width: 460px; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
/* Texte, langues, CV : espacement réparti à égalité (minimum --head-gap) ; avec la photo à côté,
   le texte démarre sur son haut et le CV finit sur son bas. */
.about__content { display: flex; flex-direction: column; justify-content: space-between; gap: var(--head-gap); }
.about__main { display: grid; gap: var(--title-gap); }
.about__lead { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.02em; color: var(--blue); }
.about__text { display: grid; gap: 12px; font-size: var(--fs-body); line-height: 1.6; max-width: 62ch; }
.langs__title {
  display: flex; align-items: center; gap: 14px; margin-bottom: var(--title-gap);
  font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); line-height: 1.2;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue);
}
.langs__title::after { content: ""; flex: 1; height: 2px; background: currentColor; }
/* Mobile : une langue par ligne, nom à gauche et niveau à droite, séparées par un filet fin */
.langs__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.langs__list li:first-child { padding-top: 0; }
.langs__name { font-weight: 500; }
.langs__level { font-size: var(--fs-small); color: var(--muted); }
/* Plus large : les quatre côte à côte, niveau sous le nom */
@media (min-width: 600px) {
  .langs__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px var(--gap); }
  .langs__list li { display: grid; gap: 2px; justify-content: start; padding: 0; border: 0; }
}
@media (min-width: 900px) {
  /* La rangée prend la hauteur de la photo (4:5) ou du texte s’il est plus long : la photo s’étire alors
     (recadrage), si bien que le texte démarre en haut de la photo et les langues + CV finissent sur son bas. */
  .about__grid { grid-template-columns: 5fr 7fr; column-gap: calc(var(--gap) * 2); }
  .about__photo { max-width: none; width: 100%; align-self: stretch; }   /* « stretch » : sinon un élément à ratio garde sa hauteur 4:5 ; largeur fixée : sinon le ratio l’élargirait */
}

/* 13. Parcours (timeline façon CV) --------------------------------------------------------------- */
.path { background: var(--bg); }

.path__grid { display: grid; gap: var(--section-tight); }
.path__col .kicker { margin-bottom: var(--head-gap); }
.timeline { position: relative; display: grid; gap: 28px; padding-left: 28px; }
/* Ligne : rail gris + remplissage bleu qui suit le scroll (--p de 0 à 1, posé par main.js).
   Sans JavaScript, tout est bleu (--p: 1, points pleins). */
.timeline::before, .timeline::after { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; }
.timeline::before { background: var(--line); }
.timeline::after { background: var(--blue); transform-origin: 50% 0; transform: scaleY(var(--p, 1)); }
.js .timeline { --p: 0; }
.timeline__item { position: relative; display: grid; gap: 2px; }
.timeline__item::before {
  content: ""; position: absolute; z-index: 1; left: -28px; top: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 4px var(--bg);
  transition: background-color .3s var(--ease-out), box-shadow .3s var(--ease-out), transform .4s var(--ease-out);
}
/* Point pas encore atteint : anneau gris ; atteint : se remplit de bleu avec un léger rebond */
.js .timeline__item:not(.is-reached)::before { background: var(--bg); box-shadow: inset 0 0 0 2px var(--line), 0 0 0 4px var(--bg); transform: scale(.85); }
.timeline__role { font-family: var(--f-title); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.01em; }
.timeline__org, .timeline__dates { font-size: 0.9375rem; color: var(--muted-tint); }
.timeline__bullets, .timeline__text { margin-top: 10px; font-size: var(--fs-body); }
.timeline__bullets { display: grid; gap: 4px; }
.timeline__bullets li { position: relative; padding-left: 16px; }
.timeline__bullets li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 2px; background: var(--blue); }
@media (min-width: 1000px) { .path__grid { grid-template-columns: 1fr 1fr; column-gap: calc(var(--gap) * 2); } }

/* 14. Contact : la section mise en avant ------------------------------------------------------- */
.contact { background: var(--blue); color: #FFFFFF; padding-block: var(--section) var(--head-gap); position: relative; overflow: hidden; }   /* en bas : même espace qu’au-dessus des contacts directs, puis le filet du pied de page */
.contact__inner { display: grid; gap: var(--head-gap); }
.contact__head { display: grid; gap: var(--title-gap); }
.contact__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-cta); line-height: 1.04; letter-spacing: -0.035em; hyphens: manual; }
/* Contacts directs : des coordonnées, pas des boutons (l’envoi du formulaire reste la seule action en bouton).
   Trois colonnes façon CV : filet fin, petit libellé en capitales, valeur en lien ; au survol, soulignement et flèche qui avance. */
.direct { display: grid; gap: var(--title-gap); padding-top: var(--head-gap); border-top: 1px solid rgba(255, 255, 255, .35); }
.direct__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; }
.direct__list { display: grid; gap: var(--title-gap); }
.direct__list li { display: grid; gap: 4px; }
.direct__label { font-size: var(--fs-small); color: var(--on-blue-soft); }
.direct__link {
  justify-self: start; display: inline-flex; align-items: baseline; gap: 8px;
  font-size: var(--fs-lead); font-weight: 500; color: #FFFFFF; text-decoration: none;
}
/* Seul le texte se souligne au survol ; la flèche avance sans être soulignée */
.direct__value { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 1.5px; transition: text-decoration-color .2s; }
.direct__link span[aria-hidden] { transition: transform .25s var(--ease-out); }
.direct__link:hover .direct__value { text-decoration-color: #FFFFFF; }
.direct__link:hover span[aria-hidden] { transform: translateX(4px); }
@media (min-width: 800px) { .direct__list { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: clamp(32px, 6vw, 96px); } }

/* 15. Formulaire (directement sur le bandeau bleu : textes blancs, champs blancs) ----------------------------------------------------- */
/* Pas de carte : le formulaire est posé sur le bleu. Les champs restent blancs pour bien ressortir ;
   tout ce qui était bleu sur blanc passe en blanc (astérisques, lien, focus, erreurs, bouton). */
.brief { color: #FFFFFF; }
.brief__form { display: grid; gap: 24px; }
.brief__title { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h3); letter-spacing: -0.02em; line-height: 1.15; }
.brief__note { font-size: var(--fs-small); color: var(--on-blue-soft); margin-top: -14px; }
.brief__row { display: grid; gap: 24px; }
@media (min-width: 640px) {
  /* Sous-grille : libellés, champs et erreurs de la même rangée partagent les mêmes lignes.
     Si un libellé passe sur deux lignes, les deux champs restent alignés et de même taille. */
  .brief__row { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; column-gap: 24px; row-gap: 0; }
  .brief__row > .field { grid-row: span 3; grid-template-rows: subgrid; row-gap: 8px; }
  .brief__row > .field > label { align-self: end; }
}
.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 500; font-size: 1rem; padding: 0; }
.field legend { margin-bottom: 10px; }
.field__hint { font-weight: 400; color: var(--on-blue-soft); font-size: 0.9375rem; }
.req { color: #FFFFFF; font-weight: 600; margin-left: 2px; }
/* Champs « soulignés », dans le langage des filets du site : léger voile blanc pour montrer où écrire,
   filet blanc en bas ; au focus, un filet plus épais se trace de gauche à droite (comme sur les compétences). */
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px 12px; color: #FFFFFF; caret-color: #FFFFFF;
  font: inherit; font-size: 1.0625rem; font-weight: 500;
  border: 0; border-bottom: 1.5px solid rgba(255, 255, 255, .65); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(#FFFFFF, #FFFFFF) left bottom / 0% 2px no-repeat, rgba(255, 255, 255, .08);
  transition: background-size .45s var(--ease), background-color .2s, border-color .2s;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.field ::placeholder { color: var(--on-blue-soft); font-weight: 400; opacity: 1; }
.field input:hover, .field textarea:hover { background-color: rgba(255, 255, 255, .12); border-bottom-color: #FFFFFF; }
.field input:focus, .field textarea:focus { outline: none; background-size: 100% 2px, auto; background-color: rgba(255, 255, 255, .14); border-bottom-color: #FFFFFF; }
/* Remplissage automatique du navigateur : on garde le fond bleu et le texte blanc */
.field input:-webkit-autofill { -webkit-text-fill-color: #FFFFFF; box-shadow: inset 0 0 0 100px #2A6DFF; transition: background-color 9999s; }
.field [aria-invalid="true"] { border-bottom-color: #FFB4B4; background-image: linear-gradient(#FFB4B4, #FFB4B4); background-size: 100% 2px, auto; }
.field[aria-invalid="true"] .chip span { border-color: var(--error); }
/* Erreur lisible sur bleu : texte blanc en gras, précédé d’une pastille « ! » rouge clair */
.field__error { display: flex; gap: 8px; align-items: baseline; color: #FFFFFF; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; }
.field__error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #FFB4B4; color: #8E1B1B; font-size: 0.75rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--field); border-radius: 999px; font-size: 0.9375rem; font-weight: 500;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover span { border-color: var(--blue); color: var(--blue); }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.chip input:checked + span::before { content: "✓"; margin-right: 8px; font-size: 0.85em; }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.brief__submit { justify-self: start; min-width: 220px; }
/* Information (pas de case à cocher) : discrète, sous le bouton d’envoi, rapprochée de lui */
.brief__legal { font-size: var(--fs-small); color: var(--on-blue-soft); margin-top: -12px; }
.brief__legal a { color: #FFFFFF; }
.brief__submit[aria-busy="true"] { cursor: progress; opacity: .85; }
.brief__submit[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brief__status { padding: 14px 16px; border-radius: var(--radius-sm); background: #FDECEC; color: #8E1B1B; font-weight: 500; }
.brief__success { display: grid; gap: 12px; }
.brief__success:focus { outline: none; }
.brief__success-title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-h3); color: #FFFFFF; letter-spacing: -0.02em; }
.brief__success p:last-child { font-size: var(--fs-lead); color: var(--on-blue-soft); }
.cf-turnstile:empty { display: none; }
/* Turnstile en mode « interaction-only » : bloc de hauteur nulle tant qu’aucune vérification n’est demandée ;
   il ajoutait un écart de 24 px en trop (gap de la grille) entre « Votre projet » et le bouton d’envoi. */
.brief__form > .cf-turnstile + .brief__submit { margin-top: -24px; }

/* 16. Page projet ------------------------------------------------------------------------------------ */
/* Récit linéaire, fond blanc : ouverture, En bref, contexte, décisions, rendu, résultat (bandeau bleu), ce que j’en retiens, crédits.
   Largeurs : texte ≈ 65ch, images sur toute la largeur du contenu. Espacements : ceux de l’accueil
   (--section entre sections, --head-gap sous un titre et entre blocs, --title-gap sous un petit titre). */
.plabel {
  font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); line-height: 1.2;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.ptext { display: grid; gap: 1em; line-height: 1.6; }   /* pas de largeur max : le texte prend celle de son bloc */
.ptext--lead { font-size: var(--fs-lead); line-height: 1.5; }

/* 1. Ouverture : titre et haut du visuel dans le premier écran (portable 1440 × 900) */
.phero { display: grid; gap: var(--title-gap); padding-top: var(--head-gap); }
.phero__back { justify-self: start; margin-bottom: calc(var(--head-gap) - var(--title-gap)); }
.phero__back-arrow { display: inline-block; transition: transform .25s var(--ease-out); }
.phero__back:hover .phero__back-arrow { transform: translateX(-4px); }
.phero__text { display: grid; gap: var(--title-gap); }
.phero__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-display); line-height: 1; letter-spacing: -0.04em; overflow-wrap: break-word; }
.phero__title span { display: inline-block; }
.phero__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--title-gap) var(--gap); }   /* titre à gauche, « Voir le site » à droite sur sa ligne */
.phero__visit { flex: none; }
.phero__lead { font-size: var(--fs-lead); line-height: 1.5; color: #333333; text-wrap: pretty; }
/* Infos clés sur une seule ligne dès 1100 px ; le bouton « Voir le site » vient dessous */
.phero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--title-gap) var(--gap); padding-top: var(--title-gap); border-top: 1px solid var(--blue); }   /* filet bleu : clôt le bloc titre + accroche */
/* Rythme de l’ouverture : repère, titre, accroche, équipe et filet des infos clés au même écart (--title-gap) ;
   puis --head-gap avant le visuel */
.phero__media { margin-top: calc(var(--head-gap) - var(--title-gap)); }
/* Chaque info clé : libellé en petites capitales bleues (comme « Défi », « Ce que j’ai fait »), valeur en --fs-lead */
.phero__facts > div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.phero__facts dt { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.phero__facts dd { font-size: var(--fs-body); font-weight: 500; line-height: 1.35; text-wrap: pretty; }   /* points clés légers : taille du texte courant */
.phero__with { margin-top: -8px; font-size: var(--fs-small); color: var(--muted); }   /* légende de l’accroche : 12 px dessous */
/* Rythme de l’ouverture : repère → logo → accroche → infos clés au même écart (--title-gap + 8 px, le logo respire), puis --head-gap avant le visuel */
.phero__facts { margin-top: 8px; }
@media (min-width: 700px) { .phero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) {   /* une seule ligne, colonnes égales séparées par un filet gris vertical, comme En bref */
  .phero__facts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 0; }
  .phero__facts > div { padding-inline: var(--gap); }
  .phero__facts > div:first-child { padding-left: 0; }
  .phero__facts > div + div { border-left: 1px solid var(--line); }
}

/* Pages projets : pas de zoom au survol des visuels (sauf la carte « Projet suivant », comme les cartes de l’accueil) */
.project .media:hover .media__inner > * { transform: none; }

/* Sections blanches : padding haut seulement, comme l’accueil */
/* Pages projets : un seul écart entre toutes les sections (--section-tight, 64 px). Avec --section (112 px), une section
   courte (Déroulement, Tests, Ce que j’en retiens…) paraissait flotter : 48 px sous son titre, 112 px sous son contenu. */
.psec { padding-top: var(--section-tight); }
.psec__body { display: grid; gap: var(--head-gap); margin-top: var(--head-gap); min-width: 0; }

/* 2. En bref : trois colonnes, filet bleu au-dessus de chacune ; empilées sur mobile */
.pbrief { display: grid; gap: var(--head-gap) var(--gap); }
.pbrief__col { display: grid; gap: var(--title-gap); align-content: start; }
@media (min-width: 800px) {
  .pbrief { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: calc(var(--gap) * 2); }   /* colonnes de même largeur */
  .pbrief__col { position: relative; }
  .pbrief__col + .pbrief__col::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gap) * -1); width: 1px; background: var(--line); }
}

/* Grands chiffres (En bref, bandeau du résultat) */
.pfigures { display: flex; flex-wrap: wrap; gap: var(--title-gap) clamp(32px, 6vw, 96px); }
.pfigures li { display: grid; gap: 6px; align-content: start; }
.pfigures__value { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-h3); line-height: 1; letter-spacing: -0.03em; }   /* note d’En bref : même taille que dans le bandeau Résultat */
.pfigures__label { max-width: 24ch; }
.pfigures--brief .pfigures__value { color: var(--blue); }
.pfigures--brief .pfigures__label { color: var(--muted); }
.pfigures--band .pfigures__label { color: var(--on-blue-soft); }

/* 3. Le contexte : intertitre à gauche, texte à droite */
.prows { display: grid; }
.prow { display: grid; gap: var(--title-gap) var(--gap); padding-block: var(--head-gap); border-top: 1px solid var(--line); }
.prow:first-child { padding-top: 0; border-top: 0; }
.prow:last-child { padding-bottom: 0; }
.prow__title { padding-top: .35em; }
.prow__body { display: grid; gap: 1em; min-width: 0; }
.prow__body .ptext { max-width: none; }
.prow--solo { padding: 0; border: 0; }
.pbullets { display: grid; gap: 6px; }
.ptests { display: grid; gap: var(--title-gap); }   /* section Tests : texte, liste des freins, conclusion */
.pbullets li { position: relative; padding-left: 22px; }
.pbullets li::before { content: "–"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }
.pstake { display: grid; gap: var(--title-gap); margin: 0; padding-top: var(--head-gap); border-top: 1px solid var(--line); }   /* isolée par un filet, comme les lignes du contexte */
.pstake blockquote { margin: 0; }
.pstake p { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.02em; color: var(--blue); text-wrap: wrap; }
.pstake p::before { content: "«\00A0"; }
.pstake p::after { content: "\00A0»"; }
:lang(en) .pstake p::before { content: "“"; }
:lang(en) .pstake p::after { content: "”"; }
.pstake__source { font-size: var(--fs-small); color: var(--muted); }
@media (min-width: 960px) {
  .prow { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap); }
}

/* 4. Les décisions : déroulement, puis chapitres numérotés ; texte et visuel alternent sur grand écran */
.psteps { display: grid; gap: 14px; }
.psteps li { position: relative; display: grid; grid-template-columns: 32px 1fr; align-items: center; column-gap: 14px; }
.psteps li:not(:last-child)::before { content: ""; position: absolute; left: 15.5px; top: 32px; height: 14px; width: 1px; background: var(--line); }
.psteps__num {
  display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--blue); border-radius: 50%;
  font-family: var(--f-title); font-weight: 700; font-size: 0.75rem; color: var(--blue);
}
.psteps__name { font-family: var(--f-title); font-weight: 600; line-height: 1.25; }
/* Grand écran : étapes sur une ligne, de la marge gauche à la marge droite. Chaque étape prend la largeur de son nom,
   puis le même espace libre est ajouté après chacune (flex-grow égal) : les écarts paraissent réguliers même quand
   les noms ont des longueurs différentes, et la dernière étape finit sur la marge. */
@media (min-width: 900px) {
  .psteps { display: flex; gap: 0; }
  .psteps li { flex: 1 1 auto; grid-template-columns: none; row-gap: 12px; align-items: start; align-content: start; padding-right: 32px; }
  .psteps li:last-child { flex: 0 0 auto; padding-right: 0; }
  .psteps li:not(:last-child)::before { left: 40px; right: 8px; top: 16px; width: auto; height: 1px; }
}
.pchapters { display: grid; gap: var(--section-tight); }
.pchapter { display: grid; gap: var(--head-gap) calc(var(--gap) * 2); align-items: center; }
.pchapter__text { display: grid; gap: var(--title-gap); align-content: start; min-width: 0; }
.pchapter__mark { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.pchapter__title { max-width: 26ch; font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.02em; }
.pchapter__media { min-width: 0; }
@media (min-width: 960px) {
  /* Sans visuel : numéro à gauche, titre et texte à droite (même grille que le contexte) */
  .pchapter:not(.pchapter--media) .pchapter__text { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap); }
  .pchapter:not(.pchapter--media) .pchapter__mark { grid-row: 1 / span 2; padding-top: .55em; }
  .pchapter:not(.pchapter--media) .pchapter__text > :not(.pchapter__mark) { grid-column: 2; }
  .pchapter--media { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .pchapter--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .pchapter--flip .pchapter__text { order: 2; }
}

/* 5. Le rendu : un groupe par livrable */
/* Deux livrables par ligne sur grand écran ; un groupe seul ou en pleine largeur prend toute la ligne */
.pgallery { display: grid; gap: var(--section-tight) calc(var(--gap) * 2); align-items: start; }
@media (min-width: 900px) {
  .pgallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgroup:only-child, .pgroup--full { grid-column: 1 / -1; }
}
.pgroup { display: grid; gap: var(--title-gap); min-width: 0; }
.pgroup__title { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.02em; }
.pgroup__media { display: grid; gap: var(--gap); min-width: 0; }
.pfig { display: grid; gap: 14px; min-width: 0; }   /* même écart visuel → légende que sous les carrousels */
.pfig__caption { font-size: var(--fs-small); color: var(--muted); }
.pfig .media { border-radius: var(--radius); }
.pgroup__media--duo { grid-template-columns: 1fr 1fr; gap: 14px; }   /* deux visuels côte à côte, même sur mobile (ex. deux A4 en portrait) */
/* Une ligne de visuels de formats différents (ex. story 9:16 + posts 4:5) : même hauteur, largeurs proportionnelles au format */
.pgroup__media--row { display: flex; gap: 14px; }
.pgroup__media--row > .pfig { flex: var(--a, 1) 1 0; min-width: 0; }
/* Trois écrans mobiles : côte à côte, défilement horizontal sur petit écran */
.pgroup__media--trio-mobile {
  grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.pgroup__media--trio-mobile::-webkit-scrollbar { display: none; }
.pgroup__media--trio-mobile .pfig { scroll-snap-align: start; }
@media (min-width: 900px) { .pgroup__media--trio-mobile { grid-auto-columns: minmax(0, 1fr); gap: 14px; overflow: visible; margin-inline: 0; padding-inline: 0; } }
.media__inner > video { width: 100%; height: 100%; object-fit: cover; background: #000000; }
/* Plein écran (bouton du lecteur) : la vidéo entière, sans recadrage (sinon une story verticale est agrandie et coupée) */
.media__inner > video:fullscreen { object-fit: contain; }
.media__inner > video:-webkit-full-screen { object-fit: contain; }
.media:hover .media__inner > video { transform: none; }

/* Aperçu plein écran (main.js) : clic sur un visuel d’une page projet ; barre du bas = celle des carrousels (compteur + flèches rondes) */
.is-zoomable { cursor: zoom-in; }
.is-zoomable:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; }
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  display: none; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(10, 10, 10, .94); color: #FFFFFF; overscroll-behavior: contain;
}
.lightbox[open] { display: grid; }
.lightbox-open, .lightbox-open body { overflow: hidden; overscroll-behavior: none; }   /* aperçu ouvert : la page ne bouge pas et les gestes horizontaux ne font pas « page précédente » */
.lightbox__fig, .lightbox__img { touch-action: pinch-zoom; }   /* le doigt fait défiler les images (géré par main.js), le pincement zoome */
.lightbox::backdrop { background: rgba(10, 10, 10, .94); }
/* « Fermer » comme le bouton Menu du site : libellé + deux traits qui forment une croix */
.lightbox__close {
  justify-self: end; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin: 12px var(--gutter) 0; padding: 0 2px 0 8px;
  background: none; border: 0; color: #FFFFFF; font: inherit; font-weight: 600; font-size: 0.9375rem; cursor: pointer;
}
.lightbox__x { position: relative; width: 22px; height: 22px; }
.lightbox__x span { position: absolute; top: 50%; left: 0; width: 100%; height: 2px; border-radius: 2px; background: #FFFFFF; transition: transform .25s var(--ease-out); }
.lightbox__x span:first-child { transform: rotate(45deg); }
.lightbox__x span:last-child { transform: rotate(-45deg); }
.lightbox__close:hover .lightbox__x span:first-child { transform: rotate(135deg); }
.lightbox__close:hover .lightbox__x span:last-child { transform: rotate(45deg); }
.lightbox__close:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; border-radius: 6px; }
.lightbox__fig { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 0; padding: 8px var(--gutter); }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 200px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); user-select: none; -webkit-user-drag: none; }
.lightbox__cap { font-size: var(--fs-small); color: rgba(255, 255, 255, .8); text-align: center; }
.lightbox__cap:empty { display: none; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 var(--gutter) 20px; }
.lightbox__count { margin-right: 6px; font-size: var(--fs-small); color: rgba(255, 255, 255, .8); font-variant-numeric: tabular-nums; }
.lightbox .carousel__btn { background: transparent; border-color: rgba(255, 255, 255, .7); color: #FFFFFF; }
.lightbox .carousel__btn:hover { border-color: #FFFFFF; color: #FFFFFF; background: rgba(255, 255, 255, .12); }
.lightbox .carousel__btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.lightbox__img.is-from-right { animation: lb-in-right .28s var(--ease-out); }
.lightbox__img.is-from-left { animation: lb-in-left .28s var(--ease-out); }
@keyframes lb-in-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes lb-in-left { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .lightbox__img.is-from-right, .lightbox__img.is-from-left { animation: none; } }

/* Carrousel : une image à la fois ; sous l’image, la légende à gauche, le compteur et les flèches à droite */
.carousel__viewport { border-radius: var(--radius); }
.carousel__track {
  display: flex; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; }
.carousel__slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.carousel__slide > svg, .carousel__slide > img { width: 100%; height: 100%; object-fit: cover; }
.carousel__slide--contain { background: #F2F2F2; }
.pgroup--framed .media::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 1px solid var(--line); border-radius: inherit; pointer-events: none; }   /* visuels sur fond blanc : leur bord reste lisible */
.carousel__slide--contain > img { object-fit: contain; padding: 4%; }
.media.carousel__viewport:hover .media__inner > * { transform: none; }
.carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; min-height: 44px; }
.carousel__caption { font-size: var(--fs-small); color: var(--muted); }
.carousel__nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.carousel__count { margin-right: 6px; font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.carousel__btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: #FFFFFF; color: var(--ink); cursor: pointer;
  transition: border-color .2s, color .2s, transform .25s var(--ease-out);
}
.carousel__btn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }   /* comme .btn--outline */
.carousel__btn:disabled { opacity: .3; cursor: default; transform: none; border-color: var(--ink); color: var(--ink); }
/* Image temporaire : filet fin pour que son bord se lise comme celui d’un vrai visuel (sinon le gris pâle se perd dans le blanc
   et les espacements autour paraissent faux) */
.media:has(> .media__inner > .v-svg), .carousel__slide:has(> .v-svg) { box-shadow: inset 0 0 0 1px var(--line); }
.carousel__slide:has(> .v-svg) > .v-svg { position: relative; z-index: -1; }
/* Image temporaire : ce qu’il faut fournir, écrit au centre (avant/après : chacun dans sa moitié) */
.ba.is-ready .ba__side--before .media__todo { left: 25%; width: 44%; }
.ba.is-ready .ba__side--after .media__todo { left: 75%; width: 44%; }
.media__todo {
  position: absolute; inset: 50% auto auto 50%; z-index: 1; transform: translate(-50%, -50%);
  width: min(80%, 46ch); padding: 14px 18px; border-radius: var(--radius-sm); background: #FFFFFF;
  font-size: var(--fs-small); line-height: 1.45; color: #444444; text-align: center; box-shadow: inset 0 0 0 1px var(--line);
}
.media__todo strong { display: block; color: var(--blue); }
:is(.media, .carousel__slide):has(> .media__todo) .v-svg text { display: none; }   /* le libellé « Image temporaire » laisse la place à l’indication */

/* Comparaison avant/après : sans JS, côte à côte ; avec JS, superposées avec un curseur */
.ba { display: grid; gap: 14px; }
.ba__side { position: relative; min-width: 0; }
.ba__label { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 4px 12px; border-radius: 999px; background: #FFFFFF; color: var(--blue); font-size: var(--fs-small); font-weight: 600; }
.ba .media:hover .media__inner > * { transform: none; }
.ba__handle { display: none; }
@media (min-width: 640px) { .ba { grid-template-columns: 1fr 1fr; } }
.ba.is-ready {
  --pos: 50%;
  display: block; position: relative; aspect-ratio: var(--ratio); overflow: hidden; border-radius: var(--radius);
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.ba.is-ready .ba__side { position: absolute; inset: 0; }
.ba.is-ready .media { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.ba.is-ready .ba__side--after { clip-path: inset(0 0 0 var(--pos)); }
.ba.is-ready .ba__side--after .ba__label { left: auto; right: 12px; }
.ba.is-ready .ba__handle { display: block; position: absolute; z-index: 4; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #FFFFFF; pointer-events: none; }
.ba.is-ready .ba__handle::after {
  content: "←→"; position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: #FFFFFF; color: var(--blue); font-size: 0.875rem; font-weight: 700; letter-spacing: -0.1em; transform: translate(-50%, -50%);
}
.ba:has(.ba__range:focus-visible) .ba__handle::after { outline: 2px solid var(--blue); outline-offset: 3px; }
.ba.is-ready .ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }

/* 6. Le résultat : bandeau bleu, comme les compétences de l’accueil */
.presult { margin-top: var(--section-tight); padding-block: var(--section-tight); background: var(--blue); color: #FFFFFF; }
.presult :focus-visible { outline-color: #FFFFFF; }
.presult .ptext { color: #FFFFFF; max-width: none; }
/* Comme le bandeau des compétences : titre, sous-titre blanc, puis des lignes séparées par des filets blancs fins */
.presult__lead { color: #FFFFFF; }
.presult__lead.pquote p { font-size: var(--fs-h2); line-height: 1.15; }
.presult__link { justify-self: start; }
.presult__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px var(--gap); }
.presult__link + .presult__link { margin-left: calc(12px - var(--gap)); }   /* deux boutons : même écart que les CTA de la landing */
.presult__note { font-size: var(--fs-small); color: var(--on-blue-soft); }
.presult__rows > li {   /* filets blancs fins entre les lignes, comme les compétences de l’accueil */
  display: grid; gap: 8px var(--gap); padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .35);
}
.presult__rows > li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .35); }
.presult__rows .plabel { padding-top: .45em; color: var(--on-blue-soft); }
.presult__value { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-h3); line-height: 1; letter-spacing: -0.03em; }   /* même taille que la note d’En bref, sous le commentaire */
.presult__cell { display: grid; gap: var(--title-gap); }
.presult__grades { display: flex; flex-wrap: wrap; gap: 8px clamp(24px, 3vw, 48px); }
.presult__grades li { display: flex; align-items: baseline; gap: 10px; }
.presult__value-label { color: var(--on-blue-soft); }
.presult__cell { min-width: 0; }
.pquote { display: grid; gap: 10px; }
.pquote blockquote { margin: 0; }
.pquote p { font-family: var(--f-title); font-weight: 600; font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.02em; }
.pquote p::before { content: "«\00A0"; }
.pquote p::after { content: "\00A0»"; }
:lang(en) .pquote p::before { content: "“"; }
:lang(en) .pquote p::after { content: "”"; }
.pquote__by { font-size: var(--fs-small); color: var(--on-blue-soft); }
.pquote__by strong { color: #FFFFFF; font-weight: 600; }
@media (min-width: 960px) { .presult__rows > li { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
/* 8. Crédits : comme le bloc « Langues » de l’accueil (petit titre bleu + filet, noms et rôles en grille) */
/* Une catégorie = une ligne : chaque nom prend sa largeur naturelle, à la suite */
.pcredits__list, .pcredits__tools { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.pcredits__list .langs__name { white-space: nowrap; }
.pcredits__list:has(li:nth-child(5)) .langs__level { width: 0; min-width: 100%; }   /* liste longue (équipe) : le rôle se cale sur la largeur du nom, pour tenir sur une ligne */
.pcredits__list li { display: grid; gap: 2px; align-content: start; }
.pcredits__tools li { display: flex; align-items: center; gap: 10px; }
.pcredits__tools .tool__icon { width: 22px; height: 22px; color: var(--blue); }
.tool__mono { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--blue); color: #FFFFFF; font-family: var(--f-title); font-weight: 700; font-size: 0.75rem; }

/* Projet suivant : grande carte entièrement cliquable ; au survol, le titre passe en bleu et la flèche avance */
.pnext { padding-top: var(--section-tight); }
.pnext__card {
  display: grid; gap: var(--title-gap); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #FFFFFF; text-decoration: none; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);   /* comme les cartes projets de l’accueil */
}
.pnext__card .media { border-radius: var(--radius-sm); }
.pnext__text { display: grid; gap: 8px; align-content: center; padding: 8px 12px 12px; }
.pnext__label { font-size: var(--fs-small); color: var(--muted); }
.pnext__arrow { display: inline-block; color: var(--blue); transition: transform .3s var(--ease-out); }
.pnext__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-h3); line-height: 1.05; letter-spacing: -0.03em; }
.pnext__cat { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.pnext__card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(0, 68, 204, .45); }   /* même survol que les cartes de l’accueil : soulèvement, ombre bleutée, flèche qui avance, image qui zoome */
.pnext__card:hover .pnext__arrow { transform: translateX(5px); }
.project .pnext .media:hover .media__inner > * { transform: scale(1.03); transition: transform .6s var(--ease-out); }
/* Projet précédent et projet suivant côte à côte (empilés sur mobile) */
.pnext { display: grid; gap: var(--gap); }
.pnext__card--prev:hover .pnext__arrow { transform: translateX(-5px); }
@media (min-width: 800px) { .pnext { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cta-band { margin-top: var(--section-tight); background: var(--blue); color: #FFFFFF; padding-block: var(--section-tight) var(--head-gap); }   /* même rythme que le bandeau Résultat ; en bas : --head-gap puis le filet du pied de page */   /* en bas : comme le contact de l’accueil, puis le filet du pied de page */
.cta-band__inner { display: grid; gap: var(--title-gap); justify-items: start; }
.cta-band__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-cta); line-height: 1.02; letter-spacing: -0.035em; }
.cta-band__text { font-size: var(--fs-lead); color: var(--on-blue-soft); }

/* Mobile : ouverture et décisions plus lisibles (placé après les règles générales des pages projets, pour les remplacer) */
@media (max-width: 699px) {
  /* « Voir le site » : même bouton, en petit (40 px de haut, cible tactile suffisante), à droite du logo ; le logo se réduit si la place manque */
  .phero__head { flex-wrap: nowrap; gap: 14px; }
  .phero__head .phero__title { min-width: 0; flex: 1 1 auto; }
  .phero__head .phero__title .plogo { max-width: 100%; }
  .phero__visit { flex: none; min-height: 40px; padding: 0 16px; font-size: 0.875rem; gap: 0.4em; }
  /* Infos clés : une par ligne, libellé à gauche, valeur à droite, filets fins (comme les langues de l’accueil) */
  .phero__facts { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .phero__facts > div { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: var(--gap); padding-block: 12px; border-bottom: 1px solid var(--line); }
  .phero__facts dd { text-align: right; }
}
@media (max-width: 959px) {
  /* Décisions : chaque chapitre (numéro, titre, texte, visuel) forme un bloc, séparé du suivant par un filet */
  .pchapters { gap: 0; }
  .pchapter { gap: var(--title-gap); padding-block: var(--head-gap); border-top: 1px solid var(--line); }
  .pchapter:first-child { padding-top: 0; border-top: 0; }
  .pchapter:last-child { padding-bottom: 0; }
}
/* Mobile : blocs empilés séparés par un filet gris, même espace au-dessus et au-dessous du filet (comme les décisions) */
@media (max-width: 799px) {
  .pbrief { gap: 0; }
  .pbrief__col { padding-block: var(--head-gap); border-top: 1px solid var(--line); }
  .pbrief__col:first-child { padding-top: 0; border-top: 0; }
  .pbrief__col:last-child { padding-bottom: 0; }
}
@media (max-width: 899px) {
  .pgallery { gap: 0; }
  .pgallery > .pgroup { padding-block: var(--head-gap); border-top: 1px solid var(--line); }
  .pgallery > .pgroup:first-child { padding-top: 0; border-top: 0; }
  .pgallery > .pgroup:last-child { padding-bottom: 0; }
}

/* 17. Pages texte, 404 et pages d’erreur ------------------------------------------------------------------------------ */
.textpage { padding-block: clamp(32px, 6vw, 88px); max-width: calc(46rem + 2 * var(--gutter)); display: grid; gap: 18px; }
.textpage__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-display); line-height: 1; letter-spacing: -0.035em; color: var(--blue); margin: 16px 0 12px; }
.textpage h2 { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-top: 24px; }
.textpage p { max-width: 62ch; }
.textpage a { color: var(--blue); }
.notfound { min-height: 70svh; display: grid; align-content: center; justify-items: start; gap: 20px; padding-block: 64px; }
.notfound__code { font-family: var(--f-title); font-weight: 700; font-size: clamp(5rem, 20vw, 14rem); line-height: .85; color: var(--blue); letter-spacing: -0.05em; }
.notfound__title { font-family: var(--f-title); font-weight: 700; font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; }
.notfound__text { font-size: var(--fs-lead); color: var(--muted); max-width: 36ch; }
/* Pages d’erreur (403, 404, 500) : construites comme la landing (même fond de reflets, même hauteur d’écran, groupe au
   centre optique) : repère « Erreur 404 » avec filet, titre au format des appels au contact (un mot en bleu), phrase, boutons. */
.errpage__inner {
  display: grid; align-content: center; justify-items: start; gap: var(--title-gap);
  min-height: min(calc(100svh - var(--header-h)), 900px);
  padding-block: 24px clamp(48px, 8vh, 80px);
}
.errpage__inner > .kicker { justify-self: stretch; }
.errpage__title { font-family: var(--f-title); font-weight: 700; font-size: var(--fs-cta); line-height: 1.04; letter-spacing: -0.035em; }
.errpage__title em { font-style: normal; color: var(--blue); white-space: nowrap; }
.errpage__text { font-size: var(--fs-lead); line-height: 1.5; color: #333333; }
.errpage .hero__actions { margin-top: calc(var(--head-gap) - var(--title-gap)); }

/* 18. Pied de page -------------------------------------------------------------------------------------- */
/* Pied de page foncé (couleur du texte), sans filet : le changement de fond sépare déjà le bandeau bleu du pied de page. */
.site-footer { background: var(--ink); color: #B5B5B5; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding-top: 28px; font-size: var(--fs-small);
}
.site-footer__name { font-family: var(--f-title); font-weight: 700; font-size: 1.0625rem; color: #FFFFFF; }
.site-footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* Séparateur « · » en inline-block : il n’hérite pas du soulignement du lien au survol */
.site-footer__meta > * + *::before { content: "·"; display: inline-block; margin-right: 12px; color: rgba(255, 255, 255, .4); }
.site-footer a { color: #FFFFFF; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .2s; }
.site-footer a:hover { text-decoration-color: #FFFFFF; }
.site-footer :focus-visible { outline-color: #FFFFFF; }

/* 19. Transitions entre pages ------------------------------------------------------------------------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease); }
@supports not (view-transition-name: none) { main { animation: fade .45s var(--ease-out) both; } }

/* 20. Mouvement réduit ---------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .btn:hover, .pnext__card:hover { transform: none; }
  .tools__track { animation: none; width: auto; }
  .tools__list { flex-wrap: wrap; padding-inline: var(--gutter); }
  .tools__list[aria-hidden] { display: none; }
}

/* Élément visible seulement à l’impression (« Enregistrer en PDF » du navigateur) */
.print-only { display: none; }

/* 21. Impression (une page projet s’imprime ou s’enregistre en PDF proprement) ------------------------------------------- */
@media print {
  @page { size: A4; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .intro-screen, .skip-link, .pnext, .cta-band, .site-footer, .phero__back, .phero__visit, .ba__handle, .ratio-badge { display: none !important; }
  .wrap { padding-inline: 0; }
  .psec { padding-top: 32px; }
  .pchapter, .pfig, .pbrief__col { break-inside: avoid; }
  .presult { padding: 28px; border-radius: 16px; }
  .contact, .brief { display: none; }
  .print-only { display: block; }
  .print-contact { margin-top: 40px; padding: 18px 24px; border-radius: 14px; background: var(--blue); color: #FFFFFF; font-weight: 500; }
}
