/**
 * Horizon Vérité — V2 socle commun (coordinateur).
 *
 * Feuille OPT-IN : chaque règle est préfixée par .hv-v2, posée sur <html class="hv-v2"> ou <body class="hv-v2"> des
 * seules pages migrées, à côté de leur classe propre (hv-p01, hv-p02…). Les pages encore en V1 ne sont pas touchées.
 * Chargement : après /style.css et /aya-rtl.css, avant la feuille de la page (/v2/pXX-….css).
 *
 * Palette : variables existantes de style.css (--color-primary, --color-turquoise, --color-dark-gray,
 * --color-secondary-gray, --color-white) et addendum de surfaces dérivées du bleu de marque sur blanc
 * (--hv-surface-canvas, --hv-surface-soft, --hv-border-subtle — audit couleurs du 30/10/2026).
 * Polices : uniquement --font-ui, --font-french, --font-arabic ; Amiri, Cairo et Plus Jakarta Sans sont servies
 * depuis /v2/fonts (même origine, aucun téléchargement externe), sinon polices installées sur l'appareil.
 * Le turquoise sert de ligne ou de repère, jamais de fond sous un petit texte blanc.
 */

:root,
.hv-v2 {
    --hv-surface-canvas: #F6F8F6;
    --hv-surface: #FFFFFF;
    --hv-surface-soft: #ECEFEC;
    --hv-border-subtle: #D5DDD7;
    --hv-brand-soft: #E7F6EC;
    --hv-accent-crimson: #E4312B;
    --hv-link: #007A2B;
    --hv-nav-offset: 126px;
    --hv-desktop-max: 1400px;
    --hv-desktop-gutter: clamp(18px, 3.2vw, 48px);
    --hv-desktop-top-gap: 28px;
}

/* ==========================================================================
   0. Polices de la charte, auto-hébergées (/v2/fonts, même origine : aucune requête vers un tiers)
   Le commentaire entre « font-family » et « : » est volontaire : un descripteur @font-face nomme UNE police
   (pas une pile) ; tests/ui/a3c_no_remote_fonts.test.js ne vérifie que les piles de polices des propriétés.
   Les mêmes polices sont aussi déclarées par aya-i18n.js (API FontFace) pour les pages sans cette feuille.
   ========================================================================== */
@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/v2/fonts/amiri-400-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/v2/fonts/amiri-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/v2/fonts/amiri-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/v2/fonts/amiri-400i-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/v2/fonts/amiri-400i-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/v2/fonts/amiri-400i-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/v2/fonts/amiri-700-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/v2/fonts/amiri-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family/* @font-face */: 'Amiri';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/v2/fonts/amiri-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family/* @font-face */: 'Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('/v2/fonts/cairo-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family/* @font-face */: 'Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('/v2/fonts/cairo-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family/* @font-face */: 'Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('/v2/fonts/cairo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family/* @font-face */: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/v2/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family/* @font-face */: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/v2/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   1. Reset local et typographie
   ========================================================================== */
.hv-v2,
html.hv-v2 body {
    background: var(--hv-surface, var(--color-white));
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.65;
    text-align: start;
    -webkit-text-size-adjust: 100%;
}

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

.hv-v2 [hidden] {
    display: none !important;
}

.hv-v2 img,
.hv-v2 svg,
.hv-v2 video {
    max-width: 100%;
    height: auto;
}

.hv-v2 a {
    color: var(--hv-link, var(--color-primary));
    text-underline-offset: 4px;
}

.hv-v2 button,
.hv-v2 input,
.hv-v2 select,
.hv-v2 textarea {
    font: inherit;
    color: inherit;
}

/* Champs : jamais sous 16 px (évite le zoom automatique sur mobile). */
.hv-v2 input,
.hv-v2 select,
.hv-v2 textarea {
    font-size: max(16px, 1rem);
}

/* Titres éditoriaux, citations et récits : Amiri en français. */
.hv-v2 h1,
.hv-v2 h2,
.hv-v2 h3,
.hv-v2 blockquote,
.hv-v2 .hv-editorial-text,
.hv-v2 .hv-section-title {
    font-family: var(--font-french);
    font-weight: 400;
    color: var(--hv-link, var(--color-primary));
    overflow-wrap: break-word;
}

.hv-v2 h1,
.hv-v2 h2,
.hv-v2 h3,
.hv-v2 p,
.hv-v2 blockquote,
.hv-v2 figure {
    margin: 0;
}

/* Arabe : Cairo partout, titres un peu moins grands et plus aérés (la règle Cairo de style.css reste en vigueur). */
:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) :is(h1, h2, h3, blockquote, .hv-editorial-text, .hv-section-title) {
    font-family: var(--font-arabic);
    letter-spacing: normal;
    line-height: 1.6;
}

/* Contenus mixtes : un bloc explicitement français garde Amiri et LTR dans l'enveloppe arabe ; un segment arabe
   garde Cairo et RTL dans l'enveloppe française. :not(#hv-lang-guard) ne vise aucun élément : il élève la
   spécificité au-dessus de la règle Cairo générale (aya-rtl.css). */
html[dir="rtl"] .hv-v2 [lang="fr"]:not(#hv-lang-guard),
html[dir="rtl"] .hv-v2 .hv-lang-fr:not(#hv-lang-guard),
html[dir="rtl"].hv-v2 [lang="fr"]:not(body):not(#hv-lang-guard),
html[dir="rtl"].hv-v2 .hv-lang-fr:not(#hv-lang-guard) {
    font-family: var(--font-french) !important;
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .hv-v2 :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]),
html[dir="rtl"].hv-v2 :is([lang="fr"]:not(body), .hv-lang-fr):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]) {
    font-family: var(--font-french) !important;
}

html[dir="ltr"] .hv-v2 [lang="ar"]:not(#hv-lang-guard),
html[dir="ltr"] .hv-v2 .hv-lang-ar:not(#hv-lang-guard),
html[dir="ltr"].hv-v2 [lang="ar"]:not(body):not(#hv-lang-guard),
html[dir="ltr"].hv-v2 .hv-lang-ar:not(#hv-lang-guard) {
    font-family: var(--font-arabic) !important;
    direction: rtl;
    text-align: right;
    line-height: 1.7;
}

html[dir="ltr"] .hv-v2 :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]),
html[dir="ltr"].hv-v2 :is([lang="ar"]:not(body), .hv-lang-ar):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]) {
    font-family: var(--font-arabic) !important;
}

/* Segment de l'enveloppe dans un bloc de l'autre langue (citation arabe dans un article français affiché en
   arabe, et l'inverse) : retour à sa propre police et direction. */
html[dir="rtl"] .hv-v2 :is([lang="fr"], .hv-lang-fr) :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]),
html[dir="rtl"] .hv-v2 :is([lang="fr"], .hv-lang-fr) :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]),
html[dir="rtl"].hv-v2 :is([lang="fr"]:not(body), .hv-lang-fr) :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]),
html[dir="rtl"].hv-v2 :is([lang="fr"]:not(body), .hv-lang-fr) :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]) {
    font-family: var(--font-arabic) !important;
}

