/*
 * GOODEV — composants partagés par toutes les pages.
 * Un composant = un bloc de classes ; aucune règle propre à une seule page.
 * Les couleurs viennent des jetons : posé dans un contexte .on-band, un
 * composant passe en version nuit sans variante.
 */

/* ---------- Icônes (masques : elles prennent la couleur du texte) ---------- */

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* Sans prise en charge des masques, mieux vaut pas d'icône qu'un carré plein. */
@supports not ((mask: url("")) or (-webkit-mask: url(""))) {
  .icon {
    display: none;
  }
}

.icon--arrow {
  --icon: url("../img/arrow.svg");
}

.icon--theme {
  --icon: url("../img/theme.svg");
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding: var(--space-2) var(--space-6);
  border: var(--rule-w) solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn:hover {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent-fill);
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  transition: transform var(--dur) var(--ease);
}

.btn:hover .icon {
  transform: translateX(3px);
}

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

.btn--primary:hover {
  border-color: var(--btn-bg-hover);
  background: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
}

.btn--sm {
  min-height: 2.25rem;
  padding-inline: var(--space-4);
  font-size: var(--text-sm);
}

/* Lien d'action : texte + flèche qui avance au survol */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 3rem;
  font-weight: 500;
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform var(--dur) var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

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

/* ---------- Texte ---------- */

.eyebrow {
  margin: 0 0 var(--space-6);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.lead {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: var(--text-md);
}

.prose {
  max-width: var(--measure);
}

.prose > :last-child {
  margin-bottom: 0;
}

/* ---------- Chiffres : la bande de preuves sous la couverture ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: var(--rule-w) solid var(--rule);
}

.stats__item {
  padding: var(--space-6) var(--space-4) var(--space-6) 0;
  border-bottom: var(--rule-w) solid var(--rule);
}

.stats__value {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1;
}

.stats__value small {
  color: var(--accent);
  font-size: 0.5em;
}

.stats__label {
  max-width: 22ch;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

@media (min-width: 62rem) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats__item {
    padding: var(--space-8) var(--space-6);
    border-bottom: 0;
    border-left: var(--rule-w) solid var(--rule);
  }

  .stats__item:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- Schémas : le dessin au trait, langage visuel du site ---------- */

.schema {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}

.schema__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schema__line--soft {
  opacity: 0.45;
}

.schema__line--accent {
  stroke: var(--accent);
  stroke-width: 1.6;
}

.schema__line--dash {
  stroke-dasharray: 3 4;
}

.schema__fill,
.schema__dot {
  fill: var(--accent);
  stroke: none;
}

.schema__label {
  fill: var(--ink-faint);
  stroke: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.schema__label--strong {
  fill: var(--ink);
  font-size: 13px;
}

/* Cadre d'un schéma : fond quadrillé, légende de figure dans le coin. */
.figure {
  position: relative;
  margin: 0;
  padding: var(--space-4);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
}

.figure__caption {
  margin: var(--space-3) 0 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ---------- Bento : les services en tuiles dimensionnées selon leur poids ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  grid-column: 1 / -1;
  margin: 0;
  padding: var(--space-4);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur-long) var(--ease-out);
}

.tile__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.tile__label .icon {
  color: var(--ink-faint);
  font-size: var(--text-md);
  transform: rotate(-45deg);
  transition: transform var(--dur-long) var(--ease-out), color var(--dur) var(--ease);
}

.tile__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Le lien du titre couvre toute la tuile : une seule cible, large. */
.tile__title a {
  text-decoration: none;
}

.tile__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.tile__title a:hover {
  color: inherit;
}

.tile__text {
  max-width: 44ch;
  margin: 0;
  color: var(--ink-soft);
}

/* Le cadre du schéma occupe la hauteur restante : deux tuiles voisines s'alignent. */
.tile .figure {
  display: grid;
  flex: 1;
  align-items: center;
}

.tile:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.tile__title a:focus-visible {
  outline: 0;
}

@media (hover: hover) {
  .tile:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
  }

  .tile:hover .schema {
    color: var(--ink);
  }

  .tile:hover .tile__label .icon {
    color: var(--accent);
    transform: rotate(0deg);
  }
}

/* Petite tuile : un titre et une flèche, pour les services secondaires. */
.tile--mini {
  grid-column: span 1;
  justify-content: space-between;
  min-height: 7rem;
}

.tile--mini .tile__title {
  font-size: var(--text-lg);
}

@media (min-width: 48rem) {
  .bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .tile {
    grid-column: span 6;
    padding: var(--space-6);
  }

  .tile--mini {
    grid-column: span 3;
  }

  .figure {
    padding: var(--space-6);
  }
}

