/* ==========================================================================
   home-accueil.css — page « Accueil › Home »
   --------------------------------------------------------------------------
   Registre : outil métier clinique. Hiérarchie par la typographie et
   l'espacement, bordures 1px, un seul accent.

   Design system (aucune valeur hors de ces jetons) :
     · encre       #131d2f / #47536a / #79849a   (le demi-cerveau NPSI)
     · trait       #dde2ea / #c5ced9
     · surfaces    #ffffff / #f5f7f8 / #eef4f3
     · accent      #1f6f68 (unique) + #a8d2cd en aplat fin
     · typo        Source Serif 4 (titres) / DM Sans (texte et interface)
     · espace      4 8 12 16 24 32 48 72 104
     · rayon       0 · 3px · 6px          épaisseur de trait : 1px
   Tout est préfixé .hf-* et porté sous .hf-home.
   ========================================================================== */

.hf-home {
    /* — encre — */
    --hf-ink: #131d2f;
    --hf-ink-2: #47536a;
    --hf-ink-3: #79849a;
    /* — traits — */
    --hf-line: #dde2ea;
    --hf-line-2: #c5ced9;
    /* — surfaces — */
    --hf-bg: #ffffff;
    --hf-bg-2: #f5f7f8;
    --hf-bg-accent: #eef4f3;
    /* — accent unique — */
    --hf-accent: #1f6f68;
    --hf-accent-2: #a8d2cd;
    /* — fond de la bande « conformité » — */
    --hf-band: #131d2f;
    /* — typographie — */
    --hf-serif: 'Source Serif 4', 'Lora', Georgia, 'Times New Roman', serif;
    --hf-sans: 'DM Sans', 'Segoe UI', Tahoma, sans-serif;
    /* — espacement — */
    --hf-1: 4px;
    --hf-2: 8px;
    --hf-3: 12px;
    --hf-4: 16px;
    --hf-5: 24px;
    --hf-6: 32px;
    --hf-7: 48px;
    --hf-8: 72px;
    --hf-9: 104px;
    /* — rayons — */
    --hf-r: 3px;
    --hf-r-2: 6px;

    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--hf-5) var(--hf-8);
    font-family: var(--hf-sans);
    color: var(--hf-ink);
    font-size: 0.95rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.hf-home[hidden] {
    display: none;
}

.hf-home p {
    margin: 0;
}

/* Les utilitaires .ha-anim d'index-page.css translatent de 40 à 48px : trop
   démonstratif pour cette page. On garde l'observateur existant, on réduit
   l'amplitude à un simple raccrochage. */
.hf-home .ha-anim {
    transition-duration: 0.45s;
}

.hf-home .ha-anim-up {
    transform: translateY(12px);
}

.hf-home .ha-anim-left {
    transform: translateX(-12px);
}

.hf-home .ha-anim-right {
    transform: translateX(12px);
}

/* Indispensable : les trois règles ci-dessus ont la même spécificité que le
   .ha-anim.ha-visible d'index-page.css, mais ce fichier est chargé après —
   sans cette remise à zéro, l'élément resterait décalé de 12px une fois
   révélé. */
.hf-home .ha-anim.ha-visible {
    transform: translate(0, 0);
}

/* Étiquette de section : le seul usage de la majuscule espacée. */
.hf-home .hf-eyebrow {
    display: flex;
    align-items: center;
    gap: var(--hf-3);
    margin-bottom: var(--hf-4);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hf-ink-3);
}

.hf-home .hf-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hf-line);
}

.hf-home .hf-h2 {
    margin: 0;
    font-family: var(--hf-serif);
    font-size: clamp(1.4rem, 2.1vw, 1.85rem);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.008em;
    color: var(--hf-ink);
}

.hf-home .hf-lead {
    max-width: 62ch;
    margin-top: var(--hf-3);
    color: var(--hf-ink-2);
}

/* ==========================================================================
   1. Accroche — colonne de texte et fiche de faits, asymétriques
   ========================================================================== */

.hf-home .hf-lede {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: var(--hf-8);
    align-items: start;
    padding: var(--hf-7) 0 var(--hf-7);
    border-bottom: 1px solid var(--hf-line);
}

.hf-home .hf-kicker {
    display: inline-flex;
    align-items: baseline;
    gap: var(--hf-2);
    margin-bottom: var(--hf-5);
    padding-bottom: var(--hf-2);
    border-bottom: 1px solid var(--hf-accent-2);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hf-accent);
}

.hf-home .hf-title {
    margin: 0;
    font-family: var(--hf-serif);
    font-size: clamp(1.95rem, 3.5vw, 2.95rem);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.018em;
    text-wrap: balance;
}

.hf-home .hf-title em {
    font-style: italic;
    font-weight: 500;
    color: var(--hf-accent);
}

.hf-home .hf-lede-text {
    max-width: 54ch;
    margin-top: var(--hf-5);
    font-size: 1.02rem;
    color: var(--hf-ink-2);
}

/* Fiche de faits : lignes clé / valeur, denses, séparées par un filet. */
.hf-home .hf-facts {
    border: 1px solid var(--hf-line);
    border-radius: var(--hf-r);
    background: var(--hf-bg);
}

