.navbar__actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s);
}

/* ============================================================
   DESIGN TOKENS — Portfolio Thomas Reaubourg
   Extraits de Figma : Portfolio 2026
   ============================================================ */

/* ------------------------------------------------------------
   TYPOGRAPHIE
   Font : Basis Grotesque Arabic Pro — fichiers locaux /public/fonts
   ------------------------------------------------------------ */

@font-face {
  font-family: 'Basis Grotesque Arabic Pro';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/BasisGrotesqueArabicPro-Light.ttf') format('truetype');
}

@font-face {
  font-family: 'Basis Grotesque Arabic Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/BasisGrotesqueArabicPro-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Basis Grotesque Arabic Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/BasisGrotesqueArabicPro-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Basis Grotesque Arabic Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/BasisGrotesqueArabicPro-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Basis Grotesque Arabic Pro';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/BasisGrotesqueArabicPro-Black.ttf') format('truetype');
}

:root {
  --font-family: 'Basis Grotesque Arabic Pro', sans-serif;
  --font-weight: 400;
  --font-weight-ui: 500;

  /* Échelle typographique */
  --text-body-s-size:   14px;
  --text-body-s-line:   20px;
  --text-body-m-size:   16px;
  --text-body-m-line:   28px;

  --text-body-l-size:   20px;
  --text-body-l-line:   30px;
  --text-body-xl-size:  24px;
  --text-body-xl-line:  40px;

  --text-title-s-size:  32px;
  --text-title-s-line:  40px;

  --text-title-l-size:  48px;
  --text-title-l-line:  56px;
}


/* ------------------------------------------------------------
   COULEURS PRIMITIVES — Stormdust scale
   Valeurs absolues, indépendantes du thème.
   ------------------------------------------------------------ */

:root {
  --color-stormdust-50:  oklch(98.5% 0 0);
  --color-stormdust-100: oklch(95%   0 0);
  --color-stormdust-200: oklch(92.2% 0 0);
  --color-stormdust-300: oklch(87%   0 0);
  --color-stormdust-400: oklch(70.8% 0 0);
  --color-stormdust-500: oklch(51.03% 0 0);
  --color-stormdust-600: oklch(43.9% 0 0);
  --color-stormdust-700: oklch(37.1% 0 0);
  --color-stormdust-800: oklch(26.9% 0 0);
  --color-stormdust-900: oklch(20.5% 0 0);
  --color-stormdust-950: oklch(14.5% 0 0);

  /* Brand */
  --brand: #ff4d00;

}


/* ------------------------------------------------------------
   COULEURS SÉMANTIQUES
   Référencent les primitives, varient selon le thème.
   ------------------------------------------------------------ */

:root {
  /* Texte */
  --text-primary:    var(--color-stormdust-950);
  --text-secondary:  var(--color-stormdust-500);
  --text-brand:      var(--brand);
  --text-inverted:   var(--white);

  /* Fonds */
  --white:           #ffffff;
  --bg-page:         var(--color-stormdust-50);
  --bg-menu:         var(--color-stormdust-50);
  --focus-card-bg:   var(--white);

  /* Navigation tabs */
  --tabs-bg-active:       var(--white);
  --tabs-bg-inactive:     var(--color-stormdust-100);
  --tabs-pill-bg:         var(--color-stormdust-100);
  /* Fond éléments navbar (logo, tabs, icon buttons, toggle langue) */
  --tabs-container-bg:    var(--white);
  --tabs-hover-bg:        var(--color-stormdust-100);

  /* Séparateurs */
  --border-color:      var(--color-stormdust-200);
  --card-border-color: var(--color-stormdust-100);

  /* Accent / Brand */
  --color-brand:     var(--brand);
  --color-brand-dark: var(--brand);

  /* Overlay / Scrim */
  --scrim-bg:        rgba(0, 0, 0, 0.25);
}

:root[data-theme='dark'] {
  --text-primary:    var(--color-stormdust-50);
  --text-secondary:  var(--color-stormdust-400);
  --text-brand:      var(--brand);
  --text-inverted:   var(--color-stormdust-950);

  --bg-page:         var(--color-stormdust-950);
  --bg-menu:         var(--color-stormdust-900);
  --focus-card-bg:   var(--color-stormdust-800);

  --tabs-bg-active:       var(--color-stormdust-600);
  --tabs-bg-inactive:     var(--color-stormdust-700);
  --tabs-pill-bg:         var(--color-stormdust-800);
  /* Fond éléments navbar (logo, tabs, icon buttons, toggle langue) */
  --tabs-container-bg:    var(--color-stormdust-900);
  --tabs-hover-bg:        var(--color-stormdust-800);

  --border-color:      var(--color-stormdust-800);
  --card-border-color: var(--color-stormdust-700);

  --color-brand:     var(--brand);
  --color-brand-dark: var(--brand);

  --scrim-bg:        rgba(0, 0, 0, 0.5);
}