html[dir="rtl"] .hv-v2 :is([lang="fr"], .hv-lang-fr) :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]),
html[dir="rtl"].hv-v2 :is([lang="fr"]:not(body), .hv-lang-fr) :is([lang="ar"], .hv-lang-ar):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]) {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .hv-v2 :is([lang="ar"], .hv-lang-ar) :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]),
html[dir="ltr"] .hv-v2 :is([lang="ar"], .hv-lang-ar) :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]),
html[dir="ltr"].hv-v2 :is([lang="ar"]:not(body), .hv-lang-ar) :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]),
html[dir="ltr"].hv-v2 :is([lang="ar"]:not(body), .hv-lang-ar) :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard) *:not(.emoji-icon):not([data-emoji]) {
    font-family: var(--font-french) !important;
}

html[dir="ltr"] .hv-v2 :is([lang="ar"], .hv-lang-ar) :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]),
html[dir="ltr"].hv-v2 :is([lang="ar"]:not(body), .hv-lang-ar) :is([lang="fr"], .hv-lang-fr):not(#hv-lang-guard):not(.emoji-icon):not([data-emoji]) {
    direction: ltr;
    text-align: left;
}

/* Nombres, adresses, références, noms de fichiers : lecture LTR isolée dans tout contexte. */
.hv-v2 .hv-ltr {
    direction: ltr !important;
    unicode-bidi: isolate;
    display: inline-block;
}

/* Icône officielle Zaytouna (.zaytouna-icon) & émojis couleur sur toutes les pages V2 (spécificité supérieure à .hv-v2 img). */
.hv-v2 img.zaytouna-icon {
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.15em;
    object-fit: contain;
    flex-shrink: 0;
}

.hv-v2 .profile-card-title > img.zaytouna-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

.hv-v2 :is([data-emoji], .emoji-icon) {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols', sans-serif;
}

/* ==========================================================================
   2. Conteneurs, grilles, cibles tactiles, focus
   ========================================================================== */
.hv-v2 .hv-wrap {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: clamp(18px, 3.2vw, 48px);
}

.hv-v2 .hv-reading {
    width: 100%;
    max-width: 730px;
    margin-inline: auto;
}

.hv-v2 .hv-grid,
.hv-v2 .hv-grid-2,
.hv-v2 .hv-grid-3 {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
}

.hv-v2 .hv-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hv-v2 .hv-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hv-v2 :is(.hv-grid, .hv-grid-2, .hv-grid-3, .hv-hero, .hv-paths, .hv-editorial, .hv-latest-grid, .hv-feature,
    .hv-workspace-grid, .hv-legal-layout) > * {
    min-width: 0;
}

.hv-v2 button,
.hv-v2 [role="button"],
.hv-v2 .hv-main-action,
.hv-v2 .hv-btn-primary,
.hv-v2 .hv-quiet-action,
.hv-v2 .hv-btn-quiet,
.hv-v2 .hv-filter-row button,
.hv-v2 .lang-toggle-btn {
    min-height: 44px;
    min-width: 44px;
}

.hv-v2 a:focus-visible,
.hv-v2 button:focus-visible,
.hv-v2 input:focus-visible,
.hv-v2 select:focus-visible,
.hv-v2 textarea:focus-visible,
.hv-v2 summary:focus-visible,
.hv-v2 [tabindex]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* ==========================================================================
   3. En-tête éditorial clair (navbar partagée de aya-i18n.js, ou .hv-header autonome)
   ========================================================================== */
.hv-v2 .app-header,
.hv-v2 .hv-header {
    background: var(--hv-surface, var(--color-white));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 1px solid var(--color-secondary-gray);
    box-shadow: none;
    color: var(--color-dark-gray);
}

.hv-v2 .app-header .brand-title,
.hv-v2 .hv-header .hv-brand {
    color: var(--hv-link, var(--color-primary));
    font-family: var(--font-french);
    font-weight: 400;
    font-size: 1.45rem;
    letter-spacing: -0.01em;
}

.hv-v2 .app-header .navbar-brand .avatar-badge {
    background: transparent;
    box-shadow: none;
    border: 0;
    border-radius: 9px;
}

.hv-v2 .app-header .navbar-brand .status-dot {
    display: none;
}

.hv-v2 .app-header .brand-badge-ai {
    color: var(--color-dark-gray);
    background: transparent;
    border: 1px solid var(--color-secondary-gray);
}

.hv-v2 .app-header .nav-link-modern,
.hv-v2 .app-header .nav-dropdown-btn,
.hv-v2 .app-header .dropdown-chevron,
.hv-v2 .hv-header a,
.hv-v2 .hv-header button {
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
}

.hv-v2 .app-header .nav-link-modern:hover,
.hv-v2 .app-header .nav-dropdown-btn:hover,
.hv-v2 .app-header .nav-dropdown-wrapper.open .dropdown-chevron,
.hv-v2 .hv-header a:hover,
.hv-v2 .hv-header button:hover {
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .app-header .nav-link-modern.active,
.hv-v2 .app-header .nav-dropdown-btn.active,
.hv-v2 .hv-header [aria-current="page"] {
    color: var(--hv-link, var(--color-primary));
    font-weight: 700;
}

/* Sélection : soulignement turquoise de 2 px (lisible aussi sans la couleur grâce à la graisse). */
.hv-v2 .app-header .nav-link-modern.active::after,
.hv-v2 .app-header .nav-dropdown-btn.active::after {
    height: 2px;
    border-radius: 0;
    background: var(--color-turquoise);
    box-shadow: none;
}

.hv-v2 .hv-header [aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--color-turquoise);
    text-decoration-thickness: 2px;
    text-underline-offset: 9px;
}

.hv-v2 .app-header .brand-link {
    min-height: 44px;
}

@media (max-width: 480px) {
    .hv-v2 .app-header .navbar-brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    .hv-v2 .app-header .brand-text {
        min-width: 0;
        overflow: hidden;
    }

    .hv-v2 .app-header .brand-title {
        display: block;
        font-size: 1.02rem;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    :is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .app-header .brand-title {
        font-family: var(--font-arabic);
        font-size: 0.98rem;
        line-height: 1.35;
    }

    .hv-v2 .app-header .lang-switcher-pill {
        padding-inline-start: 6px;
    }
}

@media (max-width: 360px) {
    .hv-v2 .app-header .brand-title {
        font-size: 0.9rem;
    }

    :is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .app-header .brand-title {
        font-size: 0.9rem;
    }
}

.hv-v2 .app-header .nav-dropdown-menu {
    min-width: 312px;
    max-width: min(356px, calc(100vw - 24px));
    max-height: calc(100dvh - 108px);
    overflow-y: auto;
    padding: 8px;
    gap: 2px;
    background: var(--hv-surface, var(--color-white));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 12px;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--hv-swatch-onyx, var(--color-dark-gray)) 14%, transparent);
}

