/* ============================================
   CALENDAR PAGE — Style NFL Schedules
   ============================================ */

/* ── Hero ─────────────────────────────────── */
.calendar-hero {
    padding: 32px 28px;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.calendar-hero-content { width: 100%; }

.calendar-hero-title {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--nfl-dark);
    margin: 0 0 6px;
    line-height: 1;
}

.calendar-hero-subtitle {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
    color: var(--nfl-gray);
}

/* ── Carousel sélecteur de semaine (style NFL) ────── */
.week-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
}

.week-carousel-arrow {
    flex-shrink: 0;
    width: 40px;
    min-height: 72px;
    background: white;
    border: none;
    border-right: 1px solid #e8e8e8;
    color: var(--nfl-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}

.week-carousel-arrow--next {
    border-right: none;
    border-left: 1px solid #e8e8e8;
}

.week-carousel-arrow:hover {
    background: var(--nfl-light);
    color: var(--nfl-blue);
}

.week-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.week-carousel-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.week-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.week-carousel-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 16px;
    min-width: 110px;
    text-decoration: none;
    color: var(--nfl-gray);
    border-right: 1px solid #f0f0f0;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    text-align: center;
}

.week-carousel-item:last-child { border-right: none; }

.week-carousel-item:hover {
    background: var(--nfl-light);
    color: var(--nfl-dark);
}

.week-carousel-item.active {
    background: var(--nfl-blue);
    color: white;
}

.week-carousel-item.current:not(.active) {
    border-bottom: 3px solid var(--nfl-blue);
    color: var(--nfl-blue);
}

.week-carousel-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.week-carousel-dates {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
    line-height: 1;
    white-space: nowrap;
}

.week-carousel-item.active .week-carousel-dates { opacity: 0.85; }

/* ── Filtres division ─────────────────────── */
.calendar-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    padding: 0 2px;
}

.calendar-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--nfl-gray);
    white-space: nowrap;
}

.calendar-filter-btns {
    display: flex;
    gap: 6px;
}

.calendar-filter-btn {
    padding: 6px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--nfl-gray);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
}

.calendar-filter-btn:hover {
    border-color: var(--nfl-blue);
    color: var(--nfl-blue);
}

.calendar-filter-btn.active {
    background: var(--nfl-blue);
    border-color: var(--nfl-blue);
    color: white;
}

/* ── Onglets de filtrage ──────────────────── */
.calendar-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.calendar-tabs::-webkit-scrollbar { display: none; }

.calendar-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    color: var(--nfl-gray);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.calendar-tab:hover { color: var(--nfl-dark); }

.calendar-tab.active {
    color: var(--nfl-blue);
    border-bottom-color: var(--nfl-blue);
}

/* ── Journée ──────────────────────────────── */
.match-day { margin-bottom: 28px; }

.match-day-header {
    background: var(--nfl-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 4px 4px 0 0;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-list {
    background: white;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8e8e8;
    border-top: none;
}

/* ── Card de match ────────────────────────── */
.match-card {
    display: grid;
    grid-template-columns: 1fr 90px 1fr 200px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
    transition: background-color 0.15s;
}

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

.match-card:hover { background-color: var(--nfl-light); }

/* Bordure gauche rouge pour les matchs joués */
.match-card.played {
    border-left: 3px solid #e0e0e0;
}

/* ── Équipes ──────────────────────────────── */
.team {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.team-logo-calendar {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-info { display: flex; flex-direction: column; gap: 2px; }

.team.away .team-info { text-align: right; }
.team.home .team-info { text-align: left; }

.team-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--nfl-dark);
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.15s;
}

a.team-name:hover { color: var(--nfl-blue); text-decoration: underline; }

.team-record {
    font-size: 11px;
    color: var(--nfl-gray);
}

.forfeit-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--nfl-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Score / VS ───────────────────────────── */
.match-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--nfl-gray);
    letter-spacing: 1px;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 24px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.score-away,
.score-home { color: var(--nfl-dark); }

.score-away.winner,
.score-home.winner { color: var(--nfl-blue); }

.score-separator {
    color: #ccc;
    font-weight: 400;
    font-size: 20px;
}

/* ── Détails ──────────────────────────────── */
.match-details { text-align: right; }

.match-time {
    font-size: 18px;
    font-weight: 800;
    color: var(--nfl-blue);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.match-venue {
    font-size: 11px;
    color: var(--nfl-gray);
    margin-bottom: 6px;
    line-height: 1.4;
}

.match-phase {
    font-style: italic;
    opacity: 0.8;
}

.match-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.match-league {
    display: inline-block;
    background: var(--nfl-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.match-sheet-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--nfl-gray);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: color 0.15s, border-color 0.15s;
}

.match-sheet-link:hover {
    color: var(--nfl-blue);
    border-color: var(--nfl-blue);
}

/* ── État vide ────────────────────────────── */
.calendar-empty {
    text-align: center;
    padding: 64px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calendar-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.calendar-empty h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--nfl-dark);
    margin-bottom: 8px;
}

.calendar-empty p {
    font-size: 14px;
    color: var(--nfl-gray);
    margin-bottom: 24px;
}

.calendar-empty-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-week-nav {
    padding: 10px 20px;
    border: 2px solid var(--nfl-blue);
    border-radius: 4px;
    color: var(--nfl-blue);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-week-nav:hover {
    background: var(--nfl-blue);
    color: white;
}

.btn-week-nav--primary {
    background: var(--nfl-blue);
    color: white;
}

.btn-week-nav--primary:hover {
    background: #012754;
    border-color: #012754;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
    .match-card {
        grid-template-columns: 1fr 70px 1fr 160px;
        gap: 8px;
        padding: 14px 16px;
    }

    .team-logo-calendar { width: 38px; height: 38px; }
    .match-score { font-size: 20px; }

    .week-carousel-item { min-width: 95px; padding: 12px 10px; }
    .week-carousel-label { font-size: 11px; }
    .week-carousel-dates { font-size: 10px; }
}

@media (max-width: 680px) {
    .calendar-hero { padding: 24px 16px; }

    .calendar-filters { flex-wrap: wrap; gap: 10px; }
    .calendar-filter-btns { flex-wrap: wrap; }
    .calendar-filter-btn { padding: 5px 12px; font-size: 11px; }

    .match-card {
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto;
        gap: 10px 8px;
        padding: 14px 16px;
    }

    /* Détails en bas sur toute la largeur */
    .match-details {
        grid-column: 1 / -1;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .match-time { font-size: 15px; margin-bottom: 0; }
    .match-venue { display: none; }

    .team-logo-calendar { width: 34px; height: 34px; }
    .team-name { font-size: 12px; }
    .match-score { font-size: 18px; }
}

@media (max-width: 480px) {
    .week-info h2 { font-size: 16px; }
    .week-info { min-width: 160px; }

    .match-card {
        grid-template-columns: 1fr 60px 1fr;
        padding: 12px;
    }

    .team-logo-calendar { width: 28px; height: 28px; }
    .team-name { font-size: 11px; }
    .match-score { font-size: 16px; gap: 4px; }
}
