/* ==========================================================================
   CSS Variables & Design System JOG
   ========================================================================== */
   
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Colors from JOG Logo */
    --color-primary: #87CEFA;      /* Light Blue Base */
    --color-primary-dark: #5CADFA;
    --color-primary-light: #E0F2FE;
    
    --color-accent: #C8A951;       /* Premium Gold */
    --color-accent-hover: #b59848;
    
    --color-secondary: #C8A951;    /* Gold */
    --color-secondary-hover: #b59848;
    
    /* Neutral / Theme Colors */
    --color-bg-dark: #FFFFFF;      /* White background */
    --color-surface-dark: #F8FAFC; /* Light surface for cards */
    --color-surface-light: #F1F5F9;
    --color-text-light: #475569;   /* Dark text */
    --color-text-white: #0F172A;   /* Primary dark text replacing white */
    --color-text-dark: #ffffff;    /* Primary light text replacing dark */
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions & Shadows */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(200, 169, 81, 0.4);
    
    /* Layout */
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

.title-primary {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
    margin-bottom: 1rem;
}

.title-section {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--color-text-white);
}

.title-section::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
}

.text-gold { color: var(--color-accent); }
.text-cyan { color: var(--color-secondary); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 5px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-white);
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-text-white);
    position: relative;
    padding: 5px 0;
}

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

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

/* --- Dropdown Menu Drawer --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #ffffff;
    min-width: 260px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    border-top: 4px solid var(--color-accent);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 25px;
    color: var(--color-text-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.dropdown-item i {
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    transition: var(--transition-fast);
    width: 25px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: var(--color-surface-light);
    color: var(--color-accent);
    padding-left: 32px; 
}

.dropdown-item:hover i {
    color: var(--color-accent);
    transform: scale(1.1);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-text-white);
    font-size: 1.5rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden; /* Prevent zoom spill */
    background-color: #030712; /* Deep background during loads */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 15%; /* Prioritize the upper part of the photo to see faces better */
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.5s ease-in-out, transform 6s linear;
}

.slide.active {
    opacity: 1;
    transform: scale(1.05);
}

/* Deep cinematic overlay for maximum text pop */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 50%, rgba(15, 23, 42, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 80px; /* Offset header */
    max-width: 800px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

/* ==========================================================================
   Cards (News, Players, etc.)
   ========================================================================== */

.card {
    background-color: var(--color-surface-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(200, 169, 81, 0.5); /* Gold hint on hover */
}

.card-img-container {
    height: 250px;
    overflow: hidden;
    background-color: #f1f5f9; /* Light neutral bg for images that don't fill the space */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows full image, no cropping (crucial for scores) */
    transition: transform 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.1);
}

.card-body {
    padding: 25px;
}

.card-date {
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 10px;
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.card-text {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   Grid System
   ========================================================================== */

.grid {
    display: grid;
    gap: 30px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ==========================================================================
   Next Match Badge
   ========================================================================== */

/* ==========================================================================
   Next Match Banner (Centré au Milieu & Équilibré)
   ========================================================================== */

.next-match-banner {
    background: #ffffff !important;
    padding: 40px 0;
    border-top: 3px solid var(--color-accent);
    border-bottom: 3px solid var(--color-accent);
    text-align: center;
}

/* Titre PROCHAIN MATCH centré au milieu */
.next-match-banner h3 {
    text-align: center !important;
    margin: 0 auto 25px auto !important;
    color: var(--color-accent) !important;
    display: block !important;
    width: 100% !important;
}

.next-match-banner h4 {
    color: #0a1428 !important;
    font-weight: 800;
    margin: 0 !important;
}

.match-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px auto;
    max-width: 900px;
    width: 100%;
}

/* Équilibre parfait : même largeur à gauche et à droite pour caler le VS pile au milieu */
.match-teams > div:first-child {
    flex: 1 1 0%;
    text-align: right !important;
}

.match-teams > div:last-child {
    flex: 1 1 0%;
    text-align: left !important;
}

.team-logo-big {
    width: 140px !important;
    height: 140px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    flex-shrink: 0;
}

.team-logo-big img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.vs-badge {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent);
    background-color: #f8fafc;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    flex-shrink: 0;
}

.match-details {
    font-size: 1.1rem;
    color: #475569 !important;
    text-align: center !important;
    margin-top: 20px !important;
}

/* Adaptation automatique sur téléphone mobile */
@media (max-width: 768px) {
    .match-teams {
        gap: 15px;
    }
    .team-logo-big {
        width: 85px !important;
        height: 85px !important;
    }
    .vs-badge {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    .next-match-banner h4 {
        font-size: 1.1rem !important;
    }
}
}
/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background-color: #F1F5F9; /* Light background */
    padding: 60px 0 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-accent);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.6);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-white);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    color: var(--color-text-white);
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(200, 169, 81, 0.2);
}

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

/* ==========================================================================
   Sections Spacing
   ========================================================================== */

.section-padding {
    padding: 80px 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .nav-menu {
        display: none; /* Add JS later to toggle this */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .title-primary {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 15px;
    }
}

/* ==========================================================================
   Premium Team Cards
   ========================================================================== */

.team-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-card-premium {
    position: relative;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    transition: var(--transition-smooth);
}

.team-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
    transition: var(--transition-smooth);
}

.team-card-premium .bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 20%;
    transition: transform 0.8s ease;
    z-index: 0;
}

.team-card-premium:hover .bg-img {
    transform: scale(1.1);
}

.team-card-premium:hover::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.9) 100%);
}

.team-card-content {
    position: relative;
    z-index: 2;
    color: white;
}

.team-card-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.team-card-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    max-width: 90%;
}

.team-card-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--color-accent);
    color: #000;
    font-weight: bold;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.team-card-premium:hover .team-card-btn {
    background-color: white;
    transform: translateY(-5px);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: var(--color-primary-dark);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid var(--color-accent);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #2ecc71;
}

.toast.error {
    border-left-color: #e74c3c;
    color: #e74c3c;
}

.toast i {
    font-size: 1.5rem;
}
