/* ── Football Calendar Import — Front CSS ──────────────────────────────────── */

/* Force le chargement immédiat des logos (contourne tout lazy loader) */
.fci-calendar .fci-logo {
    content-visibility: visible !important;
}

.fci-calendar {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    max-width: 700px;
    margin: 0 auto;
    color: #1a1a2e;
}

/* Navigation journées */
.fci-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 8px 16px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: relative;
}

.fci-nav button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #4a90d9;
    line-height: 1;
    padding: 4px 8px;
    transition: color .15s;
}
.fci-nav button:hover { color: #1a5faa; }
.fci-nav button:disabled { color: #ccc; cursor: default; }

.fci-nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1a5faa;
}

.fci-nav-dropdown-btn {
    font-size: 18px !important;
    padding: 0 4px !important;
    color: #1a5faa !important;
}

/* Dropdown journées */
.fci-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    z-index: 9999;
    min-width: 180px;
    max-height: 260px;
    overflow-y: auto;
}
.fci-dropdown[hidden] { display: none; }

.fci-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.fci-dropdown-list li {
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    transition: background .1s;
}
.fci-dropdown-list li:hover    { background: #f0f6ff; }
.fci-dropdown-list li.active   { font-weight: 700; color: #1a5faa; background: #e8f0fe; }

/* Titre */
.fci-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 0;
}

/* Wrapper matchs */
.fci-matches-wrapper { border-radius: 6px; overflow: hidden; }

/* Séparateur de date */
.fci-date-header {
    background: #f2f2f2;
    padding: 7px 14px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    text-transform: capitalize;
}

/* Ligne de match */
.fci-match {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background: #fff;
    transition: background .15s;
}
.fci-match:last-child { border-bottom: none; }
.fci-match:hover      { background: #f9fbff; }

/* Équipe domicile */
.fci-team-home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1;
    text-align: right;
}

/* Centre : heure ou score */
.fci-center {
    width: 90px;
    text-align: center;
    flex-shrink: 0;
    padding: 0 10px;
}

.fci-time {
    font-size: 15px;
    font-weight: 700;
    color: #4a90d9;
}

.fci-score {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 2px;
}

/* Équipe extérieure */
.fci-team-away {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 1;
    text-align: left;
}

/* Nom d'équipe */
.fci-team-name {
    font-size: 14px;
    font-weight: 600;
}

/* Logo — div avec background-image pour éviter le lazy loader Sahifa */
.fci-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}
.fci-logo-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    flex-shrink: 0;
}

/* Message vide */
.fci-no-data {
    text-align: center;
    color: #888;
    padding: 24px;
    font-style: italic;
}

/* Chargement */
.fci-loading {
    text-align: center;
    padding: 30px;
    color: #aaa;
}

/* Responsive */
@media (max-width: 480px) {
    .fci-team-name { font-size: 12px; }
    .fci-logo      { width: 22px; height: 22px; }
    .fci-match     { padding: 10px 10px; }
    .fci-center    { width: 70px; }
    .fci-time, .fci-score { font-size: 13px; }
}

/* Neutraliser tie-appear de Sahifa */
.fci-calendar .tie-appear,
.fci-calendar .fci-logo {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Logo en background-image (évite le lazy load du navigateur) */
.fci-calendar div.fci-logo {
    width: 28px !important;
    height: 28px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* ── Classement ─────────────────────────────────────────────────────────────── */

.fci-standings-wrapper {
    margin-top: 24px;
}

.fci-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.fci-standings-table thead tr {
    background: #1a5faa;
    color: #fff;
}

.fci-standings-table thead th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.fci-standings-table thead th.fci-st-team {
    text-align: left;
    padding-left: 12px;
}

.fci-standings-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background .1s;
}

.fci-standings-table tbody tr:hover {
    background: #f5f8ff;
}

.fci-standings-table tbody tr:last-child {
    border-bottom: none;
}

.fci-standings-table tbody td {
    padding: 8px;
    text-align: center;
    color: #333;
}

.fci-standings-table tbody td.fci-st-team {
    text-align: left;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fci-standings-table tbody td.fci-st-rang {
    color: #888;
    font-weight: 600;
    min-width: 24px;
}

.fci-standings-table tbody td.fci-st-pts strong {
    color: #1a5faa;
    font-size: 14px;
}

.fci-standings-table tbody td.fci-st-diff {
    color: #555;
}

/* Logo dans le classement */
.fci-st-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    opacity: 1 !important;
    visibility: visible !important;
}

.fci-st-logo-placeholder {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    flex-shrink: 0;
    display: inline-block;
}

/* Qualifying zones remain defined by the data, but the rank column stays neutral. */
.fci-standings-table tbody td.fci-st-rang {
    border-left: 0 !important;
}

/* Responsive */
@media (max-width: 500px) {
    .fci-standings-table { font-size: 11px; }
    .fci-standings-table thead th,
    .fci-standings-table tbody td { padding: 6px 4px; }
    .fci-st-logo { width: 16px; height: 16px; }
}
