@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ===== Variables ===== */
:root {
  /* Noir mat + blanc, strictement monochrome, palette éclaircie */
  --color-bg: oklch(14% 0 0);
  --color-bg-elevated: oklch(20% 0 0);
  --color-bg-elevated-2: oklch(26% 0 0);
  --color-border: oklch(38% 0 0);
  --color-border-soft: rgb(255 255 255 / 10%);

  --color-text: oklch(97% 0 0);
  --color-text-muted: oklch(70% 0 0);
  --color-text-faint: oklch(60% 0 0);

  /* Dégradé "métal brossé" pour le logo et les accents */
  --metal-1: oklch(92% 0 0);
  --metal-2: oklch(60% 0 0);
  --metal-3: oklch(52% 0 0);
  --metal-gradient: linear-gradient(135deg, var(--metal-1), var(--metal-2) 45%, var(--metal-3) 70%, var(--metal-2));

  --glow-soft: rgb(255 255 255 / 10%);

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 16px;
  --container-width: 1100px;
}

/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

section {
  padding: 96px 0;
  position: relative;
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }
}

.text-metal {
  background: var(--metal-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ===== Logo (coin haut-gauche) ===== */
.site-logo {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
}

.site-logo__lockup {
  height: 30px;
  width: auto;
}

@media (max-width: 640px) {
  .site-logo {
    top: calc(16px + env(safe-area-inset-top, 0px));
  }
  .site-logo__lockup {
    height: 24px;
  }
}

/* ===== Marque / tagline (footer) ===== */
.footer__logo {
  height: 40px;
  width: auto;
  margin: 0 auto 14px;
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* ===== Navbar (pilule flottante) ===== */
.navbar {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--color-bg-elevated) 85%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 8px 32px rgb(0 0 0 / 60%);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

/* état "compact" une fois qu'on a quitté le haut de page */
.navbar--compact {
  padding: 4px;
  background: color-mix(in oklch, var(--color-bg-elevated) 96%, transparent);
  box-shadow: 0 8px 28px rgb(0 0 0 / 75%);
}

.navbar--compact .navbar__link {
  padding: 8px 18px;
}

.site-logo {
  transition: transform 0.3s ease;
}

.site-logo--compact {
  transform: scale(0.9);
}

.navbar__link {
  position: relative;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
  transition: color 0.2s ease, padding 0.3s ease;
  white-space: nowrap;
}

.navbar__link:hover {
  /* l'indicateur (pastille blanche) glisse sous le lien survolé : le texte doit
     devenir sombre pour rester lisible dessus, pas blanc */
  color: var(--color-bg);
}

.navbar__link.is-active {
  color: var(--color-bg);
}

.navbar:has(.navbar__link:hover) .navbar__link.is-active:not(:hover) {
  /* la pastille a quitté le lien actif pour suivre le survol : il redevient blanc comme les autres */
  color: var(--color-text);
}

.navbar__indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  background: var(--color-text);
  z-index: -1;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar__link span.short {
  display: none;
}

@media (max-width: 640px) {
  .navbar {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .navbar::-webkit-scrollbar {
    display: none;
  }
  .navbar__link {
    padding: 8px 12px;
    font-size: 12px;
  }
  /* labels raccourcis plutôt que masqués : un onglet vide est illisible */
  .navbar__link span.full {
    display: none;
  }
  .navbar__link span.short {
    display: inline;
  }
}

/* ===== Page header (pages secondaires) ===== */
.page-header {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--glow-soft), transparent 70%);
  pointer-events: none;
}

.particles-bg__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-header__title {
  position: relative;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 16px;
  animation: header-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-header__subtitle {
  position: relative;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  animation: header-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes header-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ===== Hero à défilement (scrollytelling) ===== */
/* Un long "couloir" de scroll (--runway-h) contient une scène épinglée (position: sticky) ;
   initScrollytell() (main.js) traduit la progression du scroll en opacité/translation par
   phase, pour raconter une courte histoire avant que le logo ne se fixe en position finale. */
.scrollytell {
  position: relative;
  height: var(--runway-h, 380vh);
}

@media (max-width: 640px) {
  .scrollytell {
    height: var(--runway-h-mobile, 300vh);
  }
}

.scrollytell__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
  text-align: center;
}

.scrollytell__dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgb(255 255 255 / 22%) 1.4px, transparent 1.4px);
  background-size: 28px 28px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 72%);
}

