/* ================================================================
   AXEANE KOMPTA — PANELS & BADGES
   ================================================================
   Status badges, docs badges, paie badges, users pill
   Source exacte : EcranTableEntreprises .ent-status-badge / etc.
   ================================================================ */

/* ================================================================
   STATUS BADGES (avec dot animé)
   ================================================================ */
.ax-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--ax-radius-xs);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.ax-status-badge .ax-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.ax-status-badge .ax-status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    opacity: 0.25;
}

/* En création — orange/amber pulsant */
.ax-status-badge.ax-status-created {
    background: #FFF7ED;
    color: #C2410C;
}

.ax-status-badge.ax-status-created .ax-status-dot {
    background: #F97316;
    animation: ax-pulse-amber 2s ease-in-out infinite;
}

.ax-status-badge.ax-status-created .ax-status-dot::after {
    background: #F97316;
}

/* Créée / Active — vert */
.ax-status-badge.ax-status-active {
    background: var(--ax-success-light);
    color: var(--ax-success-text);
}

.ax-status-badge.ax-status-active .ax-status-dot {
    background: #22C55E;
}

.ax-status-badge.ax-status-active .ax-status-dot::after {
    background: #22C55E;
}

/* Ouvert — vert */
.ax-status-badge.ax-status-open {
    background: var(--ax-success-light);
    color: var(--ax-success-text);
    border: 1px solid var(--ax-success-border);
}

.ax-status-badge.ax-status-open .ax-status-dot {
    background: #22C55E;
}

.ax-status-badge.ax-status-open .ax-status-dot::after {
    background: #22C55E;
}

/* Clôturé / Fermé — rouge */
.ax-status-badge.ax-status-closed {
    background: var(--ax-danger-light);
    color: var(--ax-danger-text);
    border: 1px solid var(--ax-danger-border);
}

.ax-status-badge.ax-status-closed .ax-status-dot {
    background: var(--ax-danger);
}

.ax-status-badge.ax-status-closed .ax-status-dot::after {
    background: var(--ax-danger);
}

/* ================================================================
   DOCS BADGE
   ================================================================ */
.ax-docs-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--ax-radius-xs);
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
}

.ax-docs-badge.ax-has-docs {
    background: var(--ax-success-light);
    color: var(--ax-success-text);
}

.ax-docs-badge.ax-no-docs {
    color: var(--ax-text-disabled);
}

/* ================================================================
   PAIE STATUS BADGES
   ================================================================ */
.ax-paie-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--ax-radius-xs);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ax-paie-ok {
    background: var(--ax-success-light);
    color: var(--ax-success-text);
}

.ax-paie-error {
    background: var(--ax-danger-light);
    color: var(--ax-danger);
}

.ax-paie-pending {
    background: #F5F3FF;
    color: #7C3AED;
}

.ax-paie-none {
    background: #F9FAFB;
    color: var(--ax-text-muted);
}

.ax-paie-progress {
    background: var(--ax-info-light);
    color: var(--ax-info);
}

/* ================================================================
   USERS PILL
   ================================================================ */
.ax-users-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 14px;
    background: rgba(63, 81, 181, .08);
    border: 1px solid rgba(63, 81, 181, .15);
    font-size: 12px;
    font-weight: 500;
    color: var(--ax-primary);
    cursor: pointer;
    transition: var(--ax-tr);
}

.ax-users-pill:hover {
    background: var(--ax-primary);
    color: #fff;
    border-color: var(--ax-primary);
}

.ax-uav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    border: 1.5px solid #fff;
}

.ax-users-avatars {
    display: flex;
    align-items: center;
}

.ax-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ax-user-avatar + .ax-user-avatar {
    margin-left: -7px;
}

.ax-user-avatar-overflow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ax-border-light);
    color: #6B7280;
    font-size: 9px;
    font-weight: 700;
    border: 2px solid #fff;
    margin-left: -7px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ax-users-label {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    white-space: nowrap;
    margin-left: 2px;
}

.ax-no-users {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ax-text-disabled);
    font-size: 12px;
}

/* ================================================================
   ENTREPRISES PILL — avatar circles stacked (like ax-users-pill)
   Used in EcranTableUtilisateurs — Entreprises column
   ================================================================ */