@media (min-width: 72rem) {
  .tile--wide {
    grid-column: span 7;
  }

  .tile--narrow {
    grid-column: span 5;
  }

  .tile--third {
    grid-column: span 4;
  }
}

/* ---------- Étapes : la méthode sur une ligne, un nœud par étape ---------- */

.steps {
  display: grid;
  gap: var(--space-8);
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps__item {
  position: relative;
  margin: 0;
  padding-left: var(--space-8);
  counter-increment: step;
}

/* Le nœud, et le trait qui le relie au suivant. */
.steps__item::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: 0;
  width: 0.75rem;
  height: 0.75rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
}

.steps__item::after {
  content: "";
  position: absolute;
  top: 1.4rem;
  bottom: calc(-1 * var(--space-8));
  left: calc(0.375rem - 0.5px);
  width: var(--rule-w);
  background: var(--rule);
}

.steps__item:last-child::after {
  display: none;
}

.steps__num {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
}

.steps__num::before {
  content: counter(step, decimal-leading-zero);
}

.steps__title {
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.1;
}

.steps__text {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

@media (min-width: 62rem) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .steps__item {
    padding: var(--space-8) 0 0;
  }

  .steps__item::before {
    top: 0;
  }

  .steps__item::after {
    top: calc(0.375rem - 0.5px);
    right: calc(-1 * var(--space-6));
    bottom: auto;
    left: 0.75rem;
    width: auto;
    height: var(--rule-w);
  }
}

/* ---------- Réalisations : une planche par projet, schéma et texte en vis-à-vis ---------- */

.cases {
  display: grid;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.case {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  margin: 0;
}

.case__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.08;
}

.case__text {
  max-width: 48ch;
  color: var(--ink-soft);
}

@media (min-width: 62rem) {
  .cases {
    gap: var(--space-12);
  }

  .case {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: var(--space-16);
  }

  /* Une planche sur deux inverse le sens de lecture. */
  .case:nth-child(even) .figure {
    order: 2;
  }
}

/* Étiquettes techniques : du texte, pas des pastilles */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.tags li {
  margin: 0;
}

/* ---------- À propos : une phrase en grand, le texte en vis-à-vis ---------- */

.split {
  display: grid;
  gap: var(--space-8);
}

.split__title {
  max-width: 14ch;
  margin: var(--space-4) 0 0;
}

.split__body > * {
  max-width: 52ch;
}

.split__body p {
  color: var(--ink-soft);
  font-size: var(--text-md);
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-16);
  }
}

/* ---------- Avis ---------- */

.score {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-poster);
  line-height: 1;
}

.score small {
  color: var(--accent);
  font-size: 0.45em;
}

.quotes {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.t-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--space-6);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.t-stars {
  margin: 0 0 var(--space-3);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
}

.t-text {
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.3;
  quotes: "«\00a0" "\00a0»";
}

.t-text::before {
  content: open-quote;
}

.t-text::after {
  content: close-quote;
}

.t-author {
  margin: auto 0 0;
  color: var(--ink-faint);
  font-size: var(--text-sm);
}

/* Sur téléphone, trois avis suffisent : la page reste courte. */
.quotes .t-card:nth-child(n + 4) {
  display: none;
}

@media (min-width: 48rem) {
  .quotes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quotes .t-card:nth-child(n + 4) {
    display: flex;
  }
}

