/* ==========================================
   Variables CSS - Thème Rouge Arbitre
   ========================================== */
:root {
    /* Couleurs principales */
    --primary-red: #DC2626;
    --primary-red-dark: #991B1B;
    --primary-red-light: #EF4444;
    --accent-red: #FCA5A5;

    /* Thème clair (par défaut) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --nav-bg: #ffffff;
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
    --footer-bg: #1a1a1a;
    --footer-text: #ffffff;
    --footer-text-secondary: rgba(255, 255, 255, 0.7);
    --footer-border: rgba(255, 255, 255, 0.1);

    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(220, 38, 38, 0.1);
    --shadow-lg: 0 10px 25px rgba(220, 38, 38, 0.15);
    --shadow-xl: 0 20px 50px rgba(220, 38, 38, 0.2);

    /* Transitions */
    --transition: all 0.3s ease;

    /* Bordures */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Thème sombre */
body.dark-theme {
    --bg-primary: #1a1a1a;
    --bg-secondary: #1a1a1a;
    --bg-card: #2a2a2a;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --nav-bg: #2a2a2a;
    --nav-bg-scrolled: rgba(42, 42, 42, 0.95);
    --footer-bg: #0f0f0f;
    --footer-text: #e5e7eb;
    --footer-text-secondary: rgba(229, 231, 235, 0.6);
    --footer-border: rgba(229, 231, 235, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   Reset & Base
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   Navbar
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 3px;
    transition: var(--transition);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--primary-red);
    color: white;
    transform: rotate(180deg);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 50%, var(--primary-red-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-field {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-field svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><circle cx="200" cy="200" r="300" fill="rgba(255,255,255,0.05)"/><circle cx="1000" cy="600" r="400" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.hero-badge {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

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

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: 10px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

/* Hero Stats Strip */
.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    margin-bottom: 2rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.hero-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    line-height: 1;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-card-sq {
    display: inline-block;
    width: 10px;
    height: 13px;
    border-radius: 1px;
}

.hero-stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.3);
}

/* Hero Bottom Row */
.hero-bottom-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-glass-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    text-align: left;
    color: #fff;
    min-width: 240px;
    max-width: 320px;
    flex: 1;
}

.hero-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-next-date {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.hero-next-teams {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.hero-next-teams span {
    opacity: 0.6;
    font-weight: 400;
}

.hero-next-comp {
    font-size: 0.78rem;
    opacity: 0.7;
}

.hero-result-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 0.82rem;
}

.hero-result-row:last-child {
    border-bottom: none;
}

.hero-result-teams {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.hero-result-team {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

.hero-result-team:last-child {
    text-align: right;
}

.hero-result-teams strong {
    font-weight: 800;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 0 0.35rem;
}

.hero-result-date {
    font-size: 0.72rem;
    opacity: 0.6;
    white-space: nowrap;
}

.hero-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.hero-result-category {
    font-size: 0.72rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: #ffffff;
    color: var(--primary-red);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background: #ffffff;
    color: var(--primary-red);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==========================================
   Sections communes
   ========================================== */
.section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-red);
    letter-spacing: 3px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-red);
}

/* ==========================================
   About Section
   ========================================== */
.section-about {
    background: var(--bg-secondary);
}

.about-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    padding: 3rem;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.about-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 60px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-text h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.about-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.about-info {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-red);
    width: 30px;
}

.info-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.info-item span {
    color: var(--text-secondary);
}

.about-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ==========================================
   Matches Section
   ========================================== */
.section-matches {
    background: var(--bg-primary);
}

.matches-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, rgba(220, 38, 38, 0.01) 100%);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.search-input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 2px solid transparent;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    height: 52px;
    line-height: 1.5;
}

.filter-select:hover,
.search-input:hover {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    transform: translateY(-2px);
}

.matches-list {
    display: grid;
    gap: 1.5rem;
}

.match-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-xl);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red-light) 100%);
}