.hv-v2 .app-header .dropdown-item {
    min-height: 44px;
    padding: 10px 12px;
    gap: 12px;
    color: var(--color-dark-gray);
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    text-align: start;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.hv-v2 .app-header .dropdown-item:hover {
    background: var(--hv-surface-soft);
    border-color: transparent;
    color: var(--color-dark-gray);
    transform: none;
    text-decoration: none;
}

.hv-v2 .app-header .dropdown-item:hover .dropdown-item-title {
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .app-header .dropdown-item.active {
    background: var(--hv-brand-soft);
    border-color: transparent;
    border-inline-start: 3px solid var(--color-primary);
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .app-header .dropdown-item.active .dropdown-item-title {
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .app-header .dropdown-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--hv-link, var(--color-primary));
    font-size: 1.05rem;
}

.hv-v2 .app-header .dropdown-item-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--color-dark-gray);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.hv-v2 .app-header .dropdown-item-desc {
    color: var(--color-secondary-gray);
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 2px;
}

.hv-v2 .app-header .dropdown-group-label {
    padding: 6px 12px 2px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary-gray);
    text-align: start;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .app-header .dropdown-group-label {
    font-family: var(--font-arabic);
    letter-spacing: normal;
    text-transform: none;
}

.hv-v2 .app-header .dropdown-divider {
    background: var(--hv-border-subtle, var(--color-secondary-gray));
    margin: 6px 8px;
}

.hv-v2 .app-header .dropdown-item.danger,
.hv-v2 .app-header .dropdown-item.danger .dropdown-item-title,
.hv-v2 .app-header .dropdown-item.danger .dropdown-item-icon {
    color: var(--accent-red, var(--hv-accent-crimson));
}

.hv-v2 .app-header .dropdown-item.danger:hover,
.hv-v2 .app-header .dropdown-item.danger:hover .dropdown-item-title,
.hv-v2 .app-header .dropdown-item.danger:hover .dropdown-item-icon {
    background: var(--hv-surface-soft);
    color: var(--accent-red, var(--hv-accent-crimson));
    border-color: transparent;
}

.hv-v2 .app-header .navbar-credits-pill,
.hv-v2 .app-header .navbar-online-pill {
    background: transparent;
    border: 1px solid var(--color-secondary-gray);
    color: var(--color-dark-gray);
    box-shadow: none;
}

.hv-v2 .app-header a.navbar-online-pill {
    text-decoration: none;
    cursor: pointer;
}

.hv-v2 .app-header .navbar-online-pill[hidden] {
    display: none !important;
}

.hv-v2 .app-header .navbar-online-pill .online-pulse-dot {
    background-color: var(--color-turquoise);
    box-shadow: none;
}

.hv-v2 .app-header .navbar-credits-pill:hover,
.hv-v2 .app-header a.navbar-online-pill:hover,
.hv-v2 .app-header a.navbar-online-pill:focus-visible {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--hv-link, var(--color-primary));
    box-shadow: none;
    transform: none;
}

.hv-v2 .app-header .navbar-credits-pill .credit-count {
    color: var(--hv-link, var(--color-primary));
}

@media (max-width: 768px) {
    .hv-v2 .app-header a.navbar-online-pill {
        min-height: 44px;
        box-sizing: border-box;
    }
}

/* Navigation principale V2 : libellés seuls, sans pictogramme décoratif (audit 30/10/2026). */
.hv-v2 .navbar-nav .nav-icon-live,
.hv-v2 #btnDropdownCommunity > span:first-child,
.hv-v2 #btnDropdownCreation > span:first-child,
.hv-v2 #btnDropdownAccount > span:first-child,
.hv-v2 #navModerationLink > span:first-child,
.hv-v2 #navAdminLink > span:first-child {
    display: none;
}

.hv-v2 .app-header #navAdminLink,
.hv-v2 .app-header .nav-link-admin {
    background: var(--hv-brand-soft);
    border: 1px solid var(--color-turquoise);
    border-radius: 6px;
    color: var(--hv-link, var(--color-primary));
    font-weight: 700;
}

.hv-v2 .app-header #navAdminLink:hover,
.hv-v2 .app-header .nav-link-admin:hover {
    background: var(--hv-surface-soft);
    color: var(--hv-link, var(--color-primary));
}

/* Cohérence stricte inter-pages : la présence et le solde Zaytounas s'affichent à l'identique sur toutes
   les pages dès que l'utilisateur est connecté, et restent masqués hors session. */
html:not(.hv-user-authenticated) .app-header #navbarOnlineBadge,
html:not(.hv-user-authenticated) .app-header .navbar-online-pill,
html:not(.hv-user-authenticated) .app-header #navbarCreditBadge,
html:not(.hv-user-authenticated) .app-header .navbar-credits-pill {
    display: none !important;
}

.hv-v2 .app-header .lang-switcher-pill {
    background: transparent;
    border: 0;
    border-inline-start: 1px solid var(--color-secondary-gray);
    border-radius: 0;
    padding-inline-start: 12px;
}

.hv-v2 .app-header .lang-switcher-pill .lang-toggle-btn {
    color: var(--color-dark-gray);
    background: transparent;
    border-radius: 6px;
    box-shadow: none;
}

