/**
 * PAGES PUBLISHER (profil, annonces, annonce, adr, adp, adp-ads) - Typologie White Mode + Dark Mode
 * docs/typologie-couleurs-themes-contraste.md
 *
 * White Mode : fond blanc conservé, contenus embellis (textes, boutons, cartes, bordures).
 * Dark Mode : appliqué via le bouton Dashlight ; fond noir, contenus lisibles.
 * S'applique à toutes les pages publisher-* (classe .page-publisher-typology).
 */

/* ============================================================================
   VARIABLES (scopées au wrapper)
   ============================================================================ */

.page-publisher-typology {
    --pub-index-blue: #2b5cff;
    --pub-index-blue-light: #5c85ff;
    --pub-index-blue-bg: rgba(43, 92, 255, 0.08);
    --pub-index-gold: #FFD700;
    --pub-index-gold-dark: #e6c200;
    --pub-index-gold-bg: rgba(255, 215, 0, 0.1);
    --pub-index-orange: #ff8a00;
    --pub-index-orange-bg: rgba(255, 138, 0, 0.08);
    --pub-index-bg-card: #ffffff;
    --pub-index-bg-subtle: #f7f8fc;
    --pub-index-text: #1a1d21;
    --pub-index-text-muted: #526484;
    --pub-index-border: #e5e9f2;
    --pub-index-border-strong: #d1d7e4;
    --pub-index-shadow: 0 2px 12px rgba(43, 55, 72, 0.06);
    --pub-index-shadow-lg: 0 8px 24px rgba(43, 55, 72, 0.1);
    --pub-index-header-bg: #dce4ff;
    --pub-index-header-gradient-start: rgba(43, 92, 255, 0.22);
    --pub-index-header-gradient-end: rgba(43, 92, 255, 0.08);
    --pub-index-toggle-border: #2b5cff;
    --pub-index-toggle-bg: linear-gradient(145deg, #3d6aff 0%, #2b5cff 100%);
    --pub-index-toggle-color: #ffffff;
    --pub-index-toggle-hover-border: #2b5cff;
    --pub-index-toggle-hover-bg: linear-gradient(145deg, #4d7aff 0%, #3d6aff 100%);
    --pub-index-toggle-hover-color: #ffffff;
    --pub-index-toggle-expanded-bg: linear-gradient(145deg, #3d6aff 0%, #2b5cff 100%);
    --pub-index-toggle-expanded-border: #2b5cff;
    --pub-index-toggle-expanded-color: #ffffff;
}

.dark-mode .page-publisher-typology {
    --pub-index-bg-card: #141c26;
    --pub-index-bg-subtle: #0d141d;
    --pub-index-text: #f0f2f5;
    --pub-index-text-muted: #8094ae;
    --pub-index-border: rgba(255, 255, 255, 0.12);
    --pub-index-border-strong: rgba(255, 255, 255, 0.18);
    --pub-index-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --pub-index-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --pub-index-header-bg: #162038;
    --pub-index-blue: #5c85ff;
    --pub-index-blue-light: #7a9aff;
    --pub-index-blue-bg: rgba(92, 133, 255, 0.15);
    --pub-index-gold: #FFD700;
    --pub-index-gold-bg: rgba(255, 215, 0, 0.12);
    --pub-index-orange: #ff8a00;
    --pub-index-header-gradient-start: rgba(92, 133, 255, 0.25);
    --pub-index-header-gradient-end: rgba(0, 0, 0, 0.12);
    --pub-index-toggle-border: #e67a00;
    --pub-index-toggle-bg: linear-gradient(145deg, #ffa94d 0%, #e67a00 100%);
    --pub-index-toggle-color: #0d141d;
    --pub-index-toggle-hover-border: #e67a00;
    --pub-index-toggle-hover-bg: linear-gradient(145deg, #ffb366 0%, #ff9d3a 100%);
    --pub-index-toggle-hover-color: #0d141d;
    --pub-index-toggle-expanded-bg: linear-gradient(145deg, #ffa94d 0%, #e67a00 100%);
    --pub-index-toggle-expanded-border: #e67a00;
    --pub-index-toggle-expanded-color: #0d141d;
}

/* ============================================================================
   WHITE MODE — Fond non noirci, contenus embellis
   ============================================================================ */

.page-publisher-typology {
    color: var(--pub-index-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.page-publisher-typology .card.card-bordered,
.page-publisher-typology .card:not(.card-bordered) {
    background: var(--pub-index-bg-card) !important;
    border-radius: 0;
    border: 1px solid var(--pub-index-border) !important;
    box-shadow: var(--pub-index-shadow);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.page-publisher-typology .card.card-bordered:hover,
.page-publisher-typology .card:not(.card-bordered):hover {
    box-shadow: var(--pub-index-shadow-lg);
    border-color: var(--pub-index-border-strong) !important;
}

.page-publisher-typology .card-inner.publisher-header-gradient {
    background: linear-gradient(135deg, var(--pub-index-header-gradient-start) 0%, var(--pub-index-header-gradient-end) 50%), var(--pub-index-header-bg) !important;
    border-radius: 0;
    border-bottom: 1px solid var(--pub-index-border);
}

.dark-mode .page-publisher-typology .card-inner.publisher-header-gradient {
    background: linear-gradient(135deg, var(--pub-index-header-gradient-start) 0%, var(--pub-index-header-gradient-end) 100%), var(--pub-index-header-bg) !important;
    border-bottom-color: var(--pub-index-border);
}

.page-publisher-typology .publisher-text-brand-blue,
.page-publisher-typology .publisher-text-brand,
.page-publisher-typology .h4.publisher-text-brand-blue {
    color: var(--pub-index-blue) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-publisher-typology .text-muted,
.page-publisher-typology .h6.text-muted {
    color: var(--pub-index-text-muted) !important;
}

.page-publisher-typology .card-inner.publisher-entry-gradient,
.page-publisher-typology .article.publisher-entry-gradient {
    background: linear-gradient(145deg, var(--pub-index-gold-bg) 0%, var(--pub-index-bg-subtle) 50%) !important;
    border-radius: 0;
    border: 1px solid var(--pub-index-border);
    border-top: none;
    color: var(--pub-index-text);
}

.dark-mode .page-publisher-typology .card-inner.publisher-entry-gradient,
.dark-mode .page-publisher-typology .article.publisher-entry-gradient {
    background: linear-gradient(145deg, var(--pub-index-gold-bg) 0%, rgba(0, 0, 0, 0.08) 100%) !important;
    border-color: var(--pub-index-border);
}

.page-publisher-typology .card-inner p,
.page-publisher-typology .entry p {
    color: var(--pub-index-text);
    line-height: 1.65;
}

/* ============================================================================
   ZONE PAGE PUBLIQUE — .publisher-profile (titre, corps, image)
   Lecture agréable, engageante ; polices et tailles optimisées.
   ============================================================================ */

.page-publisher-typology .publisher-profile {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pub-index-border);
    max-width: 100%;
}

.page-publisher-typology .publisher-profile__title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--pub-index-blue);
    margin: 0 0 1.25rem 0;
}

.dark-mode .page-publisher-typology .publisher-profile__title {
    color: var(--pub-index-blue);
}

.page-publisher-typology .publisher-profile__body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.78;
    color: var(--pub-index-text);
    max-width: 72ch;
    margin-bottom: 1.75rem;
}

.page-publisher-typology .publisher-profile__body p {
    margin-bottom: 1rem;
    color: inherit;
}

.page-publisher-typology .publisher-profile__body p:last-child {
    margin-bottom: 0;
}

.page-publisher-typology .publisher-profile__body strong {
    font-weight: 600;
    color: var(--pub-index-text);
}

.page-publisher-typology .publisher-profile__body a {
    color: var(--pub-index-blue);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.page-publisher-typology .publisher-profile__body a:hover {
    color: var(--pub-index-blue-light, var(--pub-index-blue));
}

.page-publisher-typology .publisher-profile__media {
    margin-top: 0.5rem;
}

.page-publisher-typology .publisher-profile__img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: var(--pub-index-shadow-lg);
    border: 1px solid var(--pub-index-border);
}

.dark-mode .page-publisher-typology .publisher-profile__img {
    border-color: var(--pub-index-border);
}

.page-publisher-typology .publisher-profile__embed {
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--pub-index-shadow-lg);
}

.page-publisher-typology .publisher-profile__embed iframe {
    display: block;
    width: 100%;
}

.page-publisher-typology .alert.publisher-alert-gradient {
    background: linear-gradient(145deg, var(--pub-index-gold-bg), rgba(255, 204, 0, 0.04)) !important;
    border: 1px solid var(--pub-index-border) !important;
    border-left: 4px solid var(--pub-index-gold) !important;
    color: var(--pub-index-text);
    border-radius: 0;
}

.dark-mode .page-publisher-typology .alert.publisher-alert-gradient {
    border-left-color: var(--pub-index-gold);
    background: linear-gradient(145deg, var(--pub-index-gold-bg), rgba(0, 0, 0, 0.1)) !important;
}

.page-publisher-typology .btn.publisher-btn-private-access {
    background: linear-gradient(135deg, var(--pub-index-gold), var(--pub-index-orange)) !important;
    color: #000 !important;
    border: none !important;
    border-radius: 0;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(255, 204, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-publisher-typology .btn.publisher-btn-private-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.45);
}

.page-publisher-typology .btn.bg-dark.text-warning {
    background: linear-gradient(135deg, #2d3748, #1a202c) !important;
    color: var(--pub-index-gold) !important;
    border: 1px solid var(--pub-index-border-strong) !important;
    border-radius: 0;
    font-weight: 600;
}

/* Boutons désactivés (suivre / liste noire) — contraste conforme, sans gradient ni opacité */
.page-publisher-typology .btn.btn-secondary.disabled.publisher-btn-private-access,
.page-publisher-typology .btn.btn-secondary:disabled.publisher-btn-private-access,
.page-publisher-typology .btn.btn-secondary.disabled.bg-dark.text-warning,
.page-publisher-typology .btn.btn-secondary:disabled.bg-dark.text-warning {
    background: #e9ecef !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
    opacity: 1 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

.dark-mode .page-publisher-typology .btn.btn-secondary.disabled.publisher-btn-private-access,
.dark-mode .page-publisher-typology .btn.btn-secondary:disabled.publisher-btn-private-access,
.dark-mode .page-publisher-typology .btn.btn-secondary.disabled.bg-dark.text-warning,
.dark-mode .page-publisher-typology .btn.btn-secondary:disabled.bg-dark.text-warning {
    background: #495057 !important;
    color: #e9ecef !important;
    border-color: #5a6268 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

.page-publisher-typology .publisher-avatar {
    border: 3px solid var(--pub-index-border-strong);
    box-shadow: var(--pub-index-shadow-lg);
}

/* Tags / badges — thème clair : ne pas écraser les couleurs inline */
.page-publisher-typology .tags .badge {
    border: 1px solid var(--pub-index-border);
    border-radius: 0;
}

.page-publisher-typology .tags .badge[style*="background-color: #fff"],
.page-publisher-typology .tags .badge[style*="background-color:#fff"] {
    background-color: #fff !important;
    color: #1a1d21 !important;
    border-color: var(--pub-index-border-strong) !important;
}

.dark-mode .page-publisher-typology .tags .badge {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--pub-index-text) !important;
    border-color: var(--pub-index-border);
}

.dark-mode .page-publisher-typology .tags .badge[style*="background-color: #ff8c00"],
.dark-mode .page-publisher-typology .tags .badge[style*="background-color:#ff8c00"] {
    background-color: #e67e00 !important;
    color: #fff !important;
}

.page-publisher-typology .border-warning.bg-dark {
    border: 2px solid var(--pub-index-border-strong) !important;
    border-radius: 0;
    overflow: hidden;
    background: var(--pub-index-bg-subtle) !important;
}

.dark-mode .page-publisher-typology .border-warning.bg-dark {
    background: var(--pub-index-bg-card) !important;
    border-color: var(--pub-index-border) !important;
}

/* ============================================================================
   NAV PUBLISHER — BEM .publisher-nav, .publisher-nav__link, .publisher-nav__link--* --current
   Généré par F_PUBLISHER_PrintNav(). White / Dark. focus-visible.
   ============================================================================ */

.page-publisher-typology .publisher-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-inline-start: 1rem;
}

.page-publisher-typology .publisher-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    border: 1px solid;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.page-publisher-typology .publisher-nav__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.page-publisher-typology .publisher-nav__icon {
    color: inherit;
}

/* White Mode : inactifs (outline) */
.page-publisher-typology .publisher-nav__link--profil:not(.publisher-nav__link--current) {
    background-color: #fff;
    color: #1a3a5c;
    border-color: #3399ff;
}
.page-publisher-typology .publisher-nav__link--profil:not(.publisher-nav__link--current):hover {
    background-color: rgba(51, 153, 255, 0.08);
    color: #0d2137;
}

.page-publisher-typology .publisher-nav__link--ads:not(.publisher-nav__link--current) {
    background-color: #fff;
    color: #1e4620;
    border-color: #28a745;
}
.page-publisher-typology .publisher-nav__link--ads:not(.publisher-nav__link--current):hover {
    background-color: rgba(40, 167, 69, 0.08);
    color: #0d2f0f;
}

.page-publisher-typology .publisher-nav__link--adr:not(.publisher-nav__link--current) {
    background-color: #fff;
    color: #5c3d0a;
    border-color: #ff9800;
}
.page-publisher-typology .publisher-nav__link--adr:not(.publisher-nav__link--current):hover {
    background-color: rgba(255, 152, 0, 0.08);
    color: #3d2907;
}

.page-publisher-typology .publisher-nav__link--adp:not(.publisher-nav__link--current) {
    background-color: #fff;
    color: #1a1d21;
    border-color: #495057;
}
.page-publisher-typology .publisher-nav__link--adp:not(.publisher-nav__link--current):hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #0d0e10;
}

/* White Mode : actif (plein) */
.page-publisher-typology .publisher-nav__link--profil.publisher-nav__link--current {
    background-color: #3399ff;
    color: #fff;
    border-color: #3399ff;
}
.page-publisher-typology .publisher-nav__link--profil.publisher-nav__link--current:hover {
    background-color: #2672cc;
    border-color: #2672cc;
    color: #fff;
}

.page-publisher-typology .publisher-nav__link--ads.publisher-nav__link--current {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}
.page-publisher-typology .publisher-nav__link--ads.publisher-nav__link--current:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
    color: #fff;
}

.page-publisher-typology .publisher-nav__link--adr.publisher-nav__link--current {
    background-color: #ff9800;
    color: #fff;
    border-color: #ff9800;
}
.page-publisher-typology .publisher-nav__link--adr.publisher-nav__link--current:hover {
    background-color: #e68900;
    border-color: #e68900;
    color: #fff;
}

.page-publisher-typology .publisher-nav__link--adp.publisher-nav__link--current {
    background-color: #212529;
    color: #fff;
    border-color: #212529;
}
.page-publisher-typology .publisher-nav__link--adp.publisher-nav__link--current:hover {
    background-color: #0d0e10;
    border-color: #0d0e10;
    color: #fff;
}

/* Dark Mode : inactifs */
.dark-mode .page-publisher-typology .publisher-nav__link--profil:not(.publisher-nav__link--current) {
    background-color: transparent;
    color: var(--pub-index-blue);
    border-color: rgba(92, 133, 255, 0.5);
}
.dark-mode .page-publisher-typology .publisher-nav__link--profil:not(.publisher-nav__link--current):hover {
    background-color: var(--pub-index-blue-bg);
    color: var(--pub-index-blue);
}

.dark-mode .page-publisher-typology .publisher-nav__link--ads:not(.publisher-nav__link--current) {
    background-color: transparent;
    color: #6ee7c5;
    border-color: rgba(16, 185, 129, 0.5);
}
.dark-mode .page-publisher-typology .publisher-nav__link--ads:not(.publisher-nav__link--current):hover {
    background-color: rgba(16, 185, 129, 0.2);
    color: #99f0dc;
}

.dark-mode .page-publisher-typology .publisher-nav__link--adr:not(.publisher-nav__link--current) {
    background-color: transparent;
    color: #fcd88a;
    border-color: rgba(245, 158, 11, 0.5);
}
.dark-mode .page-publisher-typology .publisher-nav__link--adr:not(.publisher-nav__link--current):hover {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fde4a8;
}

.dark-mode .page-publisher-typology .publisher-nav__link--adp:not(.publisher-nav__link--current) {
    background-color: transparent;
    color: #dee2e6;
    border-color: rgba(255, 255, 255, 0.25);
}
.dark-mode .page-publisher-typology .publisher-nav__link--adp:not(.publisher-nav__link--current):hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

/* Dark Mode : actif */
.dark-mode .page-publisher-typology .publisher-nav__link--profil.publisher-nav__link--current {
    background-color: var(--pub-index-blue);
    color: #fff;
    border-color: var(--pub-index-blue);
}
.dark-mode .page-publisher-typology .publisher-nav__link--profil.publisher-nav__link--current:hover {
    background-color: var(--pub-index-blue-light);
    border-color: var(--pub-index-blue-light);
    color: #fff;
}

.dark-mode .page-publisher-typology .publisher-nav__link--ads.publisher-nav__link--current {
    background-color: #10b981;
    color: #fff;
    border-color: #10b981;
}
.dark-mode .page-publisher-typology .publisher-nav__link--ads.publisher-nav__link--current:hover {
    background-color: #0d9669;
    border-color: #0d9669;
    color: #fff;
}

.dark-mode .page-publisher-typology .publisher-nav__link--adr.publisher-nav__link--current {
    background-color: var(--pub-index-orange);
    color: #fff;
    border-color: var(--pub-index-orange);
}
.dark-mode .page-publisher-typology .publisher-nav__link--adr.publisher-nav__link--current:hover {
    background-color: #e67d00;
    border-color: #e67d00;
    color: #fff;
}

.dark-mode .page-publisher-typology .publisher-nav__link--adp.publisher-nav__link--current {
    background-color: #4b5563;
    color: #fff;
    border-color: #4b5563;
}
.dark-mode .page-publisher-typology .publisher-nav__link--adp.publisher-nav__link--current:hover {
    background-color: #374151;
    border-color: #374151;
    color: #fff;
}

/* ============================================================================
   DARK MODE — Fond sombre wrapper
   ============================================================================ */

.dark-mode .page-publisher-typology {
    background-color: #0a0a0a;
}

.dark-mode .nk-content.nk-content-fluid:has(.page-publisher-typology) {
    background-color: #0a0a0a !important;
}

/* ============================================================================
   Header publisher — grille Bootstrap (gauche: avatar + nav, droite: slug + slogan, ligne 2: badges sous gauche)
   Palette Commercify: bleu #2b5cff, or #FFD700, orange #ff8a00
   ============================================================================ */

.page-publisher-typology .publisher-header-card {
    margin-bottom: 0.75rem;
}
/* Desktop : sticky seulement si data-sticky-desktop="1" */
@media (min-width: 1200px) {
    .page-publisher-typology[data-sticky-desktop="1"] .publisher-header-card.publisher-header-sticky {
        position: fixed;
        top: var(--publisher-sticky-top, var(--publisher-sticky-top-desktop, 85px));
        left: 0;
        right: 0;
        z-index: 1020;
    }
    .page-publisher-typology[data-sticky-desktop="0"] .publisher-header-card.publisher-header-sticky {
        position: static;
    }
}
/* Tablette : sticky seulement si data-sticky-tablet="1" — alignement sur la zone contenu (padding) */
@media (min-width: 768px) and (max-width: 1199px) {
    .page-publisher-typology[data-sticky-tablet="1"] .publisher-header-card.publisher-header-sticky {
        position: fixed;
        top: var(--publisher-sticky-top, var(--publisher-sticky-top-tablet, 85px));
        left: var(--nk-content-padding, 0);
        right: var(--nk-content-padding, 0);
        z-index: 1020;
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }
    .page-publisher-typology[data-sticky-tablet="0"] .publisher-header-card.publisher-header-sticky {
        position: static;
    }
    .page-publisher-typology[data-sticky-tablet="1"] .publisher-header-sticky-spacer {
        height: var(--publisher-sticky-height, var(--publisher-sticky-height-tablet, 130px));
    }
    .page-publisher-typology[data-sticky-tablet="0"] .publisher-header-sticky-spacer {
        height: 0;
    }
}
/* Smartphone : sticky seulement si data-sticky-smartphone="1" — alignement sur la zone contenu (padding) */
@media (max-width: 767.98px) {
    .page-publisher-typology[data-sticky-smartphone="1"] .publisher-header-card.publisher-header-sticky {
        position: fixed;
        top: var(--publisher-sticky-top, var(--publisher-sticky-top-smartphone, 60px));
        left: var(--nk-content-padding, 0);
        right: var(--nk-content-padding, 0);
        z-index: 1020;
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }
    .page-publisher-typology[data-sticky-smartphone="0"] .publisher-header-card.publisher-header-sticky {
        position: static;
    }
    .page-publisher-typology[data-sticky-smartphone="1"] .publisher-header-sticky-spacer {
        height: var(--publisher-sticky-height, var(--publisher-sticky-height-smartphone, 100px));
    }
    .page-publisher-typology[data-sticky-smartphone="0"] .publisher-header-sticky-spacer {
        height: 0;
    }
}
/* Alignement largeur sur la zone contenu (sidebar fixe desktop) — uniquement si sticky desktop actif */
@media (min-width: 1200px) {
    .nk-sidebar + .nk-wrap .page-publisher-typology[data-sticky-desktop="1"] .publisher-header-card.publisher-header-sticky,
    .nk-sidebar-overlay + .nk-wrap .page-publisher-typology[data-sticky-desktop="1"] .publisher-header-card.publisher-header-sticky {
        left: 290px;
        right: 0;
    }
    .nk-sidebar.is-compact + .nk-wrap .page-publisher-typology[data-sticky-desktop="1"] .publisher-header-card.publisher-header-sticky {
        left: 76px;
        right: 0;
    }
}
/* Spacer desktop : hauteur priorité JS puis config — uniquement si sticky desktop actif */
@media (min-width: 1200px) {
    .page-publisher-typology[data-sticky-desktop="1"] .publisher-header-sticky-spacer {
        flex-shrink: 0;
        height: var(--publisher-sticky-height, var(--publisher-sticky-height-desktop, 150px));
    }
    .page-publisher-typology[data-sticky-desktop="0"] .publisher-header-sticky-spacer {
        height: 0;
    }
}
/* Spacer par défaut (hors media) pour éviter FOUC — sur tablette/smartphone géré dans les media ci‑dessus */
.page-publisher-typology .publisher-header-sticky-spacer {
    flex-shrink: 0;
}

.page-publisher-typology .card-inner.publisher-header-gradient.publisher-header-compact {
    padding: 0.85rem 1.15rem;
}

.page-publisher-typology .publisher-header-row-1 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

/* One-line partout: neutraliser l'empilement Bootstrap .col-12/.col-md-6 */
.page-publisher-typology .publisher-header-row-1 .publisher-header-col-left,
.page-publisher-typology .publisher-header-row-1 .publisher-header-col-right {
    max-width: none !important;
    width: auto !important;
    flex: none !important;
}

.page-publisher-typology .publisher-header-col-left {
    min-width: 0;
    padding-inline-end: 0.5rem;
}

.page-publisher-typology .publisher-header-col-right {
    min-width: 0;
    text-align: end;
    padding-inline-start: 0.5rem;
}

/* Bouton Plus/Moins collapse — toutes résolutions (couleurs depuis thème config) */
.page-publisher-typology .publisher-header-toggle-btn {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 1px solid var(--pub-index-toggle-border);
    background: var(--pub-index-toggle-bg);
    color: var(--pub-index-toggle-color);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--pub-index-shadow);
    transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.page-publisher-typology .publisher-header-toggle-btn:hover {
    transform: translateY(-1px);
    border-color: var(--pub-index-toggle-hover-border);
    background: var(--pub-index-toggle-hover-bg);
    color: var(--pub-index-toggle-hover-color);
}
.page-publisher-typology .publisher-header-toggle-btn:focus-visible {
    outline: 0;
    border-color: var(--pub-index-toggle-hover-border);
    box-shadow: 0 0 0 0.2rem rgba(43, 92, 255, 0.25);
}
.page-publisher-typology .publisher-header-toggle-btn[aria-expanded="true"] {
    background: var(--pub-index-toggle-expanded-bg);
    border-color: var(--pub-index-toggle-expanded-border);
    color: var(--pub-index-toggle-expanded-color);
}
.page-publisher-typology .publisher-header-toggle-btn:active {
    transform: translateY(0);
}
.page-publisher-typology .publisher-header-toggle-plus,
.page-publisher-typology .publisher-header-toggle-minus {
    transform: translateY(-1px);
}
.page-publisher-typology .publisher-header-toggle-btn[aria-expanded="true"] .publisher-header-toggle-minus {
    color: var(--pub-index-toggle-expanded-color);
}
.page-publisher-typology .publisher-header-toggle-icon {
    display: none;
}
.page-publisher-typology .publisher-header-toggle-plus {
    display: inline !important;
}
.page-publisher-typology .publisher-header-toggle-btn[aria-expanded="true"] .publisher-header-toggle-plus {
    display: none !important;
}
.page-publisher-typology .publisher-header-toggle-btn[aria-expanded="true"] .publisher-header-toggle-minus {
    display: inline !important;
}

.dark-mode .page-publisher-typology .publisher-header-toggle-btn {
    border-color: var(--pub-index-toggle-border);
    background: var(--pub-index-toggle-bg);
    color: var(--pub-index-toggle-color);
}
.dark-mode .page-publisher-typology .publisher-header-toggle-btn[aria-expanded="true"] {
    background: var(--pub-index-toggle-expanded-bg);
    border-color: var(--pub-index-toggle-expanded-border);
    color: var(--pub-index-toggle-expanded-color);
}

/* Zone collapse : slogan + badges */
.page-publisher-typology .publisher-header-details-collapse {
    border-top: 1px solid var(--pub-index-border);
}
.page-publisher-typology .publisher-header-details-inner {
    padding-top: 0.6rem;
    padding-bottom: 0.15rem;
}

.page-publisher-typology .publisher-header-avatar-link {
    display: inline-flex;
    flex-shrink: 0;
}

.page-publisher-typology .publisher-avatar {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border: 2px solid var(--pub-index-border-strong);
    box-shadow: var(--pub-index-shadow-lg);
    border-radius: 0;
}

.page-publisher-typology .publisher-header-identity {
    min-width: 0;
}

/* Avatar + nav restent sur la meme ligne avec scroll horizontal si besoin */
.page-publisher-typology .publisher-header-col-left .d-flex {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}

/* Slug + bouton + restent sur la meme ligne */
.page-publisher-typology .publisher-header-col-right .d-flex {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
}

.page-publisher-typology .publisher-header-slug {
    color: var(--pub-index-blue) !important;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== DESKTOP uniquement (hors tablette et smartphone) : tailles augmentées ========== */
@media (min-width: 1025px) {
    .page-publisher-typology .publisher-avatar {
        width: 100px;
        height: 100px;
    }
    .page-publisher-typology .publisher-header-slug {
        font-size: 2rem;
        line-height: 1.15;
    }
    .page-publisher-typology .publisher-nav__link {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }
    .page-publisher-typology .publisher-header-toggle-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.4rem;
    }
    .page-publisher-typology .card-inner.publisher-header-gradient.publisher-header-compact {
        padding: 1rem 1.25rem;
    }
}

.page-publisher-typology .publisher-header-slogan {
    margin-top: 0.2rem;
    color: var(--pub-index-text-muted) !important;
    font-size: 0.95rem;
    line-height: 1.3;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ligne 2 : badges + slogan (dans le collapse) */
.page-publisher-typology .publisher-header-row-2 {
    padding-top: 0;
    margin-top: 0;
    border: none;
}
.page-publisher-typology .publisher-header-details-collapse .publisher-header-slogan {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.page-publisher-typology .publisher-header-badges-col {
    padding-top: 0;
}

.page-publisher-typology .publisher-header-tags-wrap {
    min-width: 0;
}

.page-publisher-typology .publisher-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    justify-content: flex-start;
}

.page-publisher-typology .publisher-tag {
    border-radius: 0;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    line-height: 1.2;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.page-publisher-typology .publisher-tag:hover {
    transform: translateY(-1px);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.page-publisher-typology .publisher-tag--neutral {
    background: var(--pub-index-bg-card) !important;
    color: var(--pub-index-text) !important;
    border-color: var(--pub-index-border-strong) !important;
}

.page-publisher-typology .publisher-tag--online {
    background: #0d6832 !important;
    color: #fff !important;
}

.page-publisher-typology .publisher-tag--offline {
    background: #5a6268 !important;
    color: #fff !important;
}

.page-publisher-typology .publisher-tag--sponsor,
.page-publisher-typology .publisher-tag--demo {
    background: var(--pub-index-orange) !important;
    color: #fff !important;
}

.page-publisher-typology .publisher-tag--buyer-certified {
    background: var(--pub-index-blue) !important;
    color: #fff !important;
}

.page-publisher-typology .publisher-tag--seller-certified {
    background: #0a5fce !important;
    color: #fff !important;
}

.page-publisher-typology .publisher-tag--uncertified {
    background: #c82333 !important;
    color: #fff !important;
}

/* Nav catalogues — style Commercify */
.page-publisher-typology .publisher-nav {
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-inline-start: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    white-space: nowrap;
    max-width: 100%;
    padding-bottom: 2px;
}

.page-publisher-typology .publisher-nav__link {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    line-height: 1.2;
    gap: 0.3rem;
    flex: 0 0 auto;
    border-radius: 0;
    font-weight: 600;
}

.page-publisher-typology .publisher-nav__label {
    white-space: nowrap;
}

/* Actif / inactif avec palette Commercify */
.page-publisher-typology .publisher-nav__link--profil:not(.publisher-nav__link--current) {
    background-color: var(--pub-index-bg-card);
    color: var(--pub-index-blue);
    border-color: var(--pub-index-blue);
}
.page-publisher-typology .publisher-nav__link--profil:not(.publisher-nav__link--current):hover {
    background-color: var(--pub-index-blue-bg);
    color: var(--pub-index-blue);
}

.page-publisher-typology .publisher-nav__link--profil.publisher-nav__link--current {
    background-color: var(--pub-index-blue);
    color: #fff;
    border-color: var(--pub-index-blue);
}

.page-publisher-typology .publisher-nav__link--ads:not(.publisher-nav__link--current) {
    background-color: var(--pub-index-bg-card);
    color: #0d6832;
    border-color: #0d6832;
}
.page-publisher-typology .publisher-nav__link--ads.publisher-nav__link--current {
    background-color: #0d6832;
    color: #fff;
    border-color: #0d6832;
}

.page-publisher-typology .publisher-nav__link--adr:not(.publisher-nav__link--current) {
    background-color: var(--pub-index-bg-card);
    color: var(--pub-index-orange);
    border-color: var(--pub-index-orange);
}
.page-publisher-typology .publisher-nav__link--adr.publisher-nav__link--current {
    background-color: var(--pub-index-orange);
    color: #fff;
    border-color: var(--pub-index-orange);
}

.page-publisher-typology .publisher-nav__link--adp:not(.publisher-nav__link--current) {
    background-color: var(--pub-index-bg-card);
    color: var(--pub-index-text-muted);
    border-color: var(--pub-index-border-strong);
}
.page-publisher-typology .publisher-nav__link--adp.publisher-nav__link--current {
    background-color: #374151;
    color: #fff;
    border-color: #374151;
}

.dark-mode .page-publisher-typology .publisher-header-slug {
    color: var(--pub-index-blue) !important;
}

.dark-mode .page-publisher-typology .publisher-header-slogan {
    color: var(--pub-index-text-muted) !important;
}

.dark-mode .page-publisher-typology .publisher-tag--neutral {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--pub-index-text) !important;
    border-color: var(--pub-index-border) !important;
}

.dark-mode .page-publisher-typology .publisher-tag--sponsor,
.dark-mode .page-publisher-typology .publisher-tag--demo {
    background: var(--pub-index-orange) !important;
    color: #fff !important;
}

/* ========== TABLETTE uniquement : grille refondue, slug à droite grossi, boutons one-line ========== */
@media (min-width: 768px) and (max-width: 1024px) {
    .page-publisher-typology .publisher-header-card {
        margin-top: 2.5rem;
    }
    /* Grille : 70 % gauche (avatar + 4 boutons), 30 % droite (slug + bouton +) */
    .page-publisher-typology .publisher-header-row-1 {
        display: grid !important;
        grid-template-columns: 7fr 3fr;
        gap: 0.5rem;
        align-items: center;
        margin-bottom: 0;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    /* Annuler le 50% de Bootstrap .col-md-6 sur tablettes pour que 7fr / 3fr s'applique */
    .page-publisher-typology .publisher-header-row-1 .publisher-header-col-left,
    .page-publisher-typology .publisher-header-row-1 .publisher-header-col-right {
        max-width: none !important;
        width: auto !important;
        flex: none !important;
    }
    .page-publisher-typology .publisher-header-row-1 .publisher-header-col-left {
        min-width: 0;
        padding-inline-end: 0.5rem;
    }
    .page-publisher-typology .publisher-header-row-1 .publisher-header-col-right {
        min-width: 0;
        text-align: end;
        padding-inline-start: 0.5rem;
    }
    /* Zone gauche : avatar + 4 boutons en grille 2x2 (deux par deux) pour gagner en largeur */
    .page-publisher-typology .publisher-header-col-left .d-flex {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding-bottom: 2px;
        align-items: center;
        overflow-x: visible;
        overflow-y: visible;
    }
    .page-publisher-typology .publisher-header-col-left .publisher-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
        margin-inline-start: 0;
        flex: 1 1 auto;
        min-width: 0;
    }
    /* Boutons catalogue compacts pour tenir sur une ligne avec l'avatar */
    .page-publisher-typology .publisher-header-col-left .publisher-nav__link {
        padding: 0.28rem 0.5rem;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    .page-publisher-typology .publisher-header-col-left .publisher-nav__icon {
        display: none;
    }
    .page-publisher-typology .publisher-header-col-left .publisher-avatar-link {
        flex-shrink: 0;
    }
    /* Zone droite 30 % : slug + bouton +, pas trop d'espace */
    .page-publisher-typology .publisher-header-col-right .publisher-header-slug {
        font-size: 1.45rem;
        line-height: 1.2;
        text-align: end;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .page-publisher-typology .publisher-header-col-right .d-flex {
        justify-content: flex-end;
    }
    .page-publisher-typology .publisher-header-col-right .publisher-header-identity {
        flex-grow: 0;
        min-width: 0;
    }
    /* Carte compacte en hauteur */
    .page-publisher-typology .card-inner.publisher-header-gradient.publisher-header-compact {
        padding: 0.6rem 0.9rem;
    }
}

@media (max-width: 991.98px) {
    .page-publisher-typology .publisher-header-col-right {
        text-align: start;
        padding-inline-start: 0;
        padding-inline-end: 0;
    }
    .page-publisher-typology .publisher-header-badges-col {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

@media (max-width: 767.98px) {
    .page-publisher-typology .card-inner.publisher-header-gradient.publisher-header-compact {
        padding: 0.65rem 0.85rem;
    }
    .page-publisher-typology .publisher-avatar {
        width: 56px;
        height: 56px;
    }
    .page-publisher-typology .publisher-header-slug {
        font-size: 1.15rem;
    }
    .page-publisher-typology .publisher-header-slogan {
        font-size: 0.875rem;
    }
    .page-publisher-typology .publisher-nav__icon {
        display: none;
    }
    .page-publisher-typology .publisher-nav__link {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    /* Header publisher : 4 boutons en grille 2x2 sur smartphone pour gagner en largeur */
    .page-publisher-typology .publisher-header-col-left .d-flex {
        flex-wrap: wrap;
        overflow-x: visible;
        overflow-y: visible;
    }
    .page-publisher-typology .publisher-header-col-left .publisher-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
        margin-inline-start: 0;
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* Panneau Appel vidéo WebRTC */
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-call {
    padding: 0.5rem 0;
}
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-room .form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-videos {
    margin-bottom: 1rem;
}
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-video {
    width: 100%;
    max-height: 280px;
    background: #1a1a1a;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-videos label.small {
    display: block;
    margin-bottom: 0.25rem;
}
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.cfy-pi-zone-panel--appel_video .cfy-pi-webrtc-actions .btn {
    flex-shrink: 0;
}
.cfy-pi-zone-panel--appel_video #webrtc-status {
    flex: 1;
    min-width: 0;
}
