/* ==========================================================================
   Design system de la vitrine — SOURCE DE VÉRITÉ du look & feel
   Norme      : vitrine-back/docs/skills/oxygen-ui-design-guidelines/SKILL.md (Oxygen UI × Nord)
   Traduction : vitrine-back/docs/skills/site-look-and-feel/SKILL.md (tokens, rôles, composants Zensical)
   Pourquoi   : vitrine-back/docs/explanation/design-system.md
   Palette Nord fermée (16 couleurs + 3 dérivés AA), design plat (aucune ombre), rayon unique
   de 8px, typographie Oxygen UI (Inter, Fira Code), espacement sur une base de 8px.
   Aucune valeur littérale (couleur, rayon, ombre, taille de texte, durée) hors de la section TOKENS.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
/* Seule section autorisée à contenir des valeurs littérales.
   Unités : le thème fixe la racine à 125 % (1rem = 20 px, agrandie sur très grand écran),
   donc 1px de la norme = 0.05rem.                                                            */
:root {
  /* 1.a Palette Nord officielle — https://www.nordtheme.com/docs/colors-and-palettes */
  /* Polar Night : fonds et surfaces du thème sombre, texte du thème clair */
  --vt-nord0:  #2e3440;
  --vt-nord1:  #3b4252;
  --vt-nord2:  #434c5e;
  --vt-nord3:  #4c566a;
  /* Snow Storm : fonds et surfaces du thème clair, texte du thème sombre */
  --vt-nord4:  #d8dee9;
  --vt-nord5:  #e5e9f0;
  --vt-nord6:  #eceff4;
  /* Frost : accents (nord8 principal, nord9 secondaire, nord10 tertiaire, nord7 mise en avant secondaire) */
  --vt-nord7:  #8fbcbb;
  --vt-nord8:  #88c0d0;
  --vt-nord9:  #81a1c1;
  --vt-nord10: #5e81ac;
  /* Aurora : états (nord11 erreur, nord12 avancé, nord13 avertissement, nord14 succès, nord15 inhabituel) */
  --vt-nord11: #bf616a;
  --vt-nord12: #d08770;
  --vt-nord13: #ebcb8b;
  --vt-nord14: #a3be8c;
  --vt-nord15: #b48ead;

  /* 1.b Les trois seules nuances dérivées autorisées par la norme (même teinte, luminosité ajustée
         pour atteindre WCAG AA). Aucune autre couleur n'est permise.                              */
  --vt-nord10-strong: #476993; /* liens, texte d'accent, bouton principal (clair) : 4.9:1 sur nord6, 4.6:1 sur nord5 */
  --vt-nord11-strong: #a64a54; /* texte d'erreur, bouton destructif (clair) : 4.9:1 sur nord6, 4.6:1 sur nord5 */
  --vt-nord11-soft:   #f7939b; /* texte d'erreur (sombre) : 5.7:1 sur nord0, 4.6:1 sur nord1 */

  /* 1.c Forme — rayon unique Oxygen UI (shape.borderRadius) et bordures */
  --vt-radius:        0.4rem;   /* 8px */
  --vt-radius-none:   0;
  --vt-border-width:  1px;
  --vt-accent-bar:    3px;      /* liseré de repère (intertitre) */
  --vt-callout-bar:   4px;      /* bordure gauche d'un encadré de mise en valeur */
  --vt-gradient-band: 4px;      /* bande décorative du dégradé de marque (hero) */

  /* 1.d Ombres — design plat : aucune ombre, nulle part */
  --vt-shadow-none: none;

  /* 1.e Opacités (états et teintes). Une couleur Nord à une opacité donnée reste une couleur Nord. */
  --vt-opacity-hover:   8%;
  --vt-opacity-focus:   12%;
  --vt-opacity-pressed: 12%;
  --vt-opacity-tint:    15%;    /* fond teinté d'un encadré (Alert « standard ») */
  --vt-opacity-comment: 70%;    /* commentaires de code (nord4 @70 %) */
  /* Anneau de focus : 2px, décalé de 2px */
  --vt-focus-ring-width:  2px;
  --vt-focus-ring-offset: 2px;

  /* 1.f Typographie — échelle Oxygen UI (Inter ; code en Fira Code, déclarés dans zensical.toml) */
  --vt-font-weight-regular:  400;
  --vt-font-weight-medium:   500;
  --vt-font-weight-semibold: 600;   /* emphase sans cadre */
  --vt-type-h1-size:        1.4rem;    --vt-type-h1-line:        1.167;  /* 28px */
  --vt-type-h2-size:        1.2rem;    --vt-type-h2-line:        1.2;    /* 24px */
  --vt-type-h3-size:        1.1rem;    --vt-type-h3-line:        1.167;  /* 22px */
  --vt-type-h4-size:        1rem;      --vt-type-h4-line:        1.235;  /* 20px */
  --vt-type-h5-size:        0.8rem;    --vt-type-h5-line:        1.334;  /* 16px */
  --vt-type-h6-size:        0.7rem;    --vt-type-h6-line:        1.6;    /* 14px / 500 */
  --vt-type-subtitle1-size: 0.9rem;    --vt-type-subtitle1-line: 1.75;   /* 18px */
  --vt-type-body1-size:     0.7rem;    --vt-type-body1-line:     1.5;    /* 14px */
  --vt-type-body2-size:     0.65rem;   --vt-type-body2-line:     1.43;   /* 13px */
  --vt-type-button-size:    0.7rem;    --vt-type-button-line:    1.75;   /* 14px / 500 */
  --vt-type-caption-size:   0.55rem;   --vt-type-caption-line:   1.66;   /* 11px */
  --vt-type-tracking-none:  0;
  --vt-type-overline-tracking: 0.08em;   /* surtitre en capitales (caption + uppercase) */

  /* 1.g Mouvement — retours d'état uniquement (courbe standard MUI), aucune animation décorative */
  --vt-easing-standard:    cubic-bezier(0.4, 0, 0.2, 1);
  --vt-duration-shortest:  150ms;

  /* 1.h Espacement — theme.spacing(n) = n × 8px */
  --vt-spacing-0-5: 0.2rem;  /*  4px */
  --vt-spacing-1:   0.4rem;  /*  8px */
  --vt-spacing-2:   0.8rem;  /* 16px */
  --vt-spacing-3:   1.2rem;  /* 24px */
  --vt-spacing-4:   1.6rem;  /* 32px */
  --vt-spacing-5:   2rem;    /* 40px */
  --vt-spacing-6:   2.4rem;  /* 48px */
  --vt-spacing-8:   3.2rem;  /* 64px */

  /* 1.i Dimensions */
  --vt-size-button: 2rem;              /* 40px : hauteur d'un bouton */
  --vt-size-target: 2.4rem;            /* 48px : cible tactile minimale, pastille d'icône */
  --vt-size-icon:   1.2rem;            /* 24px : icône d'une pastille */
  --vt-measure: 60ch;                  /* texte courant : ≤ ~70 caractères par ligne */

  /* 1.j Points de rupture (MUI) — rappel, les variables CSS sont interdites dans @media :
         valeurs écrites dans la section 4. xs < 37.5em (600px) · sm 37.5em · md 56.25em (900px) */
}