.hf-home .hf-facts dl {
    margin: 0;
}

.hf-home .hf-fact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: var(--hf-3);
    padding: var(--hf-3) var(--hf-4);
    border-bottom: 1px solid var(--hf-line);
}

.hf-home .hf-fact:last-child {
    border-bottom: 0;
}

.hf-home .hf-fact dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hf-ink-3);
    line-height: 1.75;
}

.hf-home .hf-fact dd {
    margin: 0;
    font-size: 0.88rem;
    color: var(--hf-ink);
}

/* ==========================================================================
   2. Flux du bilan — rail de cinq étapes et scène de démonstration
   ========================================================================== */

.hf-home .hf-flow {
    margin: 0 calc(var(--hf-5) * -1);
    padding: var(--hf-7) var(--hf-5);
    background: var(--hf-bg-2);
    border-bottom: 1px solid var(--hf-line);
}

.hf-home .hf-flow-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--hf-4);
    margin-bottom: var(--hf-5);
}

.hf-home .hf-hint {
    display: inline-flex;
    align-items: center;
    gap: var(--hf-2);
    font-size: 0.8rem;
    color: var(--hf-ink-3);
}

.hf-home .hf-hint i {
    font-size: 0.72rem;
    color: var(--hf-accent);
}

/* — Rail — */
.hf-home .hf-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--hf-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Le filet qui relie les cinq étapes, à hauteur des cellules d'icône. */
.hf-home .hf-steps::before {
    content: '';
    position: absolute;
    top: 46px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--hf-line-2);
}

.hf-home .hf-step {
    position: relative;
    min-width: 0;
}

.hf-home .hf-node {
    display: block;
    width: 100%;
    padding: var(--hf-3) var(--hf-3) var(--hf-4);
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.hf-home .hf-node-num {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--hf-ink-3);
    transition: color 0.15s ease;
}

.hf-home .hf-node-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: var(--hf-2) 0 var(--hf-3);
    border: 1px solid var(--hf-line-2);
    border-radius: var(--hf-r);
    background: var(--hf-bg);
    color: var(--hf-ink-2);
    font-size: 0.98rem;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.hf-home .hf-node-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--hf-ink);
}

.hf-home .hf-node-desc {
    display: block;
    margin-top: var(--hf-1);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--hf-ink-3);
}

.hf-home .hf-node:hover .hf-node-icon,
.hf-home .hf-node:focus-visible .hf-node-icon {
    border-color: var(--hf-accent);
    color: var(--hf-accent);
}

.hf-home .hf-node:focus-visible {
    outline: 1px solid var(--hf-accent);
    outline-offset: 2px;
}

.hf-home .hf-step.is-active .hf-node-icon {
    border-color: var(--hf-accent);
    background: var(--hf-accent);
    color: #fff;
}

.hf-home .hf-step.is-active .hf-node-num {
    color: var(--hf-accent);
}

/* Le repère qui rattache l'étape active à la scène, en dessous. */
.hf-home .hf-step.is-active .hf-node::after {
    content: '';
    position: absolute;
    left: var(--hf-3);
    right: var(--hf-3);
    bottom: 0;
    height: 2px;
    background: var(--hf-accent);
}

/* — Scène : une seule séquence visible à la fois — */
.hf-home .hf-stage {
    position: relative;
    margin-top: var(--hf-4);
    border: 1px solid var(--hf-line-2);
    border-radius: var(--hf-r-2);
    background: var(--hf-bg);
    overflow: hidden;
}

.hf-home .hf-clip {
    display: none;
    margin: 0;
}

.hf-home .hf-clip.is-active {
    display: block;
}

.hf-home .hf-clip-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--hf-bg-2);
}

.hf-home .hf-clip video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--hf-bg-2);
}

/* Séquence jouée par une page HTML animée plutôt que par un fichier vidéo
   (étape 02 : app/static/animations/questionnaires.html). Même cadrage que la
   vidéo, mais sans object-fit : l'animation se met elle-même à l'échelle. */
.hf-home .hf-clip iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--hf-bg-2);
}

/* Séquence pas encore déposée : la scène garde sa place et l'annonce. */
.hf-home .hf-clip:not([data-media="ready"]) video,
.hf-home .hf-clip:not([data-media="ready"]) iframe {
    opacity: 0;
}

.hf-home .hf-clip-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: var(--hf-3);
    color: var(--hf-ink-3);
    text-align: center;
}

.hf-home .hf-clip[data-media="ready"] .hf-clip-empty {
    display: none;
}

.hf-home .hf-clip-empty i {
    font-size: 1.5rem;
    color: var(--hf-line-2);
}

.hf-home .hf-clip-empty span {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.hf-home .hf-clip figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--hf-2) var(--hf-3);
    padding: var(--hf-3) var(--hf-4);
    border-top: 1px solid var(--hf-line);
    font-size: 0.85rem;
    color: var(--hf-ink-2);
}

.hf-home .hf-clip figcaption b {
    font-weight: 600;
    color: var(--hf-ink);
}