.scrollytell__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.scrollytell__scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 0%, rgb(0 0 0 / 55%) 75%, var(--color-bg) 100%);
  pointer-events: none;
}

/* Phrases qui se relaient au fil du scroll : purement décoratives (aria-hidden),
   le vrai message accessible vit dans .scrollytell__final (h1 réel, lu une seule fois). */
.scrollytell__line {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  max-width: 720px;
  padding: 0 24px;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 2.8rem);
  color: var(--color-text);
  opacity: 0;
}

.scrollytell__line[data-in="0"] {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.scrollytell__final {
  position: relative;
  z-index: 1;
  opacity: 1;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 0 24px;
  color: var(--color-text);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--color-bg-elevated) 70%, transparent);
  border: 1px solid var(--color-border-soft);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text);
}

.hero__logo {
  width: clamp(240px, 44vw, 560px);
  height: auto;
  margin: 0 auto 20px;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 40px;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 24px;
}

.hero__title--sub {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__title-line {
  display: block;
}

.hero__title--sub .hero__title-line {
  display: inline;
}

.hero__title-line--accent {
  background: var(--metal-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn--primary:hover {
  transform: translateY(-2px);
}

.btn--magnet {
  position: relative;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border-color: var(--color-border-soft);
  overflow: visible;
  isolation: isolate;
}

.btn--magnet:hover {
  background: var(--color-bg-elevated-2);
}

.btn__particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text);
  opacity: 0.4;
  z-index: -1;
  transition: opacity 0.2s ease;
}

.btn--magnet:hover .btn__particle {
  opacity: 1;
}

/* Contour qui se remplit au survol (section Mon parcours) */
.btn--outline-fill {
  position: relative;
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s ease;
}

.btn--outline-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn--outline-fill:hover {
  color: var(--color-bg);
}

.btn--outline-fill:hover::before {
  transform: scaleX(1);
}

/* Halo lumineux au survol (section Mes projets) */
.btn--glow {
  background: var(--color-text);
  color: var(--color-bg);
  box-shadow: 0 0 0 0 rgb(255 255 255 / 0%);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.btn--glow:hover {
  box-shadow: 0 0 36px 6px rgb(255 255 255 / 30%);
  transform: translateY(-2px);
}

/* Lien avec flèche glissante (section Derniers articles) */
.btn--arrow {
  background: transparent;
  border-color: transparent;
  padding: 10px 4px;
  color: var(--color-text);
}

.btn--arrow:hover {
  transform: none;
  color: var(--color-text-muted);
}

.btn__arrow-icon {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn--arrow:hover .btn__arrow-icon {
  transform: translateX(6px);
}

/* ===== Sections communes ===== */
.section-heading {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-heading__title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 12px;
}

.section-heading__subtitle {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ===== Sections distinctes (page d'accueil) ===== */

/* Nos formations : trame de grille fine, pour évoquer des modules structurés */
.section-formations {
  position: relative;
  background-image:
    linear-gradient(var(--color-border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}

/* Mon parcours : bandeau photo, cadré par deux bordures */
.section-parcours {
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
}

/* ===== Bandeaux photo (Mon parcours / Mes projets / Derniers articles) ===== */
.section-parcours,
.section-projets,
.section-blog {
  position: relative;
  overflow: hidden;
}

.section-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-bg-elevated);
  background-size: cover;
  background-position: center;
}

.section-photo-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 70% 65% at 50% 50%, rgb(0 0 0 / 55%) 0%, rgb(0 0 0 / 85%) 100%);
}

.section-parcours .container,
.section-projets .container,
.section-blog .container {
  position: relative;
  z-index: 1;
}

/* ===== Cards ===== */
.card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border);
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / 70%), 0 0 0 1px var(--color-border-soft);
}

.card__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.card__title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.card__description {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.card__meta {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-faint);
}

.card__link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* ===== Card "média" (formations) : variante avec image de fond, se combine à .card ===== */
.card--media {
  position: relative;
  display: block;
  height: 380px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

.card__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-bg-elevated-2);
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.card--media:hover .card__media,
.card--media:focus-visible .card__media {
  transform: scale(1.08);
}