@media (min-width: 72rem) {
  .quotes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Tuile sans lien (liste de prestations, d'exemples) ---------- */

@media (hover: hover) {
  .tile--static:hover {
    border-color: var(--rule);
    transform: none;
  }
}

/* ---------- Fil d'Ariane ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.breadcrumb li {
  margin: 0;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--accent);
}

.breadcrumb a {
  text-decoration: none;
}

/* ---------- Liste de constats : un trait d'accent devant chaque ligne ---------- */

.checks {
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  margin: 0;
  padding-left: var(--space-8);
}

.checks li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: var(--space-4);
  height: 1.5px;
  background: var(--accent);
}

/* ---------- Encadré ---------- */

.callout {
  max-width: var(--measure);
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-left: 2px solid var(--accent);
  background: var(--paper-sunk);
}

.callout > :last-child {
  margin-bottom: 0;
}

/* ---------- Tableau large : il défile dans son cadre, pas la page ---------- */

.table-wrap {
  margin: 0 0 var(--space-6);
  overflow-x: auto;
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.table-wrap table {
  min-width: 34rem;
  margin: 0;
}

.table-wrap th,
.table-wrap td {
  padding: var(--space-3) var(--space-4);
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

/* ---------- Questions fréquentes : accordéon natif ---------- */

.faq {
  max-width: 52rem;
  margin: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
}

.faq__item {
  border-bottom: var(--rule-w) solid var(--rule);
}

.faq__question {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.2;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

/* Le signe plus, tracé en CSS, devient un moins quand la réponse est ouverte. */
.faq__question::after {
  content: "";
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat;
  transition: transform var(--dur) var(--ease);
}

.faq__item[open] .faq__question::after {
  background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat;
  transform: rotate(180deg);
}

.faq__answer {
  max-width: var(--measure);
  padding-bottom: var(--space-6);
  color: var(--ink-soft);
}

.faq__answer > :last-child {
  margin-bottom: 0;
}

/* ---------- Formulaires ---------- */

.form {
  display: grid;
  gap: var(--space-4);
  max-width: 40rem;
}

.form__row {
  display: grid;
  gap: var(--space-4);
}

.field__hint {
  margin: var(--space-1) 0 0;
  color: var(--ink-faint);
  font-size: var(--text-sm);
}

.field__error {
  margin: var(--space-1) 0 0;
  color: var(--danger);
  font-size: var(--text-sm);
}

/* Champ piège pour les robots : hors écran, hors tabulation. */
.trap {
  position: absolute;
  left: -9999px;
}

.notice {
  max-width: 40rem;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid currentColor;
}

.notice--ok {
  background: var(--ok-wash);
  color: var(--ok);
}

.notice--err {
  background: var(--danger-wash);
  color: var(--danger);
}

.notice--warn {
  background: var(--warn-wash);
  color: var(--warn);
}

@media (min-width: 40rem) {
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Texte long (articles, pages légales) ---------- */

.prose h2 {
  margin-top: var(--space-12);
  font-size: var(--text-xl);
}

.prose h3 {
  margin-top: var(--space-8);
}

.prose a {
  color: var(--accent);
}

.prose img {
  margin-block: var(--space-6);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
}

/* ---------- Liste d'articles ---------- */

.posts {
  margin: 0;
  padding: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
  list-style: none;
}

.posts__item {
  position: relative;
  display: grid;
  gap: var(--space-2) var(--space-8);
  margin: 0;
  padding-block: var(--space-6);
  border-bottom: var(--rule-w) solid var(--rule);
}

.posts__meta {
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.posts__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.15;
}

.posts__title a {
  text-decoration: none;
}

.posts__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.posts__text {
  max-width: var(--measure);
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 48rem) {
  .posts__item {
    grid-template-columns: 10rem minmax(0, 1fr);
  }
}

/* ---------- Newsletter ---------- */

.newsletter {
  min-width: 0;
  max-width: 30rem;
}

.newsletter__text {
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

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

.newsletter__form input[type="email"] {
  flex: 1 1 12rem;
  width: auto;
  min-height: 3rem;
}

/* Champ piège pour les robots : hors écran, hors tabulation. */
.newsletter__trap {
  position: absolute;
  left: -9999px;
}

.newsletter__legal {
  margin: var(--space-3) 0 0;
  color: var(--ink-faint);
  font-size: var(--text-xs);
}

.nl-msg {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid currentColor;
  font-size: var(--text-sm);
}

.nl-msg--ok {
  color: var(--accent);
}

.nl-msg--err {
  background: var(--danger-wash);
  color: var(--danger);
}

/* ---------- Outils de l'en-tête ---------- */

.lang-switch {
  display: flex;
  gap: var(--space-1);
}

.lang-switch__btn {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0 var(--space-2);
  border-color: transparent;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.lang-switch__btn:hover,
.lang-switch__btn[aria-pressed="true"] {
  border-color: var(--rule);
  color: var(--ink);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-color: transparent;
  color: var(--ink-soft);
}

.theme-toggle:hover {
  border-color: var(--rule);
  color: var(--ink);
}

.theme-toggle .icon {
  transition: transform var(--dur-long) var(--ease-out);
}

/* Au doigt, les outils de l'en-tête offrent une cible de 44 px. */
@media (pointer: coarse) {
  .btn--sm {
    min-height: 2.75rem;
  }

  .theme-toggle,
  .lang-switch__btn {
    min-width: 2.75rem;
    width: auto;
    height: auto;
    min-height: 2.75rem;
  }
}

.theme-toggle[aria-pressed="true"] .icon {
  transform: rotate(180deg);
}

/* ---------- Contact, FAQ, méthode ---------- */

/* Sommaire d'une page longue : une ligne par rubrique, numérotée, cible large au doigt. */
.toc {
  margin: 0;
  padding: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
  list-style: none;
  counter-reset: toc;
}

.toc li {
  margin: 0;
  border-bottom: var(--rule-w) solid var(--rule);
  counter-increment: toc;
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  min-height: 3rem;
  padding-block: var(--space-3);
  text-decoration: none;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
}

.toc__count {
  margin-left: auto;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Rubrique d'une FAQ : son titre en marge, ses questions en vis-à-vis. */
.faq-group {
  display: grid;
  gap: var(--space-6);
}

.faq-group + .faq-group {
  margin-top: var(--space-12);
}

.faq-group__title {
  max-width: 14ch;
  margin: var(--space-3) 0 0;
}

@media (min-width: 62rem) {
  .faq-group {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-16);
  }

  .faq-group + .faq-group {
    margin-top: var(--space-16);
  }
}

/* Question survolée : elle prend la couleur d'accent, comme un lien. */
@media (hover: hover) {
  .faq__question:hover {
    color: var(--accent);
  }
}

/* Cible d'une ancre (rubrique, étape) : elle s'arrête sous l'en-tête collant, pas derrière. */
.faq-group,
.case[id] {
  scroll-margin-top: var(--header-h);
}

/* Planches d'étapes : le texte vient d'abord dans la page (numéro, titre, puis schéma sur téléphone) ;
   sur grand écran, une planche sur deux remet son schéma à gauche, comme les réalisations. */
@media (min-width: 62rem) {
  .cases--steps .case:nth-child(odd) .figure {
    order: -1;
  }
}

/* Question anti-robot : le calcul et sa réponse sur une même ligne. */
.captcha {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.captcha__sum {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  white-space: nowrap;
}

.captcha input {
  width: 5.5rem;
  text-align: center;
}

/* Champ refusé : le filet rouge l'emporte sur le filet par défaut des champs (base.css). */
.form [aria-invalid="true"] {
  border-color: var(--danger);
}

/* Au doigt, le lien d'une note de formulaire (mentions légales) offre une cible de 44 px. */
@media (pointer: coarse) {
  .field__hint a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

/* Vis-à-vis dont la colonne de droite est haute (un formulaire) : un troisième bloc se loge
   à gauche, sous le titre, au lieu de laisser la marge vide. Sur téléphone il vient après le formulaire. */
.split__title + .lead {
  margin-top: var(--space-6);
}

@media (min-width: 62rem) {
  .split--aside {
    grid-template-rows: auto 1fr;
    row-gap: var(--space-8);
  }

  .split--aside .split__main {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .split--aside .split__aside {
    align-self: start;
  }
}

/* ==========================================================================
   Pages de service
   ========================================================================== */

/* ---------- Vis-à-vis hors liste : un schéma et le texte qui l'explique ---------- */

/* Même proportion que les planches de réalisations (.case), pour un bloc seul. */
.duo {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.duo__body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 62rem) {
  .duo {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: var(--space-16);
  }
}

/* ---------- Appel intermédiaire : une ligne entre deux filets ---------- */

/* La question à gauche, le bouton à droite ; l'un sous l'autre sur téléphone. */
.cta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  margin-top: var(--space-8);
  padding-block: var(--space-6);
  border-top: var(--rule-w) solid var(--rule);
  border-bottom: var(--rule-w) solid var(--rule);
}

.cta-line__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.15;
}

.cta-line__text {
  margin: var(--space-1) 0 0;
  color: var(--ink-soft);
}

@media (min-width: 62rem) {
  .cta-line {
    margin-top: var(--space-12);
  }
}

/* ---------- Tableau comparatif : le critère en tête de ligne ---------- */

/* <th scope="row"> : même graisse que <strong>, et pas de filet sous la dernière ligne. */
.table-wrap tbody th {
  font-weight: 600;
}

.table-wrap tbody tr:last-child th {
  border-bottom: 0;
}

/* ---------- Étapes par trois (pages API et BI) ---------- */

/* Six étapes se lisent mieux sur deux rangées de trois que tassées sur une ligne ;
   trois étapes occupent toute la largeur au lieu de laisser deux colonnes vides. */
@media (min-width: 62rem) {
  .steps--trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-12) var(--space-6);
  }

  /* Le trait s'arrête au bout de la rangée. */
  .steps--trio .steps__item:nth-child(3n)::after {
    display: none;
  }
}

/* ---------- Boîte à outils : une famille de technologies par ligne (pages API et BI) ---------- */

/* Le nom de la famille en repère, ses outils en vis-à-vis ; l'un sous l'autre sur téléphone. */
.toolkit {
  margin: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
}

.toolkit__row {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-3);
  border-bottom: var(--rule-w) solid var(--rule);
}

/* Dans un vis-à-vis, la liste prend toute la colonne, comme l'accordéon des questions. */
.split__body .toolkit {
  max-width: none;
}

.toolkit__name {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Les outils sont le contenu de la ligne : un ton plus soutenu et un corps au-dessus du repère. */
.toolkit .tags {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

@media (min-width: 36rem) {
  .toolkit__row {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: var(--space-4);
    align-items: baseline;
    padding-block: var(--space-4);
  }
}

/* ---------- Liste de constats dans une tuile : la tuile gère déjà sa marge basse ---------- */

.tile .checks {
  margin-bottom: 0;
}

/* ---------- Tuile de tarif (pages transcription, monitoring) ---------- */

/* Le prix en grand dans la voix des titres, son unité en petit et en accent, comme les chiffres de l'accueil. */
.tile__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1;
}

.tile__price small {
  color: var(--accent);
  font-size: 0.45em;
}

/* ---------- Lien d'action sous le chapeau d'une couverture intérieure (page standard téléphonique) ---------- */

/* Le chapeau d'une couverture de page n'a pas de marge basse : le lien reprend l'écart du chapeau de l'accueil. */
.cover--page .lead + .actions {
  margin-top: var(--space-6);
}

/* ---------- Tableau à deux colonnes (page transcription) ---------- */

/* Un face-à-face de deux listes tient dans un téléphone : pas de largeur minimale, deux colonnes égales.
   Sans cela, la seconde colonne (celle qu'on veut montrer) sortait de l'écran. */
.table-wrap--pair table {
  min-width: 0;
  table-layout: fixed;
}

/* ---------- Bloc de code en vis-à-vis d'un texte (page transcription) ---------- */

/* Quand une ligne dépasse, la barre de défilement prend les teintes du bloc :
   sans cela, Firefox pose une barre claire au bas d'un bloc sur fond nuit. */
.duo pre {
  margin: 0;
  scrollbar-color: var(--ink-faint) var(--paper-sunk);
}

/* ==========================================================================
   Blog, erreurs, rendez-vous
   ========================================================================== */

/* ---------- Blog : filtres de catégories ---------- */

/* Une ligne de liens en chasse fixe au-dessus de la liste ; la rubrique courante passe en accent.
   Au téléphone, neuf rubriques empilées repousseraient le premier article d'un écran entier :
   elles tiennent sur une seule ligne, qui défile dans son cadre d'un bord de l'écran à l'autre. */
.filters {
  margin-bottom: var(--space-4);
}

.filters__list {
  display: flex;
  gap: 0 var(--space-6);
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  overflow-x: auto;
  list-style: none;
}

.filters__list li {
  flex: none;
  margin: 0;
}

.filters a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-decoration-line: none;
  text-transform: uppercase;
  white-space: nowrap;
}

/* À partir de la tablette : les rubriques passent à la ligne, le flux RSS se cale à droite. */
@media (min-width: 48rem) {
  .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 var(--space-12);
    align-items: start;
  }

  .filters__list {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow-x: visible;
  }
}

/* Fil d'Ariane au doigt : le lien fait 44 px de haut, le reste de la ligne s'aligne sur lui. */
@media (pointer: coarse) {
  .breadcrumb {
    align-items: center;
  }
}

.filters a:hover,
.filters a[aria-current="page"] {
  color: var(--accent);
}

/* Le soulignement porte sur le nom de la rubrique, pas sur son compteur. */
.filters a[aria-current="page"] .filters__label {
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.5em;
}

.filters__count {
  color: var(--ink-faint);
}

/* Sur la ligne qui défile au téléphone, la rubrique affichée vient en tête : on la voit sans défiler. */
.filters__item--current {
  order: -1;
}

@media (min-width: 48rem) {
  .filters__item--current {
    order: 0;
  }
}

/* ---------- Blog : liste et pagination ---------- */

/* Date, rubrique et durée : sur une ligne au téléphone, empilées dans la marge au-delà. */
.posts__meta--stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
}

@media (min-width: 48rem) {
  .posts__meta--stack {
    flex-direction: column;
    gap: var(--space-1);
    padding-top: var(--space-2);
  }
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-6);
}

.pager__info {
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ---------- Cartouche : la fiche d'un plan (date, durée, rubrique) ---------- */

.sheet {
  margin: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
}

.sheet__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-3);
  border-bottom: var(--rule-w) solid var(--rule);
}

.sheet__label {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.sheet__value {
  font-size: var(--text-sm);
}

/* ---------- Blog : article ---------- */

/* Les titres d'articles sont longs : la couverture les compose un cran plus petit. */
.cover--article .cover__title {
  max-width: 26ch;
  font-size: var(--text-2xl);
  line-height: 1.08;
}

/* Le sommaire dans la marge, le texte dans la colonne de lecture. */
.article {
  display: grid;
  gap: var(--space-8);
}

.article__main {
  min-width: 0;
}

@media (min-width: 62rem) {
  .article {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-16);
    align-items: start;
  }

  .article__main {
    grid-column: 2;
  }
}

/* Sommaire construit par blog.js : replié au téléphone, déplié dans la marge. Il ne suit pas le défilement. */
.article__toc {
  border-top: var(--rule-w) solid var(--rule-strong);
  border-bottom: var(--rule-w) solid var(--rule);
}

.article__toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  list-style: none;
  text-transform: uppercase;
}