/* — Rail « teaser » : une seule vidéo, cinq chapitres (accueil_home_v2.html) —
   La barre sous chaque étape se remplit pendant son chapitre : mises bout à
   bout, les cinq barres forment la progression de la vidéo. L'étape en cours
   prend l'accent plein, les étapes passées gardent l'accent en liseré. */
/* Toute la hauteur de la ligne : les cinq barres restent alignées même
   quand une description passe sur trois lignes. */
.hf-home .hf-flow-teaser .hf-node {
    position: relative;
    height: 100%;
}

.hf-home .hf-flow-teaser .hf-step.is-active .hf-node::after {
    content: none;
}

.hf-home .hf-node-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--hf-line);
}

.hf-home .hf-node-bar i {
    display: block;
    height: 100%;
    background: var(--hf-accent);
    transform: scaleX(var(--hf-p, 0));
    transform-origin: left center;
}

.hf-home .hf-flow-teaser .hf-step.is-done .hf-node-icon {
    border-color: var(--hf-accent);
    color: var(--hf-accent);
}

.hf-home .hf-flow-teaser .hf-step.is-done .hf-node-num {
    color: var(--hf-accent);
}

/* L'affiche tient lieu d'image tant que la vidéo charge : on ne la masque
   pas, et le cartouche n'apparaît que si le fichier manque vraiment. */
.hf-home .hf-flow-teaser .hf-clip video {
    opacity: 1;
    cursor: pointer;
}

.hf-home .hf-flow-teaser .hf-clip:not([data-media="missing"]) .hf-clip-empty {
    display: none;
}

.hf-home .hf-flow-teaser .hf-clip[data-media="missing"] video,
.hf-home .hf-flow-teaser .hf-clip[data-media="missing"] .hf-teaser-toggle {
    display: none;
}

.hf-home .hf-teaser-toggle {
    position: absolute;
    right: var(--hf-3);
    bottom: var(--hf-3);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--hf-r-2);
    background: rgba(10, 18, 48, 0.6);
    color: #fff;
    font-size: 0.78rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.15s ease;
}

.hf-home .hf-teaser-toggle:hover {
    background: rgba(10, 18, 48, 0.85);
}

.hf-home .hf-clip-frame:hover .hf-teaser-toggle,
.hf-home .hf-clip-frame.is-paused .hf-teaser-toggle,
.hf-home .hf-teaser-toggle:focus-visible {
    opacity: 1;
}

.hf-home .hf-teaser-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Sans survol possible (tactile), le bouton reste affiché. */
@media (hover: none) {
    .hf-home .hf-teaser-toggle {
        opacity: 1;
    }
}

/* ==========================================================================
   3. Temps gagné — une mesure en grand, un tableau qui la détaille
   ========================================================================== */

.hf-home .hf-gain {
    display: grid;
    grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
    gap: var(--hf-8);
    align-items: start;
    padding: var(--hf-7) 0;
    border-bottom: 1px solid var(--hf-line);
}

.hf-home .hf-figure {
    margin-top: var(--hf-5);
    font-family: var(--hf-serif);
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--hf-accent);
}

.hf-home .hf-figure small {
    font-size: 0.38em;
    font-weight: 500;
    letter-spacing: 0;
}

.hf-home .hf-figure-note {
    margin-top: var(--hf-3);
    font-size: 0.92rem;
    color: var(--hf-ink-2);
}

.hf-home .hf-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.hf-home .hf-table th,
.hf-home .hf-table td {
    padding: var(--hf-3);
    border-bottom: 1px solid var(--hf-line);
    text-align: right;
    vertical-align: baseline;
}

.hf-home .hf-table th:first-child,
.hf-home .hf-table td:first-child {
    padding-left: 0;
    text-align: left;
}

.hf-home .hf-table th:last-child,
.hf-home .hf-table td:last-child {
    padding-right: 0;
}

/* Les colonnes de valeurs ne se replient pas : c'est le libellé du poste,
   seul en-tête à contenu variable, qui absorbe la largeur restante. */
.hf-home .hf-table thead th+th {
    white-space: nowrap;
}

.hf-home .hf-table thead th {
    border-bottom-color: var(--hf-line-2);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hf-ink-3);
}

.hf-home .hf-table tbody td {
    font-size: 0.9rem;
    color: var(--hf-ink-2);
}

.hf-home .hf-table tbody th {
    padding-left: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hf-ink);
    text-align: left;
}

.hf-home .hf-table .hf-was {
    color: var(--hf-ink-3);
}

.hf-home .hf-table .hf-now {
    font-weight: 600;
    color: var(--hf-ink);
}

.hf-home .hf-table .hf-delta {
    color: var(--hf-accent);
    font-weight: 600;
}

.hf-home .hf-table tfoot th,
.hf-home .hf-table tfoot td {
    border-bottom: 0;
    padding-top: var(--hf-4);
    font-weight: 600;
    color: var(--hf-ink);
}

/* Barre de proportion : un filet plein sur un filet vide, sans ombre. */
.hf-home .hf-bar {
    display: block;
    width: 100%;
    height: 3px;
    margin-top: var(--hf-2);
    background: var(--hf-line);
}

.hf-home .hf-bar i {
    display: block;
    height: 100%;
    background: var(--hf-accent-2);
}