/* ------------------------------------------------------------
   ESPACEMENTS (échelle de spacing)
   ------------------------------------------------------------ */

:root {
  --xs:   8px;
  --s:    12px;
  --m:    16px;
  --l:    24px;
  --xl:   32px;
  --xxl:  40px;
}


/* ------------------------------------------------------------
   BORDER RADIUS
   ------------------------------------------------------------ */

:root {
  --radius-s:   8px;   /* tags */
  --radius-m:   14px;  /* tabs, boutons */
  --radius-l:   16px;  /* tabs container */
  --radius-xl:  32px;  /* cards */
  --radius-xxl: 40px;  /* images hero */
}


/* ------------------------------------------------------------
   COMPOSANTS DE BASE
   ------------------------------------------------------------ */

/* Reset minimal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*
 * Aucun overflow-x sur html/body/.page : overflow (hidden/clip) sur un ancêtre casse position:sticky
 * (menu latéral des pages projets). Le débordement horizontal est géré par max-width + contenus.
 */
html {
  width: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  width: 100%;
}

/* Layout */
.page {
  width: 100%;
  max-width: 100%;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Locked project overlay (Coming soon) */
.locked-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: color-mix(in srgb, var(--color-stormdust-900) 90%, transparent);
  border-radius: inherit;
}

.locked-layer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
  letter-spacing: 0.01em;
}

.locked-layer__icon {
  width: 28px;
  height: 28px;
  display: block;
}

.locked-layer__text {
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
}

.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: transparent;
  transform: translate3d(0, 0, 0);
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.nav-wrapper--no-transition {
  transition: none !important;
}

.nav-spacer {
  height: 0;
  width: 100%;
  max-width: 100%;
}

.nav-wrapper--hidden {
  transform: translate3d(0, -120%, 0);
}

body {
  padding-top: 0;
  /* Fallback si le script du footer ne tourne pas (JS désactivé / erreur runtime). */
  padding-bottom: var(--footer-h, 220px);
}

/* Navbar — onglets centrés sur l’axe de l’écran (indépendamment des largeurs logo / actions) */
.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  height: 48px;
  max-width: 100%;
  min-width: 0;
}

/* Ombre navbar : même comportement/intensité que la sidebar projets */
:root {
  /* Référence sidebar: box-shadow: 0 4px 48px 0 rgba(0,0,0,.07)
     Pour drop-shadow() il faut une valeur sans "spread". */
  --nav-floating-drop-shadow: 0 4px 48px rgba(0, 0, 0, 0.07);
}

.navbar__shadow-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: var(--radius-m);
  filter: none;
  transition: filter 0.5s ease;
  will-change: filter;
}

.nav-wrapper--scrolled .navbar__shadow-wrap {
  filter: drop-shadow(var(--nav-floating-drop-shadow));
  transition: filter 0.1s ease;
}

.nav-wrapper--scrolled .navbar__shadow-wrap--tabs {
  filter: none;
}

.navbar__shadow-wrap--tabs {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.navbar__shadow-wrap--tabs .navbar__tabs {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}

/* L’ombre doit être sur le wrapper, pas sur l’élément clippé */

.navbar__logo {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--tabs-container-bg);
  border: none;
  border-radius: var(--radius-m);
  text-decoration: none;
  overflow: visible;
}

.navbar__logo-img {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: inherit;
  overflow: hidden;
}

.navbar__logo-img__default,
.navbar__logo-img__hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.navbar__logo-img__hover {
  opacity: 0;
}

.navbar__logo:hover .navbar__logo-img__default {
  opacity: 0;
}

.navbar__logo:hover .navbar__logo-img__hover {
  opacity: 1;
}

.navbar__logo-text {
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
}

/* Pilule d’onglets (navbar + filtres page projets) */
.navbar__tabs {
  position: relative;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  background: var(--tabs-pill-bg);
  border-radius: var(--radius-l);
}

.navbar .navbar__tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

/* Même largeur de colonne = celle du libellé le plus long (ex. « À propos ») */
.navbar .navbar__tabs > .navbar__tab {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Pill blanc — ancré sur le tab actif, anime vers la nouvelle tab au clic */
.navbar__tabs-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  background: var(--tabs-bg-active);
  border-radius: var(--radius-m);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              width    0.22s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, width;
}

