/* En-tête agent */
.agent-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

/* Container pour la partie haute du header (profil + bouton logout) */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.agent-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.agent-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-icon {
    color: white;
    font-size: 32px;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.agent-team {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.9;
}

.performance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.summary-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-value {
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2px;
}

.summary-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-summary .summary-item {
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}
.performance-summary .summary-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.08);
}

/* Style pour la période active */
.performance-summary .summary-item.active {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(59, 130, 246, 0.3);
    position: relative;
    transform: translateY(-1px);
}

/* Indicateur vertical discret mais visible pour la période active */
.performance-summary .summary-item.active::before {
    content: '';
    position: absolute;
    top: var(--spacing-xs);
    bottom: var(--spacing-xs);
    left: 6px;
    width: 4px;
    background: linear-gradient(180deg, var(--warning-color-light), var(--warning-color));
    border-radius: 4px;
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.45);
}

/* Amélioration de la lisibilité des textes lorsque l'élément est actif */
.performance-summary .summary-item.active .summary-label {
    color: #ffffff;
}
.performance-summary .summary-item.active .summary-value {
    color: #ffffff;
}

/* Accessibilité: focus visible clair et cohérent */
.performance-summary .summary-item:focus-visible {
    outline: 3px solid var(--primary-color-light);
    outline-offset: 2px;
}

/* Bouton de déconnexion - Design professionnel UX/UI */
.logout-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    /* Taille optimisée pour mobile */
    min-height: 44px; /* Taille tactile recommandée Apple/Google */
    min-width: 44px;
}

/* Effet de surface au survol/focus */
.logout-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.logout-button:hover::before,
.logout-button:focus::before {
    opacity: 1;
}

/* États interactifs optimisés mobile */
.logout-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logout-button:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

.logout-button:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Icône avec micro-interactions */
.logout-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.logout-button:hover svg {
    transform: translateX(1px);
}

.logout-text {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

/* État désactivé */
.logout-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Design responsive mobile-first */
@media (max-width: 480px) {
    .logout-button {
        padding: 12px;
        min-width: 44px;
        justify-content: center;
    }
    
    .logout-text {
        display: none;
    }
    
    .logout-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Optimisation pour très petits écrans */
@media (max-width: 360px) {
    .logout-button {
        padding: 10px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .logout-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Support pour les thèmes sombres/haut contraste */
@media (prefers-contrast: high) {
    .logout-button {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .logout-button:hover {
        border-color: white;
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Animation pour les utilisateurs qui préfèrent moins d'animations */
@media (prefers-reduced-motion: reduce) {
    .logout-button,
    .logout-button svg,
    .logout-button::before {
        transition: none;
    }
    
    .logout-button:hover {
        transform: none;
    }
    
    .logout-button:active {
        transform: none;
    }
}

