/**
 * Dashboard CSS — Annuaire Pro Belgique
 *
 * STYLES EXCLUSIFS au dashboard pro (/dashboard/).
 * Ce fichier ne redéfinit JAMAIS les composants déjà dans frontend.css.
 *
 * Chargé APRÈS frontend.css — hérite de toutes les variables :root.
 *
 * @package AnnuairePro
 */

/* =========================================================================
   Variables propres au dashboard (sans conflit)
   ========================================================================= */
:root {
    --apb-sidebar-w:     240px;
    --apb-nav-item-h:    42px;
    --apb-section-gap:   20px;

    /* Fallbacks si apb-front.css n'a pas ces variables (compatibilité) */
    --apb-muted:          var(--apb-text-muted, #6B7280);
    --apb-primary-light:  rgba(24, 95, 165, .08);
}

/* =========================================================================
   INTÉGRATION BRICKS BUILDER — pleine largeur
   =========================================================================
   Le wrapper Bricks .brxe-apb-dashboard hérite la largeur de la section.
   Pour un dashboard pleine largeur, mettre la section Bricks en
   "Full content width" (Largeur : Aucune limite) dans l'éditeur Bricks.
   ========================================================================= */
.brxe-apb-dashboard {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================================================
   LAYOUT PRINCIPAL
   ========================================================================= */
.apb-dashboard {
    display: grid;
    grid-template-columns: var(--apb-sidebar-w) 1fr;
    gap: var(--apb-space-xl);
    align-items: start;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: var(--apb-space-xl) var(--apb-space-lg);
    font-family: var(--apb-font, system-ui, sans-serif);
    font-size: 16px;
}

@media (max-width: 960px) {
    .apb-dashboard {
        grid-template-columns: 1fr;
        padding: var(--apb-space-lg);
    }
}

@media (max-width: 600px) {
    .apb-dashboard {
        padding: var(--apb-space-md);
        gap: var(--apb-space-lg);
    }
}

/* =========================================================================
   SIDEBAR — navigation collante
   ========================================================================= */
.apb-dashboard__sidebar {
    position: sticky;
    top: 20px;
}

/* Carte profil mini (haut sidebar) */
.apb-sidebar-card {
    background: #fff;
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-card);
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: var(--apb-shadow);
}
.apb-sidebar-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--apb-border);
    margin: 0 auto 10px;
    display: block;
}
.apb-sidebar-card__avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--apb-primary), var(--apb-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 10px;
}
.apb-sidebar-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--apb-text);
    margin: 0 0 3px;
}
.apb-sidebar-card__status {
    font-size: 12px;
    color: var(--apb-muted);
    margin: 0 0 12px;
}
.apb-sidebar-card__score-wrap {
    text-align: left;
}
.apb-sidebar-card__score-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 5px;
}
.apb-sidebar-card__score-pct {
    font-weight: 800;
    font-size: 14px;
}
.apb-sidebar-card__score-pct--ok     { color: var(--apb-success); }
.apb-sidebar-card__score-pct--warn   { color: var(--apb-warning); }
.apb-sidebar-card__score-pct--danger { color: var(--apb-danger); }
.apb-sidebar-card__bar {
    height: 7px;
    background: var(--apb-border);
    border-radius: 999px;
    overflow: hidden;
}
.apb-sidebar-card__bar-fill {
    height: 100%;
    background: var(--apb-primary);
    border-radius: 999px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}
.apb-sidebar-card__bar-fill--ok     { background: var(--apb-success); }
.apb-sidebar-card__bar-fill--warn   { background: var(--apb-warning); }

/* Navigation */
.apb-dashboard__nav {
    background: #fff;
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-card);
    padding: 8px;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: var(--apb-shadow);
}

@media (max-width: 900px) {
    .apb-dashboard__nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    .apb-dashboard__sidebar {
        position: static;
    }
}