/* ---------- 2. THÈMES (rôles de couleur) ---------- */
/* Rôles de la norme (§ 2 « Correspondance Oxygen UI → Nord »), définis pour chaque thème.
   Les composants n'utilisent QUE ces rôles, jamais --vt-nordX directement.
   Une section inversée (hero, CTA) porte data-md-color-scheme="slate" : elle hérite ainsi des
   rôles du thème sombre, sans aucune recoloration à la main.
   Contrastes vérifiés par `mise run design:contrast`.                                          */

/* Thème clair — Nord « bright to dark » : base nord6, surfaces nord5 puis nord4 */
[data-md-color-scheme="default"] {
  /* Fonds, surfaces, texte */
  --vt-bg-default:      var(--vt-nord6);
  --vt-bg-paper:        var(--vt-nord5);   /* niveau 1 : carte, panneau, tuile, en-tête, pied */
  --vt-bg-raised:       var(--vt-nord4);   /* niveau 2 : menu, popover */
  --vt-text-primary:    var(--vt-nord0);
  --vt-text-secondary:  var(--vt-nord3);
  --vt-divider:         var(--vt-nord4);
  --vt-field-border:    var(--vt-nord3);   /* contour d'une cible (3:1) */
  --vt-action-hover:    var(--vt-nord5);
  --vt-action-selected: var(--vt-nord4);
  /* Accent */
  --vt-primary:          var(--vt-nord10-strong);  /* liens, bouton principal, bouton outlined */
  --vt-primary-contrast: var(--vt-nord6);
  --vt-accent:           var(--vt-nord10);         /* repères non textuels : liserés, pastilles, icônes */
  --vt-focus:            var(--vt-nord10);
  /* États (Aurora) */
  --vt-error:      var(--vt-nord11);         /* icône, liseré */
  --vt-error-text: var(--vt-nord11-strong);
  /* Code en ligne */
  --vt-code-inline-bg: var(--vt-nord4);
  --vt-code-inline-fg: var(--vt-nord0);
  --vt-code-border:    var(--vt-nord0);      /* invisible : le bloc sombre se détache seul */
}

/* Thème sombre — Polar Night : base nord0, surfaces nord1 puis nord2 */
[data-md-color-scheme="slate"] {
  --vt-bg-default:      var(--vt-nord0);
  --vt-bg-paper:        var(--vt-nord1);
  --vt-bg-raised:       var(--vt-nord2);
  --vt-text-primary:    var(--vt-nord6);
  --vt-text-secondary:  var(--vt-nord4);
  --vt-divider:         var(--vt-nord2);
  --vt-field-border:    var(--vt-nord9);
  --vt-action-hover:    var(--vt-nord1);
  --vt-action-selected: var(--vt-nord2);
  --vt-primary:          var(--vt-nord8);
  --vt-primary-contrast: var(--vt-nord0);
  --vt-accent:           var(--vt-nord8);
  --vt-focus:            var(--vt-nord8);
  --vt-error:      var(--vt-nord11);
  --vt-error-text: var(--vt-nord11-soft);
  --vt-code-inline-bg: var(--vt-nord2);
  --vt-code-inline-fg: var(--vt-nord6);
  --vt-code-border:    var(--vt-nord2);      /* bloc nord0 sur page nord0 : séparé par une bordure */
}

