/**
 * Profil public professionnel — [apb_profil_public]
 *
 * ═══════════════════════════════════════════════════════════════════════════
 *  PERSONNALISATION FACILE — variables CSS à surcharger dans Bricks /
 *  Advanced Themer / CSS global :
 *
 *   .apb-profil {
 *       --apbp-primary:       #185FA5;   Couleur principale (hero, liens)
 *       --apbp-primary-dk:    #0C447C;   Hover couleur principale
 *       --apbp-accent:        #E6892A;   Bouton CTA principal
 *       --apbp-accent-dk:     #C96F15;   Hover CTA
 *       --apbp-hero-bg:       linear-gradient(160deg, #0d1b2e 0%, #0d2a4a 100%);
 *       --apbp-card-radius:   16px;      Arrondi des cartes
 *       --apbp-card-shadow:   0 4px 18px rgba(0,0,0,.09);
 *       --apbp-font:          system-ui, sans-serif;
 *       --apbp-font-size:     15px;
 *       --apbp-star-color:    #F59E0B;   Couleur des étoiles
 *       --apbp-chip-bg:       #EBF3FB;   Fond chips catégorie/méta
 *       --apbp-chip-color:    #185FA5;   Texte chips
 *       --apbp-service-bg:    #F0FDF4;   Fond chips service
 *       --apbp-service-color: #15803D;   Texte chips service
 *   }
 * ═══════════════════════════════════════════════════════════════════════════
 *
 * @package AnnuairePro
 */

/* =========================================================================
   Variables CSS par défaut (toutes surchargeables via Bricks / CSS global)
   ========================================================================= */