.apb-dashboard__nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--apb-nav-item-h);
    padding: 0 16px;
    border-radius: var(--apb-radius);
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 15px;
    transition: background var(--apb-transition), color var(--apb-transition);
    white-space: nowrap;
}
.apb-dashboard__nav a:hover {
    background: var(--apb-primary-light);
    color: var(--apb-primary);
}
.apb-dashboard__nav a.active {
    background: var(--apb-primary-light);
    color: var(--apb-primary);
    font-weight: 700;
}
.apb-dashboard__nav a .apb-nav-icon {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Séparateur nav */
.apb-dashboard__nav-sep {
    height: 1px;
    background: var(--apb-border);
    margin: 4px 4px;
}

/* Bouton déconnexion dans la sidebar */
.apb-dashboard__nav-logout {
    color: var(--apb-danger, #DC2626) !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.apb-dashboard__nav-logout:hover {
    opacity: 1;
}

/* =========================================================================
   ZONE DE CONTENU PRINCIPALE
   ========================================================================= */
.apb-dashboard__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--apb-section-gap);
    font-size: 16px;
    line-height: 1.6;
}

/* Titres de section dashboard */
.apb-dashboard__main .apb-section__header h3 {
    font-size: 18px;
}

/* Labels dans les stats */
.apb-dashboard__main .apb-stats-grid span,
.apb-dashboard__main .apb-stats-grid small {
    font-size: 15px;
}

/* =========================================================================
   STATS GRID (vues, contacts, etc.)
   ========================================================================= */
.apb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--apb-space-md);
}
.apb-stat-card {
    background: #fff;
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-card);
    padding: 18px;
    text-align: center;
    transition: box-shadow var(--apb-transition), transform var(--apb-transition);
}
.apb-stat-card:hover {
    box-shadow: var(--apb-shadow-md);
    transform: translateY(-2px);
}
.apb-stat-card__icon {
    font-size: 24px;
    display: block;
    margin-bottom: 6px;
}
.apb-stat-card__valeur {
    font-size: 32px;
    font-weight: 800;
    color: var(--apb-primary);
    line-height: 1;
    margin-bottom: 6px;
}
.apb-stat-card__label {
    font-size: 14px;
    color: var(--apb-muted);
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* =========================================================================
   SECTIONS DU DASHBOARD (accordion / cards)
   ========================================================================= */
.apb-section {
    background: #fff;
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-card);
    overflow: hidden;
    box-shadow: var(--apb-shadow);
    transition: box-shadow var(--apb-transition);
}
.apb-section:focus-within {
    box-shadow: var(--apb-shadow-md);
}

.apb-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(to right, #f8fafc, #fff);
    border-bottom: 1.5px solid var(--apb-border);
    cursor: pointer;
    user-select: none;
}
.apb-section__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--apb-text);
    flex: 1;
}
.apb-section__icon { font-size: 19px; }
.apb-section__toggle {
    font-size: 13px;
    color: var(--apb-muted);
    margin-left: auto;
    transition: transform var(--apb-transition);
    flex-shrink: 0;
}
.apb-section--collapsed .apb-section__toggle { transform: rotate(-90deg); }
.apb-section--collapsed .apb-section__body { display: none; }

.apb-section__body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: var(--apb-space-md);
}
/* Supprimer la marge-bas des champs dans section */
.apb-section__body .apb-form__field { margin-bottom: 0; }

/* Badge de complétion dans l'en-tête */
.apb-section__badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--apb-radius-badge);
    background: var(--apb-success);
    color: #fff;
    flex-shrink: 0;
}
.apb-section__badge--warn { background: var(--apb-warning); }
.apb-section__badge--missing { background: var(--apb-border); color: var(--apb-muted); }

/* =========================================================================
   GRILLE 2 COLONNES
   ========================================================================= */
.apb-form__row--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--apb-space-md);
}
@media (max-width: 560px) {
    .apb-form__row--2 { grid-template-columns: 1fr; }
}

