/* LiveScores - Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --dark-color: #1f2937;
    --light-gray: #f3f4f6;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark-color);
}

/* Navbar amélioration */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    box-shadow: var(--box-shadow-lg);
    padding: 1rem 0;
    border-bottom: 3px solid var(--secondary-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Container principal */
main.container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Cartes améliorées */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Boutons améliorés */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Badges améliorés */
.badge {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.875rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--light-gray);
}

/* Formulaires */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.btn-outline-secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #dbe2ea;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-page-title {
    margin-bottom: 0.5rem;
}

.admin-page-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 1.05rem;
    max-width: 60ch;
}

.admin-form-card {
    border: 1px solid rgba(37, 99, 235, 0.08);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.admin-form-card:hover {
    transform: none;
}

.admin-form-shell {
    display: grid;
    gap: 1.5rem;
}

.admin-form-section {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 1) 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.5rem;
}

.admin-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.admin-form-section-text {
    color: #64748b;
    margin-bottom: 1.25rem;
}

.admin-form-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-field {
    min-width: 0;
}

.admin-field--full {
    grid-column: 1 / -1;
}

.admin-field label,
.admin-choice-legend,
.admin-toggle-label {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.55rem;
}

.admin-form-shell .form-control,
.admin-form-shell .form-select {
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid #d9e2ec;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.admin-form-shell .form-control:focus,
.admin-form-shell .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.admin-form-shell textarea.form-control {
    min-height: 140px;
}

.admin-form-shell input[type="color"].form-control {
    padding: 0.45rem;
}

.admin-form-shell .form-text {
    color: #64748b;
    margin-top: 0.45rem;
}

.admin-form-shell .invalid-feedback,
.admin-form-shell .form-error-message {
    display: block;
    color: #b91c1c;
    font-size: 0.92rem;
    margin-top: 0.45rem;
}

.admin-choice-panel {
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    background: #fff;
    padding: 1rem;
}

.admin-choice-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-choice-option label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 58px;
    padding: 0.95rem 1rem;
    margin: 0;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-choice-option label:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.admin-choice-option input {
    margin: 0;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #2563eb;
    flex: 0 0 auto;
}

.admin-choice-option label:has(input:checked) {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.admin-choice-title {
    font-weight: 700;
    color: #0f172a;
}

.admin-choice-note {
    color: #64748b;
    font-size: 0.9rem;
}

.admin-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid #d9e2ec;
    background: #fff;
}

.admin-toggle-copy {
    color: #64748b;
    font-size: 0.95rem;
}

.admin-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    color: #0f172a;
}

.admin-toggle-switch input {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #2563eb;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.5rem;
}

.admin-form-actions .btn {
    min-width: 160px;
}

.admin-detail-card {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.admin-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-detail-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.admin-detail-value {
    font-weight: 700;
    color: #0f172a;
}

@media (max-width: 991.98px) {
    .admin-form-grid,
    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-left-color: var(--primary-color);
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    border-left-color: var(--warning-color);
    color: #92400e;
}

/* Liste groupée */
.list-group-item {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius) !important;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    padding: 1.25rem;
}

.list-group-item:hover {
    box-shadow: var(--box-shadow);
    transform: translateX(4px);
    border-color: var(--primary-color);
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: var(--light-gray);
    transform: scale(1.01);
}

/* Footer */
footer {
    background: white !important;
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Scores en live */
.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    margin-right: 0.5rem;
}

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

/* Match card spécial */
.match-card-live {
    border: 2px solid var(--danger-color);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.6);
    }
}

/* Score display */
.score-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    main.container {
        padding: 1rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading states */
.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Quick stats */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Bonnets pour équipes */
.team-cap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.team-cap-home {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.team-cap-away {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #ffffff;
    border: 2px solid #374151;
}

.team-cap-large {
    width: 60px;
    height: 60px;
    font-size: 1.25rem;
}

/* Badge de score avec bonnet */
.score-with-cap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.score-with-cap .team-cap {
    margin-bottom: 0.5rem;
}

/* Styles pour les équipes dans les matchs */
.team-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.team-display-home {
    justify-content: flex-end;
}

.team-display-away {
    justify-content: flex-start;
}

.team-info {
    text-align: center;
}

.team-info h5 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Indicateur visuel domicile/extérieur */
.venue-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.venue-badge-home {
    background: #f3f4f6;
    color: #374151;
}

.venue-badge-away {
    background: #1f2937;
    color: #ffffff;
}