.article__toc-title::-webkit-details-marker {
  display: none;
}

.article__toc-title::after {
  content: "";
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat;
}

.article__toc[open] .article__toc-title::after {
  background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat;
}

.article__toc-list {
  margin: 0;
  padding: 0 0 var(--space-3);
  list-style: none;
  counter-reset: article-toc;
}

.article__toc-list li {
  margin: 0;
  counter-increment: article-toc;
}

.article__toc-list a {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: var(--space-2);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.35;
  text-decoration-line: none;
}

.article__toc-list a:hover {
  color: var(--accent);
}

.article__toc-list a::before {
  content: counter(article-toc, decimal-leading-zero);
  flex: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
}

/* Corps de l'article (HTML venu de la base) : une colonne de lecture de 60 à 70 signes ;
   les tableaux et le code peuvent prendre toute la largeur de la colonne. */
.prose--article {
  max-width: none;
}

.prose--article > * {
  max-width: 38rem;
}

.prose--article > table,
.prose--article > pre {
  max-width: 100%;
}

.prose--article > p,
.prose--article > ul,
.prose--article > ol {
  margin-bottom: var(--space-6);
}

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

/* Chaque grande partie s'ouvre sous un filet, comme une planche. */
.prose--article > h2 {
  padding-top: var(--space-6);
  border-top: var(--rule-w) solid var(--rule);
  font-size: calc(var(--text-xl) * 1.2);
  line-height: 1.12;
}