/* Rôles communs aux deux thèmes */
[data-md-color-scheme] {
  /* États (Aurora) et mise en avant secondaire (Frost) : icônes, liserés, fonds teintés.
     En clair, ces couleurs ne portent jamais de texte. */
  --vt-warning:   var(--vt-nord13);
  --vt-success:   var(--vt-nord14);
  --vt-info:      var(--vt-nord8);
  --vt-highlight: var(--vt-nord7);
  --vt-on-state:  var(--vt-nord0);

  /* Dégradé de marque : 1 par page (hero), décoratif uniquement, jamais de texte dessus */
  --vt-gradient-primary: linear-gradient(90deg, var(--vt-nord9), var(--vt-nord10));

  /* Encadrés (articles) : couleur d'état selon le sens réel */
  --vt-admonition-info:     var(--vt-info);
  --vt-admonition-tip:      var(--vt-success);
  --vt-admonition-warning:  var(--vt-warning);
  --vt-admonition-danger:   var(--vt-error);
  --vt-admonition-question: var(--vt-info);
  --vt-admonition-example:  var(--vt-highlight);

  /* Code : blocs sombres dans les deux thèmes (convention de coloration Nord) */
  --vt-code-bg:          var(--vt-nord0);
  --vt-code-fg:          var(--vt-nord6);
  --vt-code-keyword:     var(--vt-nord9);
  --vt-code-function:    var(--vt-nord8);
  --vt-code-constant:    var(--vt-nord7);
  --vt-code-string:      var(--vt-nord14);
  --vt-code-number:      var(--vt-nord15);
  --vt-code-special:     var(--vt-nord12);
  --vt-code-comment:     color-mix(in srgb, var(--vt-nord4) var(--vt-opacity-comment), transparent);
  --vt-code-generic:     var(--vt-nord11-soft);
  --vt-code-punctuation: var(--vt-nord6);
  --vt-code-hl:          var(--vt-nord2);    /* ligne surlignée (sélection Nord) */

  /* Transitions d'état */
  --vt-transition-state:
    background-color var(--vt-duration-shortest) var(--vt-easing-standard),
    border-color     var(--vt-duration-shortest) var(--vt-easing-standard),
    color            var(--vt-duration-shortest) var(--vt-easing-standard);
}

/* ---------- 2bis. MAPPING TOKENS → THÈME (variables Material reprises par Zensical) ---------- */
[data-md-color-scheme] {
  --md-default-bg-color:            var(--vt-bg-default);
  --md-default-bg-color--light:     color-mix(in srgb, var(--vt-bg-default) 70%, transparent);
  --md-default-bg-color--lighter:   color-mix(in srgb, var(--vt-bg-default) 30%, transparent);
  --md-default-bg-color--lightest:  color-mix(in srgb, var(--vt-bg-default) 12%, transparent);
  --md-default-fg-color:            var(--vt-text-primary);
  --md-default-fg-color--light:     var(--vt-text-secondary);
  --md-default-fg-color--lighter:   color-mix(in srgb, var(--vt-text-primary) 38%, transparent);
  --md-default-fg-color--lightest:  var(--vt-divider);

  /* En-tête, onglets : surface de niveau 1 du thème (plus de bande sombre fixe) */
  --md-primary-fg-color:            var(--vt-bg-paper);
  --md-primary-fg-color--light:     var(--vt-bg-paper);
  --md-primary-fg-color--dark:      var(--vt-bg-paper);
  --md-primary-bg-color:            var(--vt-text-primary);
  --md-primary-bg-color--light:     var(--vt-text-secondary);

  --md-accent-fg-color:             var(--vt-primary);
  --md-accent-fg-color--transparent: color-mix(in srgb, var(--vt-primary) var(--vt-opacity-hover), transparent);
  --md-accent-bg-color:             var(--vt-primary-contrast);
  --md-accent-bg-color--light:      color-mix(in srgb, var(--vt-primary-contrast) 70%, transparent);

  --md-typeset-color:               var(--vt-text-primary);
  --md-typeset-a-color:             var(--vt-primary);
  --md-typeset-mark-color:          var(--vt-action-selected);
  --md-typeset-table-color:         var(--vt-divider);
  --md-typeset-table-color--light:  var(--vt-action-hover);

  --md-admonition-bg-color:         var(--vt-bg-default);
  --md-admonition-fg-color:         var(--vt-text-primary);

  /* Pied de page : surface de niveau 1 du thème */
  --md-footer-bg-color:             var(--vt-bg-paper);
  --md-footer-bg-color--dark:       var(--vt-bg-paper);
  --md-footer-fg-color:             var(--vt-text-primary);
  --md-footer-fg-color--light:      var(--vt-text-secondary);
  --md-footer-fg-color--lighter:    var(--vt-text-secondary);

  /* Design plat : toutes les ombres du thème sont neutralisées */
  --md-shadow-z1:                   var(--vt-shadow-none);
  --md-shadow-z2:                   var(--vt-shadow-none);
  --md-shadow-z3:                   var(--vt-shadow-none);

  --md-code-bg-color:               var(--vt-code-bg);
  --md-code-fg-color:               var(--vt-code-fg);
  --md-code-hl-color:               var(--vt-code-hl);
  --md-code-hl-color--light:        var(--vt-code-hl);
  --md-code-hl-keyword-color:       var(--vt-code-keyword);
  --md-code-hl-operator-color:      var(--vt-code-keyword);
  --md-code-hl-function-color:      var(--vt-code-function);
  --md-code-hl-constant-color:      var(--vt-code-constant);
  --md-code-hl-string-color:        var(--vt-code-string);
  --md-code-hl-number-color:        var(--vt-code-number);
  --md-code-hl-special-color:       var(--vt-code-special);
  --md-code-hl-comment-color:       var(--vt-code-comment);
  --md-code-hl-generic-color:       var(--vt-code-generic);
  --md-code-hl-punctuation-color:   var(--vt-code-punctuation);
  --md-code-hl-name-color:          var(--vt-code-fg);
  --md-code-hl-variable-color:      var(--vt-code-fg);
}