.card__scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 90%), rgb(0 0 0 / 45%) 50%, transparent 80%);
}

.card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 24px;
}

.card--media .card__tag,
.formation__media-content .card__tag {
  color: rgb(255 255 255 / 75%);
}

.card--media .card__title,
.formation__media-content .card__title {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.card__stat {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgb(255 255 255 / 70%);
}

.card__cta {
  margin-top: 18px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
  border: 1px solid rgb(255 255 255 / 22%);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.card--media:hover .card__cta,
.card--media:focus-visible .card__cta {
  background: rgb(255 255 255 / 20%);
  border-color: rgb(255 255 255 / 40%);
}

.card__cta-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.card--media:hover .card__cta-arrow,
.card--media:focus-visible .card__cta-arrow {
  transform: translateX(5px);
}

/* ===== Carousel ===== */
.carousel {
  position: relative;
}

.carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 20px;
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__nav-group {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.carousel__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border-soft);
  background: var(--color-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-text);
  transition: background 0.2s ease;
}

.carousel__nav:hover {
  background: var(--color-bg-elevated-2);
}

/* ===== Reel de projets (page Projets) : anneau de cartes piloté par un seul angle ===== */
.section-reel {
  padding-top: 32px;
}

.reel {
  position: relative;
  height: 480px;
  outline: none;
  touch-action: pan-y;
  cursor: grab;
}

.reel--dragging {
  cursor: grabbing;
}

.reel__stage {
  position: absolute;
  inset: 0;
}

.reel__card {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 0;
  padding: 0;
  border-radius: calc(var(--radius) * 0.75);
  background-color: var(--color-bg-elevated-2);
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / 80%);
  opacity: 0;
  cursor: pointer;
}

.reel__card.is-front {
  box-shadow:
    0 24px 60px -18px rgb(0 0 0 / 85%),
    0 0 0 2px var(--accent, var(--color-border)),
    0 0 32px -6px var(--accent, transparent);
}

.reel__card:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

.reel__caption {
  max-width: 560px;
  margin: 28px auto 0;
  padding: 0 24px;
  text-align: center;
  min-height: 148px;
}

.reel__caption-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--reel-accent-active, var(--color-text-muted));
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.reel__caption-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.reel__caption-desc {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.reel__caption-cta {
  margin-top: 16px;
}

.reel__caption-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--reel-accent-active, var(--color-border));
  padding-bottom: 2px;
  transition: border-color 0.3s ease;
}

.reel__caption-status {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-faint);
}

.reel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.reel__hint {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-faint);
}

.reel-fallback {
  display: none;
}

@media (max-width: 640px) {
  .reel {
    height: 360px;
  }

  .reel__hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reel,
  .reel__caption,
  .reel__controls {
    display: none !important;
  }

  .reel-fallback {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
  }
}

/* ===== Formation toggle (afficher/masquer la description) ===== */
.formation {
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  background: var(--color-bg-elevated);
  padding: 24px 28px;
  scroll-margin-top: calc(20px + env(safe-area-inset-top, 0px) + 70px);
}

/* Panneau "réalisation de projet" : mis en avant au-dessus des formations, pas de toggle */
.formation--service {
  background: linear-gradient(160deg, var(--color-bg-elevated-2), var(--color-bg-elevated));
  border-color: var(--color-border);
}

.formation--service p {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  margin-top: 12px;
}

.service-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.service-examples li {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}

/* Formation avec bandeau image (même traitement visuel que les cards de l'accueil) */
.formation--media {
  padding: 0;
  overflow: hidden;
}

.formation__media {
  position: relative;
  height: 200px;
  background-color: var(--color-bg-elevated-2);
  background-size: cover;
  background-position: center 20%;
}

.formation__media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 85%), transparent 65%);
}

.formation__media-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 28px;
}

.formation--media .formation__header {
  padding: 16px 28px;
}

.formation--media .formation__body-inner {
  padding: 8px 28px 24px;
}

.formation__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.formation__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.formation-toggle {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.formation-toggle__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.formation-toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.formation-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--metal-gradient);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.formation-toggle__input:checked ~ .formation-toggle__track {
  background: var(--color-text);
  border-color: var(--color-text);
}