.ax-ent-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px 2px 2px;
    border-radius: 14px;
    background: rgba(63, 81, 181, .06);
    border: 1px solid rgba(63, 81, 181, .12);
    cursor: default;
    transition: var(--ax-tr);
    max-width: 100%;
}

.ax-ent-pill:hover {
    background: rgba(63, 81, 181, .10);
    border-color: rgba(63, 81, 181, .22);
}

.ax-eav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 7.5px;
    font-weight: 700;
    color: #fff;
    border: 1.5px solid #fff;
    text-transform: uppercase;
    flex-shrink: 0;
}

.ax-ent-pill .ax-ent-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--ax-primary);
    margin-left: 2px;
    white-space: nowrap;
}

.ax-ent-pill .ax-ent-count i {
    font-size: 12px;
    margin-left: 1px;
}

.ax-no-ent {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ax-text-disabled);
    font-size: 12px;
}

/* ================================================================
   ENTREPRISE BADGES — text tags (ax-ent-badges directive)
   ================================================================ */
.ax-ent-badges-wrap {
    position: relative;
    width: 100%;
    min-height: 22px;
}

.ax-ent-badges-row {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
}

.ax-ent-badge-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 18px;
    letter-spacing: 0.01em;
}

.ax-ent-badge-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ax-primary, #3F51B5);
    background: rgba(63, 81, 181, 0.10);
    border: 1px solid rgba(63, 81, 181, 0.18);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 18px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ax-ent-badge-more:hover {
    background: var(--ax-primary, #3F51B5);
    color: #fff;
    border-color: var(--ax-primary, #3F51B5);
}

/* Popup liste complète */
.ax-ent-popup {
    position: fixed;
    z-index: 10000;
    min-width: 200px;
    max-width: 320px;
    max-height: 300px;
    background: var(--ax-card, #fff);
    border: 1px solid var(--ax-border, #E5E7EB);
    border-radius: var(--ax-radius-xs, 8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ax-ent-popup-in 0.15s ease-out;
}

@keyframes ax-ent-popup-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ax-ent-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ax-text-strong, #1F2937);
    border-bottom: 1px solid var(--ax-border-light, #F3F4F6);
    background: #F9FAFB;
}

.ax-ent-popup-header i.fa-building-o {
    margin-right: 6px;
    color: var(--ax-primary, #3F51B5);
}

.ax-ent-popup-close {
    cursor: pointer;
    color: var(--ax-text-sec, #9CA3AF);
    font-size: 13px;
    line-height: 1;
    transition: color 0.15s;
}

.ax-ent-popup-close:hover {
    color: var(--ax-danger, #DC2626);
}

.ax-ent-popup-body {
    overflow-y: auto;
    padding: 6px 0;
    max-height: 240px;
}

.ax-ent-popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ax-text-body, #374151);
    transition: background 0.15s;
}

.ax-ent-popup-item:hover {
    background: rgba(63, 81, 181, 0.04);
}

.ax-ent-popup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ================================================================
   INLINE BADGES (Oui/Non, Info tags)
   ================================================================ */
.ax-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--ax-radius-xs);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    min-width: 62px;
}

/* Icône dans les badges — même taille que le texte, centrage garanti */
.ax-badge > i {
    font-size: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.ax-badge.ax-badge-success {
    background: var(--ax-success-light);
    color: var(--ax-success-text);
}

.ax-badge.ax-badge-danger {
    background: var(--ax-danger-light);
    color: var(--ax-danger);
}

.ax-badge.ax-badge-info {
    background: var(--ax-info-light);
    color: var(--ax-info);
}

.ax-badge.ax-badge-warning {
    background: rgba(255, 152, 0, 0.12);
    color: #e65100;
    border: 1px solid rgba(255, 152, 0, 0.25);
}

.ax-badge.ax-badge-purple {
    background: rgba(156, 39, 176, 0.10);
    color: #7b1fa2;
    border: 1px solid rgba(156, 39, 176, 0.22);
}

/* Taille uniforme pour badges Type Numérotation */
.ax-badge-numerotation {
    min-width: 140px;
    text-align: center;
}