.prose--article > h3 {
  margin-top: var(--space-8);
}

/* Un article qui s'ouvre sur un titre : il s'aligne sur le haut du sommaire, sans filet ni marge. */
.prose--article > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Titre visé par le sommaire : il s'arrête sous l'en-tête, pas derrière. */
.prose [id] {
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

/* Tableau du contenu, sans enveloppe possible : il défile dans son propre cadre. */
.prose > table {
  display: block;
  width: auto;
  width: max-content;
  max-width: 100%;
  margin-block: var(--space-6);
  overflow-x: auto;
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose > table th,
.prose > table td {
  min-width: 6rem;
  padding: var(--space-3) var(--space-4);
}

.prose > table tbody tr:last-child td {
  border-bottom: 0;
}

.prose > pre {
  margin-block: var(--space-6);
}

/* Barre de défilement des cadres : fine et dans les teintes du thème, pas la bande claire du système. */
.prose > pre,
.prose > table,
.filters__list {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint) transparent;
}

/* Citation : la voix du client, en sérif ; la signature revient au texte courant. */
.prose blockquote {
  margin-block: var(--space-8);
  padding: var(--space-1) 0 var(--space-1) var(--space-6);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.35;
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose blockquote strong,
.prose blockquote cite {
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 500;
}

@media (min-width: 48rem) {
  .prose--article {
    font-size: var(--text-md);
    line-height: 1.65;
  }
}

/* Fin d'article : mots-clés et partage, en chasse fixe. */
.article__foot {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.share li {
  margin: 0;
}

.share a,
.tags--links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink-soft);
  text-decoration-line: none;
}

.share a:hover,
.tags--links a:hover {
  color: var(--accent);
}

.tags--links {
  gap: 0 var(--space-6);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

@media (pointer: coarse) {
  .article__toc-list a,
  .sheet__value a {
    min-height: 2.75rem;
  }

  .article__toc-list a {
    align-items: center;
  }

  .sheet__value a {
    display: inline-flex;
    align-items: center;
  }

  /* Un mot-clé de quatre lettres reste une cible de 44 px de large. */
  .share a,
  .tags--links a {
    min-width: 2.75rem;
  }

  /* Lien au fil du texte d'un article : la zone d'appui gagne 12 px au-dessus et au-dessous.
     Le remplissage vertical d'un élément en ligne ne déplace aucune ligne. */
  .prose--article > p a,
  .prose--article > ul a,
  .prose--article > ol a {
    padding-block: var(--space-3);
  }
}

/* ---------- Pages d'erreur : autonomes, toujours nuit, sans script ---------- */

/* <body class="error-page plan on-band"> : la barre de marque en haut, le message centré dans la hauteur. */
.error-page__inner {
  display: grid;
  gap: var(--space-8);
  align-content: center;
  padding-block: var(--space-12);
}

.error-page__code {
  margin: 0 0 var(--space-4);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.error-page__title {
  max-width: 16ch;
  margin-bottom: var(--space-6);
  font-size: var(--text-poster);
  line-height: 1.02;
}

.error-page .lead {
  margin-bottom: var(--space-8);
}

@media (min-width: 62rem) {
  .error-page__inner--figure {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-16);
    align-items: center;
  }
}

/* ---------- Rendez-vous : l'adresse, puis un horaire par jour ---------- */

.booking {
  display: grid;
  gap: var(--space-8);
}

.booking__who .eyebrow,
.booking__when .eyebrow {
  margin-bottom: var(--space-3);
}

.booking__note {
  margin: var(--space-4) 0 0;
  color: var(--ink-faint);
  font-size: var(--text-sm);
}

@media (min-width: 62rem) {
  .booking {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-16);
    align-items: start;
  }
}

.days {
  margin: 0;
  padding: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
  list-style: none;
}

.day {
  display: grid;
  gap: var(--space-3) var(--space-6);
  margin: 0;
  padding-block: var(--space-4);
  border-bottom: var(--rule-w) solid var(--rule);
}

.day__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.day__date {
  display: block;
  margin-top: var(--space-1);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

@media (min-width: 40rem) {
  .day {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    align-items: start;
  }
}

/* Un horaire = une case de 48 px de haut : large au doigt, alignée sur une grille régulière. */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.slots li {
  margin: 0;
}

/* Lien signé d'un prospect : la vue ne donne que « jour et heure » en un seul libellé, plus long. */
.slots--wide {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: var(--rule-w) solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-decoration-line: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

a.slot:hover {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent-fill);
}

a.slot:active {
  transform: translateY(1px);
}

/* Horaire déjà pris : barré, sans lien. */
.slot--taken {
  border-style: dashed;
  border-color: var(--rule);
  background: transparent;
  color: var(--ink-faint);
  text-decoration-line: line-through;
}

/* ==========================================================================
   AS/400, piano, à propos, légal
   ========================================================================== */

/* ---------- Étapes détaillées : six étapes, la liste des tâches sous chacune ---------- */

/* Deux rangées de trois sur grand écran : cinq colonnes seraient trop étroites pour les listes. */
@media (min-width: 62rem) {
  .steps--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--space-12);
  }

  /* Le trait de liaison s'arrête au bout de chaque rangée. */
  .steps--three .steps__item:nth-child(3n)::after {
    display: none;
  }
}

