/* /static/app/css/admin-styles.css */
/* 🎨 STYLES MODERNES POUR L'INTERFACE ADMIN */

/* ================================
   🎯 VARIABLES CSS
   ================================ */
:root {
    --admin-primary: #3498db;
    --admin-success: #27ae60;
    --admin-warning: #f39c12;
    --admin-danger: #e74c3c;
    --admin-dark: #2c3e50;
    --admin-light: #ecf0f1;
    --admin-gray: #7f8c8d;
    --admin-border-radius: 12px;
    --admin-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --admin-transition: all 0.3s ease;
}

/* ================================
   📦 CONTAINERS
   ================================ */
.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    overflow-y: auto !important;
    max-height: calc(100vh - 100px) !important;
}

.admin-card {
    background: white;
    border-radius: var(--admin-border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--admin-shadow);
    transition: var(--admin-transition);
}

.admin-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.admin-card h2 {
    margin: 0 0 20px 0;
    color: var(--admin-dark);
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--admin-light);
    padding-bottom: 10px;
}

.admin-card h3 {
    margin: 0 0 12px 0;
    color: var(--admin-dark);
    font-size: 1.2rem;
    font-weight: 500;
}

/* ================================
   📝 FORMULAIRES
   ================================ */
.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--admin-dark);
    font-size: 0.95rem;
}

.admin-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--admin-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--admin-transition);
    box-sizing: border-box;
}

.admin-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.admin-input::placeholder {
    color: var(--admin-gray);
}

/* ================================
   🔘 BOUTONS
   ================================ */
.admin-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--admin-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--admin-light);
    color: var(--admin-dark);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-btn:active {
    transform: translateY(0);
}

.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.admin-btn-primary {
    background: var(--admin-primary);
    color: white;
}

.admin-btn-primary:hover {
    background: #2980b9;
}

.admin-btn-success {
    background: var(--admin-success);
    color: white;
}

.admin-btn-success:hover {
    background: #229954;
}

.admin-btn-danger {
    background: var(--admin-danger);
    color: white;
}

.admin-btn-danger:hover {
    background: #c0392b;
}

.admin-btn-full {
    width: 100%;
}

/* ================================
   📊 DASHBOARD GRID
   ================================ */

.admin-dashboard-card {
    background: white;
    border: 2px solid var(--admin-light);
    border-radius: 8px;
    padding: 16px;
    transition: var(--admin-transition);
}

.admin-dashboard-card:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

/* ================================
   📋 TABLEAUX
   ================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 10px;
}

.admin-table thead {
    background: var(--admin-light);
}

.admin-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--admin-dark);
    border-bottom: 2px solid var(--admin-primary);
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--admin-light);
}

.admin-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

/* ================================
   💬 MESSAGES
   ================================ */
.admin-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
}

.admin-message:not(:empty) {
    display: block;
}

.admin-message.success {
    background: #d5f4e6;
    color: var(--admin-success);
    border-left: 4px solid var(--admin-success);
}

.admin-message.error {
    background: #fadbd8;
    color: var(--admin-danger);
    border-left: 4px solid var(--admin-danger);
}

.admin-message.warning {
    background: #fef5e7;
    color: var(--admin-warning);
    border-left: 4px solid var(--admin-warning);
}

/* ================================
   ⏳ LOADING STATES
   ================================ */
.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--admin-gray);
}

.loader {
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Spinner alternatif */
.spinner {
    border: 4px solid var(--admin-light);
    border-top: 4px solid var(--admin-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================
   🎯 COMPOSANTS SPÉCIFIQUES
   ================================ */

/* Score updater */
.score-updater {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid var(--admin-primary);
    border-radius: 6px;
    transition: var(--admin-transition);
}

.score-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.score-input:disabled {
    background: var(--admin-light);
    cursor: not-allowed;
}

.score-message {
    font-size: 13px;
    font-weight: 500;
    min-height: 20px;
}


/* ================================
   📱 RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    .admin-main {
        padding: 15px;
    }

    .admin-card {
        padding: 16px;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }

    .score-input {
        width: 50px;
        font-size: 14px;
    }

    .admin-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ================================
   🎨 TITRES
   ================================ */
.admin-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--admin-primary);
}

/* ================================
   ✨ ANIMATIONS
   ================================ */
@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de survol sur les cartes */
.admin-dashboard-card {
    position: relative;
    overflow: hidden;
}

.admin-dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s;
}

.admin-dashboard-card:hover::before {
    left: 100%;
}

/* ================================
   🏆 BADGES DE STATUT
   ================================ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.pending {
    background: #fef5e7;
    color: var(--admin-warning);
}

.status-badge.accepted {
    background: #d5f4e6;
    color: var(--admin-success);
}

.status-badge.rejected {
    background: #fadbd8;
    color: var(--admin-danger);
}

/* ================================
   🎯 UTILS
   ================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--admin-gray);
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

/* ================================
   🔧 FIX POUR MOBILE - INSCRIPTIONS
   ================================ */
#event-registrations {
    display: block !important;
}

#event-registrations > div {
    display: block !important;
}

.admin-event-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-event-item h3 {
    font-size: 1.3rem;
    color: var(--admin-dark);
    margin-bottom: 6px;
}
/* ====== VERSION PRO DES CARTES TOURNOIS ====== */

.event-pro-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border-radius: 14px;
    background: white;
    box-shadow: var(--admin-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

.event-pro-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.event-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.event-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--admin-dark);
}