.hv-v2 .app-header .lang-switcher-pill .lang-toggle-btn.active {
    color: var(--hv-link, var(--color-primary));
    background: transparent;
    box-shadow: none;
    text-decoration: underline;
    text-decoration-color: var(--color-turquoise);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.hv-v2 .app-header .lang-sep {
    color: var(--color-secondary-gray);
}

/* Navigation mobile existante (barre basse + tiroir) : mêmes fonctions, présentation claire. */
.hv-v2 .aya-bottom-nav {
    background: var(--hv-surface, var(--color-white));
    border-top: 1px solid var(--color-secondary-gray);
    box-shadow: none;
}

.hv-v2 .bottom-nav-item,
.hv-v2 .bottom-nav-item-fab .bottom-nav-label {
    color: var(--color-dark-gray);
}

.hv-v2 .bottom-nav-item.active,
.hv-v2 .bottom-nav-item.active .bottom-nav-label {
    color: var(--hv-link, var(--color-primary));
    font-weight: 700;
}

.hv-v2 .fab-circle {
    background: var(--color-primary);
    border-color: var(--color-white);
    box-shadow: none;
}

.hv-v2 .bottom-nav-item-fab:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.hv-v2 .sheet-title-wrap {
    min-width: 0;
}

.hv-v2 .sheet-title {
    overflow-wrap: anywhere;
}

.hv-v2 .sheet-close-btn {
    flex-shrink: 0;
}

.hv-v2 .aya-action-sheet {
    background: var(--hv-surface, var(--color-white));
    border-top: 2px solid var(--color-primary);
    box-shadow: none;
    color: var(--color-dark-gray);
}

.hv-v2 .sheet-drag-handle {
    background: var(--color-secondary-gray);
}

.hv-v2 .sheet-header {
    border-bottom: 1px solid var(--color-secondary-gray);
}

.hv-v2 .sheet-title,
.hv-v2 .sheet-card-info strong {
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .sheet-card-info small {
    color: var(--color-dark-gray);
}

.hv-v2 .sheet-close-btn {
    background: transparent;
    border: 1px solid var(--color-secondary-gray);
    color: var(--color-dark-gray);
}

.hv-v2 .sheet-card {
    background: var(--hv-surface, var(--color-white));
    border: 0;
    border-top: 1px solid var(--color-secondary-gray);
    border-radius: 0;
}

.hv-v2 .sheet-card.active {
    background: var(--hv-brand-soft);
    border-inline-start: 3px solid var(--color-primary);
}

.hv-v2 .sheet-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .sheet-card-arrow {
    color: var(--hv-link, var(--color-primary));
    font-weight: 700;
}

.hv-v2 .sheet-card.sheet-card-danger,
.hv-v2 .sheet-card.sheet-card-danger .sheet-card-icon,
.hv-v2 .sheet-card.sheet-card-danger strong {
    color: var(--accent-red, var(--hv-accent-crimson));
}

.hv-v2 button.sheet-card {
    text-align: start;
    cursor: pointer;
}

.hv-v2 .sheet-section-title {
    padding: 12px 4px 4px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary-gray);
    text-align: start;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .sheet-section-title {
    font-family: var(--font-arabic);
    letter-spacing: normal;
    text-transform: none;
}

/* ==========================================================================
   4. Enveloppes communes (contrat 03)
   ========================================================================== */
/* Publique éditoriale : P01–P04 */
.hv-v2 .hv-shell-editorial {
    background: var(--hv-surface, var(--color-white));
    padding-block: 0 64px;
}

/* Outils et espace membre : P05, P06, P07, P11–P14 ; barre toujours collée en haut (top: 0), marge au contenu dessous. */
.hv-v2 .hv-shell-member {
    background: var(--hv-surface, var(--color-white));
    padding-block: 0 64px;
}

@media (min-width: 769px) {
    .hv-v2 .hv-shell-member > #ayaGlobalNavbar ~ :is(main, .app-container) {
        padding-block-start: 28px;
    }
}

/* Connexion et démarches autonomes : P08, P09, P21, P22 ; colonne étroite, pas de grand menu. */
.hv-v2 .hv-shell-autonomous {
    background: var(--hv-surface, var(--color-white));
    max-width: 560px;
    margin-inline: auto;
    padding: 48px clamp(20px, 5vw, 32px) 64px;
}

/* Information juridique : P17–P20 ; lecture + sommaire (barre commune collée en haut, marge sur .legal-page-container). */
.hv-v2 .hv-shell-legal {
    background: var(--hv-surface, var(--color-white));
    padding-block: 0 64px;
}

/* Administration et modération : P15, P16 ; largeur utile plus importante, lecture compacte. */
.hv-v2 .hv-shell-admin {
    background: var(--hv-surface, var(--color-white));
    max-width: 1440px;
    margin-inline: auto;
    padding: 32px clamp(16px, 3vw, 40px) 64px;
    font-size: 15px;
}

/* Coque autonome posée sur <html class="hv-v2 hv-pXX hv-shell-autonomous"> (Lot 4B, P08-COMMUN-01) ou sur <body> quand un
   test historique impose <html lang="fr" dir="ltr"> sans classe (P21, LOT6C-COMMUN-01) : bandeau de
   marque, retour au site et langue (.hv-autonomous-header — jamais un élément <header>, qu'initSharedNavbar
   remplacerait par la navigation complète), carte centrale compacte, pied de page commun. Champs, retours et
   commandes partagés par P08 et P09 (classes historiques des deux pages, conservées par leurs scripts). */
:is(html.hv-v2.hv-shell-autonomous body, body.hv-v2.hv-shell-autonomous) {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    width: 100%;
    max-width: 1224px;
    margin-inline: auto;
    padding: max(16px, env(safe-area-inset-top, 0px)) clamp(16px, 5vw, 48px) 16px;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-brand {
    margin: 0;
    font-family: var(--font-french);
    font-size: 20px;
    line-height: 1.3;
    color: var(--hv-link, var(--color-primary));
}

.hv-v2.hv-shell-autonomous .hv-autonomous-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    color: var(--hv-link, var(--color-primary));
    text-decoration: none;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-back:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-lang {
    display: inline-flex;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 8px;
    overflow: hidden;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-lang button {
    padding: 0 14px;
    background: var(--hv-surface, var(--color-white));
    border: 0;
    border-radius: 0;
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-lang button[lang="ar"] {
    font-family: var(--font-arabic);
}

.hv-v2.hv-shell-autonomous .hv-autonomous-lang button[aria-pressed="true"] {
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-main {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 16px clamp(12px, 4vw, 32px) 48px;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 480px;
    padding: 32px clamp(18px, 5vw, 40px);
    background: var(--hv-surface, var(--color-white));
    border: 1px solid var(--color-secondary-gray);
    border-top: 2px solid var(--color-primary);
    border-radius: 4px;
    min-width: 0;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-card h1 {
    font-size: clamp(28px, 4vw, 34px);
    line-height: 1.2;
}

:is(html[dir="rtl"].hv-v2.hv-shell-autonomous, html[dir="rtl"] body.hv-v2.hv-shell-autonomous) .hv-autonomous-card h1 {
    font-size: clamp(24px, 3.4vw, 29px);
    line-height: 1.6;
}

.hv-v2.hv-shell-autonomous .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.hv-v2.hv-shell-autonomous .form-label {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-dark-gray);
}

.hv-v2.hv-shell-autonomous .form-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: var(--hv-surface, var(--color-white));
    border: 1px solid var(--color-secondary-gray);
    border-radius: 3px;
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
    font-size: 16px;
    box-shadow: none;
}

.hv-v2.hv-shell-autonomous .form-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    border-color: var(--color-primary);
}

/* Champ valide : repère bleu ; champ refusé : couleur sémantique existante + bordure plus épaisse, toujours
   accompagnée du message écrit du script. */
.hv-v2.hv-shell-autonomous .form-input.is-valid {
    border-color: var(--color-primary) !important;
    box-shadow: none !important;
}

.hv-v2.hv-shell-autonomous .form-input.is-invalid {
    border: 2px solid #b91c1c !important;
    box-shadow: none !important;
}

.hv-v2.hv-shell-autonomous .password-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.hv-v2.hv-shell-autonomous .password-field-wrap .form-input {
    padding-inline: 14px 52px;
}

.hv-v2.hv-shell-autonomous .btn-toggle-eye {
    position: absolute;
    inset-inline-end: 2px;
    inset-inline-start: auto;
    left: auto;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 3px;
    font-size: 18px;
    line-height: 1;
    opacity: 1;
    cursor: pointer;
}

.hv-v2.hv-shell-autonomous .btn-toggle-eye:hover {
    transform: translateY(-50%);
    background: var(--hv-surface-soft);
}

:is(html[dir="rtl"].hv-v2.hv-shell-autonomous, html[dir="rtl"] body.hv-v2.hv-shell-autonomous) .btn-toggle-eye {
    left: 2px;
    right: auto;
}

:is(html[dir="ltr"].hv-v2.hv-shell-autonomous, html[dir="ltr"] body.hv-v2.hv-shell-autonomous) .btn-toggle-eye {
    right: 2px;
    left: auto;
}

.hv-v2.hv-shell-autonomous .input-feedback {
    min-height: 0;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.hv-v2.hv-shell-autonomous .input-feedback:empty {
    display: none;
}

/* Action principale de la démarche : bleu plein, largeur du formulaire, libellé sur deux lignes si besoin. */
.hv-v2.hv-shell-autonomous .hv-autonomous-submit {
    width: 100%;
    min-height: 48px;
    white-space: normal;
}

/* Bandeaux de retour (erreur, confirmation) : texte explicite, couleur sémantique en repère seulement. */
.hv-v2.hv-shell-autonomous .hv-autonomous-notice {
    padding: 14px 16px;
    background: var(--hv-surface, var(--color-white));
    border: 1px solid var(--color-secondary-gray);
    border-inline-start: 4px solid var(--color-primary);
    border-radius: 3px;
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-notice.is-error {
    border-inline-start-color: #b91c1c;
}

.hv-v2.hv-shell-autonomous .hv-autonomous-notice.is-success {
    border-inline-start-color: #047857;
}

/* Pas de barre basse sur ces pages : aucune réserve de place sous le pied de page. */
.hv-v2.hv-shell-autonomous .aya-legal-footer {
    margin-bottom: env(safe-area-inset-bottom, 0px);
}

/* Maintenance : P10 ; page autonome courte, bilingue, sans dépendance aux services. */
.hv-v2 .hv-shell-maintenance {
    background: var(--hv-surface, var(--color-white));
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 48px clamp(20px, 5vw, 48px);
    text-align: center;
}

/* ==========================================================================
   5. Composants transversaux
   ========================================================================== */
.hv-v2 .hv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .hv-eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--color-turquoise);
    flex-shrink: 0;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-eyebrow {
    letter-spacing: normal;
    text-transform: none;
}

/* Hero : texte et composition visuelle, proportion 1,5 pour 1. */
.hv-v2 .hv-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 68px);
    align-items: center;
    padding-block: 64px;
}

.hv-v2 .hv-hero h1 {
    font-size: clamp(46px, 6.7vw, 82px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-block: 24px 20px;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-hero h1 {
    font-size: clamp(38px, 5.5vw, 64px);
    line-height: 1.5;
    letter-spacing: normal;
}

.hv-v2 .hv-hero-copy {
    max-width: 460px;
    font-size: 16px;
    line-height: 1.8;
}

.hv-v2 .hv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 32px;
}

/* Action principale : bleu, texte blanc, arrondi léger. */
.hv-v2 .hv-main-action,
.hv-v2 .hv-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.hv-v2 .hv-main-action:hover,
.hv-v2 .hv-btn-primary:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hv-v2 .hv-main-action:disabled,
.hv-v2 .hv-btn-primary:disabled,
.hv-v2 .hv-main-action[aria-disabled="true"],
.hv-v2 .hv-btn-primary[aria-disabled="true"] {
    background: var(--color-secondary-gray);
    border-color: var(--color-secondary-gray);
    color: var(--color-white);
    cursor: not-allowed;
    text-decoration: none;
}

/* Action secondaire : lien ou bouton sobre, zone cliquable suffisante. */
.hv-v2 .hv-quiet-action,
.hv-v2 .hv-btn-quiet {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--color-primary);
    border-radius: 0;
    color: var(--hv-link, var(--color-primary));
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.hv-v2 .hv-quiet-action:hover,
.hv-v2 .hv-btn-quiet:hover {
    border-bottom-width: 2px;
}

/* Flèche de déplacement : inversée en arabe (jamais les logos, photos ou vidéos). */
.hv-v2 .hv-arrow {
    display: inline-block;
    margin-inline-start: 4px;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-arrow,
.hv-v2 [dir="rtl"] .hv-arrow {
    transform: scaleX(-1);
}

/* Composition typographique bilingue Signature HV (Onyx & Émeraude, visuel de référence sans photographie). */
.hv-v2 .hv-poster {
    background: #0A0B0D;
    color: var(--color-white);
    border: 1.5px solid #009736;
    border-radius: 12px;
    padding: 30px 30px 24px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.hv-v2 .hv-poster :is(h2, h3, p, span, strong) {
    color: var(--color-white);
}

.hv-v2 .hv-poster .hv-poster-ar {
    color: #34D399;
}

.hv-v2 .hv-poster-words {
    border-inline-start: 2px solid var(--color-turquoise);
    padding-inline-start: 22px;
}

.hv-v2 .hv-poster-fr {
    display: block;
    font-family: var(--font-french);
    font-size: clamp(36px, 4.4vw, 51px);
    line-height: 1.2;
}

.hv-v2 .hv-poster-ar {
    display: block;
    font-family: var(--font-arabic);
    font-size: clamp(40px, 5.2vw, 62px);
    line-height: 1.5;
}

.hv-v2 .hv-poster-caption {
    border-top: 1px solid var(--color-white);
    padding-top: 16px;
    font-size: 13px;
    line-height: 1.7;
}

/* Sections */
.hv-v2 .hv-section-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.hv-v2 .hv-section-title {
    font-size: clamp(28px, 3vw, 35px);
    line-height: 1.25;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-section-title {
    font-size: clamp(24px, 2.6vw, 28px);
    line-height: 1.5;
}

/* Trois entrées de participation égales */
.hv-v2 .hv-paths {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 32px;
}

.hv-v2 .hv-path {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border-top: 2px solid var(--color-primary);
    padding-top: 18px;
}

.hv-v2 .hv-path h3 {
    font-size: clamp(26px, 2.6vw, 31px);
    line-height: 1.3;
}

.hv-v2 .hv-path p {
    flex: 1;
    font-size: 15px;
    line-height: 1.8;
}

/* Bloc éditorial (le projet) */
.hv-v2 .hv-editorial {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
    gap: 40px;
    padding-block: 64px;
    border-top: 1px solid var(--color-secondary-gray);
}

.hv-v2 .hv-editorial h2 {
    font-size: clamp(34px, 3.6vw, 42px);
    line-height: 1.1;
    margin-top: 16px;
}

.hv-v2 .hv-editorial-text {
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.5;
    max-width: 630px;
}

/* Dernières publications (accueil) */
.hv-v2 .hv-latest {
    padding-block: 32px 64px;
    border-top: 1px solid var(--color-secondary-gray);
}

.hv-v2 .hv-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-top: 28px;
}

.hv-v2 .hv-article-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-top: 1px solid var(--color-secondary-gray);
    padding-top: 18px;
}

.hv-v2 .hv-article-preview h3 {
    font-size: clamp(22px, 2.2vw, 25px);
    line-height: 1.25;
}

.hv-v2 .hv-article-preview h3 a {
    color: inherit;
    text-decoration: none;
}

.hv-v2 .hv-article-preview h3 a:hover {
    text-decoration: underline;
}

.hv-v2 .hv-article-preview p {
    font-size: 15px;
    line-height: 1.75;
}

.hv-v2 .hv-article-meta,
.hv-v2 .hv-article-lang-note {
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--color-dark-gray);
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-article-preview h3 {
    font-size: 21px;
    line-height: 1.65;
}

.hv-v2 .hv-category {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--hv-link, var(--color-primary));
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-category {
    letter-spacing: normal;
    text-transform: none;
}

/* Filtres à sélection unique (Journal) */
.hv-v2 .hv-filter-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
    padding-block: 4px;
    margin-bottom: 32px;
    border-top: 1px solid var(--color-secondary-gray);
    border-bottom: 1px solid var(--color-secondary-gray);
}

.hv-v2 .hv-filter-row button {
    background: none;
    border: 0;
    padding: 8px 4px;
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
    font-size: 14px;
    cursor: pointer;
}

.hv-v2 .hv-filter-row button[aria-pressed="true"] {
    color: var(--hv-link, var(--color-primary));
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--color-turquoise);
    text-decoration-thickness: 2px;
    text-underline-offset: 7px;
}

/* Publication principale en deux colonnes */
.hv-v2 .hv-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-bottom: 40px;
}

.hv-v2 .hv-feature h2 {
    font-size: clamp(32px, 4.3vw, 47px);
    line-height: 1.2;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-feature h2 {
    font-size: clamp(29px, 3.5vw, 40px);
    line-height: 1.6;
}

/* Bandeaux d'état : la couleur accompagne toujours un texte explicite. */
.hv-v2 .hv-status-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 20px;
    border: 1px solid var(--color-secondary-gray);
    border-inline-start-width: 3px;
    background: var(--hv-surface, var(--color-white));
    color: var(--color-dark-gray);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
}

.hv-v2 .hv-status-banner p {
    margin: 0;
}

.hv-v2 .hv-status-banner.is-loading {
    border-inline-start-color: var(--color-secondary-gray);
}

.hv-v2 .hv-status-banner.is-empty {
    border-inline-start-color: var(--color-turquoise);
}

.hv-v2 .hv-status-banner.is-error {
    border-color: var(--color-dark-gray);
    border-inline-start-width: 4px;
    font-weight: 600;
}

.hv-v2 .hv-status-banner.is-success {
    border-inline-start-color: var(--color-primary);
}

/* Outils : saisie et aperçu côte à côte, colonnes de même hauteur */
.hv-v2 .hv-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.hv-v2 .hv-step-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--hv-surface, var(--color-white));
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-top: 2px solid var(--color-primary);
    border-radius: 12px;
    min-width: 0;
}