/* Pill preview — suit le hover sur les onglets inactifs (#navbar-tabs, filtres Projets, etc.) */
.navbar__tabs-indicator-hover {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  /* Même logique que #projets-category-tabs : track ≈ --tabs-hover-bg → teinte lisible au glissement */
  background: color-mix(in srgb, var(--text-primary) 9%, var(--tabs-pill-bg));
  border-radius: var(--radius-m);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              width    0.22s cubic-bezier(0.4, 0, 0.2, 1),
              opacity  0.14s ease;
  will-change: transform, width, opacity;
}

/* Quand le JS est actif : fond du tab actif géré par le pill blanc */
.navbar__tabs--has-indicator .navbar__tab--active {
  background: transparent;
}

/* Quand le JS est actif : fond hover géré par le pill preview */
.navbar__tabs--has-indicator .navbar__tab:not(.navbar__tab--active):hover {
  background: transparent;
}

/* Pilule thème / langue — fond gris ; au hover, centre blanc inset 4px (comme les onglets) */
.navbar__action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  padding: 4px;
  box-sizing: border-box;
  background: var(--tabs-pill-bg);
  border-radius: var(--radius-l);
}

.navbar__action-pill .navbar__icon-button,
.navbar__action-pill .navbar__lang-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-m);
  background: transparent;
  transition: background 0.34s ease;
}

.navbar__action-pill:hover .navbar__icon-button,
.navbar__action-pill:hover .navbar__lang-toggle {
  background: var(--tabs-bg-active);
}

.navbar__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-m);
  border: none;
  background: var(--tabs-container-bg);
  cursor: pointer;
  padding: 0;
  transition:
    background 0.34s ease,
    opacity 0.34s ease;
}

.navbar__icon-button:hover {
  background: var(--tabs-hover-bg);
}

.navbar__icon {
  width: 18px;
  height: 18px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1.5;
}

.navbar__icon--moon {
  display: none;
  fill: none;
}

.navbar__icon-button--dark .navbar__icon--sun {
  display: none;
}

.navbar__icon-button--dark .navbar__icon--moon {
  display: block;
  stroke: var(--text-primary);
}

.navbar__lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-m);
  border: none;
  background: var(--tabs-container-bg);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
  gap: 6px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.navbar__lang-toggle:hover {
  background: var(--tabs-hover-bg);
}

/* Libellé langue active (FR / EN) */
.navbar__lang {
  display: block;
  font-size: var(--text-body-s-size);
  line-height: var(--text-body-s-line);
  font-weight: 500;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.navbar__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-m);
  background: transparent;
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
  transition: background 0.15s ease;
  position: relative;
  z-index: 1;
}

.navbar__tab--active {
  background: var(--tabs-bg-active);
}

.navbar__tab:not(.navbar__tab--active):hover {
  background: var(--tabs-hover-bg);
}

.navbar__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  background: var(--color-brand);
  border-radius: var(--radius-m);
  color: var(--white);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition:
    background 0.34s ease,
    color 0.34s ease,
    filter 0.34s ease,
    opacity 0.34s ease;
}

.navbar__cta:hover {
  background: var(--color-brand);
}

.navbar__cta-arrow {
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  transition: max-width  0.25s cubic-bezier(0.4, 0, 0.2, 1),
              margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity     0.2s  ease;
}

.navbar__cta:hover .navbar__cta-arrow {
  max-width: 20px;
  margin-left: 6px;
  opacity: 1;
}

/*
 * Bouton secondaire — même gabarit que .navbar__cta (Contact) : hauteur 48px, padding 0 18px, radius-m, body-m.
 * Fond noir / texte clair ; réutilisable hors navbar.
 */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  box-sizing: border-box;
  background: var(--color-stormdust-950);
  border-radius: var(--radius-m);
  color: var(--white);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition:
    opacity 0.34s ease,
    filter 0.34s ease,
    background 0.34s ease,
    color 0.34s ease;
}

.btn-secondary:any-link:hover,
button.btn-secondary:hover:not([aria-disabled='true']):not(.btn-secondary--disabled) {
  opacity: 0.92;
  filter: brightness(1.06);
}

.btn-secondary--disabled,
.btn-secondary[aria-disabled='true'] {
  cursor: default;
  pointer-events: none;
  opacity: 0.72;
}

.btn-secondary__label {
  display: inline-block;
}

