/* ========================================================================== */
/* 1. VARIABLES GLOBALES (BROWNS BRANDING)                                    */
/* ========================================================================== */

:root {
    /* Couleurs Primaires */
    --orange: #ff3c00;          /* Orange Vif (Action, Accent) */
    --brown: #311d00;           /* Marron Profond (Fond, Texte Principal) */
    
    /* Dérivés Orange */
    --orange-light: #ff7043;    /* Orange plus clair (Hover) */
    --orange-pale: #ffe5d4;     /* Orange très clair (Fond léger) */

    /* Dérivés Marron */
    --brown-light: #5c3d2e;     /* Marron clair (Bordures, Backgrounds secondaires) */
    --brown-sand: #a97463;      /* Marron sable (Bordures de cartes) */

    /* Couleurs Neutres */
    --gray-light: #f4f4f4;      /* Gris très clair (Fond de page) */
    --gray: #777;               /* Gris moyen (Texte secondaire) */
    --black: #000;
    --white: #fff;
    
    /* Variables Bootstrap pour l'intégration des couleurs des Browns */
    --bs-brown: var(--brown);
    --bs-orange: var(--orange);
    --bs-orange-light: var(--orange-light);
}


/* ========================================================================== */
/* 2. STYLES DE BASE & TYPOGRAPHIE                                            */
/* ========================================================================== */

body {
    background-color: var(--gray-light);
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Assure que le contenu principal prend l'espace restant */
}

/* Classes utilitaires de couleur */
.text-orange {
    color: var(--orange) !important;
}

.text-brown {
    color: var(--brown) !important;
}


/* ========================================================================== */
/* 3. HEADER & NAVIGATION (NAVBAR)                                            */
/* ========================================================================== */

header.navbar {
    background-color: var(--brown);
}
header .nav-link {
    color: var(--white) !important;
}
header .nav-link.active,
header .nav-link:hover {
    color: var(--orange) !important;
}

/* Assure que les dropdowns sont visibles (correction de bug potentiel) */
.navbar .navbar-collapse {
    overflow: visible;
}

.navbar .dropdown-menu {
    z-index: 1000;
}


/* ========================================================================== */
/* 4. FOOTER                                                                  */
/* ========================================================================== */

footer {
    background-color: var(--brown);
    color: var(--white);
    padding: 20px 0;
}
footer a {
    color: var(--orange);
    text-decoration: none;
}
footer a:hover {
    color: var(--orange-light);
}

/* Styles pour le footer refactorisé (hover-orange) */
.hover-orange:hover {
    color: var(--orange) !important;
    transition: color 0.2s ease-in-out;
}
.bg-brown {
    background-color: var(--brown) !important;
}


/* ========================================================================== */
/* 5. BOUTONS (BUTTONS)                                                       */
/* ========================================================================== */

/* Bouton Marron (Principal) */
.btn-brown {
    --bs-btn-color: var(--white);
    --bs-btn-bg: var(--brown);
    --bs-btn-border-color: var(--brown);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--brown-light);
    --bs-btn-hover-border-color: var(--brown-light);
    --bs-btn-active-bg: var(--brown-light);
    --bs-btn-active-border-color: var(--brown-light);
}

/* Bouton Orange (Accent/Action) */
.btn-orange {
    --bs-btn-color: var(--white);
    --bs-btn-bg: var(--orange);
    --bs-btn-border-color: var(--orange);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--orange-light);
    --bs-btn-hover-border-color: var(--orange-light);
    --bs-btn-active-bg: var(--orange-light);
    --bs-btn-active-border-color: var(--orange-light);
}

/* Bouton Outline Marron */
.btn-outline-brown {
    --bs-btn-color: var(--brown);
    --bs-btn-border-color: var(--brown);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--brown-light);
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: var(--brown);
    --bs-btn-active-border-color: var(--brown);
    --bs-btn-hover-border-color: var(--brown-light);
}

/* Remplacement du style par défaut de .btn-outline-secondary */
.btn-outline-secondary {
    --bs-btn-color: var(--brown);
    --bs-btn-border-color: var(--brown);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--brown-light);
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: var(--brown);
    --bs-btn-active-border-color: var(--brown);
    --bs-btn-hover-border-color: var(--brown-light);
}

/* Bouton extra small */
.btn-xs {
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}