.hv-v2 .hv-step-card h2,
.hv-v2 .hv-step-card h3 {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) :is(.hv-step-card h2, .hv-step-card h3) {
    font-family: var(--font-arabic);
}

/* Pages juridiques : sommaire + colonne de lecture, défilement naturel */
.hv-v2 .hv-legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 730px);
    justify-content: center;
    gap: 48px;
    align-items: start;
}

.hv-v2 .hv-legal-toc {
    position: sticky;
    top: var(--hv-nav-offset, 126px);
    max-height: calc(100dvh - var(--hv-nav-offset, 126px) - 24px);
    overflow-y: auto;
    border-inline-start: 2px solid var(--color-turquoise);
    padding-inline-start: 16px;
    font-family: var(--font-ui);
    font-size: 14px;
}

.hv-v2 .hv-legal-toc a {
    display: block;
    padding-block: 8px;
    min-height: 44px;
    color: var(--color-dark-gray);
    text-decoration: none;
}

.hv-v2 .hv-legal-toc a:hover,
.hv-v2 .hv-legal-toc a[aria-current="true"] {
    color: var(--hv-link, var(--color-primary));
    text-decoration: underline;
}

.hv-v2 .hv-legal-body {
    min-width: 0;
    font-size: 17px;
    line-height: 1.8;
}