/* ---------- 3. COMPOSANTS ---------- */

/* Typographie de contenu : échelle Oxygen UI (corps body1, titres h1 à h4) */
.md-typeset {
  font-size: var(--vt-type-body1-size);
  line-height: var(--vt-type-body1-line);
  letter-spacing: var(--vt-type-tracking-none);
}
.md-typeset :is(h1, h2, h3, h4) {
  color: var(--vt-text-primary);
  font-weight: var(--vt-font-weight-regular);
  letter-spacing: var(--vt-type-tracking-none);
}
.md-typeset h1 { font-size: var(--vt-type-h1-size); line-height: var(--vt-type-h1-line); }
/* Ancre ¶ inutile sur le titre de page (l'URL y mène déjà) ; elle passait à la ligne en compact et créait un vide */
.md-typeset h1 .headerlink { display: none; }
.md-typeset h2 { font-size: var(--vt-type-h2-size); line-height: var(--vt-type-h2-line); }
.md-typeset h3 { font-size: var(--vt-type-h3-size); line-height: var(--vt-type-h3-line); }
.md-typeset h4 { font-size: var(--vt-type-h4-size); line-height: var(--vt-type-h4-line); }

/* Longueur de ligne du texte courant */
.md-typeset > :is(p, ul, ol, dl, blockquote),
.md-typeset .vt-timeline > :is(p, ul, ol) { max-width: var(--vt-measure); }
/* Exception demandée par le propriétaire : texte en pleine largeur (paragraphe { .vt-full } ou <div class="vt-full" markdown>) */
.md-typeset > p.vt-full,
.md-typeset > .vt-full > :is(p, ul, ol) { max-width: none; }

/* Liens soulignés : le sens n'est jamais porté par la seule couleur */
.md-typeset a:not(.md-button):not(.headerlink):not(.vt-exp-item) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.md-typeset a:not(.md-button):not(.headerlink):not(.vt-exp-item):hover { text-decoration-thickness: 2px; }

/* Focus clavier toujours visible : anneau de 2px, nord10 (clair) / nord8 (sombre) */
:focus-visible,
.md-typeset :is(a, summary, button, [tabindex]):is(:focus-visible, .focus-visible) {   /* le thème colore sinon le focus du contenu avec sa couleur d'accent */
  outline: var(--vt-focus-ring-width) solid var(--vt-focus);
  outline-offset: var(--vt-focus-ring-offset);
}

/* En-tête, onglets et pied de page : surface de niveau 1 posée sur la page → bordure divider */
.md-header,
.md-header--shadow { box-shadow: var(--vt-shadow-none); border-bottom: var(--vt-border-width) solid var(--vt-divider); }
.md-tabs { border-bottom: var(--vt-border-width) solid var(--vt-divider); }
.md-footer { border-top: var(--vt-border-width) solid var(--vt-divider); }
/* Bouton de recherche de l'en-tête : le thème le teinte en noir translucide, hors palette */
.md-search__button,
.md-search__button:hover {
  border-radius: var(--vt-radius);
  background-color: var(--vt-action-selected);
  color: var(--vt-text-primary);
}

/* Cibles tactiles de 48px minimum pour les icônes sociales du pied de page */
.md-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: var(--vt-size-target);
  min-height: var(--vt-size-target);
}

/* Boutons : deux styles seulement.
   - principal = contained primary, 1 seul par vue ;
   - secondaire = outlined (contour et libellé primary).
   Rayon 8px, hauteur 40px, libellé « button » (14px / 500), marge verticale de 4px → cible de 48px.
   États par opacité de la couleur du libellé (survol 8 %, focus et appui 12 %), sans ombre. */