.hf-home .hf-note {
    margin-top: var(--hf-4);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--hf-ink-3);
}

/* ==========================================================================
   3b. Échelle plateforme — compteurs catalogue + volume patients
   ========================================================================== */

.hf-home .hf-scale {
    padding: var(--hf-7) 0;
    border-bottom: 1px solid var(--hf-line);
}

.hf-home .hf-scale-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hf-5);
    margin: var(--hf-5) 0 0;
    padding: 0;
    list-style: none;
}

.hf-home .hf-scale-item {
    padding: var(--hf-5);
    border: 1px solid var(--hf-line);
    border-radius: var(--hf-r-2);
    background: var(--hf-bg-2);
    text-align: center;
}

.hf-home .hf-scale-value {
    display: block;
    font-family: var(--hf-serif);
    font-size: clamp(1.85rem, 3.2vw, 2.35rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--hf-accent);
    font-variant-numeric: tabular-nums;
}

.hf-home .hf-scale-label {
    display: block;
    margin-top: var(--hf-2);
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--hf-ink-2);
}

.hf-home .hf-scale-note {
    margin: var(--hf-4) 0 0;
    max-width: 72ch;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--hf-ink-3);
}

/* ==========================================================================
   4. Conformité — bande encrée, rupture de rythme
   ========================================================================== */

.hf-home .hf-legal {
    margin: 0 calc(var(--hf-5) * -1);
    padding: var(--hf-7);
    background: var(--hf-band);
    color: #e6eaf0;
}

.hf-home .hf-legal .hf-eyebrow {
    color: rgba(230, 234, 240, 0.55);
}

.hf-home .hf-legal .hf-eyebrow::after {
    background: rgba(230, 234, 240, 0.18);
}

.hf-home .hf-legal .hf-h2 {
    color: #fff;
}

.hf-home .hf-legal .hf-lead {
    color: rgba(230, 234, 240, 0.72);
}

.hf-home .hf-legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--hf-8);
    margin-top: var(--hf-5);
}

.hf-home .hf-legal-item {
    padding: var(--hf-4) 0;
    border-top: 1px solid rgba(230, 234, 240, 0.16);
}

.hf-home .hf-legal-item h3 {
    display: flex;
    align-items: baseline;
    gap: var(--hf-3);
    margin: 0 0 var(--hf-2);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.hf-home .hf-legal-item h3 i {
    font-size: 0.76rem;
    color: var(--hf-accent-2);
}

.hf-home .hf-legal-item p {
    font-size: 0.86rem;
    line-height: 1.55;
    color: rgba(230, 234, 240, 0.68);
}

.hf-home .hf-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hf-5);
    margin-top: var(--hf-5);
    padding-top: var(--hf-4);
    border-top: 1px solid rgba(230, 234, 240, 0.16);
    font-size: 0.85rem;
}

.hf-home .hf-legal-links a {
    color: var(--hf-accent-2);
    text-decoration: none;
    border-bottom: 1px solid rgba(168, 210, 205, 0.4);
    padding-bottom: 1px;
}

.hf-home .hf-legal-links a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* ==========================================================================
   5. Partenariat — bloc court, logo à gauche
   ========================================================================== */

.hf-home .hf-partner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--hf-7);
    align-items: center;
    margin-top: var(--hf-7);
    padding: var(--hf-6);
    border: 1px solid var(--hf-line);
    border-radius: var(--hf-r);
    background: var(--hf-bg-accent);
}

.hf-home .hf-partner-mark {
    display: grid;
    place-items: center;
    padding: var(--hf-4) var(--hf-5);
    border: 1px solid var(--hf-line);
    border-radius: var(--hf-r);
    background: #fff;
}

.hf-home .hf-partner-mark img {
    display: block;
    width: 84px;
    height: auto;
}

.hf-home .hf-partner h3 {
    margin: var(--hf-2) 0 0;
    font-family: var(--hf-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--hf-ink);
}

.hf-home .hf-partner p {
    max-width: 62ch;
    margin-top: var(--hf-3);
    font-size: 0.92rem;
    color: var(--hf-ink-2);
}

/* ==========================================================================
   Adaptations
   ========================================================================== */

@media (max-width: 1100px) {

    .hf-home .hf-lede,
    .hf-home .hf-gain {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--hf-6);
    }

    .hf-home .hf-facts {
        max-width: 520px;
    }

    .hf-home .hf-figure {
        margin-top: 0;
    }
}

@media (max-width: 900px) {
    .hf-home .hf-scale-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hf-home .hf-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--hf-2);
    }

    .hf-home .hf-steps::before {
        display: none;
    }

    .hf-home .hf-legal-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hf-home .hf-legal {
        padding: var(--hf-6) var(--hf-5);
    }

    .hf-home .hf-partner {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--hf-5);
        justify-items: start;
    }
}