/*
 * CTA (hors navbar / onglets)
 * Objectif: 2 variantes globales (primary + outline) réutilisables partout.
 */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 var(--l);
  box-sizing: border-box;
  border-radius: var(--radius-m);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition:
    opacity 0.34s ease,
    background 0.34s ease,
    border-color 0.34s ease,
    color 0.34s ease,
    filter 0.34s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta__label {
  position: relative;
  z-index: 1;
  display: inline-block;
}

/* Primary (orange) — hover noir en light, hover blanc en dark */
.cta--primary {
  background: var(--color-brand);
  color: var(--white);
  /* Défensif: évite toute régression de gabarit via overrides page/JS */
  height: 52px;
  padding: 0 var(--l);
}

.cta--primary:hover {
  background: var(--color-stormdust-950);
  color: var(--white);
  opacity: 1;
  filter: none;
}

:root[data-theme='dark'] .cta--primary:hover {
  background: var(--white);
  color: var(--color-stormdust-950);
}

/*
 * Outline — reprend le style + fonctionnement du footer (variables fill/stroke)
 * Remarque: la forme "squircle" est rendue en SVG via le script de `Navbar.astro`
 * pour éviter les artefacts border+clip-path.
 */
.cta--outline {
  --footer-pill-stroke: var(--color-stormdust-300);
  --footer-pill-bg: transparent;
  --footer-pill-stroke-w: 1px;
  /* Défensif: certains styles page peuvent cibler les anciens CTA et écraser `.cta` */
  height: 52px;
  padding: 0 var(--l);
  border: var(--footer-pill-stroke-w) solid var(--footer-pill-stroke);
  background: var(--footer-pill-bg);
  color: var(--color-stormdust-900);
}

.cta--outline:any-link,
.cta--outline:link,
.cta--outline:visited {
  color: var(--color-stormdust-900);
}

.cta--outline:hover,
.cta.cta--outline:hover {
  --footer-pill-stroke: var(--color-stormdust-950);
  --footer-pill-bg: var(--color-stormdust-950);
  color: var(--white);
  opacity: 1;
}

.cta--outline:any-link:hover,
.cta--outline:link:hover,
.cta--outline:visited:hover {
  color: var(--white);
}

:root[data-theme='dark'] .cta--outline {
  --footer-pill-stroke: var(--color-stormdust-600);
  color: var(--white);
}

:root[data-theme='dark'] .cta--outline:hover,
:root[data-theme='dark'] .cta.cta--outline:hover {
  --footer-pill-stroke: var(--white);
  --footer-pill-bg: var(--white);
  color: var(--color-stormdust-950);
}

/* Footer : intro (hand + accroche) en ligne haut gauche ; ligne CV + contact (libellés inclus) bas gauche ; réseaux à droite */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
  background: var(--tabs-pill-bg);
  color: var(--text-primary);
  /* Même espace en haut qu’en bas (aligné sur le padding bas du footer) */
  padding: 52px 32px;
  box-sizing: border-box;
  height: 60vh;
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  height: 100%;
  justify-content: space-between;
}
.footer__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  width: 100%;
}
.footer__heading {
  min-width: 0;
}
.footer__kicker {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 26px;
  font-weight: var(--font-weight-ui);
  color: var(--color-stormdust-600);
}
.footer__headline {
  margin: 0;
  font-size: 56px;
  line-height: 64px;
  font-weight: var(--font-weight-ui);
  color: var(--color-stormdust-900);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.footer__signature {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-stormdust-600);
  font-weight: 500;
  max-width: 260px;
}
.footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.footer__pill {
  --footer-pill-stroke: var(--color-stormdust-300);
  --footer-pill-bg: transparent;
  --footer-pill-stroke-w: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-m);
  border: var(--footer-pill-stroke-w) solid var(--footer-pill-stroke);
  background: var(--footer-pill-bg);
  color: var(--color-stormdust-900);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-weight: var(--font-weight-ui);
  text-decoration: none;
  white-space: nowrap;
  transition:
    opacity 0.34s ease,
    background 0.34s ease,
    border-color 0.34s ease,
    color 0.34s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer__pill--cta {
  --footer-pill-stroke-w: 1px;
}

.footer__pill--cta:hover {
  color: var(--white);
}

.footer__pill:hover {
  --footer-pill-stroke: var(--color-stormdust-950);
  --footer-pill-bg: var(--color-stormdust-950);
  color: var(--white);
  opacity: 1;
}

/* Footer — Dark mode overrides */
:root[data-theme='dark'] .footer__headline {
  color: var(--white);
}

:root[data-theme='dark'] .footer__signature {
  color: var(--color-stormdust-600);
}

:root[data-theme='dark'] .footer__pill {
  --footer-pill-stroke: var(--color-stormdust-600);
  color: var(--white);
}

