/* ==========================================
   SECTION ADMINISTRATION
   ========================================== */

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-header p {
    color: var(--muted);
    font-size: 14px;
}

/* Stats rapides */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.admin-stat-card:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.admin-stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: 10px;
    flex-shrink: 0;
}

.admin-stat-info {
    flex: 1;
}

.admin-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.admin-stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

/* Section utilisateurs */
.admin-users-section {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

/* Table */
.admin-table-container {
    overflow-x: auto;
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--card);
}

.admin-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: var(--hover-bg);
}

.admin-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text);
}

/* Utilisateur dans la table */
.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    flex-shrink: 0;
    overflow: hidden;
}

.admin-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-user-name {
    font-weight: 600;
    font-size: 14px;
}

.admin-user-id {
    font-size: 12px;
    color: var(--muted);
    font-family: 'SF Mono', monospace;
}

/* Discord info */
.admin-discord-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5865F2;
}

.admin-discord-tag .icon {
    font-size: 16px;
}

/* Badges de rôle */
.admin-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--border);
}

.admin-role-badge.admin {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.admin-role-badge.user {
    background: var(--accent-soft);
    border-color: rgba(10, 132, 255, 0.3);
    color: var(--accent);
}

/* Badges de statut */
.admin-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.admin-status-badge.active {
    background: var(--success-soft);
    color: var(--success);
}

.admin-status-badge.inactive {
    background: var(--error-soft);
    color: var(--error);
}

/* Boutons d'action */
.admin-action-btns {
    display: flex;
    gap: 8px;
}

.admin-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-btn-icon:hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.admin-btn-icon.danger:hover {
    background: var(--error-soft);
    border-color: var(--error);
    color: var(--error);
}

.admin-btn-icon.primary:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

/* Formatage dates */
.admin-date {
    font-size: 13px;
    color: var(--muted);
}

/* Modal de confirmation */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.admin-modal.active {
    opacity: 1;
    pointer-events: all;
}

.admin-modal-content {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.admin-modal-header {
    margin-bottom: 20px;
}

.admin-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-modal-header p {
    font-size: 14px;
    color: var(--muted);
}

.admin-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Select personnalisé */
.admin-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-select:hover {
    background: var(--hover-bg);
}

.admin-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Styles pour les options de select - Contraste optimal */
select option {
    background: #1a1a1a !important;
    color: #ffffff !important;
    padding: 10px;
    font-weight: 500;
}

select option:checked,
select option:hover {
    background: #0A84FF !important;
    color: #ffffff !important;
}

.profile-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.profile-select option {
    background: #1a1a1a !important;
    color: #ffffff !important;
    padding: 10px;
}

/* ==========================================
   WIDGET OBS URL CARD - DESIGN MODERNE
   ========================================== */

.obs-link-panel {
    background: linear-gradient(135deg, rgba(245, 196, 81, 0.05) 0%, rgba(245, 196, 81, 0.02) 100%);
    border: 2px solid rgba(245, 196, 81, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.obs-link-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(245, 196, 81, 0.5) 20%, 
        rgba(245, 196, 81, 0.8) 50%, 
        rgba(245, 196, 81, 0.5) 80%, 
        transparent 100%);
}

.obs-link-panel:hover {
    border-color: rgba(245, 196, 81, 0.4);
    background: linear-gradient(135deg, rgba(245, 196, 81, 0.08) 0%, rgba(245, 196, 81, 0.03) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 196, 81, 0.15);
}

.obs-link-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.obs-link-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 196, 81, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(245, 196, 81, 0.2);
    flex-shrink: 0;
}

.obs-link-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 8px;
}

.obs-link-url {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    color: #F5C451;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(245, 196, 81, 0.2);
    word-break: break-all;
    user-select: all;
    transition: all 0.2s ease;
}

.obs-link-url:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(245, 196, 81, 0.4);
}

.obs-link-panel .btn {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #F5C451 0%, #E8B840 100%);
    color: #1a1a1a;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 196, 81, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.obs-link-panel .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 196, 81, 0.4);
    background: linear-gradient(135deg, #FFD666 0%, #F5C451 100%);
}

.obs-link-panel .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 196, 81, 0.3);
}

/* Animation de copie réussie */
@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(52, 199, 89, 0.5);
    }
}

.obs-link-panel .btn.copied {
    background: linear-gradient(135deg, #34C759 0%, #28A745 100%);
    color: #ffffff;
    animation: successPulse 0.6s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-table-container {
        overflow-x: scroll;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .obs-link-panel {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .obs-link-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .obs-link-icon {
        width: 48px;
        height: 48px;
        font-size: 28px;
    }

    .obs-link-url {
        font-size: 12px;
        padding: 8px 12px;
    }

    .obs-link-panel .btn {
        width: 100%;
        justify-content: center;
    }
}