.match-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.15), 0 10px 20px rgba(0, 0, 0, 0.08);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, rgba(220, 38, 38, 0.01) 100%);
    flex-wrap: wrap;
    gap: 1rem;
}

.match-date {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.match-date i {
    color: var(--primary-red);
    font-size: 1.1rem;
}

.match-type {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-type.championnat {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: white;
}

.match-type.coupe {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.match-type.amical {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 2rem;
    padding: 2rem 2rem 1.5rem;
    background: var(--bg-card);
}

.team {
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 200px;
}

.team span {
    line-height: 1.3;
    color: var(--text-primary);
}

.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.team-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
}

.vs {
    font-weight: 800;
    color: var(--primary-red);
    font-size: 1.8rem;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.match-score {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 3px;
    color: transparent;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.5rem 1.5rem;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.match-score::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: rgba(220, 38, 38, 0.08);
    border-radius: 15px;
    z-index: -1;
    border: 2px solid rgba(220, 38, 38, 0.15);
}

.match-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: rgba(220, 38, 38, 0.02);
    border-top: 1px solid rgba(220, 38, 38, 0.1);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: var(--primary-red);
    font-size: 1rem;
}

.detail-item.role-central,
.detail-item.role-assistant {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    padding: 0.6rem 1.2rem;
    border: 2px solid;
    font-weight: 700;
}

.detail-item.role-central {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.detail-item.role-assistant {
    border-color: #f59e0b;
    color: #d97706;
}

/* Footer simplifié des match-cards */
.match-footer {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.match-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.info-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

.info-tag i {
    color: var(--primary-red);
    font-size: 0.75rem;
}

.info-tag.role-tag-central {
    color: var(--primary-red);
    background: rgba(220, 38, 38, 0.08);
    font-weight: 700;
}

.info-tag.role-tag-assistant {
    color: #d97706;
    background: rgba(245, 158, 11, 0.1);
    font-weight: 700;
}

.match-cards-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.card-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 0.25rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-square {
    width: 14px;
    height: 18px;
    border-radius: 2px;
    display: inline-block;
}

.white-sq { background: #f3f4f6; border: 1.5px solid #d1d5db; }
.yellow-sq { background: #fbbf24; }
.red-sq { background: #DC2626; }

.match-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
}

.card-count {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.card-count:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.card-count i {
    font-size: 1.3rem;
}

.card-count.white {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    color: #374151;
    border: 2px solid #d1d5db;
}

.card-count.yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 2px solid #fbbf24;
}

.card-count.red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid var(--primary-red);
}

.match-notes {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(220, 38, 38, 0.1);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.match-notes i {
    color: var(--primary-red);
    margin-right: 0.5rem;
}

.loading,
.no-matches {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
}

.loading i,
.no-matches i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ==========================================
   Statistics Section
   ========================================== */
.section-stats {
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-red);
}

.stat-card.stat-white::before {
    background: #9ca3af;
}

.stat-card.stat-yellow::before {
    background: #fbbf24;
}

.stat-card.stat-red::before {
    background: var(--primary-red);
}

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

.stat-icon {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 0.75rem;
}

.stat-card.stat-white .stat-icon {
    color: #9ca3af;
}

.stat-card.stat-yellow .stat-icon {
    color: #fbbf24;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-red);
    font-family: 'Bebas Neue', sans-serif;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-categories {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.stats-categories h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
    text-align: center;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 2px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    min-width: 120px;
    gap: 0.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.category-tile:hover {
    border-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(220,38,38,0.12);
}

.category-tile-count {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-red);
    font-family: 'Bebas Neue', sans-serif;
    line-height: 1;
}

.category-tile-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* ==========================================
   Diploma Section
   ========================================== */
.section-diploma {
    background: var(--bg-primary);
}

.diploma-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.diploma-image {
    position: relative;
    cursor: pointer;
}

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

.diploma-overlay {
    position: absolute;
    inset: 0;
    background: rgba(220, 38, 38, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 3rem;
    opacity: 0;
    transition: var(--transition);
}

.diploma-image:hover .diploma-overlay {
    opacity: 1;
}

.diploma-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.diploma-info h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diploma-date {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.diploma-description {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ==========================================
   Gallery Section
   ========================================== */
.section-gallery {
    background: var(--bg-secondary);
}

/* Grille de miniatures */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-thumb {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-thumb:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.08);
}

.gallery-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-thumb:hover .gallery-thumb-overlay {
    opacity: 1;
}

.gallery-thumb-overlay i {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.gallery-thumb-overlay span {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 0 0.75rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Lightbox */
.lightbox {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s, visibility 0.25s;
}

.lightbox.open {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.lightbox-caption {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 2rem 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--footer-text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--footer-text-secondary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    text-align: center;
    color: var(--footer-text-secondary);
    font-size: 0.9rem;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }

    .theme-toggle {
        margin-left: 0.5rem;
        margin-right: 0;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
    }

    .hero-title {
        font-size: 4rem;
    }

    .about-card,
    .diploma-card {
        grid-template-columns: 1fr;
    }

    .matches-filters {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 0.85rem;
    }

    .stat-icon {
        font-size: 1.85rem;
    }

    .stat-value {
        font-size: 2.25rem;
    }

    .stat-label {
        font-size: 0.88rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 3rem;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .match-teams {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem 1rem;
    }

    .team {
        max-width: 100%;
    }

    .team-logo {
        width: 70px;
        height: 70px;
    }

    .vs {
        font-size: 1.5rem;
    }

    .match-score {
        font-size: 2rem;
        min-width: 100px;
        padding: 0.4rem 1rem;
    }

    .match-score::before {
        inset: -6px;
    }

    .match-header {
        padding: 1.25rem 1.5rem 0.75rem;
    }

    .match-details {
        padding: 1.25rem 1.5rem;
        gap: 0.5rem;
    }

    .detail-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .match-cards {
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .card-count {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }

    .match-notes {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem 0.75rem;
    }

    .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ==========================================
   Guestbook Section
   ========================================== */
.section-guestbook {
    background: var(--bg-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.guestbook-form-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(220, 38, 38, 0.08);
}

.guestbook-form-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1.5fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-group label i {
    color: var(--primary-red);
}

.required {
    color: var(--primary-red);
}

.form-input {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.form-input:focus {
    border-color: var(--primary-red);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: -0.25rem;
}

/* Star rating */
.star-rating {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 0;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    color: #d1d5db;
    padding: 0;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}

.star-btn:hover,
.star-btn.active {
    color: #fbbf24;
}

.star-btn:hover {
    transform: scale(1.2);
}

.gb-submit {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
    gap: 0.6rem;
}

.gb-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--primary-red);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Messages grid */
.guestbook-messages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.gb-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.06);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: gbFadeIn 0.4s ease;
}

@keyframes gbFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

.gb-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.gb-meta {
    flex: 1;
    min-width: 0;
}

.gb-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gb-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.gb-stars {
    display: flex;
    gap: 0.15rem;
    color: #fbbf24;
    font-size: 0.85rem;
}

.gb-stars .star-empty {
    color: #d1d5db;
}

.gb-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    flex: 1;
    word-break: break-word;
}

.gb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gb-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(220, 38, 38, 0.07);
    color: var(--primary-red);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.gb-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.gb-like-btn {
    background: none;
    border: 1.5px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.gb-like-btn:hover,
.gb-like-btn.liked {
    background: rgba(220, 38, 38, 0.08);
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.gb-like-btn i {
    font-size: 0.9rem;
}

.gb-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
}

.gb-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Confirmation toast */
.gb-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-red);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Guestbook responsive */
@media (max-width: 900px) {
    .guestbook-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .guestbook-form-row {
        grid-template-columns: 1fr;
    }

    .guestbook-form-wrapper {
        padding: 1.5rem;
    }

    .guestbook-messages {
        grid-template-columns: 1fr;
    }
}