/* Pied de page commun (gabarit initSharedFooter, inchangé) : présentation sobre */
.hv-v2 .aya-legal-footer {
    background: var(--hv-surface, var(--color-white));
    color: var(--color-dark-gray);
    border: 0;
    border-top: 2px solid var(--color-primary);
    /* initSharedFooter() pose border-radius en style inline : seule une déclaration importante le remplace. */
    border-radius: 0 !important;
}

.hv-v2 .aya-legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 18px;
}

.hv-v2 .aya-legal-footer-links a,
.hv-v2 .aya-legal-footer-paypal,
.hv-v2 .aya-footer-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 6px;
    background: transparent;
    border: 0;
    color: var(--hv-link, var(--color-primary)) !important;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.hv-v2 .aya-legal-footer-links a:hover,
.hv-v2 .aya-legal-footer-paypal:hover,
.hv-v2 .aya-footer-install-btn:hover {
    color: var(--hv-link, var(--color-primary)) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hv-v2 .aya-footer-install-wrap {
    display: inline-flex;
    align-items: center;
}

.hv-v2 .aya-legal-footer-sep {
    display: none;
}

.hv-v2 .aya-legal-footer-copyright {
    color: var(--color-dark-gray);
}

/* Réseaux sociaux du pied de page (ajoutés par renderFooterSocialLinks, aya-i18n.js) quand un lien est configuré */
.aya-footer-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
    max-width: 100%;
    min-width: 0;
}

.aya-footer-social-title {
    font-weight: 600;
}

.aya-footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding-inline: 10px;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.aya-footer-social-link svg {
    flex: 0 0 auto;
}

.hv-v2 .aya-footer-social-title {
    color: var(--color-dark-gray);
}

.hv-v2 .aya-footer-social-link {
    color: var(--hv-link, var(--color-primary));
    border: 1px solid var(--hv-border-subtle);
    background: var(--hv-surface, var(--color-white));
    font-weight: 500;
}

.hv-v2 .aya-footer-social-link:hover {
    background: var(--hv-surface-soft);
    text-decoration: underline;
}

.hv-v2 .aya-footer-social-link:focus-visible {
    outline: 2px solid var(--hv-link, var(--color-primary));
    outline-offset: 2px;
}

/* Bandeau d'information sur les cookies (cookie-banner.js) : surface claire V2, bordure supérieure bleue et bouton primaire V2 */
:is(.hv-v2, body.hv-v2) .aya-cookie-banner {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 960px;
    background: var(--hv-surface, var(--color-white));
    color: var(--color-dark-gray);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-top: 2px solid var(--color-primary);
    border-radius: 12px;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--hv-swatch-onyx, var(--color-dark-gray)) 14%, transparent);
    z-index: 999999;
    padding: 12px 18px;
    font-family: var(--font-ui);
}

:is(.hv-v2, body.hv-v2) .aya-cookie-banner[dir="rtl"] {
    font-family: var(--font-arabic);
}