@media (max-width: 640px) {
    .hf-home {
        padding: 0 var(--hf-4) var(--hf-7);
    }

    .hf-home .hf-flow,
    .hf-home .hf-legal {
        margin: 0 calc(var(--hf-4) * -1);
        padding-left: var(--hf-4);
        padding-right: var(--hf-4);
    }

    .hf-home .hf-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .hf-home .hf-scale-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hf-home .hf-node {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0 var(--hf-3);
        align-items: center;
    }

    .hf-home .hf-node-num {
        grid-column: 2;
    }

    .hf-home .hf-node-icon {
        grid-row: 1 / span 3;
        margin: 0;
    }

    .hf-home .hf-table th,
    .hf-home .hf-table td {
        padding-left: var(--hf-2);
        padding-right: var(--hf-2);
    }

    .hf-home .hf-col-was {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hf-home .hf-clip video {
        display: none;
    }

    /* Le teaser reste affiché, à l'arrêt sur son affiche : il ne se lance
       qu'à la demande (bouton de lecture). */
    .hf-home .hf-flow-teaser .hf-clip video {
        display: block;
    }

    .hf-home .ha-anim {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Variante « Home 2 » (.hf-home-v2)
   --------------------------------------------------------------------------
   Meme page, trois ecarts assumes :
     1. la palette suit le MODE du site au lieu du teal NPSI de Home ;
     2. la fiche de faits est une grille 2 x 2 a filets internes ;
     3. la conformite tient sur une ligne par point.
   ========================================================================== */

/* — 1a. Mode Old : bleu identitaire var(--syn-grad-1) -> var(--syn-grad-2) — */
.hf-home-v2 {
    --hf-ink: #101833;
    --hf-ink-2: #46507a;
    --hf-ink-3: #7a83a6;
    --hf-line: #dde3f4;
    --hf-line-2: #c3ccea;
    --hf-bg: #ffffff;
    --hf-bg-2: #f4f6fd;
    --hf-bg-accent: #eef1fb;
    --hf-accent: var(--syn-grad-2);
    --hf-accent-2: #a8b6ee;
    /* Bande conformite volontairement ATTENUEE : assez sombre pour marquer la
       rupture, pas assez pour trouer la page comme le faisait #101833. */
    --hf-band: #33406b;
}

/* — 2. Fiche de faits : grille 2 x 2, filets internes, libelle accentue — */
.hf-home-v2 .hf-facts {
    border-radius: var(--hf-r-2);
    overflow: hidden;
}

.hf-home-v2 .hf-facts-title {
    padding: var(--hf-2) var(--hf-4);
    border-bottom: 1px solid var(--hf-line);
    background: var(--hf-bg-accent);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hf-ink-3);
}

.hf-home-v2 .hf-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.hf-home-v2 .hf-fact {
    display: block;
    padding: var(--hf-4);
    border-right: 1px solid var(--hf-line);
    border-bottom: 1px solid var(--hf-line);
}

.hf-home-v2 .hf-fact:nth-child(2n) {
    border-right: 0;
}

.hf-home-v2 .hf-fact:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.hf-home-v2 .hf-fact dt {
    display: flex;
    align-items: center;
    gap: var(--hf-2);
    margin-bottom: var(--hf-2);
    font-size: 0.67rem;
    letter-spacing: 0.11em;
    line-height: 1.2;
    color: var(--hf-accent);
}

.hf-home-v2 .hf-fact dt i {
    font-size: 0.8rem;
}

.hf-home-v2 .hf-fact dd {
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--hf-ink-2);
}

/* — 3. Conformite : une ligne par point, sur trois colonnes —
       La bande etant plus claire que dans Home, on remonte les alphas du
       texte secondaire pour conserver le contraste. */
.hf-home-v2 .hf-legal .hf-eyebrow {
    color: rgba(255, 255, 255, 0.62);
}

.hf-home-v2 .hf-legal .hf-eyebrow::after {
    background: rgba(255, 255, 255, 0.2);
}

.hf-home-v2 .hf-legal .hf-lead {
    color: rgba(255, 255, 255, 0.78);
}

.hf-home-v2 .hf-legal-links {
    border-top-color: rgba(255, 255, 255, 0.18);
}

.hf-home-v2 .hf-legal-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hf-4) var(--hf-6);
    margin: var(--hf-5) 0 0;
    padding: 0;
    list-style: none;
}