.md-typeset .md-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vt-spacing-1);
  min-height: var(--vt-size-button);
  margin: var(--vt-spacing-0-5) 0;
  padding: 0 var(--vt-spacing-2);
  vertical-align: middle;
  border-width: var(--vt-border-width);
  border-style: solid;
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow-none);
  font-size: var(--vt-type-button-size);
  line-height: var(--vt-type-button-line);
  font-weight: var(--vt-font-weight-medium);
  letter-spacing: var(--vt-type-tracking-none);
  transition: var(--vt-transition-state);
}

/* Secondaire : outlined */
.md-typeset .md-button:not(.md-button--primary),
.md-typeset .md-button:not(.md-button--primary):focus {
  color: var(--vt-primary);
  background-color: transparent;
  border-color: var(--vt-primary);
}
.md-typeset .md-button:not(.md-button--primary):hover {
  color: var(--vt-primary);
  background-color: color-mix(in srgb, var(--vt-primary) var(--vt-opacity-hover), transparent);
  border-color: var(--vt-primary);
}
.md-typeset .md-button:not(.md-button--primary):is(:focus-visible, :active) {
  background-color: color-mix(in srgb, var(--vt-primary) var(--vt-opacity-focus), transparent);
}

/* Principal : contained */
.md-typeset .md-button--primary,
.md-typeset .md-button--primary:focus {
  color: var(--vt-primary-contrast);
  background-color: var(--vt-primary);
  border-color: var(--vt-primary);
}
.md-typeset .md-button--primary:hover {
  color: var(--vt-primary-contrast);
  background-color: color-mix(in srgb, var(--vt-primary-contrast) var(--vt-opacity-hover), var(--vt-primary));
  border-color: var(--vt-primary);
}
.md-typeset .md-button--primary:is(:focus-visible, :active) {
  background-color: color-mix(in srgb, var(--vt-primary-contrast) var(--vt-opacity-pressed), var(--vt-primary));
}

/* Hero de page d'accueil : <div class="vt-hero" markdown> puis <div class="vt-hero-text" markdown> (titre, accroche, boutons).
   Pas de portrait : le site met en avant un service, pas une personne.
   Ouvert (sans cadre ni fond) : il suit le thème et se détache par l'espace qui l'entoure, pas par un cadre.
   Bande supérieure au dégradé de marque : décorative, aucun texte posé dessus. Mobile d'abord : colonne. */
.vt-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--vt-spacing-3);
  margin: 0 0 var(--vt-spacing-8);
  padding: var(--vt-spacing-5) 0 0;
  background-image: var(--vt-gradient-primary);
  background-repeat: no-repeat;
  background-size: 100% var(--vt-gradient-band);
  color: var(--vt-text-primary);
}
.vt-hero-text { flex: 1 1 auto; min-width: 0; }
.md-typeset .vt-hero h1 { margin: 0 0 var(--vt-spacing-2); }
.vt-hero-text > p:not(:last-child) {   /* accroche : subtitle1, texte secondaire */
  max-width: var(--vt-measure);
  color: var(--vt-text-secondary);
  font-size: var(--vt-type-subtitle1-size);
  line-height: var(--vt-type-subtitle1-line);
}
.vt-hero .md-button { margin-right: var(--vt-spacing-1); }

/* CTA de fin de page : <div class="vt-cta" data-md-color-scheme="slate" markdown>.
   Section inversée : rôles du thème sombre (texte nord6, accent nord8, bouton nord8 + nord0),
   surface de niveau 1 (nord1) + bordure divider pour rester distincte d'une page déjà sombre. */
.vt-cta {
  border: var(--vt-border-width) solid var(--vt-divider);
  border-radius: var(--vt-radius);
  background-color: var(--vt-bg-paper);
  color: var(--vt-text-primary);
  margin-top: var(--vt-spacing-6);
  padding: var(--vt-spacing-3);
}
.md-typeset .vt-cta > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vt-spacing-2);
  margin: 0;
  font-size: var(--vt-type-subtitle1-size);
  line-height: var(--vt-type-subtitle1-line);
}

/* Grille de cartes : <div class="grid cards" markdown> — unités autonomes et répétées.
   Card outlined : surface de niveau 1, bordure divider, rayon 8px (l'accent reste sur l'icône).
   Les cartes ne sont pas cliquables en entier : aucun effet de survol. */
.md-typeset .grid { gap: var(--vt-spacing-2); }
.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ul > li:focus-within {
  padding: var(--vt-spacing-2);
  border: var(--vt-border-width) solid var(--vt-divider);
  border-radius: var(--vt-radius);
  background-color: var(--vt-bg-paper);
  box-shadow: var(--vt-shadow-none);
  font-size: var(--vt-type-body1-size);
  line-height: var(--vt-type-body1-line);
}
.md-typeset .grid.cards > ul > li > p:first-child {  /* titre de carte : h5 (16px) */
  font-size: var(--vt-type-h5-size);
  line-height: var(--vt-type-h5-line);
}
.md-typeset .grid.cards .twemoji { color: var(--vt-accent); }
.md-typeset .grid.cards > ul > li > hr { border-bottom-color: var(--vt-divider); }