:is(.hv-v2, body.hv-v2) .aya-cookie-banner.aya-cookie-banner-closing {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

html.hv-cookie-banner-open {
    scroll-padding-bottom: 160px;
}

html.hv-cookie-banner-open body,
html.hv-cookie-banner-open.hv-v2 body {
    padding-bottom: 160px !important;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-text {
    flex: 1;
    min-width: 0;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--hv-link, var(--color-primary));
    margin-bottom: 4px;
    letter-spacing: 0;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-desc {
    margin: 0;
    font-size: 14px;
    color: var(--color-dark-gray);
    line-height: 1.55;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-desc strong {
    color: var(--color-dark-gray);
    font-weight: 700;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-desc code {
    background: var(--hv-surface-soft);
    color: var(--hv-link, var(--color-primary));
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-link {
    color: var(--hv-link, var(--color-primary));
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-link:hover {
    color: var(--hv-link, var(--color-primary));
    text-decoration-thickness: 2px;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-actions {
    flex-shrink: 0;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    background: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: 3px;
    box-shadow: none;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: none;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-banner[dir="rtl"] .aya-cookie-btn {
    font-family: var(--font-arabic);
}

:is(.hv-v2, body.hv-v2) .aya-cookie-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: underline;
    text-underline-offset: 4px;
    transform: none;
    box-shadow: none;
}

:is(.hv-v2, body.hv-v2) .aya-cookie-btn:focus-visible {
    outline: 2px solid var(--color-turquoise);
    outline-offset: 2px;
}

/* ==========================================================================
   6. Adaptation aux largeurs (1440 référence ; 820, 768, 580, 375, 320)
   ========================================================================== */
@media (max-width: 820px) {
    .hv-v2 .hv-hero {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 28px;
        padding-block: 48px;
    }

    .hv-v2 .hv-hero h1 {
        font-size: 56px;
    }

    .hv-v2 .hv-poster {
        min-height: 310px;
        padding: 24px;
    }

    .hv-v2 :is(.hv-paths, .hv-latest-grid) {
        gap: 22px;
    }

    .hv-v2 .hv-editorial {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
        gap: 26px;
    }

    .hv-v2 .hv-legal-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .hv-v2 .hv-legal-toc {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    :root,
    .hv-v2 {
        --hv-nav-offset: 68px;
    }

    .hv-v2 .hv-workspace-grid,
    .hv-v2 .hv-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .hv-v2 .hv-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Barre basse conservée pour les membres : une seule réserve propre en bas de page. */
    .hv-v2 .hv-shell-member,
    .hv-v2 .hv-shell-editorial,
    .hv-v2 .hv-shell-legal {
        padding-block-end: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .hv-v2 .aya-legal-footer {
        margin-top: 32px;
        margin-bottom: 0;
    }

    :is(.hv-v2, body.hv-v2) .aya-cookie-banner {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        width: calc(100% - 24px);
        padding: 14px 16px;
    }

    :is(.hv-v2, body.hv-v2) .aya-cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    :is(.hv-v2, body.hv-v2) .aya-cookie-actions {
        width: 100%;
    }

    :is(.hv-v2, body.hv-v2) .aya-cookie-btn {
        width: 100%;
        justify-content: center;
    }

    html.hv-cookie-banner-open {
        scroll-padding-bottom: 360px;
    }

    html.hv-cookie-banner-open body,
    html.hv-cookie-banner-open.hv-v2 body {
        padding-bottom: calc(360px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 580px) {
    .hv-v2 .hv-hero,
    .hv-v2 .hv-paths,
    .hv-v2 .hv-latest-grid,
    .hv-v2 .hv-editorial,
    .hv-v2 .hv-feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .hv-v2 .hv-hero {
        gap: 32px;
        padding-block: 42px;
    }

    .hv-v2 .hv-hero h1 {
        font-size: 51px;
        letter-spacing: -0.01em;
    }

    :is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-hero h1 {
        font-size: 40px;
    }

    .hv-v2 .hv-poster {
        min-height: 280px;
    }

    .hv-v2 .hv-editorial {
        padding-block: 42px;
    }

    .hv-v2 .hv-filter-row {
        justify-content: flex-start;
        gap: 4px 18px;
    }

    .hv-v2 .hv-status-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hv-v2 .hv-shell-autonomous {
        padding-top: 32px;
    }
}

@media (max-width: 375px) {
    .hv-v2 .hv-hero h1 {
        font-size: 46px;
    }

    :is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-hero h1 {
        font-size: 36px;
    }

    .hv-v2 .hv-poster {
        padding: 20px;
    }

    .hv-v2 .hv-step-card {
        padding: 18px;
    }
}

@media (max-width: 320px) {
    .hv-v2 .hv-wrap {
        padding-inline: 16px;
    }

    .hv-v2 .hv-hero h1 {
        font-size: 40px;
    }

    :is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-hero h1 {
        font-size: 32px;
    }

    .hv-v2 .hv-main-action,
    .hv-v2 .hv-btn-primary {
        width: 100%;
    }
}

/* ==========================================================================
   Axe 4.3 — Bandeau sobre d'entraide & Lexique vivant (.hv-community-pulse)
   Variables officielles uniquement, zéro chevauchement, grille minmax(0, 1fr)
   ========================================================================== */
.hv-v2 .hv-community-pulse {
    margin: 0 0 28px;
    padding: 18px 20px;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 14px;
    background: var(--hv-surface-soft, var(--color-white));
    box-sizing: border-box;
    min-width: 0;
}

.hv-v2 .hv-pulse-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.hv-v2 .hv-pulse-eyebrow {
    margin: 0;
}

.hv-v2 .hv-pulse-title {
    margin: 0;
    font-family: var(--font-french);
    font-size: clamp(19px, 2.2vw, 23px);
    line-height: 1.3;
    color: var(--hv-link, var(--color-primary));
    overflow-wrap: break-word;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-pulse-title {
    font-family: var(--font-arabic);
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.6;
}

.hv-v2 .hv-pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.hv-v2 .hv-pulse-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 10px;
    background: var(--hv-surface, var(--color-white));
    min-width: 0;
    box-sizing: border-box;
}

.hv-v2 .hv-pulse-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hv-v2 .hv-pulse-icon {
    font-size: 18px;
    line-height: 1;
}

.hv-v2 .hv-pulse-num {
    font-family: var(--font-ui);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .hv-pulse-label {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--color-dark-gray);
    overflow-wrap: break-word;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-pulse-label {
    font-family: var(--font-arabic);
    line-height: 1.65;
}

@media (max-width: 580px) {
    .hv-v2 .hv-community-pulse {
        padding: 14px 16px;
        margin-bottom: 22px;
    }

    .hv-v2 .hv-pulse-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Bandeau discret de mise à jour disponible (mobile & application installée, zéro jargon, 100 % charte HV) */
.hv-update-banner {
    position: fixed;
    inset-inline: 12px;
    bottom: 20px;
    z-index: 900;
    margin-inline: auto;
    max-width: 480px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 8px 12px;
    background: var(--hv-surface, var(--color-white));
    color: var(--color-dark-gray);
    border: 1px solid var(--color-primary);
    border-inline-start-width: 4px;
    border-radius: 12px;
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.hv-update-banner[dir="rtl"] {
    font-family: var(--font-arabic);
}

.hv-update-banner-text {
    flex: 1 1 160px;
    min-width: 0;
    font-weight: 600;
    color: var(--color-dark-gray);
}

.hv-update-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.hv-v2 .hv-update-banner-btn,
.hv-update-banner-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 14px;
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.hv-update-banner-close {
    min-height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 999px;
    background: var(--hv-surface-canvas, var(--color-white));
    color: var(--color-dark-gray);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 820px) {
    .hv-update-banner {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }
}

/* ==========================================================================
   Composant transversal : Vidéo explicative au clic (.hv-video-help)
   Fermé par défaut, 100 % variables CSS officielles, bilingue FR / AR (RTL).
   ========================================================================== */
.hv-v2 .hv-video-help {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-block: 14px 4px;
    max-width: 100%;
    min-width: 0;
}

.hv-v2 .hv-video-help.is-compact {
    margin-block: 0;
}

.hv-v2 .hv-video-help-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 16px;
    background: var(--hv-surface, var(--color-white));
    color: var(--hv-link, var(--color-primary));
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    max-width: 100%;
    text-align: start;
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-video-help-trigger {
    font-family: var(--font-arabic);
}

.hv-v2 .hv-video-help-trigger:hover {
    background: var(--hv-brand-soft);
    border-color: var(--color-primary);
}

.hv-v2 .hv-video-help-trigger[aria-expanded="true"] {
    background: var(--hv-brand-soft);
    border-color: var(--color-primary);
}

.hv-v2 .hv-video-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    flex-shrink: 0;
}

.hv-v2 .hv-video-help-panel {
    width: 100%;
    padding: 20px;
    background: var(--hv-surface, var(--color-white));
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-inline-start: 3px solid var(--color-primary);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.hv-v2 .hv-video-help-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.hv-v2 .hv-video-help-heading {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-dark-gray);
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-video-help-heading {
    font-family: var(--font-arabic);
}

.hv-v2 .hv-video-help-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 14px;
    background: var(--hv-surface-soft);
    color: var(--color-dark-gray);
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hv-v2 .hv-video-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 20px;
    align-items: start;
}

.hv-v2 .hv-video-help-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.hv-v2 .hv-video-help-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--hv-link, var(--color-primary));
}

.hv-v2 .hv-video-help-stage {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 9 / 16;
    background: var(--hv-swatch-onyx);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
}

.hv-v2 .hv-video-help-stage video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--hv-swatch-onyx);
}

.hv-v2 .hv-video-help-note {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-dark-gray);
}

.hv-v2 .hv-video-help-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding-top: 8px;
    border-top: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    font-size: 14px;
}

.hv-v2 .hv-video-help-foot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-weight: 600;
    color: var(--hv-link, var(--color-primary));
}

/* ==========================================================================
   Bandeau de consultation libre hors connexion (zéro couleur littérale, FR/AR, 3 thèmes)
   ========================================================================== */
.hv-v2 .hv-guest-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--hv-border-subtle, var(--color-secondary-gray));
    border-inline-start: 4px solid var(--color-primary);
    background: var(--hv-brand-soft, var(--hv-surface-soft));
    color: var(--color-dark-gray);
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.hv-v2 .hv-guest-notice-copy {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hv-v2 .hv-guest-notice-title {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 700;
    color: var(--hv-link, var(--color-primary));
    line-height: 1.35;
}

.hv-v2 .hv-guest-notice-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-dark-gray);
    overflow-wrap: anywhere;
}

.hv-v2 .hv-guest-notice-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hv-v2 .hv-guest-notice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    box-sizing: border-box;
}

.hv-v2 .hv-guest-notice-btn:hover,
.hv-v2 .hv-guest-notice-btn:focus-visible {
    background: var(--color-primary-dark, var(--color-primary));
    border-color: var(--color-primary-dark, var(--color-primary));
    color: var(--color-white);
}

:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-guest-notice,
:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-guest-notice-title,
:is(html[dir="rtl"].hv-v2, html[dir="rtl"] .hv-v2) .hv-guest-notice-btn {
    font-family: var(--font-arabic);
}

@media (max-width: 520px) {
    .hv-v2 .hv-guest-notice {
        padding: 12px 14px;
    }

    .hv-v2 .hv-guest-notice-actions {
        width: 100%;
    }

    .hv-v2 .hv-guest-notice-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Harmonisation architecture ordinateur (>= 1024 px, 0 couleur littérale)
   Unifie la largeur utile (1400 px), les gouttières, la barre de navigation,
   le pied de page, le fond de toile et le rythme d'en-tête entre toutes les pages.
   ========================================================================== */
@media (min-width: 1024px) {
    .hv-v2 .app-header {
        padding-inline: 0;
    }

    .hv-v2 .app-header .navbar-container {
        max-width: var(--hv-desktop-max, 1400px);
        padding-inline: 16px;
        box-sizing: border-box;
    }

    .hv-v2 .aya-legal-footer {
        width: 100%;
        max-width: none;
        margin-inline: 0;
        margin-top: 48px;
        margin-bottom: 0;
        padding-inline: 0;
        box-sizing: border-box;
    }

    .hv-v2 .aya-legal-footer-inner {
        width: 100%;
        max-width: var(--hv-desktop-max, 1400px);
        margin-inline: auto;
        padding-inline: var(--hv-desktop-gutter, clamp(18px, 3.2vw, 48px));
        box-sizing: border-box;
    }

    .hv-p13 .p13-main.hv-wrap,
    .hv-lexique .lx-main,
    html:not(.hv-solo-app-mode).hv-p24 .p24-main,
    .hv-p16 .p16-main.admin-container,
    .hv-p15 .p15-admin-header-inner,
    .hv-p15 .p15-main.container,
    .hv-p15 .p15-tabs-wrap,
    :is(.hv-p17, .hv-p18, .hv-p19, .hv-p20) .legal-page-container {
        width: 100%;
        max-width: var(--hv-desktop-max, 1400px);
        margin-inline: auto;
        padding-inline: var(--hv-desktop-gutter, clamp(18px, 3.2vw, 48px));
        box-sizing: border-box;
    }

    .hv-p14 .p14-main.hv-wrap,
    .hv-lexique .lx-main,
    html:not(.hv-solo-app-mode).hv-p24 .p24-main,
    .hv-p16 .p16-main.admin-container,
    .hv-p15 .p15-main.container,
    html.hv-v2.hv-p25 .rd-main {
        padding-top: var(--hv-desktop-top-gap, 28px);
    }

    html.hv-v2.hv-p06,
    html.hv-v2.hv-p06 body {
        background: var(--hv-surface-canvas);
    }

    .hv-p05 .p05-intro,
    .hv-p07 .p07-head,
    .hv-p11 .p11-head,
    .hv-p12 .p12-head,
    .hv-p13 .p13-head,
    .hv-p14 .p14-head,
    .hv-p16 .p16-intro,
    .hv-lexique .lx-intro,
    html.hv-v2.hv-p25 .rd-header {
        max-width: 100%;
        padding-block: 4px 20px;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--hv-border-subtle);
    }

    .hv-v2 :is(.p05-lead, .p07-lead, .p11-lead, .p12-lead, .p13-lead, .p14-lead, .lx-lead, .rd-help) {
        max-width: 72ch;
    }

    .hv-p12 .p12-form {
        align-items: stretch;
    }
}

@media (min-width: 1280px) {
    .hv-v2 .app-header .navbar-container {
        padding-inline: var(--hv-desktop-gutter, clamp(18px, 3.2vw, 48px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .hv-v2 *,
    .hv-v2 *::before,
    .hv-v2 *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