.apb-profil {
    /* Couleurs */
    --apbp-primary:          #185FA5;
    --apbp-primary-dk:       #0C447C;
    --apbp-accent:           #E6892A;
    --apbp-accent-dk:        #C96F15;
    --apbp-text:             #1A1A2E;
    --apbp-muted:            #6B7280;
    --apbp-border:           #E2E6EA;
    --apbp-surface:          #FFFFFF;
    --apbp-bg:               #F7F8FA;
    --apbp-success:          #047857;   /* WCAG AA */
    --apbp-wa-color:         #25D366;

    /* Hero */
    --apbp-hero-bg:          linear-gradient(160deg, #0d1b2e 0%, #0d2a4a 100%);
    --apbp-hero-text:        #FFFFFF;
    --apbp-hero-muted:       rgba(255,255,255,.75);
    --apbp-hero-border:      rgba(255,255,255,.18);

    /* Cartes */
    --apbp-card-bg:          #FFFFFF;
    --apbp-card-radius:      16px;
    --apbp-card-shadow:      0 2px 12px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
    --apbp-card-shadow-hover:0 6px 24px rgba(0,0,0,.11);
    --apbp-card-padding:     28px;

    /* Typo */
    --apbp-font:             system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --apbp-font-size:        15px;
    --apbp-line-height:      1.65;

    /* Étoiles */
    --apbp-star-color:       #F59E0B;
    --apbp-star-empty:       #D1D5DB;

    /* Chips méta */
    --apbp-chip-bg:          rgba(255,255,255,.18);
    --apbp-chip-color:       #FFFFFF;
    --apbp-chip-border:      rgba(255,255,255,.3);
    /* Chips dans les cards (hors hero) */
    --apbp-chip-card-bg:     #EBF3FB;
    --apbp-chip-card-color:  #185FA5;
    --apbp-chip-cat-bg:      #185FA5;
    --apbp-chip-cat-color:   #FFFFFF;
    --apbp-service-bg:       #F0FDF4;
    --apbp-service-color:    #15803D;
    --apbp-service-border:   #BBF7D0;

    /* Disponibilités */
    --apbp-dispo-on-bg:      #D1FAE5;
    --apbp-dispo-on-color:   #065F46;
    --apbp-dispo-off-bg:     #F3F4F6;
    --apbp-dispo-off-color:  #9CA3AF;

    /* Mise en page */
    --apbp-gap:              24px;
    --apbp-transition:       .18s ease;

    /* Application */
    box-sizing: border-box;
    font-family: var(--apbp-font);
    font-size:   var(--apbp-font-size);
    line-height: var(--apbp-line-height);
    color:       var(--apbp-text);
    background:  var(--apbp-bg);
    border-radius: var(--apbp-card-radius);
    overflow:    hidden;
}
.apb-profil * { box-sizing: border-box; }

/* =========================================================================
   HERO
   ========================================================================= */
.apb-profil__hero {
    background:  var(--apbp-hero-bg);
    color:       var(--apbp-hero-text);
    padding:     40px 32px 36px;
}
.apb-profil__hero-inner {
    display:     flex;
    gap:         28px;
    align-items: flex-start;
    max-width:   1100px;
    margin:      0 auto;
}

/* Colonne avatar */
.apb-profil__avatar-col {
    flex-shrink: 0;
    position:    relative;
    width:       110px;
}

/* Override taille lg pour le hero */
.apb-profil__avatar-col .apb-avatar--lg,
.apb-profil__avatar-col .apb-avatar {
    width:          110px;
    height:         110px;
    border-radius:  50%;
    border:         3px solid rgba(255,255,255,.6);
    box-shadow:     0 4px 16px rgba(0,0,0,.25);
    font-size:      36px;
    background:     rgba(255,255,255,.15);
    color:          #fff;
}
.apb-profil__avatar-col .apb-avatar__img {
    width:          100%;
    height:         100%;
    object-fit:     cover;
    border-radius:  50%;
}
.apb-profil__premium-badge {
    position:       absolute;
    bottom:         -4px;
    right:          -4px;
    background:     var(--apbp-accent);
    color:          #fff;
    font-size:      11px;
    font-weight:    700;
    padding:        3px 7px 3px 5px;
    border-radius:  20px;
    display:        flex;
    align-items:    center;
    gap:            3px;
    border:         2px solid #fff;
    white-space:    nowrap;
}

/* Infos principales */
.apb-profil__hero-info {
    flex:           1;
    min-width:      0;
}
.apb-profil__nom {
    font-size:      clamp(22px, 3vw, 30px);
    font-weight:    800;
    color:          var(--apbp-hero-text);
    margin:         0 0 4px;
    line-height:    1.2;
    letter-spacing: -.3px;
}
.apb-profil__slogan {
    font-size:      15px;
    color:          var(--apbp-hero-muted);
    margin:         0 0 12px;
    font-style:     italic;
}

/* Chips méta dans le hero */
.apb-profil__meta-chips {
    display:        flex;
    flex-wrap:      wrap;
    gap:            7px;
    margin-bottom:  14px;
}
.apb-profil__meta-chips .apb-chip {
    background:     var(--apbp-chip-bg);
    color:          var(--apbp-chip-color);
    border:         1px solid var(--apbp-chip-border);
    font-size:      12.5px;
    font-weight:    600;
    padding:        4px 10px;
    border-radius:  20px;
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
    -webkit-font-smoothing: antialiased;
}
.apb-profil__meta-chips .apb-chip--cat {
    background:     rgba(255,255,255,.35);
    border-color:   rgba(255,255,255,.5);
    font-weight:    700;
}
.apb-profil__meta-chips .apb-chip--clientele {
    background:     rgba(230,137,42,.25);
    border-color:   rgba(230,137,42,.5);
    font-weight:    600;
}

/* Rating */
.apb-profil__rating-row {
    display:        flex;
    align-items:    center;
    gap:            8px;
    margin-bottom:  12px;
    flex-wrap:      wrap;
}
.apb-stars {
    display:        inline-flex;
    gap:            2px;
}
.apb-star {
    font-size:      18px;
    line-height:    1;
}
.apb-star--full  { color: var(--apbp-star-color); }
.apb-star--half  { color: var(--apbp-star-color); opacity: .6; }
.apb-star--empty { color: var(--apbp-star-empty); filter: brightness(2); }

.apb-profil__note-val {
    font-size:  16px;
    font-weight:700;
    color:      var(--apbp-hero-text);
}
.apb-profil__avis-link {
    font-size:  13px;
    color:      var(--apbp-hero-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--apbp-transition);
}
.apb-profil__avis-link:hover { color: #fff; }
.apb-profil__avis-link--empty { text-decoration: none; font-style: italic; }

/* Badges dans le hero */
.apb-profil__hero-badges {
    display:        flex;
    flex-wrap:      wrap;
    gap:            7px;
    margin-top:     4px;
}

/* CTA column */
.apb-profil__hero-cta {
    flex-shrink:    0;
    display:        flex;
    flex-direction: column;
    gap:            10px;
    min-width:      190px;
    max-width:      220px;
    align-items:    stretch;
}

/* Boîte tarif */
.apb-profil__tarif-box {
    background:     rgba(255,255,255,.15);
    border:         1px solid rgba(255,255,255,.25);
    border-radius:  12px;
    padding:        12px 16px;
    text-align:     center;
    backdrop-filter:blur(6px);
}
.apb-profil__tarif-label {
    display:        block;
    font-size:      11px;
    font-weight:    600;
    color:          var(--apbp-hero-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom:  2px;
}
.apb-profil__tarif-price {
    font-size:      28px;
    font-weight:    800;
    color:          #fff;
    line-height:    1.1;
}
.apb-profil__tarif-price small {
    font-size:      15px;
    font-weight:    600;
    opacity:        .8;
}
.apb-profil__tarif-max {
    display:        block;
    font-size:      11px;
    color:          var(--apbp-hero-muted);
    margin-top:     3px;
}
.apb-profil__tarif-box--devis {
    display:        flex;
    align-items:    center;
    justify-content:center;
    gap:            7px;
    font-weight:    700;
    font-size:      15px;
    color:          #fff;
}

/* Boutons hero */
.apb-profil__btn-contact,
.apb-profil__btn-tel,
.apb-profil__btn-wa {
    width:          100%;
    justify-content:center;
    border-radius:  10px;
    font-size:      14px;
}
.apb-profil__btn-contact {
    padding:        13px 16px;
    font-size:      15px;
}
.apb-profil__btn-tel {
    color:          #fff !important;
    border-color:   rgba(255,255,255,.5) !important;
    background:     rgba(255,255,255,.12);
    backdrop-filter:blur(4px);
}
.apb-profil__btn-tel:hover {
    background:     rgba(255,255,255,.22);
    border-color:   #fff !important;
}
.apb-profil__btn-wa {
    background:     var(--apbp-wa-color);
    color:          #fff !important;
    border-color:   var(--apbp-wa-color);
    font-weight:    700;
}
.apb-profil__btn-wa:hover { background: #1da851; filter: brightness(1.05); }

/* =========================================================================
   CORPS 2 COLONNES
   ========================================================================= */
.apb-profil__body {
    display:        grid;
    grid-template-columns: 1fr 340px;
    gap:            var(--apbp-gap);
    padding:        28px 24px 40px;
    max-width:      1100px;
    margin:         0 auto;
    align-items:    start;
}

/* =========================================================================
   CARTES (main + sidebar)
   ========================================================================= */
.apb-profil__card {
    background:     var(--apbp-card-bg);
    border-radius:  var(--apbp-card-radius);
    box-shadow:     var(--apbp-card-shadow);
    padding:        var(--apbp-card-padding);
    transition:     box-shadow var(--apbp-transition);
    border:         1px solid var(--apbp-border);
    overflow:       hidden;
}
.apb-profil__card + .apb-profil__card { margin-top: var(--apbp-gap); }
.apb-profil__main .apb-profil__card:hover,
.apb-profil__sidebar .apb-profil__card:hover {
    box-shadow: var(--apbp-card-shadow-hover);
}
.apb-profil__card--admin {
    border-left:    4px solid var(--apbp-primary);
    background:     #EBF3FB;
}

/* Titre de carte */
.apb-profil__card-title {
    font-size:      var(--apbp-title-size, 18px);
    font-weight:    var(--apbp-title-weight, 700);
    color:          var(--apbp-text);
    margin:         0 0 18px;
    display:        flex;
    align-items:    center;
    gap:            8px;
    padding-bottom: 14px;
    border-bottom:  2px solid var(--apbp-border);
    line-height:    1.3;
}
.apb-profil__card-title svg {
    color:          var(--apbp-primary);
    flex-shrink:    0;
}

/* Sidebar sticky (formulaire contact) */
.apb-profil__card--sticky {
    position:       sticky;
    top:            20px;
    background:     var(--apbp-contact-bg, var(--apbp-primary));
    border-color:   var(--apbp-primary-dk);
    color:          var(--apbp-contact-text, #fff);
    border-radius:  var(--apbp-contact-radius, var(--apbp-card-radius, 16px));
    padding:        var(--apbp-contact-padding, var(--apbp-card-padding, 28px));
    overflow:       visible;
}
.apb-profil__card--sticky .apb-profil__card-title {
    color:          #fff;
    border-bottom-color: rgba(255,255,255,.2);
}
.apb-profil__card--sticky .apb-profil__card-title svg {
    color:          rgba(255,255,255,.8);
}

/* =========================================================================
   SECTION DESCRIPTION
   ========================================================================= */
.apb-profil__description {
    color:          var(--apbp-text);
    line-height:    1.8;
    font-size:      15px;
}
.apb-profil__description p { margin: 0 0 1em; }
.apb-profil__description p:last-child { margin: 0; }

/* =========================================================================
   CHIPS — Services
   ========================================================================= */
.apb-profil__service-chips {
    display:        flex;
    flex-wrap:      wrap;
    gap:            8px;
}
.apb-chip {
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
    padding:        5px 12px;
    border-radius:  20px;
    font-size:      13px;
    font-weight:    600;
    line-height:    1;
    white-space:    nowrap;
    transition:     transform var(--apbp-transition), box-shadow var(--apbp-transition);
}
.apb-chip--service {
    background:     var(--apbp-service-bg);
    color:          var(--apbp-service-color);
    border:         1px solid var(--apbp-service-border);
}
.apb-chip--service:hover {
    transform:      translateY(-1px);
    box-shadow:     0 3px 8px rgba(0,0,0,.1);
}

/* =========================================================================
   DISPONIBILITÉS
   ========================================================================= */
.apb-dispos {
    display:        flex;
    gap:            6px;
    flex-wrap:      wrap;
}
.apb-dispo-chip {
    display:        inline-flex;
    align-items:    center;
    justify-content:center;
    width:          44px;
    height:         36px;
    border-radius:  8px;
    font-size:      12px;
    font-weight:    700;
    transition:     transform var(--apbp-transition);
}
.apb-dispo-chip--on {
    background:     var(--apbp-dispo-on-bg);
    color:          var(--apbp-dispo-on-color);
    border:         1.5px solid rgba(5,150,105,.2);
}
.apb-dispo-chip--off {
    background:     var(--apbp-dispo-off-bg);
    color:          var(--apbp-dispo-off-color);
    border:         1.5px solid var(--apbp-border);
}

/* =========================================================================
   LISTE INFOS PRATIQUES
   ========================================================================= */
.apb-profil__info-list {
    list-style:     none;
    padding:        0;
    margin:         0;
    display:        flex;
    flex-direction: column;
    gap:            10px;
}
.apb-profil__info-list li {
    display:        flex;
    gap:            10px;
    align-items:    flex-start;
    font-size:      16px;
    line-height:    1.4;
}
.apb-info-icon {
    font-size:      18px;
    flex-shrink:    0;
    width:          24px;
    text-align:     center;
    margin-top:     1px;
}
.apb-profil__info-list strong {
    display:        block;
    font-size:      13px;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color:          var(--apbp-muted);
    margin-bottom:  1px;
    line-height:    1.2;
}
.apb-profil__info-link {
    color:          var(--apbp-primary);
    text-decoration:none;
    font-weight:    600;
    transition:     color var(--apbp-transition);
}
.apb-profil__info-link:hover { color: var(--apbp-primary-dk); text-decoration: underline; }

/* =========================================================================
   SCORE ADMIN
   ========================================================================= */
.apb-profil__score { display: flex; align-items: center; gap: 12px; }
.apb-score-bar {
    flex:           1;
    height:         8px;
    background:     var(--apbp-border);
    border-radius:  4px;
    overflow:       hidden;
}
.apb-score-bar__fill {
    height:         100%;
    background:     var(--apbp-primary);
    border-radius:  4px;
    transition:     width .5s ease;
}
.apb-score-bar__label {
    font-size:      13px;
    font-weight:    700;
    color:          var(--apbp-primary);
    white-space:    nowrap;
}

/* =========================================================================
   GALERIE — ajustements dans le contexte profil
   ========================================================================= */
.apb-profil__card .apb-galerie {
    margin-top:     4px;
}
.apb-profil__card .apb-galerie__item {
    border-radius:  10px;
    overflow:       hidden;
    aspect-ratio:   4/3;
    display:        block;
}
.apb-profil__card .apb-galerie__img {
    width:          100%;
    height:         100%;
    object-fit:     cover;
    transition:     transform .3s ease;
}
.apb-profil__card .apb-galerie__item:hover .apb-galerie__img {
    transform:      scale(1.04);
}

/* =========================================================================
   FORMULAIRE CONTACT (dans la sidebar bleue)
   ========================================================================= */

/* Rendre le wrapper du formulaire transparent (il a souvent background:white) */
.apb-profil__card--sticky .apb-contact-form,
.apb-profil__card--sticky .apb-contact-form__form,
.apb-profil__card--sticky form {
    background:  transparent !important;
    box-shadow:  none !important;
    border:      none !important;
    padding:     0 !important;
    margin:      0 !important;
}

/* Labels blancs */
.apb-profil__card--sticky .apb-contact-form label,
.apb-profil__card--sticky .apb-contact-form .apb-form__field label,
.apb-profil__card--sticky .apb-form__label {
    color:       rgba(255,255,255,.85) !important;
    font-size:   13px;
    font-weight: 600;
    display:     block;
    margin-bottom: 4px;
}

/* Espacement entre champs */
.apb-profil__card--sticky .apb-form__field {
    margin-bottom: 12px !important;
}
.apb-profil__card--sticky .apb-contact-form input,
.apb-profil__card--sticky .apb-contact-form textarea,
.apb-profil__card--sticky .apb-contact-form select {
    background:     rgba(255,255,255,.12) !important;
    border-color:   rgba(255,255,255,.3) !important;
    color:          #fff !important;
    border-radius:  8px;
}
.apb-profil__card--sticky .apb-contact-form input::placeholder,
.apb-profil__card--sticky .apb-contact-form textarea::placeholder {
    color: rgba(255,255,255,.45) !important;
}
.apb-profil__card--sticky .apb-contact-form input:focus-visible,
.apb-profil__card--sticky .apb-contact-form textarea:focus-visible {
    background:     rgba(255,255,255,.2) !important;
    border-color:   rgba(255,255,255,.6) !important;
    outline:        none;
    box-shadow:     0 0 0 3px rgba(255,255,255,.15) !important;
}
.apb-profil__card--sticky .apb-btn--primary,
.apb-profil__card--sticky .apb-contact-form [type="submit"] {
    background:     var(--apbp-accent) !important;
    border-color:   var(--apbp-accent) !important;
    color:          #fff !important;
    width:          100%;
    white-space:    normal !important;
    word-break:     break-word;
    text-align:     center;
    overflow:       hidden;
    text-overflow:  ellipsis;
    max-width:      100%;
}
.apb-profil__card--sticky .apb-btn--primary:hover,
.apb-profil__card--sticky .apb-contact-form [type="submit"]:hover {
    background:     var(--apbp-accent-dk) !important;
}

/* =========================================================================
   LEAFLET MAP dans le profil
   ========================================================================= */
.apb-profil__card .apb-map-container,
.apb-profil__card [id^="apb-map-"] {
    border-radius:  10px;
    overflow:       hidden;
    margin-top:     4px;
    height:         220px !important;
}

/* Bouton agrandir la carte */
.apb-profil__map-expand {
    margin-left: auto;
    background: var(--apbp-chip-bg, #EBF3FB);
    border: none;
    color: var(--apbp-primary, #185FA5);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.apb-profil__map-expand:hover { background: var(--apbp-primary, #185FA5); color: #fff; }

/* État agrandi — carte plein écran */
.apb-profil__card--map-expanded {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: #fff;
    overflow: auto;
}
/* Éviter artefacts de rendu tuiles Leaflet */
.apb-profil__card .leaflet-tile-pane img,
.apb-profil__card .leaflet-tile {
    max-width: none !important;
    max-height: none !important;
}
.apb-profil__card--map-expanded .apb-map-container,
.apb-profil__card--map-expanded [id^="apb-map-"] {
    height: calc(100vh - 80px) !important;
    border-radius: 0;
}
.apb-profil__card--map-expanded .apb-profil__map-expand svg {
    transform: rotate(180deg);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
    .apb-profil__body {
        grid-template-columns: 1fr;
        padding: 20px 16px 32px;
    }
    /* Sidebar passe sous la colonne principale */
    .apb-profil__card--sticky {
        position: static;
    }
}

/* ── Mobile-first : hero minimal ─────────────────────── */
/* Masqué sur desktop, visible sur mobile uniquement */
.apb-profil__mobile-details { display: none; }

@media (max-width: 700px) {
    /* Hero minimal : uniquement photo + nom + slogan + étoiles */
    .apb-profil__hero {
        padding: 20px 16px 16px;
    }
    .apb-profil__hero-inner {
        flex-wrap: nowrap;
        gap: 14px;
        align-items: center;
    }
    /* Masquer les détails hero (chips, badges, score) — affichés sous les tabs */
    .apb-profil__hero-details { display: none; }
    /* Masquer la colonne CTA hero — la sticky bar mobile la remplace */
    .apb-profil__hero-cta { display: none; }

    /* Afficher le bloc détails sous les tabs */
    .apb-profil__mobile-details {
        display: block;
        padding: 12px 16px 0;
    }
    .apb-profil__mobile-details .apb-profil__meta-chips {
        margin-bottom: 8px;
    }
    /* Chips sur fond clair (pas sur fond hero sombre) */
    .apb-profil__mobile-details .apb-chip {
        background: #EBF3FB;
        color: #1A1A2E;
        border-color: #D1E3F6;
    }
    .apb-profil__mobile-details .apb-chip--cat {
        background: #185FA5;
        color: #fff;
        border-color: #185FA5;
    }
    .apb-profil__mobile-details .apb-profil__hero-badges {
        margin-top: 4px;
    }

    .apb-profil__nom { font-size: 22px; }
    .apb-profil__card { padding: 20px 18px; }
    .apb-profil__card-title { font-size: 16px; }
}

@media (max-width: 480px) {
    .apb-profil__hero-inner { gap: 14px; }
    .apb-profil__avatar-col { width: 80px; }
    .apb-profil__avatar-col .apb-avatar { width: 80px; height: 80px; font-size: 26px; }
    .apb-profil__card { padding: 16px 14px; }
    .apb-dispo-chip { width: 38px; height: 32px; font-size: 11px; }
    /* Fix débordement texte mobile */
    .apb-profil__info-list li { font-size: 15px; }
    .apb-profil__info-list strong { font-size: 13px; }
    .apb-profil__meta-chips .apb-chip { font-size: 11.5px; padding: 4px 8px; }
    .apb-profil__nom { font-size: 20px; }
}

/* Anti-débordement global profil */
.apb-profil { overflow-x: hidden; max-width: 100vw; box-sizing: border-box; }
.apb-profil__body { overflow-x: hidden; padding-left: 16px; padding-right: 16px; box-sizing: border-box; max-width: 100%; }
.apb-profil__main { min-width: 0; max-width: 100%; } /* Empêche le grid child de déborder */
.apb-profil__info-list li span { overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.apb-profil__card { overflow: hidden; box-sizing: border-box; max-width: 100%; }
/* Texte description — empêcher débordement mots longs */
.apb-profil__card p,
.apb-profil__card div {
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}
.apb-profil__hero-cta { overflow: hidden; }
/* Fix chips catégories débordement mobile */
.apb-profil__meta-chips { flex-wrap: wrap; max-width: 100%; }
.apb-profil__meta-chips .apb-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apb-profil__hero-meta { max-width: 100%; overflow: hidden; }
@media (max-width: 480px) {
    .apb-profil__body { padding-left: 12px; padding-right: 12px; }
    /* Tarif box — réduire font-size sur mobile */
    .apb-profil__tarif-price { font-size: 22px; }
    .apb-profil__tarif-price small { font-size: 13px; }
    /* Hero CTA — boutons empilés */
    .apb-profil__hero-cta .apb-profil__btn-contact,
    .apb-profil__hero-cta .apb-profil__btn-tel,
    .apb-profil__hero-cta .apb-profil__btn-wa,
    .apb-profil__hero-cta .apb-profil__btn-fav {
        width: 100%;
        justify-content: center;
    }
}

/* ── 360px — ultra-petits écrans ── */
@media (max-width: 360px) {
    .apb-profil__nom { font-size: 18px; }
    .apb-profil__tarif-price { font-size: 20px; }
    .apb-profil__avatar-col { width: 64px; }
    .apb-profil__avatar-col .apb-avatar { width: 64px; height: 64px; font-size: 22px; }
}

/* Avatar premium */
.apb-profil--premium .apb-profil__avatar-col .apb-avatar {
    border: 3px solid var(--apbp-accent);
}

/* Score nudge */
.apb-profil__score-nudge {
    background: linear-gradient(135deg, rgba(230,137,42,0.15), rgba(230,137,42,0.06));
    border: 1.5px solid rgba(230,137,42,0.4);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 14px;
    max-width: 440px;
}
.apb-profil__score-nudge-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}
.apb-profil__score-nudge-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}
.apb-profil__score-nudge-msg {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}
.apb-profil__score-nudge-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.apb-profil__score-bar {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    height: 7px;
    overflow: hidden;
    flex: 1;
}
.apb-profil__score-fill {
    background: linear-gradient(90deg, #E6892A, #f5a623);
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}
.apb-profil__score-pct {
    font-size: 14px;
    font-weight: 800;
    color: #f5a623;
    min-width: 38px;
    text-align: right;
}
.apb-profil__score-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    background: #f5a623;
    padding: 7px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, transform .15s;
}
.apb-profil__score-cta:hover { background: #e09310; transform: translateY(-1px); }
.apb-profil__score-cta:focus-visible { outline: 2px solid #f5a623; outline-offset: 2px; }

/* Anchor nav */
.apb-profil__anchors {
    background: #ffffff;
    border-bottom: 1px solid var(--apbp-border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.apb-profil__anchors-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1200px;
    margin: 0 auto;
}
.apb-profil__anchors-inner::-webkit-scrollbar { display: none; }
.apb-profil__anchor-link {
    display: block;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--apbp-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}
.apb-profil__anchor-link:hover,
.apb-profil__anchor-link.is-active {
    color: var(--apbp-primary);
    border-bottom-color: var(--apbp-primary);
    font-weight: 700;
}
.apb-profil__anchor-link:focus-visible {
    outline: 2px solid var(--apbp-primary);
    outline-offset: -2px;
}

/* Masonry gallery */
.apb-profil__masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 8px;
}
.apb-profil__masonry-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    min-height: 0;
}
.apb-profil__masonry-item--tall {
    grid-row: span 2;
    height: 100%;
}
.apb-profil__masonry-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
    display: block;
}
.apb-profil__masonry-item:hover .apb-profil__masonry-img,
.apb-profil__masonry-item:focus-visible .apb-profil__masonry-img { transform: scale(1.04); }
.apb-profil__masonry-item:focus-visible { outline: 2px solid var(--apbp-primary); outline-offset: 2px; }
@media (max-width: 640px) {
    .apb-profil__masonry {
        display: flex;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        gap: 8px;
        scrollbar-width: none;
    }
    .apb-profil__masonry-item {
        flex: 0 0 200px;
        height: 160px;
        scroll-snap-align: start;
        border-radius: 8px;
    }
    .apb-profil__masonry-item--tall { flex: 0 0 200px; }
}
/* =========================================================================
   Section Tarifs dédiée
   ========================================================================= */
.apb-profil__tarif-detail {
    padding: 8px 0;
}
.apb-profil__tarif-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #F0F7FF;
}
.apb-profil__tarif-badge--devis { background: #FFF7ED; }
.apb-profil__tarif-badge--forfait { background: #F0FDF4; }
.apb-profil__tarif-icon { font-size: 28px; flex-shrink: 0; }
.apb-profil__tarif-badge strong { font-size: 18px; color: var(--apbp-text, #1A1A2E); }
.apb-profil__tarif-badge p { font-size: 15px; }

/* =========================================================================
   Lightbox avec navigation + zoom
   ========================================================================= */
.apb-profil__lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.apb-profil__lightbox[hidden] { display: none; }

.apb-profil__lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 16px;
}
.apb-profil__lightbox-img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform .3s ease;
    user-select: none;
}
.apb-profil__lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    font-size: 20px;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.apb-profil__lightbox-close:hover { background: rgba(255,255,255,.3); }
.apb-profil__lightbox-close:focus-visible { outline: 2px solid white; outline-offset: 2px; }

/* Flèches navigation */
.apb-profil__lightbox-prev,
.apb-profil__lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    border: none;
    color: white;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    transition: background .2s;
}
.apb-profil__lightbox-prev:hover,
.apb-profil__lightbox-next:hover { background: rgba(255,255,255,.3); }
.apb-profil__lightbox-prev { left: 16px; }
.apb-profil__lightbox-next { right: 16px; }

/* Toolbar (zoom + compteur) */
.apb-profil__lightbox-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,.5);
    padding: 8px 16px;
    border-radius: 24px;
    z-index: 10;
}
.apb-profil__lightbox-zoom {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 4px;
}
.apb-profil__lightbox-zoom:hover { color: var(--apbp-accent, #E6892A); }
.apb-profil__lightbox-counter {
    color: rgba(255,255,255,.7);
    font-size: 15px;
    font-weight: 500;
}

/* Sticky bar mobile — hide/show au scroll */
.apb-profil__sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid var(--apbp-border);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    transform: translateY(0);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.apb-profil__sticky-bar.is-hidden {
    transform: translateY(100%);
}
@media (max-width: 1024px) {
    .apb-profil__sticky-bar { display: flex; }
    .apb-profil__body { padding-bottom: 80px; }
}

/* Boutons sticky bar :
 * contact (icône busta) | appeler (arancione) | whatsapp (verde, condiz.) | annuaire (chevron)
 * Appeler et WhatsApp se partagent l'espace central (flex: 2 chacun si les 2 présents)
 */
.apb-profil__sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    min-height: 48px;
    transition: background .15s ease, transform .1s ease;
}
.apb-profil__sticky-btn:active { transform: scale(.96); }
.apb-profil__sticky-btn--contact {
    flex: 1;
    background: var(--apbp-primary, #185FA5);
    color: #fff;
}
.apb-profil__sticky-btn--tel {
    flex: 2;
    background: var(--apbp-accent, #E6892A);
    color: #fff;
    gap: 6px;
}
.apb-profil__sticky-btn--whatsapp {
    flex: 1;
    background: #25D366;
    color: #fff;
}
.apb-profil__sticky-btn--back {
    flex: 0 0 48px;
    background: #F7F8FA;
    color: var(--apbp-text, #1A1A2E);
    border: 1px solid var(--apbp-border, #E2E6EA);
}
.apb-profil__sticky-btn:focus-visible { outline: 2px solid var(--apbp-primary); outline-offset: 2px; }