.formation-toggle__input:checked ~ .formation-toggle__thumb {
  transform: translateX(22px);
  background: var(--color-bg);
}

.formation-toggle__input:focus-visible ~ .formation-toggle__track {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.formation__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.formation:has(.formation-toggle__input:checked) .formation__body {
  max-height: 320px;
}

.formation__body-inner {
  padding-top: 16px;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== Story scroll (Mon parcours) : deux colonnes épinglées, défilement scrubé =====
   Même schéma que .scrollytell (long couloir de scroll + scène en position:sticky, la
   progression du scroll pilote des styles par étape), étendu à deux colonnes : le texte
   de chaque étape se anime rapidement (fondu + léger décalage vertical), pendant que son
   image effectue un fondu-balayage plus lent, étalé sur tout le pas de scroll (clip-path
   qui grignote le bas de l'image du dessus pour révéler celle du dessous, qui grandit
   légèrement en même temps) — texte et image sont volontairement désynchronisés. */
.story {
  --story-accent: oklch(68% 0.15 265);
  position: relative;
  height: 400vh;
}

.story__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
  background: var(--color-bg);
}

.story__col {
  position: relative;
  height: 100%;
}

.story__col--text {
  width: 44%;
  padding: 0 clamp(32px, 6vw, 96px);
}

.story__col--media {
  width: 56%;
  overflow: hidden;
}

.story__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
  opacity: 0;
}

.story__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--story-accent);
  margin-bottom: 14px;
}

.story__heading {
  font-size: 2rem;
  margin-bottom: 16px;
}

.story__paragraph {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 46ch;
}

.story__list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story__list li {
  position: relative;
  padding-left: 22px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.story__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--story-accent);
}

.story__link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--story-accent);
  padding-bottom: 2px;
}

.story__link-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.story__link:hover .story__link-arrow {
  transform: translateX(5px);
}

.story__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-elevated-2);
  transform-origin: center center;
}

.story__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgb(0 0 0 / 55%), transparent 35%),
    radial-gradient(ellipse at center, transparent 55%, rgb(10 8 20 / 45%) 100%);
}

.story__hint {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.story__hint-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.story__chev {
  color: var(--story-accent);
  animation: story-chev-fade 1.4s ease-in-out infinite;
}

.story__chev--2 {
  animation-delay: 0.22s;
}

.story__chev--3 {
  animation-delay: 0.44s;
}

@keyframes story-chev-fade {
  0%, 100% {
    opacity: 0.15;
    transform: translateY(-3px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(2px);
  }
}

.story-fallback {
  display: none;
}

@media (max-width: 860px) {
  .story__stage {
    flex-direction: column-reverse;
  }

  .story__col--text,
  .story__col--media {
    width: 100%;
  }

  .story__col--media {
    height: 42%;
  }

  .story__col--text {
    height: 58%;
    padding: 0 24px;
  }

  .story__heading {
    font-size: 1.5rem;
  }

  .story__hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story {
    display: none !important;
  }

  .story-fallback {
    display: block;
    padding: 80px 0;
  }

  .story-fallback__grid {
    display: flex;
    flex-direction: column;
    gap: 64px;
  }

  .story-fallback__item {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
  }

  .story-fallback__media {
    flex: 1 1 320px;
    height: 320px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-elevated-2);
    border-radius: var(--radius);
  }

  .story-fallback__item > *:not(.story-fallback__media) {
    flex: 1 1 320px;
  }
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

  @keyframes reveal-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: none; }
  }
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
  padding: 56px 0 32px;
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 20px 0;
  flex-wrap: wrap;
  font-family: var(--font-body);
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-faint);
  margin-top: 24px;
}

/* ===== Focus visible (accessibilité clavier) ===== */
a:focus-visible,
button:focus-visible,
.card:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* ===== Réduction de mouvement ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .navbar__indicator,
  .btn,
  .btn__particle,
  .reveal,
  .page-header__title,
  .page-header__subtitle {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Le hero à défilement redevient un hero classique, sans histoire ni "runway" à parcourir */
  .scrollytell {
    height: auto !important;
  }

  .scrollytell__stage {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .scrollytell__line {
    display: none !important;
  }

  .scrollytell__final {
    opacity: 1 !important;
    transform: none !important;
  }
}
