/* Styles V2.4 — Ligues, avatars, profil et performances (Mobile-First) */

.mpr-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border: 1px solid rgba(211, 170, 91, 0.45);
    background: #17263b;
}

.mpr-avatar-preset {
    font-size: 22px;
    line-height: 1;
}

/* Grille des ligues */
.league-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
}

.league-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(211, 170, 91, 0.35);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: rgba(12, 26, 44, 0.04);
}

.league-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #17263b;
}

.league-avatar .mpr-avatar {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
}

.league-avatar.large,
.league-avatar.large .mpr-avatar,
.profile-header .mpr-avatar {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    font-size: 28px;
}

.league-tile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.league-tile-info strong {
    overflow-wrap: anywhere;
}

.league-tile-info small,
.member-row small {
    color: #5b6878;
    font-size: 12px;
}

.league-profile-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.member-list {
    display: grid;
    gap: 8px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(16, 27, 44, 0.08);
}

.member-row > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.rank-mini {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(16, 27, 44, 0.04);
}

.rank-mini strong {
    flex: 1;
    min-width: 0;
}

.rank-number {
    color: #c64b25;
    font-weight: 800;
}

/* Formulaires V2.4 */
.v24-form {
    display: grid;
    gap: 12px;
    max-width: 620px;
}

.v24-form label,
.panel form label {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.v24-form input,
.v24-form textarea,
.v24-form select,
.panel form input,
.panel form textarea,
.panel form select {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #cbd3dc;
    background: #fff;
    color: #101b2c;
    font: inherit;
}

.v24-form textarea,
.panel form textarea {
    min-height: 96px;
    resize: vertical;
}

.inline-form {
    margin-top: 12px;
}

.danger-zone {
    border-top: 1px solid rgba(139, 52, 52, 0.3);
    margin-top: 22px;
    padding-top: 18px;
}

.btn.danger {
    background: #8b3434;
    color: #fff;
}

/* Performances & classement */
.performance-breakdown {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.performance-breakdown span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(16, 27, 44, 0.04);
    border-radius: 9px;
}

.performance-breakdown b {
    color: #c64b25;
    font-size: 16px;
}

.leader-player {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.leader-player .mpr-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 18px;
}

/* Tablette & Desktop (>= 640px) */
@media (min-width: 640px) {
    .league-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 14px;
    }

    .league-profile-head {
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }

    .league-avatar.large,
    .league-avatar.large .mpr-avatar,
    .profile-header .mpr-avatar {
        width: 76px;
        height: 76px;
        flex: 0 0 76px;
        font-size: 32px;
    }

    .section-heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .performance-breakdown {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
        gap: 12px;
    }
}


    .page-intro.page-intro--compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    flex-wrap: wrap;
    padding: 12px 18px;
    margin-bottom: 14px;
    border-radius: 12px;
    /*background: linear-gradient(125deg, #0b1221 0%, #15223b 100%);*/
    color: #ffffff;
    border-bottom: 3px solid #d85a2a;
}

.page-intro--compact .matches-hero-mark {
    display: none;
}

.page-intro--compact .matches-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-intro--compact .matches-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f4a282;
    line-height: 1.1;
}

.page-intro--compact h1 {
    margin: 0;
    font-size: clamp(19px, 2.2vw, 25px);
    line-height: 1.15;
    font-weight: 900;
    color: #ffffff;
}

.page-intro--compact h1 em {
    font-style: normal;
    color: var(--mpr-yellow);
}

.page-intro--compact .matches-hero-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-intro--compact .matches-hero-stats > span {
    padding: 4px 10px;
    /*border-radius: 999px;*/
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 11.5px;
    line-height: 1.2;
    color: #e6eee9;
}

.page-intro--compact .matches-hero-stats > span b {
    /*color: #ffffff;*/
    font-weight: 900;
}

.page-intro--compact .matches-hero-stats .joker-indicator {
    background: #d9f7e3;
    border-color: #9be4b7;
    color: #0f4c2c;
}

.page-intro--compact .matches-hero-stats .joker-indicator b {
    color: #0f4c2c;
}

@media (max-width: 640px) {
    .page-intro.page-intro--compact {
        padding: 10px 14px;
        gap: 8px;
    }
    .page-intro--compact .matches-hero-stats > span {
        padding: 3px 8px;
        font-size: 11px;
    }
}



.date-selector.date-selector--compact {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #d8e2dd;
    box-shadow: 0 2px 8px rgba(11, 18, 33, 0.04);
}

.date-selector--compact .date-selector-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.date-selector--compact .date-selector-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.date-selector--compact .section-kicker {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #d85a2a;
}

.date-selector--compact .date-selector-title h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
    color: #0b1221;
}

.date-selector--compact .date-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.date-selector--compact .all-dates {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    color: #0b1221;
    background: #f3f7f5;
    border: 1px solid #d6e2dc;
    line-height: 1.2;
}

.date-selector--compact .all-dates.active {
    background: #0b1221;
    color: #ffffff;
    border-color: #0b1221;
}

.date-selector--compact .date-strip {
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
}

.date-selector--compact .date-chip {
    flex: 0 0 auto;
    min-width: 74px;
    padding: 6px 9px;
    border-radius: 9px;
    background: #f8faf9;
    border: 1px solid #dde6e1;
    text-decoration: none;
    color: #0b1221;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.date-selector--compact .date-chip:hover {
    border-color: #d85a2a;
    background: #fdf2ec;
}

.date-selector--compact .date-chip.active {
    background: #0b1221;
    border-color: #0b1221;
    color: #ffffff;
}

.date-selector--compact .date-chip-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 5px;
}

.date-selector--compact .date-chip small {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #586861;
    line-height: 1;
}

.date-selector--compact .date-chip.active small {
    color: #f4a282;
}

.date-selector--compact .date-chip-top b {
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.date-selector--compact .date-chip-sub {
    font-size: 10px;
    font-weight: 700;
    color: #586861;
    line-height: 1.1;
}

.date-selector--compact .date-chip.active .date-chip-sub {
    color: #d9f7e3;
}

@media (max-width: 640px) {
    .date-selector.date-selector--compact {
        padding: 8px 10px;
    }
    .date-selector--compact .date-chip {
        min-width: 68px;
        padding: 5px 8px;
    }
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: #102b46;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pwa-install-btn[hidden] {
  display: none;
}

.pwa-install-btn:hover {
  background: #173b60;
}