/*
    custom-nexsas.css
    Surcouche pour le layout gouv basé sur le thème Nexsas.
    Contient les éléments propres à Verify My Document : bannière cookies,
    notifications, badge crédits, ajustements responsive.
*/

/* ============================================================
   Bannière de consentement des cookies (RGPD)
   ============================================================ */
.fv-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    pointer-events: none;
}

.fv-cookie-banner.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================================
   Notifications (alertes de session)
   ============================================================ */
.fv-alert {
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px solid transparent;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fv-alert + .fv-alert {
    margin-top: 12px;
}

.fv-alert--success {
    background-color: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}

.fv-alert--error {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.fv-alert--warning {
    background-color: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.fv-alert--info {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.dark .fv-alert--success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.dark .fv-alert--error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.dark .fv-alert--warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.dark .fv-alert--info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* ============================================================
   Prévisualisation admin : page SEO programmatique pas encore en ligne
   ============================================================ */
.fv-programmatic-seo-preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #fcd34d;
    background-color: #fffbeb;
    color: #92400e;
}

.fv-programmatic-seo-preview-banner__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fv-programmatic-seo-preview-banner__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.dark .fv-programmatic-seo-preview-banner {
    background-color: rgba(245, 158, 11, 0.12);
    border-bottom-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

/* ============================================================
   Inputs auth (login / register)
   ============================================================ */
.auth-form-input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background-color: transparent;
    color: inherit;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form-input:focus {
    outline: none;
    border-color: #25c3cd;
    box-shadow: 0 0 0 3px rgba(0, 54, 128, 0.15);
}

.dark .auth-form-input {
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ============================================================
   Sélecteur de langue (bouton + modale grille)
   ============================================================ */
.fv-lang-switcher-trigger--sidebar .fv-lang-switcher-trigger__btn {
    width: 100%;
    max-width: none;
    justify-content: space-between;
}

/*
 * Modale langue : rendue en fin de <body> (hors header avec transform) pour un vrai fixed viewport.
 * Centrage vertical : flex + margin auto sur le panneau ; zone scrollable si contenu haut.
 */
#fv-lang-modal.fv-dry-modal.is-open {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    min-height: 100dvh;
    min-height: 100vh;
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    overflow: hidden;
    overscroll-behavior: none;
    box-sizing: border-box;
}

#fv-lang-modal.fv-dry-modal .fv-dry-modal__panel {
    width: min(100%, 56rem);
    max-width: min(100vw - 1.5rem, 56rem);
    max-height: min(96dvh, 56rem);
    max-height: min(96vh, 56rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    margin-top: auto;
    margin-bottom: auto;
    box-sizing: border-box;
}

/* Corps : entre titre (h2) et footer, laisse la hauteur à la zone liste scrollable. */
#fv-lang-modal.fv-dry-modal #fv-lang-modal-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#fv-lang-modal.fv-dry-modal .fv-dry-modal__footer {
    flex-shrink: 0;
}

@media (min-width: 768px) {
    #fv-lang-modal.fv-dry-modal .fv-dry-modal__panel {
        max-width: min(100vw - 1.5rem, 56rem);
    }
}

/* Au-dessus du menu mobile (z-[9999]), bannière cookies (9998), autres dry-modales (10100). */
#fv-lang-modal.fv-dry-modal {
    z-index: 99999;
}

.fv-lang-modal__search-wrap {
    position: relative;
}

.fv-lang-modal__search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
    pointer-events: none;
}

.dark .fv-lang-modal__search-icon {
    color: rgba(255, 255, 255, 0.45);
}

.fv-lang-modal__search {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px 8px 32px;
    font-size: 0.875rem;
    background-color: #f9fafb;
    color: inherit;
}

.fv-lang-modal__search:focus {
    outline: none;
    border-color: #25c3cd;
    box-shadow: 0 0 0 2px rgba(37, 195, 205, 0.2);
}

.dark .fv-lang-modal__search {
    border-color: rgba(255, 255, 255, 0.12);
    background-color: rgba(255, 255, 255, 0.05);
}

.fv-lang-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .fv-lang-modal__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .fv-lang-modal__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .fv-lang-modal__grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