/* Lien d'action en fin de section : [Discuter de … :material-arrow-right:](contact.md){ .vt-next }
   Un lien (pas un bouton) : le seul bouton principal de la page reste celui du CTA de fin. */
.md-typeset .vt-next {
  font-weight: var(--vt-font-weight-medium);
}

/* Expertises : liste numérotée + panneau de détail, en CSS seul ; expertises.js évite le saut de défilement.
   <div class="vt-expertises" markdown> : <nav class="vt-exp-list"> (intitulés de groupe et entrées
   <a class="vt-exp-item" href="#ancre">) puis <div class="vt-exp-panels"> (un <section class="vt-exp-panel">
   par expertise, dont le titre porte l'ancre). Structure : skills site-look-and-feel et site-navigation.
   Mobile d'abord : panneaux empilés, liste masquée. À partir de md : liste à gauche, un seul panneau à
   droite, celui dont le titre est la cible de l'URL (:target), le premier par défaut.
   Entrée = carte cliquable (outlined, niveau 0) ; panneau = surface de niveau 1 ; pastille d'icône =
   fond seul (pas de cadre imbriqué). */
.vt-expertises { margin: var(--vt-spacing-3) 0 var(--vt-spacing-4); }
.vt-exp-list { display: none; }
.md-typeset .vt-exp-list > p { margin: 0 0 var(--vt-spacing-1); }
.md-typeset .vt-exp-list > .vt-group-label { margin: var(--vt-spacing-3) 0 var(--vt-spacing-1); }
.md-typeset .vt-exp-list > .vt-group-label:first-child { margin-top: 0; }
.md-typeset a.vt-exp-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: var(--vt-spacing-2);
  padding: var(--vt-spacing-2);
  border: var(--vt-border-width) solid var(--vt-divider);
  border-radius: var(--vt-radius);
  background-color: var(--vt-bg-default);
  color: var(--vt-text-primary);
  text-decoration: none;
  transition: var(--vt-transition-state);
}
.md-typeset a.vt-exp-item:hover { background-color: var(--vt-action-hover); }
.vt-exp-index {
  color: var(--vt-text-secondary);
  font-family: var(--md-code-font-family);
  font-size: var(--vt-type-caption-size);
  line-height: var(--vt-type-caption-line);
}
.vt-exp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vt-size-target);
  height: var(--vt-size-target);
  border-radius: var(--vt-radius);
  background-color: var(--vt-action-selected);
  color: var(--vt-accent);
}
.md-typeset .vt-exp-icon .twemoji { height: var(--vt-size-icon); }
.md-typeset .vt-exp-icon .twemoji svg { width: var(--vt-size-icon); max-height: none; }
.vt-exp-text { display: flex; flex-direction: column; gap: var(--vt-spacing-0-5); min-width: 0; }
.vt-exp-title {
  font-size: var(--vt-type-h5-size);
  line-height: var(--vt-type-h5-line);
  font-weight: var(--vt-font-weight-medium);
}
.vt-exp-pitch {
  color: var(--vt-text-secondary);
  font-size: var(--vt-type-body2-size);
  line-height: var(--vt-type-body2-line);
  /* Une ligne : gain client en 45 caractères au plus ; coupure de sécurité si la colonne rétrécit */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vt-exp-panel {
  padding: var(--vt-spacing-3);
  border: var(--vt-border-width) solid var(--vt-divider);
  border-radius: var(--vt-radius);
  background-color: var(--vt-bg-paper);
}
.vt-exp-panel + .vt-exp-panel { margin-top: var(--vt-spacing-3); }
.md-typeset .vt-exp-panel > p:first-child { margin: 0 0 var(--vt-spacing-2); }
.md-typeset .vt-exp-panel :is(h2, h3) { margin-top: 0; }
.md-typeset .vt-exp-lead {
  color: var(--vt-text-primary);
  font-weight: var(--vt-font-weight-semibold);
}
.md-typeset .vt-exp-label {          /* surtitre « La mission couvre » : caption en capitales + divider */
  margin: var(--vt-spacing-3) 0 var(--vt-spacing-1);
  padding-bottom: var(--vt-spacing-1);
  border-bottom: var(--vt-border-width) solid var(--vt-divider);
  color: var(--vt-text-secondary);
  font-size: var(--vt-type-caption-size);
  line-height: var(--vt-type-caption-line);
  font-weight: var(--vt-font-weight-medium);
  letter-spacing: var(--vt-type-overline-tracking);
  text-transform: uppercase;
}
[dir] .md-typeset .vt-exp-checks ul {
  display: grid;
  gap: var(--vt-spacing-1) var(--vt-spacing-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
[dir] .md-typeset .vt-exp-checks li {
  position: relative;
  margin: 0;
  padding-left: var(--vt-spacing-3);
}
.md-typeset .vt-exp-checks li::before {   /* coche décorative : le libellé porte le sens */
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--vt-accent);
  font-weight: var(--vt-font-weight-semibold);
}

/* Intitulé de groupe de cartes : paragraphe `Libellé` + `{ .vt-group-label }` juste avant une grille.
   Typographie h6 (14px / 500), texte secondaire. Pas un titre : ni table des matières, ni niveau. */
.md-typeset .vt-group-label {
  margin: var(--vt-spacing-4) 0 var(--vt-spacing-1);
  color: var(--vt-text-secondary);
  font-size: var(--vt-type-h6-size);
  line-height: var(--vt-type-h6-line);
  font-weight: var(--vt-font-weight-medium);
}

/* Intertitres de contenu : liseré d'accent sous chaque H2 (repère de balayage) */
.md-typeset h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: var(--vt-accent-bar);
  margin-top: var(--vt-spacing-1);
  border-radius: var(--vt-radius);
  background: var(--vt-accent);
}

/* Citation (devise) : encadré de mise en valeur — surface de niveau 1, bordure gauche info (note).
   1 par page au maximum. */
[dir] .md-typeset blockquote {
  padding: var(--vt-spacing-1) var(--vt-spacing-3);
  border: var(--vt-border-width) solid var(--vt-divider);
  border-left: var(--vt-callout-bar) solid var(--vt-info);
  border-radius: var(--vt-radius);
  background: var(--vt-bg-paper);
  color: var(--vt-text-primary);
}

/* Compte-rendu de mission (page Réalisations) : <section class="vt-mission" markdown>, H2, lignes
   { .vt-mission-meta } (expertise principale, durée, expertises associées), puis « Actions menées » et
   « Bénéfice client » ({ .vt-exp-label }, { .vt-exp-checks }, { .vt-exp-lead } du composant Expertises).
   Surface de niveau 1, comme un panneau d'expertise. */
.vt-mission {
  margin: var(--vt-spacing-3) 0;
  padding: var(--vt-spacing-3);
  border: var(--vt-border-width) solid var(--vt-divider);
  border-radius: var(--vt-radius);
  background-color: var(--vt-bg-paper);
}
.md-typeset .vt-mission h2 { margin-top: 0; }
.md-typeset :is(.vt-mission-meta, .vt-post-service) {
  margin: var(--vt-spacing-1) 0 0;
  color: var(--vt-text-secondary);
  font-size: var(--vt-type-body2-size);
  line-height: var(--vt-type-body2-line);
}
.md-typeset :is(.vt-mission-meta, .vt-post-service) .twemoji { color: var(--vt-accent); }
/* Thème d'un article (blog) : au-dessus du titre, en petit, avec le pictogramme du service */
.md-typeset .vt-post-service {
  margin: 0 0 var(--vt-spacing-0-5);
  font-size: var(--vt-type-caption-size);
  line-height: var(--vt-type-caption-line);
}
.md-typeset .vt-post-service + :is(h1, h2) { margin-top: 0; }
/* Liste du blog : le thème est affiché au-dessus du titre, inutile de le répéter dans les métadonnées */
.md-post--excerpt .md-meta__item:has(> .md-meta__link[href*="category/"]) { display: none; }

/* Frise chronologique : <div class="vt-timeline" markdown> autour des H3 d'expérience */
.vt-timeline {
  margin-left: var(--vt-spacing-1);
  padding-left: var(--vt-spacing-3);
  border-left: 2px solid var(--vt-divider);
}
.md-typeset .vt-timeline h3 { position: relative; }
.md-typeset .vt-timeline h3::before {
  content: "";
  position: absolute;
  top: 0.25em;
  left: calc(-1 * var(--vt-spacing-3) - 0.4rem - 1px);
  width: 0.8rem;
  height: 0.8rem;
  border-radius: var(--vt-radius);
  background: var(--vt-accent);
  outline: 4px solid var(--vt-bg-default);
}

/* Tuiles : <div class="vt-tiles" markdown> autour d'une liste courte (compétences, modalités).
   Même traitement qu'une carte outlined (unités répétées), sans icône ni liseré. */
[dir] .md-typeset .vt-tiles ul {
  display: grid;
  /* 3 colonnes au plus (6 tuiles = 3 + 3, jamais 4 + 2) ; 1 colonne sous ~14rem */
  grid-template-columns: repeat(auto-fit, minmax(max(14rem, 30%), 1fr));
  gap: var(--vt-spacing-2);
  margin: var(--vt-spacing-2) 0;
  margin-left: 0;
  padding: 0;
  list-style: none;
}
[dir] .md-typeset .vt-tiles li {
  margin: 0;
  margin-left: 0;
  padding: var(--vt-spacing-2);
  border: var(--vt-border-width) solid var(--vt-divider);
  border-radius: var(--vt-radius);
  background: var(--vt-bg-paper);
  color: var(--vt-text-primary);
  font-size: var(--vt-type-body1-size);
  line-height: var(--vt-type-body1-line);
}

/* Bandeau de preuves (références, certifications, logos) : <div class="vt-proof" markdown>
   Uniquement des éléments réels et autorisés. */
.vt-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--vt-spacing-2) var(--vt-spacing-5);
  margin: var(--vt-spacing-5) 0;
  padding: var(--vt-spacing-3) var(--vt-spacing-2);
  border-top: var(--vt-border-width) solid var(--vt-divider);
  border-bottom: var(--vt-border-width) solid var(--vt-divider);
  color: var(--vt-text-secondary);
  font-size: var(--vt-type-body2-size);
  line-height: var(--vt-type-body2-line);
}
.vt-proof p { margin: 0; }
.vt-proof img {
  height: 2.5rem;
  width: auto;
  filter: grayscale(1);
  opacity: 0.8;
}

