/* AV-Pronos — Shortcode Pronostics */

.avp-pronostics-wrap {
    max-width: 600px;
    margin: 0 auto;
}

/* ── En-tête de phase ─────────────────────────────────────────────────────── */

.avp-prono-phase-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 8px;
    margin-top: 20px;
    margin-bottom: 6px;
    border-bottom: 2px solid #e5e7eb;
}

.avp-prono-phase-header:first-of-type { margin-top: 0; }

.avp-prono-phase-title {
    font-weight: 700;
    font-size: 15px;
    color: #1d2327;
}

.avp-prono-phase-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.avp-prono-phase-badge.group       { background: #d7f0d2; color: #1a6e14; }
.avp-prono-phase-badge.elimination { background: #fce8e8; color: #8a1515; }

/* ── Toolbar save ─────────────────────────────────────────────────────────── */

.avp-prono-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    margin: 8px 0 14px;
}

.avp-prono-save-btn {
    background: #0f9147;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 26px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.2px;
}

.avp-prono-save-btn:hover { background: #0a7038; }
.avp-prono-save-btn:disabled { background: #8c8f94; cursor: not-allowed; }

.avp-prono-status {
    font-size: 14px;
    font-weight: 500;
    min-height: 1em;
}

/* ── Match card ───────────────────────────────────────────────────────────── */

.avp-prono-match {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.avp-prono-match.avp-prono-locked {
    opacity: 0.75;
}

/* ── Date bar ─────────────────────────────────────────────────────────────── */

.avp-prono-date-bar {
    background: #2271b1;
    color: #fff;
    padding: 7px 14px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avp-prono-match.avp-prono-locked .avp-prono-date-bar {
    background: #8c8f94;
}

.avp-prono-date-text { text-transform: capitalize; }

.avp-prono-phase-tag {
    background: #fff;
    color: #1a4f8a;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.avp-prono-match-tag {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 11px;
}

.avp-prono-lock-icon { font-size: 13px; }

/* ── Body: teams + scores ─────────────────────────────────────────────────── */

.avp-prono-body { padding: 14px; }

.avp-prono-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.avp-prono-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avp-prono-team-left  { justify-content: flex-end; flex-direction: row-reverse; }
.avp-prono-team-right { justify-content: flex-start; }

.avp-prono-flag {
    max-width: 50px;
    height: auto;
    max-height: 36px;
    object-fit: contain;
    border-radius: 2px;
    flex-shrink: 0;
}

.avp-prono-flag-ph {
    width: 50px;
    height: 34px;
    background: #e9ecef;
    border-radius: 2px;
    flex-shrink: 0;
}

.avp-prono-team-name {
    font-weight: 700;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.2;
}

/* ── Score inputs ─────────────────────────────────────────────────────────── */

.avp-prono-scores {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.avp-prono-score {
    width: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    padding: 6px 4px;
    height: 48px;
    border: 2px solid #c3c4c7;
    border-radius: 5px;
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}

.avp-prono-score::-webkit-outer-spin-button,
.avp-prono-score::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.avp-prono-score:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.avp-prono-locked .avp-prono-score {
    background: #f0f0f1;
    border-color: #ddd;
    cursor: not-allowed;
    color: #50575e;
}

.avp-prono-sep {
    font-size: 22px;
    font-weight: 700;
    color: #c3c4c7;
    line-height: 1;
}

/* ── Winner selector ──────────────────────────────────────────────────────── */

.avp-prono-winner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    flex-wrap: wrap;
    animation: avp-fade-in 0.2s ease;
}

.avp-prono-winner-label {
    font-size: 13px;
    color: #50575e;
    font-weight: 600;
    white-space: nowrap;
}

.avp-prono-winner-opt {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

@keyframes avp-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 540px) {
    .avp-prono-team-name { font-size: 12px; }

    .avp-prono-flag, .avp-prono-flag-ph {
        max-width: 36px;
        width: 36px;
        height: 26px;
        max-height: 26px;
    }

    /* Équipes côte à côte sur la ligne du haut, scores centrés en dessous */
    .avp-prono-teams {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 6px 4px;
    }

    .avp-prono-team-left {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        justify-content: flex-start;
    }

    .avp-prono-team-right {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
    }

    .avp-prono-scores {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        padding-top: 2px;
    }

    .avp-prono-score { width: 52px; font-size: 20px; height: 44px; }
}
