/*
 * Mise en page du portail Helios.
 * Tokens dans tokens.css. Pas de framework : le portail doit s'ouvrir en
 * double-clic depuis le disque.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink-1);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 700; /* 700 est le maximum — l'extra-bold n'est pas chargé */
  letter-spacing: -0.01em;
  /* Répartit les lignes d'un titre au lieu de laisser tomber un mot seul sur la
     dernière — un « Up. » orphelin sous un titre de 52px se voit beaucoup. */
  text-wrap: balance;
}

p {
  margin: 0;
  /* Évite la ligne finale d'un seul mot dans les paragraphes. */
  text-wrap: pretty;
}

a {
  color: var(--primary-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--primary-hover);
}

ul,
ol {
  margin: 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: var(--space-2);
}

code {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
  background: var(--bg-muted);
  color: var(--ink-2);
  /* Les chemins de fichiers sont insécables et débordaient en mobile. */
  overflow-wrap: anywhere;
}

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

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------------------------------------------------------------- structure */

.shell {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

section {
  padding-block: var(--space-8);
}

section + section {
  border-top: 1px solid var(--line-1);
}

/* La mesure est portée par le titre et le paragraphe, pas par le bloc : chacun
   se replie sur sa propre longueur de ligne. */
.section-head {
  margin-bottom: var(--space-6);
}

.kicker {
  display: block;
  font-size: var(--fs-kicker);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-700);
  margin-bottom: var(--space-2);
}

.section-head h2 {
  font-size: var(--fs-h2);
  color: var(--ink-1);
  max-width: var(--measure-title);
}

.section-head p {
  margin-top: var(--space-3);
  color: var(--ink-3);
  font-size: var(--fs-body);
  max-width: var(--measure-text);
}

.lede {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: var(--measure-text);
}

/* -------------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-1);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink-1);
  margin-right: auto;
}

.brand img {
  height: 22px;
  width: auto;
}

.brand-sep {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.brand-name {
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topnav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.topnav a {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-md);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
}

.topnav a:hover {
  background: var(--bg-sunken);
  color: var(--ink-1);
}

.topnav a[aria-current='page'] {
  background: var(--brand-softer);
  color: var(--primary-800);
}

/* En étroit, les cinq entrées se repliaient sur trois lignes tout en gardant la
   marque centrée verticalement à côté : les deux se chevauchaient. On empile
   plutôt marque et navigation, et on fait glisser la navigation sur une seule
   ligne — l'en-tête est collant, il doit rester court. */
@media (max-width: 860px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: var(--space-2);
  }

  .brand {
    margin-right: 0;
    padding-block: var(--space-2);
  }

  .topnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    /* Un peu d'air sous les pastilles, et pas de barre de défilement visible. */
    padding-bottom: var(--space-2);
    scrollbar-width: none;
  }

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

  .topnav a {
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------------- hero */

.hero {
  padding-block: var(--space-9) var(--space-8);
  /* Le dégradé était ancré à 8% de la FENÊTRE : sur un grand écran il se
     retrouvait loin à gauche, détaché de la colonne de contenu centrée. Ancré
     au centre, il reste solidaire du texte à toutes les largeurs. */
  background:
    radial-gradient(140% 130% at 50% 0%, var(--brand-softer) 0%, transparent 62%), var(--bg-surface);
  border-bottom: 1px solid var(--line-1);
}

.hero h1 {
  font-size: var(--fs-display);
  max-width: var(--measure-title);
}

.hero .lede {
  margin-top: var(--space-5);
  max-width: var(--measure-text);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem 1.125rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: var(--fs-small);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--line-strong);
  color: var(--ink-1);
}

.btn-ghost:hover {
  background: var(--bg-sunken);
  color: var(--ink-1);
}

/* --------------------------------------------------------------------- split */