.hf-home-v2 .hf-legal-list li {
    padding-top: var(--hf-3);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

/* Le libellé tient sa propre ligne : pas de tiret de séparation à poser. */
.hf-home-v2 .hf-legal-list b {
    display: flex;
    align-items: center;
    gap: var(--hf-2);
    margin-bottom: var(--hf-1);
    font-weight: 600;
    color: #fff;
}

.hf-home-v2 .hf-legal-list i {
    font-size: 0.76rem;
    color: var(--hf-accent-2);
}

@media (max-width: 900px) {
    .hf-home-v2 .hf-legal-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {

    .hf-home-v2 .hf-facts-grid,
    .hf-home-v2 .hf-legal-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .hf-home-v2 .hf-fact {
        border-right: 0;
    }

    .hf-home-v2 .hf-fact:nth-last-child(-n + 2) {
        border-bottom: 1px solid var(--hf-line);
    }

    .hf-home-v2 .hf-fact:last-child {
        border-bottom: 0;
    }
}

/* ==========================================================================
   Palette Accueil (.hf-home-b) — confort de lecture
   --------------------------------------------------------------------------
   Fond Accueil très clair, légèrement bleuté, intégré au cadre (plus de carte
   superposée) ; encres opaques un cran moins dures ; filets avec une pointe
   de bleu ; bande « conformité » en indigo.
   ========================================================================== */

.hf-home-v2.hf-home-b {
    /* encre opaque, contraste tenu mais sans dureté */
    --hf-ink: #1b2338;
    --hf-ink-2: #4d5876;
    --hf-ink-3: #7e88a3;
    /* traits légèrement bleutés : ils se lisent sans peser */
    --hf-line: #dfe5f2;
    --hf-line-2: #c6cfe6;
    /* surfaces : blanc pour le contenu, deux aplats froids très clairs */
    --hf-bg: #ffffff;
    --hf-bg-2: #f2f5fb;
    --hf-bg-accent: #eaf0fd;
    /* accent : suit le dégradé mode Old (Paramètres) */
    --hf-accent: var(--syn-grad-2);
    --hf-accent-2: #aebbef;
    /* bande conformité : indigo, plus chaud que l'ardoise et moins profond
       que le bleu nuit #101833 qui trouait la page */
    --hf-band: #2b3660;
}

/* Plus de fiche « En bref » : l'accroche reprend toute la largeur au lieu de
   laisser la colonne de droite vide. */
.hf-home-b .hf-lede {
    grid-template-columns: minmax(0, 1fr);
}

.hf-home-b .hf-lede-text {
    max-width: 64ch;
}

/* ==========================================================================
   Accroche : image de consultation en fond, à la demande
   --------------------------------------------------------------------------
   Le bouton pose .is-media sur la section. Image et texte partagent la même
   cellule de grille (grid-area 1/1) : la hauteur de la ligne est celle du
   plus haut des deux, et l'image gardant height:auto n'est jamais recadrée
   ni étirée — le bloc s'adapte à elle, pas l'inverse.
   ========================================================================== */

.hf-home-b .hf-lede {
    position: relative;
    isolation: isolate;
    /* Le retrait haut de 48px de .hf-home vient d'une page qui commence loin
       sous la banniere ; ici la page est calee juste dessous et ajoute deja
       ses 32px de gouttiere. On rend l'air en trop : l'image (et le titre,
       image masquee) demarre plus pres de la bande. */
    padding-top: var(--hf-3);
}

.hf-home-b .hf-lede-body {
    grid-area: 1 / 1;
    align-self: center;
    position: relative;
    z-index: 1;
}

.hf-home-b .hf-lede-img {
    grid-area: 1 / 1;
    align-self: center;
    width: 100%;
    height: auto;
    border-radius: var(--hf-r-2);
    /* Retirée du flux tant que le bouton n'a pas été actionné : la hauteur
       du bloc est alors celle du seul texte. */
    display: none;
}

.hf-home-b .hf-lede.is-media .hf-lede-img {
    display: block;
}

/* Voile : sans lui le texte passe mal sur la photo. Il suit le fond Accueil,
   donc la lecture reste la même dans les deux modes. */
.hf-home-b .hf-lede.is-media::before {
    content: '';
    grid-area: 1 / 1;
    align-self: stretch;
    z-index: 0;
    border-radius: var(--hf-r-2);
    background: linear-gradient(100deg,
            rgba(251, 252, 255, 0.82) 0%,
            rgba(251, 252, 255, 0.68) 40%,
            rgba(251, 252, 255, 0.35) 72%,
            rgba(251, 252, 255, 0.12) 100%);
}

/* Le bouton : discret, aligné sur le reste de l'interface de la page. */
.hf-home-b .hf-lede-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--hf-2);
    margin-top: var(--hf-5);
    padding: 7px 14px;
    border: 1px solid var(--hf-line-2);
    border-radius: 999px;
    background: var(--hf-bg);
    color: var(--hf-ink-2);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hf-home-b .hf-lede-toggle:hover {
    color: var(--hf-accent);
    border-color: var(--hf-accent-2);
    background: var(--hf-bg-accent);
}

.hf-home-b .hf-lede-toggle:focus-visible {
    outline: 2px solid var(--hf-accent);
    outline-offset: 2px;
}

.hf-home-b .hf-lede-toggle i {
    color: var(--hf-accent);
}

/* Un seul des deux libellés est visible : l'état est porté par aria-pressed. */
.hf-home-b .hf-lede-toggle .hf-lede-toggle-off,
.hf-home-b .hf-lede-toggle[aria-pressed="true"] .hf-lede-toggle-on {
    display: none;
}

.hf-home-b .hf-lede-toggle[aria-pressed="true"] .hf-lede-toggle-off {
    display: inline;
}

/* Sous 720px la photo passerait derrière un texte plus haut qu'elle : on la
   laisse au-dessus du texte, en bandeau, plutôt que de la voiler entièrement. */
@media (max-width: 720px) {
    .hf-home-b .hf-lede.is-media {
        grid-template-rows: auto auto;
        gap: var(--hf-5);
    }

    .hf-home-b .hf-lede.is-media .hf-lede-img {
        grid-area: 1 / 1;
    }

    .hf-home-b .hf-lede.is-media .hf-lede-body {
        grid-area: 2 / 1;
    }

    .hf-home-b .hf-lede.is-media::before {
        display: none;
    }
}

/* ==========================================================================
   Accueil / Présentation intégrés (plein cadre) — plus de feuille flottante
   --------------------------------------------------------------------------
   #accueil-home et #demo-home remplacent le fond de la coquille : on annule
   le padding du .container-fluid parent (haut + gouttières Bootstrap) pour
   coller sous la bannière et aux bords. Le texte reste dans une colonne
   lisible ; les bandes .hf-flow / .hf-legal s'élargissent un peu.
   ========================================================================== */

#accueil-home.hf-home-b,
#demo-home.hf-home-b {
    position: relative;
    z-index: 0;
    max-width: none;
    width: auto;
    /* padding-top du #main-sections-container (20px) + gouttières BS */
    margin: -20px calc(var(--bs-gutter-x, 1.5rem) * -0.5) 0;
    padding: var(--hf-6) var(--hf-7) var(--hf-8);
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f9fe 100%);
    /* Couvre la coquille même si le contenu est plus court que l'écran */
    min-height: calc(100vh - 4.25rem);
    overflow: visible;
    box-sizing: border-box;
}