/* ========================================================================== */
/* 6. COMPOSANTS GÉNÉRAUX (CARD, BADGE, PAGINATION)                           */
/* ========================================================================== */

.card {
    border: 1px solid var(--brown-sand);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Légère ombre pour la profondeur */
}

.badge {
    /* Le badge par défaut utilise l'orange */
    background-color: var(--orange);
}

.badge.bg-secondary {
    /* Surcharge pour le badge "secondary" qui doit être marron */
    background-color: var(--brown-light) !important;
}

.badge.bg-primary {
    /* Surcharge pour le badge "primary" qui doit être orange */
    background-color: var(--orange) !important;
}

.pagination {
    --bs-pagination-color: var(--brown);
    --bs-pagination-bg: var(--white);
    --bs-pagination-border-color: var(--brown);
    --bs-pagination-hover-color: var(--white);
    --bs-pagination-hover-bg: var(--brown-light);
    --bs-pagination-hover-border-color: var(--brown-light);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(49, 29, 0, 0.25);
    --bs-pagination-active-color: var(--white);
    --bs-pagination-active-bg: var(--brown);
    --bs-pagination-active-border-color: var(--brown);
    --bs-pagination-disabled-color: var(--gray);
    --bs-pagination-disabled-bg: var(--gray-light);
    --bs-pagination-disabled-border-color: var(--gray);
}


/* ========================================================================== */
/* 7. COMPOSANTS SPÉCIFIQUES (ARTICLE CARD, EDITO BAR)                        */
/* ========================================================================== */

.article-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.article-card:hover {
    transform: translateY(-4px);
}
.article-card img {
    height: 180px;
    object-fit: cover;
}
.article-card .card-title {
    color: var(--brown);
}

/* Édito minimaliste et cliquable */
.edito-bar {
    border-left: 4px solid var(--orange) !important;
    transition: all 0.2s ease-in-out;
    text-decoration: none !important;
    background-color: var(--white);
}

.edito-bar:hover {
    background-color: var(--orange-pale);
    transform: translateX(5px);
}