/* =========================================================================
   AVATAR UPLOAD
   ========================================================================= */
.apb-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.apb-avatar-preview-wrap { flex-shrink: 0; }
.apb-avatar-preview__img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--apb-border);
    box-shadow: var(--apb-shadow);
    display: block;
}
.apb-avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--apb-primary), var(--apb-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    font-weight: 800;
    box-shadow: var(--apb-shadow);
}
/* .apb-avatar-info — supprimé 2026-03-19 */

/* =========================================================================
   GALERIE UPLOAD
   ========================================================================= */
/* .apb-galerie-upload — supprimé 2026-03-19 */

/* Barre de progression upload galerie */
.apb-galerie-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 4px;
}
.apb-galerie-progress__track {
    flex: 1;
    height: 6px;
    background: var(--apb-border);
    border-radius: 999px;
    overflow: hidden;
}
.apb-galerie-progress__fill {
    height: 100%;
    background: var(--apb-primary);
    border-radius: 999px;
    transition: width .25s ease;
}
.apb-galerie-progress__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--apb-muted);
    white-space: nowrap;
    min-width: 36px;
    text-align: right;
}

/* Skeleton placeholder pendant l'upload */
.apb-galerie-thumb--loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: apbSkeletonShimmer 1.2s infinite linear;
    cursor: default;
    border: none;
}
@keyframes apbSkeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.apb-galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: var(--apb-space-md);
}
.apb-galerie-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--apb-radius);
    overflow: hidden;
    background: var(--apb-bg);
    border: 1px solid var(--apb-border);
}
.apb-galerie-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.apb-galerie-thumb:hover img { transform: scale(1.05); }
.apb-galerie-thumb__delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--apb-transition);
    line-height: 1;
}
.apb-galerie-thumb:hover .apb-galerie-thumb__delete { opacity: 1; }

/* =========================================================================
   DISPONIBILITÉS — jours semaine
   ========================================================================= */
.apb-dispo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.apb-dispo-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.apb-dispo-label input { display: none; }
.apb-dispo-label span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--apb-border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--apb-muted);
    background: #fff;
    transition: background var(--apb-transition), border-color var(--apb-transition), color var(--apb-transition);
}
.apb-dispo-label input:checked + span {
    background: var(--apb-primary);
    border-color: var(--apb-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(24,95,165,.3);
}
.apb-dispo-label:hover span {
    border-color: var(--apb-primary);
    color: var(--apb-primary);
}

/* =========================================================================
   RANGE SLIDER — Rayon d'action (cross-browser)
   ========================================================================= */
.apb-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--apb-border);
    outline: 3px solid transparent;
    cursor: pointer;
    margin: 14px 0 5px;
}
.apb-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--apb-primary);
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(24,95,165,.35);
    border: 2.5px solid #fff;
    transition: transform .12s, box-shadow .12s;
}
.apb-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 8px rgba(24,95,165,.5);
}
.apb-range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--apb-primary);
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(24,95,165,.35);
    border: 2.5px solid #fff;
}
.apb-range-slider::-webkit-slider-runnable-track {
    background: linear-gradient(
        to right,
        var(--apb-primary) 0%,
        var(--apb-primary) var(--fill, 20%),
        var(--apb-border)  var(--fill, 20%),
        var(--apb-border)  100%
    );
    height: 6px;
    border-radius: 3px;
}
.apb-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--apb-muted);
    padding: 0 2px;
    margin-top: 3px;
    font-weight: 500;
}

/* =========================================================================
   SCORE DE COMPLÉTUDE (sidebar)
   ========================================================================= */
/* .apb-completude — supprimé 2026-03-19 (classe non utilisée dans PHP) */

/* =========================================================================
   AVIS DANS LE DASHBOARD
   ========================================================================= */
/* .apb-avis-liste-dash — supprimé 2026-03-19 (legacy review dashboard) */
/* .apb-avis-dash* — supprimé 2026-03-19 (legacy review dashboard) */