#accueil-home.hf-home-b>*,
#demo-home.hf-home-b>* {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

#accueil-home.hf-home-b .hf-flow,
#accueil-home.hf-home-b .hf-legal,
#demo-home.hf-home-b .hf-flow,
#demo-home.hf-home-b .hf-legal {
    max-width: calc(1180px + var(--hf-5) * 2);
    margin: 0 auto;
}

@media (max-width: 991.98px) {

    /* mobile.css : padding-top 12px et gouttières fixes 12px */
    #accueil-home.hf-home-b,
    #demo-home.hf-home-b {
        margin: -12px -12px 0;
    }
}

@media (max-width: 640px) {

    #accueil-home.hf-home-b,
    #demo-home.hf-home-b {
        padding: var(--hf-5) var(--hf-4) var(--hf-7);
    }
}

/* Les outils de Présentation sont une bande, comme les rubriques d'Accueil.
   Le détail est avec les bandes pleine largeur, plus bas. */

/* ==========================================================================
   Rail « Le flux de travail » posé dans une autre page (.hf-home-inline)
   --------------------------------------------------------------------------
   Variante compacte (historique) : palette Accueil sans mise en page
   pleine largeur. La Présentation utilise désormais #demo-home.
   ========================================================================== */

.hf-home.hf-home-inline {
    position: static;
    inset: auto;
    z-index: auto;
    max-width: none;
    height: auto;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
}

.hf-home-inline>* {
    max-width: none;
}

/* La bande du flux ne déborde plus des gouttières : la carte hôte les fournit. */
.hf-home-inline .hf-flow {
    margin: 0;
    max-width: none;
    border-bottom: 0;
    border-radius: var(--hf-r-2);
    padding: var(--hf-5);
}

/* ==========================================================================
   Accueil — bandes pleine largeur
   --------------------------------------------------------------------------
   Le fond bleu du body dépasse dès que la coquille est bornée à 1600px et
   que chaque rubrique est recadrée à ~1180px. Ici, dès qu'Accueil ou
   Présentation est la section visible, la coquille s'ouvre bord à bord et
   chaque rubrique devient une bande opaque. Le texte reste dans une colonne
   lisible.
   ========================================================================== */

#main-sections-container:has(#accueil-section:not([style*="display: none"]) #accueil-content:not(.d-none)),
#main-sections-container:has(#demo-section:not([style*="display: none"]) #demo-content:not(.d-none)) {
    flex: 1 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #f4f7fc;
}

#accueil-section:has(#accueil-content:not(.d-none)),
#demo-section:has(#demo-content:not(.d-none)) {
    background: #f4f7fc;
}

#accueil-home.hf-home-b,
#demo-home.hf-home-b {
    --hf-band-x: max(24px, calc((100% - 1220px) / 2));
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #f4f7fc;
    /* Le zoom html (80 %) fait qu'un 100vh ne couvre pas l'écran : on
       compense pour que le bleu du body ne réapparaisse pas sous la page. */
    min-height: calc(100vh / 0.8 - 4.5rem);
}

#accueil-home.hf-home-b>section,
#demo-home.hf-home-b>section {
    max-width: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding-left: var(--hf-band-x);
    padding-right: var(--hf-band-x);
}

/* Le flux et la vidéo gardent la largeur de l'ancienne coquille (1600px),
   pas la colonne de texte des autres rubriques. */
#accueil-home.hf-home-b>section.hf-flow,
#demo-home.hf-home-b>section.hf-flow {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: var(--hf-7) max(32px, calc((100% - 1300px) / 2));
}

/* Présentation : moins d'air autour de « Le flux de travail ». */
#demo-home.hf-home-b>section.hf-flow {
    padding-top: var(--hf-4);
    padding-bottom: var(--hf-6);
}

#demo-home .hf-flow-head {
    margin-bottom: var(--hf-3);
}

#demo-home .hf-flow-head .hf-eyebrow {
    margin-bottom: 0;
}