.edito-label {
    color: var(--orange);
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.edito-title {
    color: var(--brown);
    font-weight: 600;
}


/* ========================================================================== */
/* 8. STYLES LIVE & ANIMATIONS                                                */
/* ========================================================================== */

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

/* Hover effect sur le bandeau Live Ticker */
.alert[style*="background-color: #311d00"] {
    transition: transform 0.2s ease-in-out, background-color 0.2s;
}
.alert[style*="background-color: #311d00"]:hover {
    background-color: #3d2500 !important;
    transform: translateY(-2px);
}

/* ========================================================================== */
/* 9. UTILS & OVERRIDES                                                       */
/* ========================================================================== */

/* Pour les éléments qui ne doivent pas être masqués par le header fixe */
.scroll-margin-top {
    scroll-margin-top: 100px;
}

/* Styles pour les commentaires (mobile) */
@media (max-width: 576px) {
    /* Réduire la taille de l'avatar sur mobile */
    .comment-wrapper img.rounded-circle {
        width: 32px !important;
        height: 32px !important;
    }
    
    /* Réduire le padding de la bulle de commentaire */
    .comment-wrapper .flex-grow-1.ms-3 {
        margin-left: 0.5rem !important;
        padding: 0.75rem !important;
    }

    /* Optionnel : cacher la ligne verticale au 3ème niveau pour gagner de la place */
    .comment-wrapper .comment-wrapper .comment-wrapper .replies-container {
        border-left: none !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

/* Styles pour les textes tronqués (nécessite -webkit-box) */
.line-clamp-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}
.line-clamp-3 { 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}
.line-clamp-4 { 
    display: -webkit-box; 
    -webkit-line-clamp: 4; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* ========================================================================== */
/* 10. REFONTE HOMEPAGE & SPORT UI                                            */
/* ========================================================================== */

/* --- A. Hero Banner (Article à la une) --- */
.hero-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    color: var(--white);
    box-shadow: 0 10px 20px rgba(49, 29, 0, 0.2);
    min-height: 400px;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    background: linear-gradient(to top, rgba(49, 29, 0, 0.95) 0%, rgba(49, 29, 0, 0.6) 50%, transparent 100%);
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero-img {
    transition: transform 0.5s ease;
}

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

/* --- B. Titres de Section (Style NFL) --- */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brown);
    margin: 0;
    padding-right: 1rem;
    background-color: var(--gray-light); /* Couleur de fond du body pour "couper" la ligne */
    position: relative;
    top: 2px; /* Pour aligner avec la bordure */
    border-bottom: 2px solid var(--orange); /* La touche de couleur */
}

/* --- C. Widgets Sidebar Uniformisés --- */
.sidebar-widget {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.sidebar-header {
    background-color: var(--brown);
    color: var(--white);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .icon-box {
    color: var(--orange);
    margin-right: 0.5rem;
}

/* --- D. Édito style "Citation" --- */
.edito-box {
    background-color: var(--white);
    border-left: 5px solid var(--orange);
    padding: 1.5rem;
    position: relative;
    border-radius: 0 8px 8px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.edito-box:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.edito-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--gray-light);
    opacity: 0.5;
}

.edito-minimal {
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}
.edito-minimal:hover {
    background-color: #f9f9f9;
    text-decoration: none;
}
.edito-tag {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gray); /* Gris pour être discret */
    border: 1px solid var(--gray-light);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
    white-space: nowrap;
}
.edito-title {
    color: var(--brown);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================================================== */
/* 11. CALENDRIER & RÉSULTATS (GAME UI)                                       */
/* ========================================================================== */

/* Ligne de match (remplace le tableau classique) */
.match-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-left: 5px solid transparent; /* Pour l'indicateur W/L */
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    z-index: 10;
}

/* Indicateurs de résultat (Bordure gauche) */
.match-card.win { border-left-color: #28a745; }
.match-card.loss { border-left-color: #dc3545; }
.match-card.tie { border-left-color: #ffc107; }
.match-card.scheduled { border-left-color: var(--gray); }
.match-card.browns { border-left-color: var(--orange); } /* Spécial pour ton équipe */

/* Typographie Score */
.score-box {
    font-family: 'Arial', sans-serif; /* Police bâton pour les chiffres */
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}
.score-box.winner { color: var(--black); }
.score-box.loser { color: var(--gray); opacity: 0.7; }

/* Custom Tabs for Calendar */
.nav-tabs .nav-link {
    transition: all 0.2s ease-in-out;
}
.nav-tabs .nav-link:hover {
    background-color: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}


/* ========================================================================== */
/* 12. CLASSEMENT (STANDINGS UI)                                              */
/* ========================================================================== */

.table-standings thead th {
    background-color: #f8f9fa;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray);
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

/* Ligne de démarcation Playoffs */
.playoff-cutoff {
    border-bottom: 2px dashed rgba(0,0,0,0.1) !important;
}

/* Badges de Seed (1, 2, 3...) */
.seed-badge {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 8px;
}
.seed-1 { background-color: #ffd700; color: #000; } /* Or */
.seed-div { background-color: #e0f2f1; color: #00695c; } /* Vert Sarcelle */
.seed-wc { background-color: #e3f2fd; color: #0d47a1; } /* Bleu clair */
.seed-out { background-color: #f8f9fa; color: #6c757d; border: 1px solid #dee2e6; }

/* ========================================================================== */
/* 13. GAME CENTER (PAGE MATCH)                                               */
/* ========================================================================== */

/* A. Le Hero Header */
.game-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 1rem;
}

.game-hero.theme-browns {
    background: linear-gradient(135deg, #311d00 0%, #1a0f00 100%);
    border-bottom: 4px solid var(--orange);
}

/* B. Logos CSS */
.team-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 4px solid rgba(255,255,255,0.15);
    margin: 0 auto 1rem auto;
    letter-spacing: -1px;
}

@media (min-width: 768px) {
    .team-avatar {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
}

/* C. Score Géant */
.score-huge {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
    .score-huge { font-size: 5rem; }
}

/* D. Nettoyage du Tableau de Score (CRITIQUE) */
.game-hero table,
.game-hero table > :not(caption) > * > * {
    background-color: transparent !important; /* Force la transparence partout */
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,0.1) !important;
    box-shadow: none !important;
}

.game-hero table th {
    color: rgba(255,255,255,0.5) !important;
    font-weight: 400;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 0.5rem;
}

.game-hero table td {
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.5rem;
    border: none !important;
}

/* E. Info Strip (Barre du bas) */
.game-info-strip {
    background-color: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}