/* Le partage Rise Up / Helios */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.split-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.split-card h3 {
  font-size: var(--fs-h3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.split-card > p {
  color: var(--ink-3);
  font-size: var(--fs-small);
  margin-top: var(--space-2);
}

.split-card ul {
  margin-top: var(--space-4);
  padding-left: 0;
  list-style: none;
}

.split-card li {
  position: relative;
  padding-left: 1.1rem;
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.split-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.split-card[data-product='riseup'] {
  border-top: 3px solid var(--info);
}

.split-card[data-product='helios'] {
  border-top: 3px solid var(--primary);
}

.punchline {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--r-xl);
  background: var(--secondary-900);
  color: #fff;
  font-size: 1.0625rem;
  text-align: center;
}

.punchline strong {
  color: var(--primary-200);
}

/* ------------------------------------------------------------------ tag/chip */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.6em;
  border-radius: var(--r-pill);
  font-size: var(--fs-kicker);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-riseup {
  background: var(--info-soft);
  color: var(--info-ink);
}

.tag-helios {
  background: var(--brand-softer);
  color: var(--primary-800);
}

.tag-role {
  background: var(--bg-muted);
  color: var(--ink-3);
}

.tag-ai {
  background: var(--hue-lilac);
  color: var(--hue-lilac-ink);
}

.tag-soon {
  background: var(--warning-soft);
  color: var(--warning-ink);
}

.tag-code {
  background: var(--bg-muted);
  color: var(--ink-2);
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 400;
}

.tag-ok {
  background: var(--success-soft);
  color: var(--success-ink);
}

/* ------------------------------------------- tableau des fonctionnalités */

.ft-toolbar {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line-1);
  border-radius: var(--r-xl);
  background: var(--bg-surface);
  margin-bottom: var(--space-4);
}

.ft-label {
  display: block;
  font-size: var(--fs-kicker);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: var(--space-2);
}

.ft-search input,
.ft-field select {
  width: 100%;
  font: inherit;
  font-size: var(--fs-small);
  color: var(--ink-1);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-surface);
}

.ft-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: var(--space-4);
}

.ft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.ft-count {
  font-size: var(--fs-small);
  color: var(--ink-3);
  margin-bottom: var(--space-3);
}

/* Le tableau est long : l'en-tête reste lisible pendant le défilement, et la
   hauteur est bornée pour que les filtres restent atteignables. */
.ft-table-wrap {
  max-height: 70vh;
  overflow: auto;
}

.ft-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-sunken);
}

.ft-table td {
  vertical-align: top;
  font-size: var(--fs-small);
}

/* Une largeur par colonne : sans ça la description mange tout et les libellés
   se replient sur trois lignes. */
.ft-table td:nth-child(4) {
  font-weight: 600;
  color: var(--ink-1);
  min-width: 190px;
}

.ft-table td:nth-child(5) {
  min-width: 320px;
  color: var(--ink-3);
}

.ft-table td:nth-child(2),
.ft-table td:nth-child(3),
.ft-table td:nth-child(6) {
  color: var(--ink-3);
  min-width: 155px;
}

.ft-table tr[data-status='Prévu'] td:nth-child(4) {
  color: var(--ink-3);
}

/* À l'impression : pas de barre d'outils, pas de hauteur bornée — on veut le
   tableau complet, tel qu'il est filtré à l'écran. */
@media print {
  .topbar,
  .foot,
  .ft-toolbar,
  .hero,
  .notice {
    display: none !important;
  }

  .ft-table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
  }

  .ft-table {
    font-size: 9pt;
  }
}

/* --------------------------------------------------------------------- cards */

/* 340px de piste minimale plafonne la grille à trois colonnes sur la largeur du
   portail. À 240px elle en tenait cinq, larges de 250px : le texte s'y repliait
   tous les quatre mots. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--space-4);
}

/* Quatre cartes : 2 × 2 plutôt que trois plus une orpheline. La mesure y est
   alors celle des cartes du partage Rise Up / Helios, juste au-dessus. */
.cards:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: var(--fs-h4);
}

.card p {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  color: var(--ink-3);
}

.card-meta {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

thead th {
  font-size: var(--fs-kicker);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  background: var(--bg-sunken);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ----------------------------------------------------------------- checklist */

.checklist {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
  display: grid;
  gap: var(--space-3);
}

.checklist li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-4);
  align-items: start;
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  margin-top: 0;
}

.checklist li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-softer);
  color: var(--primary-800);
  font-weight: 700;
  font-size: var(--fs-small);
}

.checklist h3 {
  font-size: var(--fs-h4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.checklist p {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  color: var(--ink-3);
}

/* -------------------------------------------------------------------- states */

/* ------------------------------------------------------------ vidéo à la une */

/* La présentation générale, en tête de la page d'accueil. Plus large que les
   captures du workflow, et centrée : c'est le premier contenu qu'on regarde. */
.feature-video {
  margin: 0;
  max-width: 1100px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line-1);
  background: var(--secondary-900);
  box-shadow: var(--shadow-md);
}

.feature-video video {
  width: 100%;
  display: block;
  aspect-ratio: 1500 / 950;
  background: var(--secondary-900);
}

.feature-video figcaption {
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-meta);
  color: var(--ink-3);
  background: var(--bg-surface);
  border-top: 1px solid var(--line-1);
}