.steps__list {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.steps__list li {
  position: relative;
  margin: 0;
  padding-left: var(--space-4);
}

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

.steps__list li::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 0;
  width: var(--space-2);
  height: var(--rule-w);
  background: var(--ink-faint);
}

/* ---------- Fiche technique : une ligne par rubrique, l'intitulé puis le détail ---------- */

.specs {
  margin: 0;
  border-top: var(--rule-w) solid var(--rule-strong);
}

.specs__row {
  display: grid;
  gap: var(--space-3) var(--space-12);
  padding-block: var(--space-4);
  border-bottom: var(--rule-w) solid var(--rule);
}

.specs__label {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.specs__value > :last-child {
  margin-bottom: 0;
}

.specs .tags {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

/* Variante large : l'intitulé passe en marge, comme la première colonne d'un tableau. */
@media (min-width: 48rem) {
  .specs--side .specs__row {
    grid-template-columns: 14rem minmax(0, 1fr);
    padding-block: var(--space-8);
  }
}

/* ---------- Chapitres d'un texte long : le titre en marge, le texte en vis-à-vis ---------- */

.chapter {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-12);
  border-top: var(--rule-w) solid var(--rule);
  scroll-margin-top: var(--header-h);
}

.chapter:first-child {
  padding-top: 0;
  border-top: 0;
}

.chapter:last-child {
  padding-bottom: 0;
}

.chapter__title {
  max-width: 16ch;
  margin: var(--space-4) 0 0;
}

.chapter .prose > :first-child {
  margin-top: 0;
}

/* Une ancre posée dans le texte s'arrête sous l'en-tête, pas derrière. */
.prose [id] {
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.prose .callout {
  margin-block: var(--space-4);
}

@media (min-width: 62rem) {
  .chapter {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-16);
    padding-block: var(--space-16);
  }
}

/* Sortie d'une page de texte : les liens de fin, sous un filet. */
.page-end {
  margin: var(--space-12) 0 0;
  padding-top: var(--space-6);
  border-top: var(--rule-w) solid var(--rule);
}

/* ---------- Piano : lecteur, liste des morceaux, votes, partage (construits par piano.js) ---------- */

.piano-audio-player {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border: var(--rule-w) solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.piano-audio-player audio {
  display: block;
  width: 100%;
}

/* État de la liste : chargement, liste vide, service injoignable. */
.loading-msg,
.error-msg {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  max-width: var(--measure);
  margin: 0;
  padding: var(--space-6);
  border: var(--rule-w) solid var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
}

.loading-msg p,
.error-msg p {
  margin: 0;
}

.error-msg {
  border-left-color: var(--warn);
}

.perf-state__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.2;
}

.perf-retry {
  margin-top: var(--space-3);
}

/* Sans script, la liste ne peut pas se charger : le message d'attente laisse la place à l'explication. */
.no-js .loading-msg {
  display: none;
}

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

.perf-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

/* Morceau ouvert depuis un lien partagé. */
.perf-card--shared {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Lecture et pause tracées en CSS : pas de glyphe, le rendu ne dépend d'aucune police. */
.perf-play {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.perf-play::before {
  content: "";
  margin-left: 0.2rem;
  border-style: solid;
  border-width: 0.4rem 0 0.4rem 0.65rem;
  border-color: transparent transparent transparent currentColor;
}

.perf-play.playing::before {
  width: 0.7rem;
  height: 0.8rem;
  margin-left: 0;
  border-width: 0 0.22rem;
  border-color: currentColor;
}

.perf-play:hover,
.perf-play.playing {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent-fill);
}

.perf-info {
  flex: 1 1 12rem;
  min-width: 0;
}

.perf-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.2;
  overflow-wrap: break-word;
}

.perf-meta {
  margin: var(--space-1) 0 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.perf-stars-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-2);
}