:root[data-theme='dark'] .footer__pill:hover {
  --footer-pill-stroke: var(--white);
  --footer-pill-bg: var(--white);
  color: var(--color-stormdust-950);
}

.footer__pill--svg-squircle {
  position: relative;
  border-color: transparent;
  background: transparent;
  isolation: isolate;
}

.cta--svg-squircle {
  position: relative;
  border-color: transparent;
  background: transparent;
  isolation: isolate;
}

.footer__pill--svg-squircle,
.cta--svg-squircle {
  /* L'outline est rendu par le SVG (stroke). On supprime le border CSS
     pour éviter un "shrink" perçu au moment où le JS remplace la forme. */
  border: 0;
  /* Sinon le border-radius de .cta / .footer__pill masque le squircle SVG */
  border-radius: 0;
  overflow: visible;
}

.footer__pill-label {
  position: relative;
  z-index: 1;
  display: inline-block;
}

.footer__pill--svg-squircle > *:not(.footer__pill-shape) {
  position: relative;
  z-index: 1;
}

.cta--svg-squircle > *:not(.footer__pill-shape) {
  position: relative;
  z-index: 1;
}

.footer__pill-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Quand le squircle est rendu en SVG, animer fill/stroke rend le hover vraiment "fade". */
.footer__pill-shape path {
  transition: fill 0.34s ease, stroke 0.34s ease;
}
.footer__pill--primary {
  background: transparent;
}
.footer__pill--social {
  gap: 10px;
}
.footer__ext-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--color-stormdust-700) 25%, transparent);
  border-radius: 50%;
  flex-shrink: 0;
  color: var(--color-stormdust-700);
}
.footer__ext-icon {
  display: block;
}

/*
 * Badge projet — même gabarit que .navbar__tab (hauteur 40px, padding 0 18px, typo body-m + font-weight-ui).
 * Fond noir / texte blanc fixes (indépendants du thème clair/sombre).
 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  box-sizing: border-box;
  background: var(--color-stormdust-950);
  color: var(--white);
  border-radius: var(--radius-m);
  font-family: var(--font-family);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-weight: var(--font-weight-ui);
  white-space: nowrap;
  border: none;
}

/* Pages projet — rangée badges : secteurs à gauche, année (badge) à droite */
.project-header__badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--xs);
  margin-bottom: var(--xs);
  width: 100%;
}

.project-header__badges-row > .project-header__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--xs);
  margin-bottom: 0;
}

/* Card Metrics */
.card-metrics {
  display: flex;
  flex-direction: column;
  gap: var(--xs);
  padding: var(--xl);
  background: var(--focus-card-bg);
  border: 1px solid var(--card-border-color);
  border-radius: var(--radius-xl);
  flex: 1;
}

.card-metrics__value {
  font-size: 40px;
  line-height: 48px;
  color: var(--text-primary);
}

@media (max-width: 479px) {
  .card-metrics__value {
    font-size: 32px;
    line-height: 40px;
  }
}

.card-metrics__label {
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
  font-weight: var(--font-weight-ui);
}

/* Card Role */
.card-role {
  display: flex;
  flex-direction: column;
  gap: var(--xs);
  padding: var(--xl);
  background: var(--focus-card-bg);
  border: 1px solid var(--card-border-color);
  border-radius: var(--radius-xl);
  flex: 1;
}

.card-role__header {
  display: flex;
  flex-direction: column;
}

.card-role__number {
  color: var(--text-secondary);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
}

.card-role__title {
  color: var(--text-brand);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-weight: var(--font-weight-ui);
}

.card-role__body {
  color: var(--text-primary);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
}

/* Card Opportunity */
.card-opportunity {
  display: flex;
  gap: var(--s);
  align-items: flex-start;
  padding: var(--xl);
  background: var(--focus-card-bg);
  border: 1px solid var(--card-border-color);
  border-radius: var(--radius-xl);
  width: 100%;
}

.card-opportunity__number {
  color: var(--text-brand);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  flex-shrink: 0;
  width: 26px;
  font-weight: var(--font-weight-ui);
}

.card-opportunity__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--xs);
}

.card-opportunity__title {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-weight: 700;
}

.card-opportunity__text {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-weight: var(--font-weight);
}

/* ============================================================
   RESPONSIVE
   Breakpoints :
     < 1280px  Desktop S  (MBP 13")
     < 1024px  Tablet
     <  768px  Mobile L
     <  480px  Mobile S
   ============================================================ */