/* Renvoi discret en fin de section, vers la page qui détaille le sujet. */
.section-note {
  margin-top: var(--space-6);
  font-size: var(--fs-small);
  color: var(--ink-3);
  max-width: var(--measure-text);
}

/* Le parcours d'une demande, dessiné comme un chemin : une pastille par étape,
   reliées par un trait continu. Vertical plutôt qu'horizontal — cinq colonnes
   auraient étranglé le texte, et la lecture de haut en bas reste la même sur
   mobile. */
.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.path-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  margin: 0;
}

.path-step:last-child {
  padding-bottom: 0;
}

/* Le trait de liaison : part du centre de la pastille et descend jusqu'à la
   suivante. Le dernier pas n'en porte pas — le chemin s'arrête là. */
.path-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 34px;
  bottom: -6px;
  width: 2px;
  background: var(--line-strong);
}

.path-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-softer);
  border: 2px solid var(--primary);
  color: var(--primary-800);
  font-size: var(--fs-small);
  font-weight: 700;
}

/* Les sorties (refus, archivage) ne sont pas sur le chemin : pastille creuse. */
.path-step[data-exit] .path-marker {
  background: var(--bg-surface);
  border-color: var(--line-strong);
  color: var(--ink-4);
}

.path-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.path-head h3 {
  font-size: var(--fs-h4);
}

.path-body p {
  margin-top: var(--space-2);
  color: var(--ink-3);
  font-size: var(--fs-small);
  max-width: var(--measure-text);
}

.path-code {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-kicker);
  color: var(--ink-4);
}

@media (max-width: 640px) {
  .path-step {
    grid-template-columns: 32px 1fr;
    gap: var(--space-3);
  }

  .path-marker {
    width: 32px;
    height: 32px;
    font-size: var(--fs-kicker);
  }

  .path-step:not(:last-child)::before {
    left: 15px;
    top: 26px;
  }
}

/* ------------------------------------------------------------------ workflow */

.wf-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: var(--space-6);
  align-items: start;
}

.wf-rail {
  position: sticky;
  top: 76px;
  display: grid;
  gap: var(--space-5);
  /* Douze étapes et quatre intertitres dépassent la hauteur d'un écran de
     portable : sans défilement propre, les dernières étaient inatteignables
     sans faire défiler toute la page. */
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  /* De quoi ne pas rogner l'anneau de focus contre le bord du conteneur. */
  padding-right: var(--space-2);
  scrollbar-width: thin;
}

.wf-phase-title {
  font-size: var(--fs-kicker);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: var(--space-2);
}

.wf-steps {
  display: grid;
  gap: var(--space-2);
}

.wf-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  text-align: left;
  padding: var(--space-3);
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
  background: var(--bg-surface);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.wf-step:hover {
  border-color: var(--line-strong);
  background: var(--bg-sunken);
}

.wf-step[aria-current='true'] {
  border-color: var(--primary);
  background: var(--brand-softer);
  box-shadow: var(--shadow-sm);
}

.wf-step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--ink-3);
  font-size: var(--fs-kicker);
  font-weight: 700;
}

.wf-step[aria-current='true'] .wf-step-num {
  background: var(--primary);
  color: #fff;
}

.wf-step-label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-1);
}

.wf-step-sub {
  display: block;
  font-size: var(--fs-kicker);
  font-weight: 400;
  color: var(--ink-4);
  margin-top: 2px;
}

/* Panneau de détail */
.wf-panel {
  /* Le panneau se cale sous la barre collante quand on y défile. En étroit la
     barre s'empile sur deux rangées, d'où la marge plus généreuse. */
  scroll-margin-top: 76px;
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  min-height: 60vh;
}

.wf-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}

.wf-panel h2 {
  font-size: var(--fs-h2);
  width: 100%;
}

.wf-panel .lede {
  margin-top: var(--space-3);
  font-size: 1.0625rem;
}

.wf-block {
  margin-top: var(--space-6);
}

.wf-block h3 {
  font-size: var(--fs-kicker);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: var(--space-3);
}

.wf-block p,
.wf-block li {
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.wf-where {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--r-lg);
  background: var(--bg-sunken);
  border: 1px solid var(--line-1);
}

