/* Styles pour l'interface publique */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 10px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Fonts */
body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar {
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0 2px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--warning-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-image {
    text-align: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-image i {
    font-size: 8rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2,
.section-header h3 {
    margin: 0;
    font-weight: 600;
}

/* Match Cards */
.match-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.live-match {
    border-left: 4px solid var(--danger-color);
    animation: pulse-border 2s infinite;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.league-name {
    font-weight: 600;
    color: var(--secondary-color);
}

.match-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team {
    display: flex;
    align-items: center;
    flex: 1;
}

.home-team {
    justify-content: flex-start;
}

.away-team {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.team-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin: 0 0.5rem;
}

.team-logo-sm {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-left: 0.5rem;
}

.team-logo-xs {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-left: 0.25rem;
}

.team-name {
    font-weight: 500;
}

.match-score {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
}

.match-minute {
    font-size: 0.8rem;
    color: var(--danger-color);
    font-weight: 500;
}

/* Match Lists */
.matches-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.match-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.match-item:last-child {
    border-bottom: none;
}

.match-item:hover {
    background-color: #f8f9fa;
}

.match-time-col {
    min-width: 80px;
    text-align: center;
}

.match-teams {
    flex: 1;
    margin: 0 1rem;
}

.team-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.team-row:last-child {
    margin-bottom: 0;
}

.match-score-col {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
}

.match-league {
    min-width: 120px;
    text-align: left;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.result-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.result-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-body .team {
    flex: 1;
    font-size: 0.9rem;
}

.result-body .score {
    margin: 0 1rem;
    color: var(--success-color);
}

/* News */
.news-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.news-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: #f8f9fa;
}

.news-image {
    width: 80px;
    height: 60px;
    margin-left: 1rem;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-summary {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-meta {
    font-size: 0.8rem;
}

/* Quick Links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.quick-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quick-link i {
    margin-left: 0.75rem;
    font-size: 1.2rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer h5 {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes pulse-border {
    0% {
        border-left-color: var(--danger-color);
    }
    50% {
        border-left-color: rgba(220, 53, 69, 0.5);
    }
    100% {
        border-left-color: var(--danger-color);
    }
}

/* Status Colors */
.status-live {
    color: var(--danger-color);
    font-weight: bold;
}

.status-finished {
    color: var(--success-color);
}

.status-not-started {
    color: var(--secondary-color);
}

.status-postponed {
    color: var(--warning-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .match-body {
        flex-direction: column;
        gap: 1rem;
    }
    
    .team {
        justify-content: center !important;
        flex-direction: row !important;
    }
    
    .match-score {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .match-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .match-teams,
    .match-score-col,
    .match-league {
        margin: 0;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 150px;
        margin: 0 0 1rem 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-image i {
        font-size: 4rem;
    }
    
    .match-card {
        padding: 1rem;
    }
    
    .team-logo {
        width: 30px;
        height: 30px;
    }
    
    .match-score {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .quick-links {
        display: none;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    .match-card,
    .news-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #343a40;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: #1a1a1a;
        color: #f8f9fa;
    }
    
    .match-card,
    .news-list,
    .matches-list,
    .quick-link {
        background: #2d3748;
        color: #f8f9fa;
    }
    
    .match-item:hover,
    .news-item:hover {
        background-color: #4a5568;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .match-card,
    .news-item,
    .quick-link {
        border: 2px solid;
    }
}