.event-icon {
    font-size: 1.7rem;
    color: var(--admin-primary);
}

.event-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .95rem;
    color: var(--admin-dark);
}

.event-info i {
    color: var(--admin-primary);
}

/* ================================
   🎨 DASHBOARD CARDS - VERSION PRO
   ================================ */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.dashboard-card-pro {
    background: white;
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-card-pro:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.dashboard-card-icon {
    font-size: 2rem;
    color: var(--admin-primary);
}

.dashboard-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--admin-dark);
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--admin-primary);
    margin-top: 5px;
}
/* =========================================
   🏆 HEADER PRO TOURNOI (DARK SPORTS UI)
   ========================================= */

.event-header-pro {
    background: linear-gradient(135deg, #1a1f2b, #0f1218);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    margin-bottom: 25px;
    animation: adminFadeIn 0.4s ease;
}

.event-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
}

.event-header-logo {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 150, 255, 0.3);
    background: #111;
}

.event-header-logo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    font-size: 2rem;
    color: #3498db;
}

.event-header-info h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: white;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    color: #cfd6e1;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag i {
    color: #3498db;
}

/* Statut */
.tag.status {
    font-weight: 600;
}

.tag.status.pending {
    color: #f1c40f;
    border-color: #f1c40f;
}

.tag.status.running {
    color: #2ecc71;
    border-color: #2ecc71;
}

.tag.status.finished {
    color: #e74c3c;
    border-color: #e74c3c;
}

.event-header-description {
    margin-top: 15px;
    color: #8f9bb3;
    line-height: 1.5;
    font-size: 0.95rem;
}
#TEST-ADMIN {
    background: red !important;
    height: 50px;
}
/* 🔥 Reset du style global pour l’administration */
body.is-admin-page {
    background: #f7f9fc !important;
    color: #222 !important;
}
/* =========================================
   ✨ AMÉLIORATIONS DASHBOARD
   ========================================= */

/* ================================
   👋 HEADER PERSONNALISÉ
   ================================ */
.welcome-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: adminFadeIn 0.4s ease;
}

.welcome-content {
    flex: 1;
}

.welcome-title {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.welcome-subtitle {
    margin: 0;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: white;
}

.welcome-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    backdrop-filter: blur(10px);
}

/* ================================
   🎯 CTA CARD (Créer événement)
   ================================ */
.dashboard-card-pro.cta {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: 3px solid #1e8449;
    position: relative;
    overflow: hidden;
}

.dashboard-card-pro.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.dashboard-card-pro.cta .dashboard-card-icon {
    color: white;
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.dashboard-card-pro.cta .dashboard-card-title {
    color: white;
    font-size: 1.3rem;
}

.dashboard-card-pro.cta .dashboard-card-value {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.dashboard-card-pro.cta .dashboard-card-meta {
    color: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.dashboard-card-pro.cta:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(39, 174, 96, 0.4);
}

/* ================================
   📊 META INFO CARTES
   ================================ */
.dashboard-card-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
    font-weight: 500;
}

/* ================================
   ⚡ ACTIONS RAPIDES
   ================================ */
.quick-actions-section {
    margin-top: 35px;
    animation: adminFadeIn 0.5s ease 0.2s backwards;
}

.section-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.quick-action-btn {
    padding: 18px 22px;
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quick-action-btn:hover {
    border-color: #3498db;
    background: #f0f8ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.2);
}

.quick-action-btn i {
    color: #3498db;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.quick-action-btn span {
    flex: 1;
}

/* ================================
   📊 ACTIVITÉ RÉCENTE
   ================================ */
.recent-activity-section {
    margin-top: 35px;
    animation: adminFadeIn 0.6s ease 0.3s backwards;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.activity-item:hover {
    border-color: #3498db;
    background: #f0f8ff;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-icon.upcoming {
    background: #d5f4e6;
    color: #27ae60;
}

.activity-icon.past {
    background: #ecf0f1;
    color: #7f8c8d;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 4px;
}

.activity-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.activity-arrow {
    font-size: 1.2rem;
    color: #bdc3c7;
    transition: transform 0.3s ease;
}

.activity-item:hover .activity-arrow {
    transform: translateX(5px);
    color: #3498db;
}

.activity-empty {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

/* ================================
   📱 RESPONSIVE AMÉLIORATIONS
   ================================ */
@media (max-width: 768px) {
    .welcome-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 15px;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-subtitle {
        font-size: 1.05rem;
    }

    .welcome-logo,
    .welcome-logo-placeholder {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .activity-item {
        padding: 14px 16px;
    }

    .activity-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .activity-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .welcome-header {
        padding: 20px 15px;
    }

    .welcome-title {
        font-size: 1.4rem;
    }

    .welcome-subtitle {
        font-size: 0.95rem;
    }

    .dashboard-card-value {
        font-size: 1.8rem !important;
    }

    .quick-action-btn {
        padding: 14px 18px;
        font-size: 0.9rem;
    }

    .activity-item {
        gap: 10px;
    }
}
/* ========================================
   GESTION ÉVÉNEMENTS SUPPRIMÉS
   ======================================== */

.event-deleted {
    opacity: 0.85;
    border-left: 4px solid #999;
}

.status-badge.archived {
    background: #999;
    color: white;
}

.admin-btn-success {
    background: #28a745;
    color: white;
}

.admin-btn-success:hover {
    background: #218838;
}

.admin-btn-danger {
    background: #dc3545;
    color: white;
}

.admin-btn-danger:hover {
    background: #c82333;
}