.perf-stars-label,
.perf-vote-count,
.perf-page-info {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Largeur fixe : « 1 vote » et « 12 votes » gardent la note et le partage alignés d'une ligne à l'autre. */
.perf-vote-count {
  min-width: 4.5rem;
}

.perf-stars {
  display: inline-flex;
}

/* Une note = cinq nœuds, comme ceux de la méthode : vide, puis plein. */
.star {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.star::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border: 1.5px solid var(--ink-faint);
  border-radius: 50%;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.star.filled::before {
  border-color: var(--accent);
  background: var(--accent);
}

/* Une fois le vote enregistré, les nœuds ne se cliquent plus mais la note reste lisible. */
.star:disabled {
  cursor: default;
  opacity: 1;
}

@media (hover: hover) {
  .star:not(:disabled):hover::before {
    border-color: var(--accent);
  }
}

@media (pointer: coarse) {
  .star {
    width: 2.75rem;
  }

  .perf-share-btn,
  .perf-page-btn,
  .perf-retry {
    min-height: 2.75rem;
  }

  /* Lien dans le fil d'un texte long : la zone tactile grandit, la ligne ne bouge pas. */
  .chapter .prose a {
    padding-block: 0.75rem;
  }
}

.perf-rating {
  padding: var(--space-1) var(--space-2);
  border: var(--rule-w) solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.perf-share-wrap {
  position: relative;
  margin-left: auto;
}

/* Menu de partage : un panneau plein, posé sous le bouton, au-dessus des morceaux suivants. */
.share-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 2;
  display: none;
  min-width: 12rem;
  padding: var(--space-2);
  border: var(--rule-w) solid var(--rule-strong);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.share-menu.open {
  display: block;
}

.share-menu a,
.share-copy-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: 0;
  font-size: var(--text-sm);
  text-align: left;
  text-decoration: none;
}

.share-menu a:hover,
.share-copy-btn:hover {
  background: var(--accent-fill);
  color: var(--on-accent-fill);
}

.share-copied {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  color: var(--accent);
  font-size: var(--text-xs);
}

.perf-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--rule-w) solid var(--rule);
}

/* Au changement de page, la liste revient en haut de l'écran, sous l'en-tête. */
.perf-zone {
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

/* ---------- Avis en nombre quelconque (page « À propos ») ---------- */

/* Un avis resté seul sur la dernière rangée prend toute la largeur au lieu de laisser un trou. */
@media (min-width: 48rem) and (max-width: 71.99rem) {
  .quotes .t-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 72rem) {
  .quotes .t-card:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }
}

/* ---------- CV (/resume/) : la période en marge, le poste, l'employeur, les missions ---------- */

.cv .checks {
  margin: var(--space-4) 0 0;
  color: var(--ink-soft);
}