/* Encadrés (articles) : !!! note|info|tip|success|warning|danger|question|example
   Alert « standard » : liseré et icône à la couleur d'état, titre sur fond teinté à 15 %, texte nord0/nord6. */
.md-typeset .admonition, .md-typeset details { --vt-adm: var(--vt-admonition-info); }
.md-typeset :is(.tip, .success, .hint, .check, .done)        { --vt-adm: var(--vt-admonition-tip); }
.md-typeset :is(.warning, .caution, .attention)              { --vt-adm: var(--vt-admonition-warning); }
.md-typeset :is(.danger, .error, .failure, .fail, .bug)      { --vt-adm: var(--vt-admonition-danger); }
.md-typeset :is(.question, .help, .faq)                      { --vt-adm: var(--vt-admonition-question); }
.md-typeset :is(.example, .quote, .cite)                     { --vt-adm: var(--vt-admonition-example); }
.md-typeset :is(.admonition, details)[class] {
  border-color: var(--vt-adm);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow-none);
  font-size: var(--vt-type-body1-size);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  background-color: color-mix(in srgb, var(--vt-adm) var(--vt-opacity-tint), transparent);
  color: var(--vt-text-primary);
}
.md-typeset :is(.admonition, details) > :is(.admonition-title, summary)::before {
  background-color: var(--vt-adm);
}