.fv-lang-modal__cell {
    display: flex;
    min-height: 2.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.fv-lang-modal__cell:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.fv-lang-modal__cell--current {
    border-color: #25c3cd;
    background-color: rgba(37, 195, 205, 0.08);
    font-weight: 600;
    cursor: default;
}

.fv-lang-modal__cell-label {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fv-lang-modal__cell-check {
    font-size: 0.7rem;
    color: #25c3cd;
}

.fv-lang-modal__cell--hidden {
    display: none !important;
}

.dark .fv-lang-modal__cell {
    border-color: rgba(255, 255, 255, 0.12);
}

.dark .fv-lang-modal__cell:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.dark .fv-lang-modal__cell--current {
    border-color: #25c3cd;
    background-color: rgba(37, 195, 205, 0.12);
}

/* ============================================================
   Couleur de marque Verify My Document
   Réécrit les tokens Nexsas (secondary = noir d’origine, primary = vert)
   pour aligner texte, CTA et footer sur le bleu institutionnel.
   ============================================================ */
:root,
:host {
    --vmd-brand: #25c3cd;
    --vmd-brand-light: #b8d9ff;
    --vmd-brand-soft: #e8f2ff;
    /* Palette « primary » des boutons .btn-primary → bleu VMD */
    --color-primary-50: #e8f2ff;
    --color-primary-400: #5c9fd9;
    --color-primary-500: #25c3cd;
    --color-primary-600: #1fa7b0;
    /* Texte / surfaces « secondary » : bleu nuit lisible au lieu du noir pur */
    --color-secondary: #0f2744;
}

/* Bouton « VMD » : conserve l'identité visuelle même quand on utilise btn-primary nexsas */
.btn-vmd {
    background-color: var(--vmd-brand);
    color: #fff;
    border-color: var(--vmd-brand);
}

.btn-vmd:hover {
    background-color: #00254f;
    border-color: #00254f;
}

/* Plan pricing mis en avant — dégradé couleur primaire admin (nexsas-theme-vars) */
.pricing-featured-shell {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--color-primary-400, var(--color-primary-500, #25c3cd)) 80%, #fff) 0%,
        var(--color-primary-500, #25c3cd) 45%,
        var(--color-primary-600, color-mix(in srgb, var(--color-primary-500, #25c3cd) 78%, #000)) 100%
    );
}

.dark .pricing-featured-shell {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--color-primary-500, #25c3cd) 30%, #0a0a0a) 0%,
        color-mix(in srgb, var(--color-primary-500, #25c3cd) 70%, #0a0a0a) 50%,
        color-mix(in srgb, var(--color-primary-600, var(--color-primary-500, #25c3cd)) 85%, #000) 100%
    );
}

/* ============================================================
   Boutons .btn (thème Nexsas / main.css)
   - main.css impose text-transform: lowercase et .btn span:first-letter uppercase.
   - Avec <span><i class="fa…"></i>Libellé</span>, :first-letter ne cible pas le texte
     après l’icône → tout le libellé reste en minuscules.
   - On affiche les chaînes telles que les fichiers de langue (Title Case possible).
   - inline-flex + column-gap espace l’icône du texte sans dépendre seul de mr-2.
   ============================================================ */
.btn {
    text-transform: none;
}

.btn span:first-letter {
    text-transform: none;
}

.btn > span {
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
}

.btn > span > i[class*="fa-"] {
    margin-right: 0 !important;
}

.badge {
    text-transform: none;
}

.badge:first-letter {
    text-transform: none;
}

/* ============================================================
   Prose (contenu éditorial — pages legales, blog)
   ============================================================ */
.fv-prose {
    line-height: 1.7;
}

.fv-prose h1,
.fv-prose h2,
.fv-prose h3,
.fv-prose h4 {
    margin-top: 1.6em;
    margin-bottom: 0.8em;
    font-weight: 600;
    line-height: 1.3;
}

.fv-prose h1 { font-size: 2rem; }
.fv-prose h2 { font-size: 1.625rem; }
.fv-prose h3 { font-size: 1.25rem; }
.fv-prose h4 { font-size: 1.125rem; }

.fv-prose p {
    margin-bottom: 1em;
}

.fv-prose ul,
.fv-prose ol {
    margin: 0.8em 0 1.2em;
    padding-left: 1.5em;
}

.fv-prose ul { list-style: disc; }
.fv-prose ol { list-style: decimal; }

.fv-prose li + li {
    margin-top: 0.4em;
}

.fv-prose a {
    color: var(--vmd-brand);
    text-decoration: underline;
}

.fv-prose a:hover {
    text-decoration: none;
}

.fv-prose strong {
    font-weight: 600;
}

.fv-prose blockquote {
    border-left: 4px solid var(--vmd-brand);
    padding-left: 1rem;
    margin: 1.2em 0;
    color: rgba(15, 23, 42, 0.7);
    font-style: italic;
}

.dark .fv-prose blockquote {
    color: rgba(255, 255, 255, 0.7);
}

.fv-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}

.fv-prose th,
.fv-prose td {
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 8px 12px;
    text-align: left;
}

.dark .fv-prose th,
.dark .fv-prose td {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   Programmatic SEO DOC_PAGE : blocs éditoriaux structurés
   ============================================================ */
.fv-doc-page-section__inner {
    max-width: 920px;
}

.fv-doc-page-prose {
    max-width: 74ch;
    line-height: 1.72;
    font-size: 1.05rem;
}

.fv-doc-page-prose p {
    margin-bottom: 1rem;
}

.fv-doc-page-prose p:last-child {
    margin-bottom: 0;
}

.fv-doc-page-list {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.fv-doc-page-list__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 50px -34px rgba(15, 23, 42, 0.55);
}

.dark .fv-doc-page-list__item {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.fv-doc-page-list__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(37, 195, 205, 0.12);
    color: var(--vmd-brand);
    font-weight: 700;
}

.fv-doc-page-list__icon--warning,
.fv-doc-page-callout--warning > i {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.fv-doc-page-list__icon--check,
.fv-doc-page-callout--success > i {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.fv-doc-page-list__icon--xmark {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.fv-doc-page-list h3,
.fv-doc-page-callout h3,
.fv-doc-page-inline-cta h3 {
    margin: 0 0 0.35rem;
    color: currentColor;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.35;
}

.fv-doc-page-list p,
.fv-doc-page-callout p,
.fv-doc-page-inline-cta p {
    margin: 0;
    line-height: 1.62;
    opacity: 0.78;
}

.fv-doc-page-stats,
.fv-doc-page-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

.fv-doc-page-stat,
.fv-doc-page-compare-card {
    padding: 1.25rem;
    border: 1px solid rgba(37, 195, 205, 0.18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(37, 195, 205, 0.12), rgba(255, 255, 255, 0.78));
}

.dark .fv-doc-page-stat,
.dark .fv-doc-page-compare-card {
    border-color: rgba(37, 195, 205, 0.28);
    background: linear-gradient(135deg, rgba(37, 195, 205, 0.14), rgba(255, 255, 255, 0.04));
}

.fv-doc-page-stat__value {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--vmd-brand);
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.fv-doc-page-stat__label {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.fv-doc-page-stat__context,
.fv-doc-page-stat__source {
    margin: 0;
    line-height: 1.55;
    opacity: 0.78;
}

.fv-doc-page-stat__source {
    margin-top: 0.65rem;
    font-size: 0.9rem;
    opacity: 0.62;
}

.fv-doc-page-compare-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
}

.fv-doc-page-compare-card__visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    background: rgba(37, 195, 205, 0.16);
    color: var(--vmd-brand);
    font-size: 1.25rem;
}

.fv-doc-page-compare-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.fv-doc-page-compare-card__intro,
.fv-doc-page-compare-card__items {
    margin: 0;
    line-height: 1.58;
    opacity: 0.78;
}

.fv-doc-page-compare-card__items {
    margin-top: 0.75rem;
    padding-left: 1.15rem;
}

.fv-doc-page-callout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1.75rem;
    padding: 1.2rem;
    border: 1px solid rgba(37, 195, 205, 0.18);
    border-left: 4px solid var(--vmd-brand);
    border-radius: 18px;
    background: rgba(37, 195, 205, 0.08);
}

.fv-doc-page-callout > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(37, 195, 205, 0.14);
    color: var(--vmd-brand);
}

.fv-doc-page-inline-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem;
    border-radius: 22px;
    background: rgba(37, 195, 205, 0.1);
}

.fv-doc-page-section__separator {
    width: 72px;
    height: 3px;
    margin-top: 2rem;
    border-radius: 999px;
    background: var(--vmd-brand);
    opacity: 0.32;
}

.fv-doc-page-floating-cta {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    display: none;
}

@media (min-width: 1024px) {
    .fv-doc-page-floating-cta {
        display: block;
    }
}

/* ============================================================
   Topbar gouv (Nexsas) : espacement logo / menu / compte
   ============================================================ */
.header-one {
    gap: clamp(0.75rem, 2.5vw, 1.25rem);
}

.header-one .gouv-header-my-account {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-one .gouv-header-my-account .fa-user {
    flex-shrink: 0;
}

/* ============================================================
   Ajustements généraux pour notifications / messages
   ============================================================ */
.fv-page-header {
    padding-top: 140px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .fv-page-header {
        padding-top: 180px;
        padding-bottom: 60px;
    }
}

/* Ajustement breadcrumb (utilisé par certaines pages) */
.fv-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(15, 23, 42, 0.6);
}

.fv-breadcrumb a {
    color: rgba(15, 23, 42, 0.6);
    text-decoration: none;
}

.fv-breadcrumb a:hover {
    color: var(--vmd-brand);
}

.dark .fv-breadcrumb {
    color: rgba(255, 255, 255, 0.6);
}

.dark .fv-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   Dropzone d’accueil : halo animé pour inciter au dépôt
   ============================================================ */
@keyframes fv-dropzone-attention-glow {
    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(37, 195, 205, 0.25),
            0 0 0 0 rgba(37, 195, 205, 0.2);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(37, 195, 205, 0.45),
            0 0 0 14px rgba(37, 195, 205, 0);
    }
}

@keyframes fv-dropzone-attention-glow-dark {
    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(37, 195, 205, 0.35),
            0 0 0 0 rgba(37, 195, 205, 0.15);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(37, 195, 205, 0.55),
            0 0 0 16px rgba(37, 195, 205, 0);
    }
}

.fv-dropzone.fv-dropzone--attention {
    animation: fv-dropzone-attention-glow 2.5s ease-in-out infinite;
}

.dark .fv-dropzone.fv-dropzone--attention {
    animation: fv-dropzone-attention-glow-dark 2.5s ease-in-out infinite;
}

.fv-dropzone.fv-dropzone--attention.dragover {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .fv-dropzone.fv-dropzone--attention {
        animation: none;
    }
}

/* ============================================================
   Modales « dry » Nexsas / gouv (`x-gouv.dry-modal`, voile + flou).
   Au-dessus de la topbar (z-50) et du menu mobile (z-[9999]).
   ============================================================ */
.fv-dry-modal {
    z-index: 10100;
    isolation: isolate;
    background-color: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.dark .fv-dry-modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.fv-dry-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fv-dry-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile : pleine largeur utile ; à partir de md : au plus 50 % du viewport. */
@media (min-width: 768px) {
    .fv-dry-modal__panel {
        max-width: 50vw;
    }
}

.fv-dry-modal__video {
    width: 100%;
    height: auto;
    max-height: min(78vh, 720px);
    object-fit: contain;
}
p.text-tagline-1.text-secondary\/70.dark\:text-accent\/70.mb-\[25px\] {
    margin-bottom: 25px;
}

/* Copyright footer Nexsas : padding haut / bas identiques (remplace pt-6 + pb-[60px]). */
.nexsas-footer-copyright {
    padding-block: 1.5rem;
}

/* ============================================================
   Blog public — layout 2 colonnes (contenu large + sidebar ~370px)
   flex-auto n’existe pas dans assets_nexsas/main.css → flex-1 explicite ici.
   ============================================================ */
.blog-article-layout-row__main {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
}

/* Sidebar blog — fond clair (thème Nexsas public), structure blog-details.html */
.blog-details-sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;

    display: flex;
    flex-direction: column;
    gap: 4.375rem;
    padding: 2.625rem 2rem;
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--color-stroke-2, #e3e7ed) 100%, transparent);
    background: var(--color-background-1, #fff);
    color: var(--color-secondary, #1a1a1a);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--color-secondary, #1a1a1a) 6%, transparent);
}

.dark .blog-details-sidebar,
html.dark .blog-details-sidebar {
    border-color: color-mix(in srgb, var(--color-stroke-6, #444) 100%, transparent);
    background: var(--color-background-8, #1a1a1a);
    color: var(--color-accent, #f5f5f5);
    box-shadow: none;
}

@media (min-width: 1024px) {
    .blog-details-sidebar {
        width: 370px;
        max-width: 370px;
        position: sticky;
        top: 7.5rem;
        align-self: flex-start;
    }
}

.blog-details-sidebar__section-title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-secondary, #1a1a1a);
}

.dark .blog-details-sidebar__section-title,
html.dark .blog-details-sidebar__section-title {
    color: var(--color-accent, #f5f5f5);
}

@media (min-width: 1024px) {
    .blog-details-sidebar__section-title {
        font-size: 1.5rem;
    }
}

.blog-details-sidebar__empty {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 400;
    color: color-mix(in srgb, var(--color-secondary, #1a1a1a) 55%, transparent);
}

.dark .blog-details-sidebar__empty,
html.dark .blog-details-sidebar__empty {
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 55%, transparent);
}

/* Recherche — fieldset blog-details.html */
.blog-details-sidebar__search-fieldset {
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-stroke-2, #e3e7ed);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--color-background-3, #f4f5f8);
}

.dark .blog-details-sidebar__search-fieldset,
html.dark .blog-details-sidebar__search-fieldset {
    border-color: var(--color-stroke-6, #444);
    background: color-mix(in srgb, var(--color-background-8, #1a1a1a) 92%, #fff);
}

.blog-details-sidebar__search-inner {
    position: relative;
}

.blog-details-sidebar__search-input {
    display: block;
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1.125rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-secondary, #1a1a1a);
    background: transparent;
    border: 0;
    outline: none;
}

.dark .blog-details-sidebar__search-input,
html.dark .blog-details-sidebar__search-input {
    color: var(--color-accent, #f5f5f5);
}

.blog-details-sidebar__search-input::placeholder {
    color: color-mix(in srgb, var(--color-secondary, #1a1a1a) 45%, transparent);
}

.dark .blog-details-sidebar__search-input::placeholder,
html.dark .blog-details-sidebar__search-input::placeholder {
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 45%, transparent);
}

.blog-details-sidebar__search-input:focus {
    outline: none;
}

.blog-details-sidebar__search-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    color: color-mix(in srgb, var(--color-secondary, #1a1a1a) 50%, transparent);
    pointer-events: none;
}

.dark .blog-details-sidebar__search-icon,
html.dark .blog-details-sidebar__search-icon {
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 50%, transparent);
}

/* Catégories */
.blog-details-sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-details-sidebar__list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: color-mix(in srgb, var(--color-secondary, #1a1a1a) 65%, transparent);
    text-decoration: none;
    transition: background-color 0.35s ease, color 0.35s ease;
}

.blog-details-sidebar__list-link:hover,
.blog-details-sidebar__list-link:focus-visible {
    background-color: var(--color-background-3, #f4f5f8);
    color: var(--color-primary, #864ffe);
}

.dark .blog-details-sidebar__list-link,
html.dark .blog-details-sidebar__list-link {
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 65%, transparent);
}

.dark .blog-details-sidebar__list-link:hover,
html.dark .blog-details-sidebar__list-link:hover,
.dark .blog-details-sidebar__list-link:focus-visible,
html.dark .blog-details-sidebar__list-link:focus-visible {
    background-color: color-mix(in srgb, var(--color-background-7, #2a2a2a) 100%, transparent);
    color: var(--color-primary, #864ffe);
}

/* Articles récents */
.blog-details-sidebar__recent-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding-right: 0.125rem;
    border-radius: 0.375rem;
    border: 1px solid var(--color-stroke-2, #e3e7ed);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.blog-details-sidebar__recent-card:hover,
.blog-details-sidebar__recent-card:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary, #864ffe) 45%, transparent);
}

.dark .blog-details-sidebar__recent-card,
html.dark .blog-details-sidebar__recent-card {
    border-color: var(--color-stroke-6, #444);
}

.blog-details-sidebar__recent-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--color-primary, #864ffe) 12%, var(--color-background-3, #f4f5f8));
}

.blog-details-sidebar__recent-title {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    font-weight: 400;
    color: var(--color-secondary, #1a1a1a);
}

.dark .blog-details-sidebar__recent-title,
html.dark .blog-details-sidebar__recent-title {
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 88%, transparent);
}

.blog-details-sidebar__recent-date {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 400;
    color: color-mix(in srgb, var(--color-secondary, #1a1a1a) 50%, transparent);
}

.dark .blog-details-sidebar__recent-date,
html.dark .blog-details-sidebar__recent-date {
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 50%, transparent);
}

/* Tags (remplace « Trending label ») */
.blog-details-sidebar__tag {
    display: inline-flex;
    padding: 0.5625rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid var(--color-stroke-2, #e3e7ed);
    color: color-mix(in srgb, var(--color-secondary, #1a1a1a) 80%, transparent);
    background: transparent;
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.blog-details-sidebar__tag:hover,
.blog-details-sidebar__tag:focus-visible {
    background: var(--color-primary, #864ffe);
    color: #fff;
    border-color: var(--color-primary, #864ffe);
}

.blog-details-sidebar__tag--active {
    background: var(--color-primary, #864ffe);
    color: #fff;
    border-color: var(--color-primary, #864ffe);
}

.dark .blog-details-sidebar__tag,
html.dark .blog-details-sidebar__tag {
    border-color: var(--color-stroke-6, #444);
    color: color-mix(in srgb, var(--color-accent, #f5f5f5) 80%, transparent);
}

.blog-details-body.details-body h3,
.blog-details-body.details-body h4 {
    scroll-margin-top: 7rem;
}

.blog-details-body .blog-richtext-block p + p {
    margin-top: 1rem;
}

.blog-details-body .blog-richtext-block img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.blog-inline-cta {
    text-align: center;
}

.blog-toc .table-of-list li.is-active a {
    color: var(--color-primary, #864ffe);
    font-weight: 500;
}

.blog-article-intro p + p {
    margin-top: 0.75rem;
}

.blog-share-bar {
    padding-block: 1rem;
    border-block: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.blog-share-bar--details {
    padding-block: 0;
    border: 0;
}

.blog-share-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    color: inherit;
    background: transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.blog-share-bar__btn:hover,
.blog-share-bar__btn:focus-visible {
    border-color: var(--color-primary, #864ffe);
    color: var(--color-primary, #864ffe);
}

.blog-article-featured-image img {
    width: 100%;
}

/* Bloc auteur (fin d’article) — aligné Verify My Document (programmatic-author-byline) */
.fv-author-byline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dark .fv-author-byline {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

@media (min-width: 640px) {
    .fv-author-byline {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.75rem 2rem;
    }
}

.fv-author-byline__photo {
    flex-shrink: 0;
    margin: 0;
}

.fv-author-byline__photo img,
.fv-author-byline__photo-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--color-primary, #864ffe);
    background: #fff;
    display: block;
}

.fv-author-byline__photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary, #864ffe);
    text-transform: uppercase;
    user-select: none;
}

.dark .fv-author-byline__photo img,
.dark .fv-author-byline__photo-placeholder {
    background: rgba(255, 255, 255, 0.08);
}

.fv-author-byline__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fv-author-byline__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary, #864ffe);
    margin: 0 0 0.15rem 0;
}

.fv-author-byline__label .fas {
    font-size: 0.85rem;
}

.fv-author-byline__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary, #864ffe);
    margin: 0;
    line-height: 1.3;
}

.fv-author-byline__role {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
}

.fv-author-byline__bio {
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.8;
    margin: 0.25rem 0 0 0;
}

.fv-author-byline__credentials,
.fv-author-byline__date {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.45;
    opacity: 0.7;
    margin: 0.25rem 0 0 0;
}

.fv-author-byline__credentials .fas,
.fv-author-byline__date .fas {
    margin-top: 0.2rem;
    color: var(--color-primary, #864ffe);
    flex-shrink: 0;
}