.wf-where div {
  display: grid;
  grid-template-columns: minmax(90px, 120px) 1fr;
  gap: var(--space-3);
  font-size: var(--fs-small);
}

.wf-where dt,
.wf-where .k {
  color: var(--ink-4);
  font-size: var(--fs-meta);
}

/* Transition d'état */
.wf-transition {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--fs-small);
}

.wf-arrow {
  color: var(--ink-4);
}

/* Encart IA */
.wf-ai {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--r-lg);
  background: var(--hue-lilac);
  border: 1px solid color-mix(in oklch, var(--hue-lilac-ink) 20%, transparent);
}

.wf-ai h3 {
  color: var(--hue-lilac-ink);
  margin-bottom: var(--space-2);
}

.wf-ai p {
  color: var(--hue-lilac-ink);
}

/* Médias */
.wf-media {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.shot {
  margin: 0;
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-sunken);
}

.shot img,
.shot video {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.shot video {
  cursor: default;
}

.shot figcaption {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-meta);
  color: var(--ink-3);
  background: var(--bg-surface);
  border-top: 1px solid var(--line-1);
}

/* Emplacement média vide — visible tant que la capture n'est pas faite */
.shot-missing {
  display: grid;
  place-items: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg-sunken);
  color: var(--ink-4);
  font-size: var(--fs-meta);
}

.shot-missing code {
  background: var(--bg-surface);
}

/* Pagination du panneau */
.wf-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-1);
}

.wf-nav button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  font-size: var(--fs-meta);
  font-weight: 600;
  cursor: pointer;
}

.wf-nav button:hover:not(:disabled) {
  background: var(--bg-sunken);
}

.wf-nav button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 900px) {
  .wf-layout {
    grid-template-columns: 1fr;
  }

  .wf-rail {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .wf-panel {
    scroll-margin-top: 120px;
  }
}

/* ------------------------------------------------------------------ lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: var(--space-5);
  background: rgba(50, 50, 93, 0.72);
  backdrop-filter: blur(3px);
}

.lightbox[open],
.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(1500px, 96vw);
  max-height: 92vh;
  width: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface);
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------- « à venir » */

.notice {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5);
  border-radius: var(--r-xl);
  background: var(--warning-soft);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
}

.notice h2 {
  font-size: var(--fs-h4);
  color: var(--warning-ink);
}

.notice p {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  color: var(--warning-ink);
}

/* Cadre de maquette — doit se distinguer d'une capture au premier regard */
.mockup {
  margin: 0;
  border: 2px dashed color-mix(in srgb, var(--warning) 55%, var(--line-strong));
  border-radius: var(--r-lg);
  background:
    repeating-linear-gradient(135deg, var(--warning-soft) 0 12px, transparent 12px 24px),
    var(--bg-sunken);
  padding: var(--space-3);
  position: relative;
}

.mockup img {
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}

.mockup figcaption {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  font-size: var(--fs-meta);
  color: var(--warning-ink);
}

.guardrails {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: var(--space-3);
}

.guardrails li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-3);
  align-items: start;
  font-size: var(--fs-small);
  color: var(--ink-2);
  margin-top: 0;
}

.guardrails li::before {
  content: '—';
  color: var(--danger);
  font-weight: 700;
}

/* -------------------------------------------------------------------- footer */

.foot {
  padding-block: var(--space-6);
  border-top: 1px solid var(--line-1);
  background: var(--bg-surface);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-meta);
  color: var(--ink-4);
}

/* -------------------------------------------------------------------- loop */

/* Deux rangées de trois plutôt qu'une frise de six colonnes à 205px, où même
   les titres d'étape se repliaient. L'ordre de lecture reste celui du cycle. */
.loop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--space-4);
  counter-reset: loop;
}

.loop-item {
  counter-increment: loop;
  position: relative;
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.loop-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary-300);
  color: inherit;
}

.loop-item::before {
  content: counter(loop);
  position: absolute;
  top: calc(var(--space-4) * -1);
  left: var(--space-4);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-meta);
  box-shadow: var(--shadow-sm);
}

.loop-item h3 {
  font-size: var(--fs-h4);
  margin-top: var(--space-2);
}

.loop-item p {
  margin-top: var(--space-2);
  font-size: var(--fs-meta);
  color: var(--ink-3);
}

/* Impression : on garde les captures lisibles */
@media print {
  .topbar,
  .wf-nav,
  .lightbox {
    display: none;
  }

  .wf-layout {
    grid-template-columns: 1fr;
  }
}