/* =========================================================================
   SECTION TVA (readonly)
   ========================================================================= */
.apb-tva-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--apb-bg);
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-lg);
    font-size: 14px;
}
.apb-tva-masked { font-weight: 700; color: var(--apb-text); font-family: monospace; font-size: 15px; }

/* =========================================================================
   COMPTEUR DE CARACTÈRES
   ========================================================================= */
.apb-char-count {
    text-align: right;
    color: var(--apb-muted);
    font-size: 12px;
    margin-top: 3px;
    font-weight: 500;
}
.apb-char-count.warn  { color: var(--apb-warning); }
.apb-char-count.limit { color: var(--apb-danger); font-weight: 700; }

/* =========================================================================
   BOUTON SUBMIT — barre sticky en bas
   ========================================================================= */
.apb-form-submit-bar {
    position: sticky;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-card);
    box-shadow: 0 -2px 12px rgba(0,0,0,.08), var(--apb-shadow-lg);
    z-index: 20;
}
/* .apb-form-submit-bar__msg — supprimé 2026-03-19 */
.apb-form-submit-bar__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Message de sauvegarde inline — margin-right:auto le pousse à gauche
   quand visible, laissant le bouton Enregistrer toujours à droite */
.apb-save-msg {
    font-size: 14px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--apb-radius);
    margin-right: auto;
    display: none;
}
.apb-save-msg.ok    { color: var(--apb-success); background: #f0fdf4; display: inline-flex; align-items: center; gap: 5px; }
.apb-save-msg.error { color: var(--apb-danger);  background: #fef2f2; display: inline-flex; align-items: center; gap: 5px; }
.apb-save-msg.info  { color: var(--apb-muted);   background: transparent; display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================================
   SECTION COMPLÉTUDE dans le contenu (haut du formulaire)
   ========================================================================= */
.apb-dashboard__completude {
    background: #fff;
    border: 1.5px solid var(--apb-border);
    border-radius: var(--apb-radius-card);
    padding: var(--apb-space-lg) var(--apb-space-xl);
    box-shadow: var(--apb-shadow);
}

/* =========================================================================
   TITRES STANDARDISÉS
   ========================================================================= */
.apb-dashboard h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--apb-text);
    margin: 0 0 12px;
}
.apb-dashboard h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--apb-text);
    margin: 0 0 var(--apb-space-md);
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--apb-border);
}

/* =========================================================================
   DASHBOARD MOBILE — navigation horizontale en bas
   ========================================================================= */
@media (max-width: 900px) {
    .apb-dashboard__sidebar {
        order: -1;
    }
    .apb-sidebar-card { display: none; }

    /* Grille d'icônes style app mobile */
    .apb-dashboard__nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 12px;
    }
    .apb-dashboard__nav a {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        font-weight: 600;
        padding: 12px 6px;
        height: auto;
        min-height: 64px;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
        border-radius: 10px;
        background: var(--apb-bg, #F7F8FA);
    }
    .apb-dashboard__nav a:hover,
    .apb-dashboard__nav a.active {
        background: var(--apb-primary-light, #EBF3FB);
    }
    .apb-dashboard__nav a .apb-nav-icon {
        display: block;
        font-size: 22px;
        width: auto;
    }
    /* Séparateurs cachés en grille */
    .apb-dashboard__nav-sep {
        display: none;
    }
    /* Déconnexion en rouge */
    .apb-dashboard__nav-logout {
        background: #FEF2F2 !important;
        color: #DC2626 !important;
    }
}

/* =========================================================================
   SECTION ABONNEMENT — Plans & Statut
   ========================================================================= */

/* Grille des plans (3 colonnes) */
.apb-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 1rem;
}