/* -- Navbar burger (mobile) --------------------------------- */
.navbar__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-m);
  border: none;
  /* Aligné thème / langue / icônes (clair + sombre) */
  background: var(--tabs-container-bg);
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.navbar__burger:hover { background: var(--tabs-hover-bg); }
.navbar__burger svg { width: 20px; height: 20px; }
.navbar__burger-close { display: none; }

/* Menu overlay (mobile) — desktop : masqué */
.navbar__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Fond porté par .navbar__mobile-menu__scrim (animation GPU) */
  background: transparent;
  z-index: 99;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  isolation: isolate;
}

/* Calque animé : scale (origine = centre du burger, défini en JS) */
.navbar__mobile-menu__scrim {
  display: none;
}

.navbar__mobile-menu__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s);
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Entrées progressives : uniquement opacity + transform (compositing) */
.navbar__mobile-menu__inner > * {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.navbar__mobile-menu--open .navbar__mobile-menu__inner > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.navbar__mobile-menu--closing .navbar__mobile-menu__inner > * {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
}

@media (max-width: 767px) {
  .navbar__mobile-menu {
    display: flex;
    visibility: hidden;
    pointer-events: none;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .navbar__mobile-menu__scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bg-page);
    /* Coins arrondis ; coin bas-gauche un peu plus marqué */
    border-radius: var(--radius-xl);
    border-bottom-left-radius: var(--radius-xxl);
    /* Fallback avant JS (burger en haut à droite sur mobile) */
    transform-origin: calc(100% - 40px) 40px;
    transform: scale3d(0.001, 0.001, 1);
    transition: transform 0.38s cubic-bezier(0.25, 0.82, 0.25, 1);
  }

  .navbar__mobile-menu--open {
    visibility: visible;
    pointer-events: auto;
  }

  .navbar__mobile-menu--open .navbar__mobile-menu__scrim {
    transform: scale3d(1, 1, 1);
  }

  .navbar__mobile-menu--closing {
    visibility: visible;
    pointer-events: none;
  }

  .navbar__mobile-menu--closing .navbar__mobile-menu__scrim {
    transform: scale3d(0.001, 0.001, 1);
  }

  .navbar__mobile-menu__inner {
    max-width: none;
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
  }

  /* Boutons nav : même gabarit que le CTA ; couleurs via tokens (clair + dark) */
  .navbar__mobile-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 56px;
    padding: 0 18px;
    box-sizing: border-box;
    border-radius: var(--radius-m);
    border: 1px solid var(--card-border-color);
    background: var(--focus-card-bg);
    color: var(--text-primary);
    font-size: var(--text-body-m-size);
    line-height: var(--text-body-m-line);
    font-family: var(--font-family);
    font-weight: var(--font-weight-ui);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .navbar__mobile-nav-btn:hover {
    background: var(--tabs-hover-bg);
  }

  /*
   * Stagger uniquement sur opacity + transform (entrée du menu).
   * background / border / text : durée 0 + pas de délai → changement de thème instantané.
   */
  .navbar__mobile-menu__inner > .navbar__mobile-nav-btn,
  .navbar__mobile-menu__inner > .navbar__mobile-cta,
  .navbar__mobile-menu__inner > .navbar__mobile-actions {
    transition-property: opacity, transform, background, border-color, color;
    transition-duration: 0.32s, 0.32s, 0s, 0s, 0s;
    transition-timing-function:
      cubic-bezier(0.25, 0.46, 0.45, 0.94),
      cubic-bezier(0.25, 0.46, 0.45, 0.94),
      linear,
      linear,
      linear;
    transition-delay: 0s, 0s, 0s, 0s, 0s;
  }

  /* Décalage haut → bas : seulement opacity & transform (delais 1–2 = stagger) */
  .navbar__mobile-menu--open .navbar__mobile-menu__inner > *:nth-child(1) { transition-delay: 0.1s, 0.1s, 0s, 0s, 0s; }
  .navbar__mobile-menu--open .navbar__mobile-menu__inner > *:nth-child(2) { transition-delay: 0.2s, 0.2s, 0s, 0s, 0s; }
  .navbar__mobile-menu--open .navbar__mobile-menu__inner > *:nth-child(3) { transition-delay: 0.3s, 0.3s, 0s, 0s, 0s; }
  .navbar__mobile-menu--open .navbar__mobile-menu__inner > *:nth-child(4) { transition-delay: 0.4s, 0.4s, 0s, 0s, 0s; }
  .navbar__mobile-menu--open .navbar__mobile-menu__inner > *:nth-child(5) { transition-delay: 0.5s, 0.5s, 0s, 0s, 0s; }

  .navbar__mobile-menu--closing .navbar__mobile-menu__inner > .navbar__mobile-nav-btn,
  .navbar__mobile-menu--closing .navbar__mobile-menu__inner > .navbar__mobile-cta,
  .navbar__mobile-menu--closing .navbar__mobile-menu__inner > .navbar__mobile-actions {
    transition-delay: 0s, 0s, 0s, 0s, 0s;
    transition-duration: 0.18s, 0.18s, 0s, 0s, 0s;
  }

  .navbar__mobile-menu .navbar__mobile-cta {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .navbar__mobile-menu .navbar__mobile-actions {
    justify-content: center;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .navbar__mobile-menu__scrim {
    transition: none;
  }

  .navbar__mobile-menu--open .navbar__mobile-menu__scrim {
    transform: scale3d(1, 1, 1);
  }

  .navbar__mobile-menu:not(.navbar__mobile-menu--open) .navbar__mobile-menu__scrim {
    transform: scale3d(0.001, 0.001, 1);
  }

  /* Pas de stagger : contenu visible dès l’ouverture */
  .navbar__mobile-menu--open .navbar__mobile-menu__inner > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.navbar__mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  height: 56px;
  border-radius: var(--radius-m);
  background: var(--color-brand);
  color: var(--white);
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  font-family: var(--font-family);
  font-weight: var(--font-weight-ui);
  text-decoration: none;
}
.navbar__mobile-cta:hover { background: var(--color-brand); }

@media (max-width: 767px) {
  /* Limite les débordements de grille / contenus larges (scroll horizontal type Android) */
  .page {
    min-width: 0;
  }

  .navbar__logo {
    min-width: 0;
  }

  .navbar .navbar__tabs {
    display: none;
  }
  .navbar__burger { display: flex; }
  .navbar__actions .navbar__cta { display: none; }
  .navbar__actions .navbar__action-pill { display: none; }
}

/* Rangée thème + langue dans le menu mobile */
.navbar__mobile-actions {
  display: flex;
  gap: var(--s);
}

/* -- Footer responsive -------------------------------------- */
@media (max-width: 1023px) {
  .footer {
    padding: 48px 22px;
  }
  .footer__headline {
    font-size: 48px;
    line-height: 56px;
  }
}

@media (max-width: 767px) {
  .footer {
    padding: 44px max(12px, env(safe-area-inset-left, 0px)) 44px max(12px, env(safe-area-inset-right, 0px));
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }
  .footer__inner {
    gap: 18px;
  }
  .footer__header {
    /* Allow re-ordering: title -> actions -> signature */
    display: contents;
  }
  .footer__heading {
    order: 1;
    text-align: left;
  }
  .footer__kicker {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 28px;
  }
  .footer__headline {
    font-size: 56px;
    line-height: 64px;
  }
  .footer__signature {
    order: 3;
    margin-top: 12px;
    max-width: none;
    text-align: left;
  }
  .footer__actions {
    order: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: auto;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .footer__pill {
    width: fit-content;
    max-width: 100%;
    height: 48px;
    border-radius: var(--radius-m);
    font-size: var(--text-body-m-size);
    line-height: var(--text-body-m-line);
  }
  .footer__pill--social {
    height: 48px;
    width: auto;
    border-radius: var(--radius-m);
    font-size: var(--text-body-m-size);
    line-height: var(--text-body-m-line);
  }
}

/* -- Typographie mobile -------------------------------------- */
@media (max-width: 479px) {
  :root {
    --text-title-l-size: 32px;
    --text-title-l-line: 40px;
    --text-title-s-size: 24px;
    --text-title-s-line: 32px;
    --text-body-l-size:  20px;
    --text-body-l-line:  30px;
    --text-body-xl-size: 20px;
    --text-body-xl-line: 30px;
  }
}

/* Séparateur horizontal */
.divider {
  width: 100%;
  height: 1px;
  border-top: 1px solid var(--border-color);
}

/* Label de section (ex: LONG STORY SHORT, OBJECTIF…) */
.label {
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: var(--font-weight-ui);
}

/* Titres */
.title-l {
  font-size: var(--text-title-l-size);
  line-height: var(--text-title-l-line);
  font-weight: var(--font-weight-ui);
}

.title-s {
  font-size: var(--text-title-s-size);
  line-height: var(--text-title-s-line);
  font-weight: var(--font-weight-ui);
}

.body-l {
  font-size: var(--text-body-l-size);
  line-height: var(--text-body-l-line);
}

.body-m {
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
}

/* ── Feedback cards ──────────────────────────────────── */

.feedback-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--m);
}

/* One testimonial: max ~50% width above 1024px; full width at ≤1024px */
.feedback-cards:has(> :only-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feedback-cards:has(> :only-child) > * {
  grid-column: 1;
}

/* Two testimonials: each takes 50% of the row (above mobile) */
.feedback-cards:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feedback-card {
  background: var(--focus-card-bg);
  border: 1px solid var(--card-border-color);
  border-radius: var(--radius-xl);
  padding: var(--xl);
  display: flex;
  flex-direction: column;
  gap: var(--l);
}

.feedback-card__icon {
  height: 28px;
  width: auto;
  max-width: 100%;
  color: var(--text-secondary);
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.feedback-card__text {
  flex: 1;
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
}

.feedback-card__author {
  display: flex;
  align-items: center;
  gap: var(--m);
  margin-top: auto;
  padding-top: var(--m);
  border-top: 1px solid var(--card-border-color);
}

.feedback-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-stormdust-200);
}

.feedback-card__author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feedback-card__name {
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
}

.feedback-card__role {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .feedback-cards { grid-template-columns: repeat(2, 1fr); }

  .feedback-cards:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-cards:has(> :only-child) > * {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .feedback-cards { grid-template-columns: 1fr; }

  .feedback-cards:has(> :only-child) {
    grid-template-columns: 1fr;
  }

  .feedback-cards:has(> :only-child) > * {
    grid-column: 1;
  }

  .feedback-cards:has(> :nth-child(2):last-child) {
    grid-template-columns: 1fr;
  }
}

/* ── Skills (Compétences) ────────────────────────────────── */

.skills-section {
  display: flex;
  flex-direction: column;
  gap: var(--xl);
}

.skills-title {
  font-size: var(--text-title-s-size);
  line-height: var(--text-title-s-line);
  color: var(--text-primary);
  font-weight: var(--font-weight-ui);
  text-align: center;
  margin: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--l);
  align-items: stretch;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: var(--s);
  padding: var(--l);
  background: var(--focus-card-bg);
  border: 1px solid var(--card-border-color);
  border-radius: var(--radius-xl);
  height: 100%;
  min-height: 210px;
  position: relative;
  overflow: hidden;
  transform: rotate(var(--skill-rotation, 0deg));
  transition: background 0.28s ease, border-color 0.28s ease, transform 0.18s ease;
}

.skill-card--highlight {
  background: var(--focus-card-bg);
  border-color: var(--card-border-color);
}

.skill-card:hover {
  background: var(--color-brand);
  border-color: rgba(255, 255, 255, 0.25);
}

.skill-card__icon {
  width: 40px;
  height: 40px;
  color: var(--text-brand);
  flex-shrink: 0;
}

.skill-card:hover .skill-card__icon {
  color: var(--white);
}

.skill-card__title {
  font-size: var(--text-title-s-size);
  line-height: var(--text-title-s-line);
  color: var(--text-primary);
  font-weight: var(--font-weight-ui);
  transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.skill-card__desc {
  margin: 0;
  font-size: var(--text-body-m-size);
  line-height: var(--text-body-m-line);
  color: var(--text-primary);
  font-weight: 400;
}

.skill-card__desc-default {
  transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.skill-card__desc-hover {
  position: absolute;
  left: var(--l);
  right: var(--l);
  top: calc(var(--l) + 40px + var(--s));
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.skill-card:hover .skill-card__desc-default {
  opacity: 0;
  transform: translateY(-14px);
}
.skill-card:hover .skill-card__desc-hover {
  opacity: 1;
  transform: translateY(0);
  font-size: 24px;
  line-height: var(--text-title-s-line);
  color: var(--white);
}

.skill-card:hover .skill-card__title {
  opacity: 0;
  transform: translateY(-14px);
  color: var(--white);
}

@media (max-width: 1023px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Légende sous image (cas projet, articles) ───────── */
.content-image-block {
  margin: 0;
  width: 100%;
  /* Espace net sous la légende (le margin du bloc suivant s’ajoute au-delà) */
  padding-bottom: var(--m);
  display: flow-root;
}

.content-image-block .content-image {
  margin: 0;
}

.image-caption {
  margin: var(--s) 0 0;
  padding: 0;
  font-size: var(--text-body-m-size); /* 16px */
  line-height: var(--text-body-m-line);
  color: var(--text-secondary);
  font-style: italic;
  font-weight: var(--font-weight);
}

/* Images Markdown + vidéos locales dans les blocs texte des cas projet (aligné sur .content-image__img) */
.text-block__body img,
.text-block__body .text-block__video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xxl);
}

