/* ================================================================
   Football Calendar – Styles
   ================================================================ */

.fc-calendar {
    --fc-primary:      #1a3a6b;
    --fc-primary-dark: #0d1f3c;
    --fc-accent:       #e65100;
    --fc-gold:         #c8a94a;
    --fc-today-bg:     #fff8e1;
    --fc-today-border: #f59e0b;
    --fc-match-bg:     #eef4ff;
    --fc-match-border: #3b82f6;
    --fc-text:         #1d2327;
    --fc-muted:        #6b7280;
    --fc-border:       #e5e7eb;
    --fc-radius:       8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: var(--fc-text);
}

/* ── Navigation ──────────────────────────────────────────────── */
.fc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--fc-primary);
    color: #fff;
    border-radius: var(--fc-radius) var(--fc-radius) 0 0;
    padding: 12px 20px;
    border-bottom: 2px solid var(--fc-gold);
}
.fc-month-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .03em;
}
.fc-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
    transition: background .2s;
}
.fc-nav-btn:hover { background: rgba(255,255,255,.3); color: #fff; }

/* ── Grille ──────────────────────────────────────────────────── */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--fc-border);
    border-top: none;
    border-radius: 0 0 var(--fc-radius) var(--fc-radius);
    overflow: hidden;
}

.fc-day-header {
    background: #f1f5f9;
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fc-muted);
    padding: 7px 4px;
    border-right: 1px solid var(--fc-border);
    border-bottom: 1px solid var(--fc-border);
}
.fc-day-header:last-child { border-right: none; }

.fc-day {
    min-height: 72px;
    padding: 5px 4px;
    border-right: 1px solid var(--fc-border);
    border-bottom: 1px solid var(--fc-border);
    background: #fff;
    transition: background .12s;
}
.fc-day:nth-child(7n) { border-right: none; }
.fc-day.fc-empty      { background: #fafafa; }
.fc-day.fc-today      { background: var(--fc-today-bg); }
.fc-day.fc-today .fc-day-num {
    background: var(--fc-today-border);
    color: #fff;
}
.fc-day.fc-has-match { background: var(--fc-match-bg); }

.fc-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--fc-text);
}

/* ── Badges journée ──────────────────────────────────────────── */
.fc-badges {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fc-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    background: var(--fc-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
    text-align: left;
    transition: background .15s, transform .1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-badge:hover {
    background: var(--fc-primary-dark);
    transform: translateY(-1px);
}

.fc-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fc-gold);
    color: #1a1a1a;
    border-radius: 50%;
    width: 16px; height: 16px;
    font-size: .62rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ── Popup journée ───────────────────────────────────────────── */
.fc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
}

.fc-popup {
    position: fixed;
    z-index: 9999;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 94vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.fc-popup-inner {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.fc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--fc-primary);
    color: #fff;
    padding: 12px 16px;
    border-bottom: 2px solid var(--fc-gold);
    flex-shrink: 0;
}
.fc-popup-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.fc-popup-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .15s;
}
.fc-popup-close:hover { background: rgba(255,255,255,.2); color: #fff; }

.fc-popup-list {
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Carte match dans le popup ───────────────────────────────── */
.fc-match-row {
    border: 1px solid var(--fc-border);
    border-left: 4px solid var(--fc-match-border);
    border-radius: 6px;
    padding: 10px 12px;
    background: #f9fafb;
}

.fc-match-row-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.fc-match-team {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--fc-primary);
}
.fc-match-team img {
    width: 28px; height: 28px;
    object-fit: contain;
}

.fc-match-vs {
    font-size: .8rem;
    font-weight: 800;
    color: var(--fc-muted);
    padding: 0 4px;
}

.fc-match-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: .78rem;
    color: var(--fc-muted);
    justify-content: center;
}
.fc-match-row-meta span { white-space: nowrap; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .fc-day       { min-height: 52px; padding: 3px; }
    .fc-badge     { font-size: .6rem; padding: 2px 4px; }
    .fc-badge-count { width: 13px; height: 13px; font-size: .55rem; }
    .fc-match-team { font-size: .8rem; }
    .fc-match-team img { width: 22px; height: 22px; }
}