/* Card plan individuelle */
.apb-plan-card {
    position: relative;
    border: 2px solid var(--apb-border, #e5e7eb);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    background: var(--apb-surface, #fff);
    transition: border-color .2s, box-shadow .2s;
}
.apb-plan-card:hover {
    border-color: var(--apb-primary, #185FA5);
}

/* Plan populaire (mis en avant) */
.apb-plan-card--popular {
    border-color: var(--apb-primary, #185FA5);
    box-shadow: 0 4px 16px rgba(24, 95, 165, .15);
    transform: scale(1.03);
}

/* Badge "Populaire" */
.apb-plan-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--apb-primary, #185FA5);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.apb-plan-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 .75rem;
    color: var(--apb-text, #1A1A2E);
}

.apb-plan-card__prix {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--apb-primary, #185FA5);
    line-height: 1.2;
}

/* Prix promo (1€ le 1er mois / les X premiers mois) */
.apb-plan-card__prix--promo {
    font-size: 2rem;
    color: var(--apb-accent, #E6892A);
}

.apb-plan-card__prix--promo .apb-plan-card__periode {
    font-size: 1.1rem;
    color: var(--apb-accent, #E6892A);
    opacity: .85;
}

/* "puis 9,99€/mois" affiché sous le prix promo */
.apb-plan-card__puis {
    font-size: 1.1rem;
    color: var(--apb-muted, #6B7280);
    margin: 4px 0 8px;
    text-align: center;
}

.apb-plan-card__periode {
    font-size: 1rem;
    font-weight: 400;
    color: var(--apb-muted, #6B7280);
}

.apb-plan-card__trial {
    font-size: 15px;
    color: var(--apb-success, #059669);
    font-weight: 600;
    margin: 10px 0 0;
    text-align: center;
}

.apb-plan-card__btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    text-align: center;
}

/* Note essai gratuit */
.apb-plans-trial-note {
    text-align: center;
    margin-top: 1rem;
    font-size: .9rem;
    color: var(--apb-primary, #185FA5);
    font-weight: 600;
}

/* Statut abonnement */
.apb-subscription-status {
    padding: 20px;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 1rem;
}
.apb-subscription-status p,
.apb-subscription-status .apb-abo-detail {
    font-size: 1rem;
    margin-bottom: .25rem;
}

.apb-subscription-status--active {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

.apb-subscription-status--trial {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.apb-subscription-status--expired,
.apb-subscription-status--warn {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.apb-subscription-status--ready {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

/* Barre de progression */
.apb-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.apb-progress-bar__fill {
    height: 100%;
    background: var(--apb-primary, #185FA5);
    border-radius: 999px;
    transition: width .3s ease;
}

/* Badge essai */
.apb-trial-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: .5rem;
}

/* Bouton annulation */
.apb-btn--outline {
    background: transparent;
    border: 1px solid var(--apb-border, #e5e7eb);
    color: var(--apb-text, #1A1A2E);
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.apb-btn--outline:hover {
    border-color: var(--apb-danger, #dc2626);
    color: var(--apb-danger, #dc2626);
}

.apb-btn--sm {
    padding: 8px 20px;
    font-size: 1rem;
    min-height: 44px;
}

/* ── Responsive plans ── */
@media (max-width: 768px) {
    .apb-plans-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .apb-plan-card--popular {
        transform: none;
        order: -1;
    }
}

/* =========================================================================
   RESPONSIVE — 480px (petits mobiles)
   ========================================================================= */
@media (max-width: 480px) {

    /* Layout principal */
    .apb-dashboard {
        padding: 10px;
        gap: 12px;
    }

    /* Sections — padding réduit */
    .apb-section__body {
        padding: 14px;
        gap: 12px;
    }
    .apb-section__header {
        padding: 12px 14px;
    }
    .apb-section__header h3 {
        font-size: 15px;
    }

    /* Stats — colonnes plus petites */
    .apb-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    .apb-stat-card {
        padding: 12px 8px;
    }
    .apb-stat-card__valeur {
        font-size: 24px;
    }
    .apb-stat-card__icon {
        font-size: 20px;
    }

    /* Galerie — vignettes plus petites */
    .apb-galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }
    /* .apb-galerie-upload — supprimé 2026-03-19 */

    /* Grille 2 colonnes → 1 colonne dès 480px */
    .apb-form__row--2 {
        grid-template-columns: 1fr;
    }

    /* Avatar upload */
    .apb-avatar-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Barre de soumission sticky — empile verticalement */
    .apb-form-submit-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 14px;
        bottom: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .apb-form-submit-bar__actions {
        flex-direction: column;
        gap: 8px;
    }
    .apb-form-submit-bar__actions .apb-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .apb-save-msg {
        margin-right: 0;
        justify-content: center;
    }

    /* Nav mobile — icônes visibles */
    .apb-dashboard__nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .apb-dashboard__nav::-webkit-scrollbar { display: none; }
    .apb-dashboard__nav a {
        min-height: 44px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Titres dashboard */
    .apb-dashboard h2 {
        font-size: 16px;
    }
    .apb-dashboard h3 {
        font-size: 14px;
    }

    /* Section complétude */
    .apb-dashboard__completude {
        padding: var(--apb-space-md) 14px;
    }
    /* .apb-completude__score — supprimé 2026-03-19 (legacy score display) */

    /* TVA section */
    .apb-tva-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
    }

    /* Disponibilités — plus compact */
    .apb-dispo-label span {
        width: 38px;
        height: 38px;
        font-size: 11px;
    }

    /* .apb-avis-dash — supprimé 2026-03-19 (legacy review dashboard) */

    /* Plans abonnement */
    .apb-plans-grid {
        gap: 10px;
    }
    .apb-plan-card {
        padding: 18px 12px;
    }
}

/* =========================================================================
   TAB PANELS — show/hide sections via JS
   ========================================================================= */
.apb-dashboard__panel { display: none; }
.apb-dashboard__panel--active { display: block; }

/* =========================================================================
   BOTTOM TAB BAR — mobile only
   ========================================================================= */
.apb-bottom-tabs {
    display: none; /* Caché en desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--apb-surface, #fff);
    border-top: 1px solid var(--apb-border, #E2E6EA);
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    padding: 6px 0 env(safe-area-inset-bottom, 0);
}

@media (max-width: 900px) {
    .apb-bottom-tabs {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    /* Cacher la sidebar nav en mobile (on a le bottom bar) */
    .apb-dashboard__nav { display: none !important; }
    /* Ajouter du padding en bas pour ne pas être masqué par la bar */
    .apb-dashboard__main { padding-bottom: 80px; }
}

.apb-bottom-tabs__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--apb-muted, #6B7280);
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    transition: color .2s;
    position: relative;
    min-width: 56px;
    flex: 1;
}
.apb-bottom-tabs__btn--active {
    color: var(--apb-primary, #185FA5);
}
.apb-bottom-tabs__icon {
    font-size: 20px;
    line-height: 1;
}
.apb-bottom-tabs__label {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}
.apb-bottom-tabs__badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--apb-danger, #DC2626);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Menu "Plus" — popup au-dessus du bouton */
.apb-bottom-tabs__more {
    position: absolute;
    bottom: 100%;
    right: 4px;
    background: var(--apb-surface, #fff);
    border: 1px solid var(--apb-border, #E2E6EA);
    border-radius: 12px;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    padding: 8px 0;
    min-width: 200px;
}
.apb-bottom-tabs__more button,
.apb-bottom-tabs__more a {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    color: var(--apb-text, #1A1A2E);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background .15s;
}
.apb-bottom-tabs__more button:hover,
.apb-bottom-tabs__more a:hover {
    background: var(--apb-bg, #F7F8FA);
}
.apb-bottom-tabs__logout {
    color: var(--apb-danger, #DC2626) !important;
}
.apb-bottom-tabs__more[hidden] { display: none; }
