/* =====================================================
   BLOC PROGRAMME & BILLETS
   ===================================================== */

.cf-programme-billet {
    width: 100%;
    padding: 3rem 1.5rem;
}

/* En-tête du bloc */
.cf-programme-billet__titre {
    font-size: clamp(1.5rem, 1.3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    font-family: 'League Gothic';
}

/* Pied du bloc : bouton CTA centré */
.cf-programme-billet__footer {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.cf-programme-billet__btn-footer {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: 2px solid var(--couleur-1, #0057a8);
    border-radius: 6px;
    text-transform: uppercase;
    color: var(--couleur-1, #0057a8);
    font-weight: 500;

    text-decoration: none;
    font-size: 2rem;
    font-family: 'League Gothic';
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: center;
}

.cf-programme-billet__btn-footer:hover {
    background-color: var(--couleur-1, #0057a8);
    color: #fff;
}

@media screen and (max-width: 768px) {
    .cf-programme-billet__btn-footer {
        font-size: 1.2rem;
    }
}

/* Message vide */
.cf-programme-billet__vide {
    text-align: center;
    opacity: 0.6;
    padding: 2rem;
}

/* ---- Barre de date (JJ MM) ---- */
.cf-programme-billet__day-bar {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    background-color: var(--couleur-4, #003f7f);
    color: #fff;
    border-radius: 999px;
    padding: 0.4rem 1.25rem;
    margin: 0 0 0.75rem;
    font-weight: 700;
    justify-content: center;
    width: 100%;
}

.cf-programme-billet__day-bar:not(:first-of-type) {
    margin-top: 1rem;
}

.cf-programme-billet__day-num {
    font-size: 1.2rem;
    line-height: 1;
}

.cf-programme-billet__day-month {
    font-size: 1.2rem;
    letter-spacing: 0.06em;
}

/* ---- Conteneur des matchs du jour ---- */
.cf-programme-billet__matchs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ---- Session (demi-journée : 1 ou 2 matchs + 1 bouton billet partagé) ---- */
.cf-session {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 0.75rem;
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 0.5rem;
}

.cf-session__matchs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cf-session__billet {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

/* ---- Ligne d'un match (au sein d'une session) ---- */
.cf-match {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(180px, 2fr) 8fr;
    align-items: center;
    gap: 1rem;
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-family: "Roboto";
}

.cf-session[data-matchs="2"] .cf-match + .cf-match {
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
    border-radius: 0;
}

/* Colonne 1 : date/heure */
.cf-match__datetime {
    text-wrap: nowrap;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.2;
    position: relative;
    padding-right: 1rem;
}

.cf-match__datetime::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-color: currentColor;
    opacity: 0.3;
}

.cf-match__date, .cf-match__heure {
    text-align: center;
}

/* Colonne 2 : groupe/phase */
.cf-match__groupe {
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 800;
    position: relative;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.cf-match__groupe::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-color: currentColor;
    opacity: 0.3;
}

.cf-match__groupe-label {
    font-weight: 400;
    font-size: 0.85rem;
}

.cf-match__groupe-name {
    font-weight: 800;
}

/* Colonne 3 : équipes */
.cf-match__equipes {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.cf-match__equipe {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 1.3rem;
}

.cf-match__equipe:first-child {
    justify-content: flex-end;
}

.cf-match__equipe:last-child {
    justify-content: flex-start;
}

.cf-match__drapeau {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.cf-match__sep {
    font-weight: 300;
    opacity: 0.5;
    margin: 0 0.25rem;
}

/* ---- Bouton billet de session (partagé entre 1 ou 2 matchs) ---- */
.cf-session__billet-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: 2px solid var(--couleur-1, #0057a8);
    border-radius: 6px;
    color: var(--couleur-1, #0057a8);
    background: transparent;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'League Gothic';
    line-height: 1.1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cf-session__billet-btn:hover {
    background-color: var(--couleur-1, #0057a8);
    color: #fff;
}

.cf-session__billet-btn--disabled,
.cf-session__billet-btn--disabled:hover {
    border-color: #9a9a9a;
    color: #6b6b6b;
    background: #f2f2f2;
    cursor: not-allowed;
    pointer-events: none;
}

.cf-session__billet-label {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.cf-session__billet-sub {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

.cf-session__billet-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ---- Responsive mobile ---- */
@media (max-width: 680px) {
    .cf-session {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .cf-session__billet {
        justify-content: center;
        padding: 0.25rem 0 0;
    }

    .cf-match {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .cf-match__datetime {
        justify-content: center;
        padding-right: 0;
        font-size: 1rem;
    }

    .cf-match__datetime::after {
        display: none;
    }

    .cf-match__groupe {
        text-align: center;
        padding: 0;
        font-size: 0.9rem;
    }

    .cf-match__groupe::after {
        display: none;
    }

    .cf-match__equipes {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

    .cf-match__equipe {
        font-size: 1.1rem;
    }

    .cf-match__equipe:first-child,
    .cf-match__equipe:last-child {
        justify-content: center;
    }

    .cf-match__sep {
        font-size: 1.2rem;
    }

    .cf-session__billet-btn {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }
}

/* Alignement Gutenberg full/wide */
.wp-block[data-align="full"] .cf-programme-billet,
.alignfull.cf-programme-billet {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(1.5rem, calc((100vw - 1200px) / 2));
    padding-right: max(1.5rem, calc((100vw - 1200px) / 2));
}