/* — 1. Accroche — */
#accueil-home .hf-lede {
    padding-top: clamp(48px, 6vw, 88px);
    padding-bottom: clamp(56px, 7vw, 96px);
    border-bottom: 0;
    background:
        radial-gradient(ellipse 62% 80% at 100% 0%, rgba(61, 91, 208, 0.11), transparent 58%),
        #ffffff;
}

/* Image affichée : elle sort de la colonne et va d'un bord à l'autre.
   Le texte garde la gouttière de lecture. */
#accueil-home.hf-home-b>section.hf-lede.is-media {
    padding: 0;
}

#accueil-home .hf-lede.is-media .hf-lede-body {
    padding: clamp(48px, 6vw, 88px) var(--hf-band-x) clamp(56px, 7vw, 96px);
}

#accueil-home .hf-lede.is-media .hf-lede-img,
#accueil-home .hf-lede.is-media::before {
    border-radius: 0;
}

#accueil-home .hf-title {
    max-width: 16em;
}

#accueil-home .hf-lede-text {
    font-size: 1.08rem;
    line-height: 1.6;
}

/* — 3. Temps gagné — */
#accueil-home .hf-gain {
    padding-top: clamp(52px, 6vw, 88px);
    padding-bottom: clamp(52px, 6vw, 88px);
    border-bottom: 0;
    background: #ffffff;
}

#accueil-home .hf-figure {
    letter-spacing: -0.04em;
}

#accueil-home .hf-table {
    border: 1px solid var(--hf-line);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    overflow: hidden;
}

#accueil-home .hf-table th,
#accueil-home .hf-table td {
    padding: 14px var(--hf-4);
}

#accueil-home .hf-table thead th {
    background: var(--hf-bg-2);
}

/* — 3b. Échelle plateforme — */
#accueil-home .hf-scale {
    padding-top: clamp(40px, 5vw, 64px);
    padding-bottom: clamp(40px, 5vw, 64px);
    border-bottom: 0;
    background: #f6f9fe;
}

#accueil-home .hf-scale-item {
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(27, 35, 56, 0.04);
}

/* — 4. Conformité — même largeur utile que « Temps de travail » (1220px) */
#accueil-home.hf-home-b > section.hf-legal {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: clamp(52px, 6vw, 88px) var(--hf-band-x);
    background: linear-gradient(118deg, #1e2a4d 0%, #2c3d72 52%, #3a56b5 130%);
}

#accueil-home .hf-legal .hf-lead {
    max-width: none;
}

/* — 5. Partenariat — même largeur utile que « Temps de travail » (1220px) */
#accueil-home.hf-home-b > section.hf-partner {
    flex: 1 0 auto;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: clamp(40px, 5vw, 64px) var(--hf-band-x) clamp(48px, 6vw, 80px);
    border: 0;
    border-radius: 0;
    background: #e7eefb;
}

#accueil-home .hf-partner-mark {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(27, 35, 56, 0.06);
}

#accueil-home .hf-partner p {
    max-width: none;
}

/* — Présentation : les outils, même bande blanche que « Temps gagné » — */
#demo-home.hf-home-b>section.hf-tools {
    flex: 1 0 auto;
    padding-top: clamp(52px, 6vw, 88px);
    padding-bottom: clamp(52px, 6vw, 88px);
    border-bottom: 0;
    background: #ffffff;
}

#demo-home .hf-tools .hf-lead {
    max-width: 62ch;
}

#demo-home .hf-tools-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hf-5) var(--hf-6);
    margin: var(--hf-6) 0 0;
    padding: 0;
    list-style: none;
}

#demo-home .hf-tools-list li {
    padding-top: var(--hf-4);
    border-top: 1px solid var(--hf-line);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--hf-ink-2);
}

#demo-home .hf-tools-list b {
    display: flex;
    align-items: center;
    gap: var(--hf-2);
    margin-bottom: var(--hf-2);
    font-weight: 600;
    color: var(--hf-ink);
}

#demo-home .hf-tools-list i {
    width: 1.1em;
    font-size: 0.82rem;
    color: var(--hf-accent);
    text-align: center;
}

#demo-home .hf-tools-go {
    display: inline-flex;
    align-items: center;
    gap: var(--hf-2);
    margin-top: var(--hf-6);
    padding: 7px 14px;
    border: 1px solid var(--hf-line-2);
    border-radius: 999px;
    background: var(--hf-bg);
    color: var(--hf-ink-2);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#demo-home .hf-tools-go:hover {
    color: var(--hf-accent);
    border-color: var(--hf-accent-2);
    background: var(--hf-bg-accent);
}

#demo-home .hf-tools-go:focus-visible {
    outline: 2px solid var(--hf-accent);
    outline-offset: 2px;
}

#demo-home .hf-tools-go i {
    color: var(--hf-accent);
}

@media (max-width: 900px) {
    #demo-home .hf-tools-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    #accueil-home.hf-home-b,
    #demo-home.hf-home-b {
        --hf-band-x: 20px;
    }

    #demo-home .hf-tools-list {
        grid-template-columns: minmax(0, 1fr);
    }
}