/* Code : blocs sombres (nord0) dans les deux thèmes, code en ligne sur une surface du thème */
.md-typeset code { border-radius: var(--vt-radius); }
.md-typeset :not(pre) > code {
  background-color: var(--vt-code-inline-bg);
  color: var(--vt-code-inline-fg);
}
.md-typeset pre > code { border: var(--vt-border-width) solid var(--vt-code-border); }

/* ---------- 4. MISE EN PAGE ADAPTATIVE (points de rupture MUI) ---------- */

/* sm et plus (≥ 600px) : grilles de 4 éléments en 2 × 2 (jamais 3 + 1 orphelin) */
@media screen and (min-width: 37.5em) {
  .md-typeset .grid.cards:has(> ul > li:nth-child(4):last-child),
  [dir] .md-typeset .vt-tiles ul:has(> li:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* md et plus (≥ 900px) : expertises en deux colonnes, un seul panneau visible */
@media screen and (min-width: 56.25em) {
  .vt-expertises {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: var(--vt-spacing-3);
  }
  .vt-exp-list { display: block; }
  /* Le panneau reste visible sous l'en-tête (barre + onglets) pendant le parcours de la liste */
  .vt-exp-panels {
    position: sticky;
    top: calc(var(--vt-spacing-8) + var(--vt-spacing-6));
  }
  .vt-exp-panel { display: none; }
  .vt-exp-panel + .vt-exp-panel { margin-top: 0; }
  /* Sans JavaScript : panneau cible de l'URL (:target), le premier par défaut.
     Avec expertises.js (.vt-js) : panneau .is-current, choisi sans défilement. */
  .vt-expertises:not(.vt-js) .vt-exp-panels:not(:has(:target)) > .vt-exp-panel:first-of-type,
  .vt-expertises:not(.vt-js) .vt-exp-panel:has(:target),
  .vt-expertises.vt-js .vt-exp-panel.is-current { display: block; }
  /* Entrée sélectionnée (8 expertises au plus) : liseré d'accent et surface de niveau 1 */
  .vt-expertises.vt-js .vt-exp-list a.vt-exp-item[aria-current],
  .vt-expertises:not(.vt-js):not(:has(.vt-exp-panel :target)) .vt-exp-list > p:nth-child(1 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(1) :target) .vt-exp-list > p:nth-child(1 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(2) :target) .vt-exp-list > p:nth-child(2 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(3) :target) .vt-exp-list > p:nth-child(3 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(4) :target) .vt-exp-list > p:nth-child(4 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(5) :target) .vt-exp-list > p:nth-child(5 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(6) :target) .vt-exp-list > p:nth-child(6 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(7) :target) .vt-exp-list > p:nth-child(7 of :has(> .vt-exp-item)) > .vt-exp-item,
  .vt-expertises:not(.vt-js):has(.vt-exp-panel:nth-of-type(8) :target) .vt-exp-list > p:nth-child(8 of :has(> .vt-exp-item)) > .vt-exp-item {
    border-color: var(--vt-accent);
    background-color: var(--vt-bg-paper);
  }
}

/* Mouvement réduit : aucune transition */
@media (prefers-reduced-motion: reduce) {
  .md-typeset :is(.md-button, a.vt-exp-item) { transition: none; }
}
