/* ====================================================
   MyPadel — Public
   Immersive dark sport experience
   Règle : pas d’emoji côté public, uniquement icônes SVG / Bootstrap Icons.
   ==================================================== */

:root {
    /* Palette « court de nuit » : bleu nuit, texte blanc cassé, accent jaune balle de padel */
    --pub-bg: #0a1b3d;
    --pub-bg-alt: #0e2247;
    --pub-surface: rgba(19, 40, 79, 0.88);
    --pub-surface-hover: rgba(26, 48, 90, 0.94);
    --pub-surface-light: rgba(28, 52, 96, 0.72);
    --pub-border: rgba(242, 239, 230, 0.09);
    --pub-border-hover: rgba(242, 239, 230, 0.18);
    --pub-glass: rgba(242, 239, 230, 0.03);
    --pub-ink: #0a1b3d;

    /* Accent : jaune balle */
    --pub-accent: #dcf23f;
    --pub-accent-dim: #c4dc2a;
    --pub-accent-glow: rgba(220, 242, 63, 0.12);
    --pub-accent-glow-strong: rgba(220, 242, 63, 0.3);

    /* Médailles classement poules */
    --pub-gold: #ffd700;
    --pub-gold-dim: #e6b800;
    --pub-gold-glow: rgba(255, 215, 0, 0.15);
    --pub-silver: #c0c0c0;
    --pub-silver-dim: #a8a8a8;
    --pub-bronze: #cd7f32;
    --pub-bronze-dim: #b87333;

    /* Status colors */
    --pub-live: #dcf23f;
    --pub-upcoming: #6ea0f5;
    --pub-finished: rgba(242, 239, 230, 0.45);
    --pub-danger: #ff6b5e;

    /* Text */
    --pub-text: #f2efe6;
    --pub-text-dim: rgba(242, 239, 230, 0.7);
    --pub-text-muted: rgba(242, 239, 230, 0.5);

    /* Spacing : angles nets plutôt que cartes très arrondies */
    --pub-radius: 6px;
    --pub-radius-sm: 4px;
    --pub-radius-lg: 8px;
    --pub-radius-xl: 10px;
}

/* ====================================================
   ANIMATIONS
   ==================================================== */

@keyframes pub-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pub-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pub-slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pub-pulse-live {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 242, 63, 0.6);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(220, 242, 63, 0);
    }
}

@keyframes pub-glow-pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* ====================================================
   BODY & BACKGROUND
   ==================================================== */

body.public-page {
    background: var(--pub-bg) !important;
    min-height: 100vh;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pub-text);
}

body.public-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(180deg, #0a1b3d 0%, #0c1f45 60%, #081734 100%) !important;
}

body.public-page::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.018;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) !important;
    background-size: 80px 80px !important;
}

/* ====================================================
   HERO SECTION
   ==================================================== */

.pub-hero {
    text-align: center;
    padding: 4rem 1rem 2.5rem;
    position: relative;
    overflow: hidden;
    animation: pub-fadeIn 0.6s ease;
}

.pub-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: none;
    pointer-events: none;
    animation: pub-glow-pulse 4s ease-in-out infinite;
}

.pub-hero-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0 auto 0.75rem;
    width: fit-content;
    text-align: center;
    position: relative;
    color: var(--pub-text);
    animation: pub-fadeInUp 0.7s ease;
}

.pub-hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--pub-text-dim);
    max-width: 100%;
    margin: 0 auto 2rem;
    line-height: 1.6;
    animation: pub-fadeInUp 0.7s ease 0.1s both;
}

/* Page d'accueil : flux centré, marges gauche/droite */
.pub-home-container {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Desktop uniquement : flux centré avec marges raisonnables */
@media (min-width: 993px) {
    body.public-page .container.pub-home-container {
        max-width: 640px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    /* Page détail organisateur : alignée sur la barre de navigation, comme les pages tournoi */
    body.public-page .container.pub-organisateur-detail {
        max-width: 1140px;
        padding-left: 15px;
        padding-right: 15px;
    }
}

.pub-home-container .pub-org-grid {
    max-width: 100%;
}

/* Barre de recherche (form) */
.pub-search-bar {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 2rem;
    animation: pub-fadeInUp 0.7s ease 0.15s both;
}

.pub-search-bar .pub-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pub-text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.pub-search-bar .pub-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--pub-radius-sm);
    color: var(--pub-text);
    font-size: 0.92rem;
    font-family: 'Onest', sans-serif;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.pub-search-bar .pub-search-input::placeholder {
    color: var(--pub-text-muted);
}

.pub-search-bar .pub-search-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(220, 242, 63, 0.08);
}

/* ====================================================
   ORGANISATEUR CARDS
   ==================================================== */

.pub-org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.pub-org-card {
    background: var(--pub-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
    animation: pub-fadeInUp 0.5s ease both;
}

.pub-org-card:nth-child(1) {
    animation-delay: 0.05s;
}

.pub-org-card:nth-child(2) {
    animation-delay: 0.1s;
}

.pub-org-card:nth-child(3) {
    animation-delay: 0.15s;
}

.pub-org-card:nth-child(4) {
    animation-delay: 0.2s;
}

.pub-org-card:nth-child(5) {
    animation-delay: 0.25s;
}

.pub-org-card:nth-child(6) {
    animation-delay: 0.3s;
}

.pub-org-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--pub-radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, var(--pub-accent-glow) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pub-org-card:hover {
    transform: translateY(-4px);
    border-color: var(--pub-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(220, 242, 63, 0.05);
    background: var(--pub-surface-hover);
}

.pub-org-card:hover::before {
    opacity: 1;
}

.pub-org-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.pub-org-card:hover .pub-org-logo {
    border-color: rgba(220, 242, 63, 0.3);
    box-shadow: 0 0 20px rgba(220, 242, 63, 0.1);
}

.pub-org-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-org-logo svg {
    width: 50%;
    height: 50%;
    color: var(--pub-text-muted);
}

.pub-org-info {
    flex: 1;
    min-width: 0;
}

.pub-org-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.3rem;
    letter-spacing: -0.02em;
}

.pub-org-meta {
    font-size: 0.82rem;
    color: var(--pub-text-dim);
}

.pub-org-arrow {
    flex-shrink: 0;
    color: var(--pub-text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.pub-org-card:hover .pub-org-arrow {
    color: var(--pub-accent);
    transform: translateX(4px);
}

/* Live indicator on card */
.pub-live-dot {
    width: 8px;
    height: 8px;
    background: var(--pub-live);
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.35rem;
    animation: pub-pulse-live 1.5s ease-in-out infinite;
    vertical-align: middle;
}

/* Tournoi en cours : comme le screen — point vert + texte vert */
.pub-status-en-cours {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--pub-live) !important;
    font-weight: 500;
}

.pub-status-en-cours .pub-live-dot {
    flex-shrink: 0;
}

/* Tournoi à venir : autre couleur + icône horloge qui “tictaque” */
.pub-status-a-venir {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--pub-upcoming) !important;
    font-weight: 500;
}

.pub-clock-tick {
    font-size: 0.9rem;
    animation: pub-clock-tick 1s ease-in-out infinite;
}

@keyframes pub-clock-tick {
    0%, 100% { transform: rotate(0deg); opacity: 1; }
    50% { transform: rotate(-8deg); opacity: 0.85; }
}

/* ====================================================
   ORGANISATEUR DETAIL HEADER
   ==================================================== */

.pub-org-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    position: relative;
    margin-bottom: 2rem;
    animation: pub-fadeIn 0.5s ease;
}

.pub-org-header::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: none;
    pointer-events: none;
}

.pub-org-header-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.pub-org-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-org-header-logo svg {
    width: 50%;
    height: 50%;
    color: var(--pub-text-dim);
}

.pub-org-header-name {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.pub-org-header-contact {
    color: var(--pub-text-dim);
    font-size: 0.9rem;
}

.pub-org-header-contact a {
    color: var(--pub-accent);
    text-decoration: none;
}

.pub-org-header-contact a:hover {
    text-decoration: underline;
}

.pub-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pub-radius-sm);
    color: var(--pub-text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.pub-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

/* ====================================================
   TOURNAMENT CARDS (Organisateur Detail)
   ==================================================== */

.pub-tournoi-grid {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.pub-section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.pub-tournoi-card {
    background: var(--pub-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    animation: pub-fadeInUp 0.5s ease both;
    position: relative;
    overflow: hidden;
}

.pub-tournoi-card:hover {
    border-color: var(--pub-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.pub-tournoi-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.pub-tournoi-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Status badges */
.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--pub-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.pub-badge-live {
    background: rgba(220, 242, 63, 0.12);
    color: var(--pub-live);
    border: 1px solid rgba(220, 242, 63, 0.2);
}

.pub-badge-upcoming {
    background: rgba(84, 160, 255, 0.1);
    color: var(--pub-upcoming);
    border: 1px solid rgba(84, 160, 255, 0.15);
}

.pub-badge-finished {
    background: rgba(255, 255, 255, 0.04);
    color: var(--pub-finished);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pub-tournoi-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--pub-text-dim);
    margin-bottom: 1rem;
}

.pub-tournoi-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pub-tournoi-meta-item i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.pub-tournoi-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.3rem;
    background: var(--pub-accent);
    color: #0a0e18;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--pub-radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pub-tournoi-cta:hover {
    background: var(--pub-accent-dim);
    color: #0a0e18;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(220, 242, 63, 0.25);
}

/* ====================================================
   TOURNOI DETAIL — HEADER
   ==================================================== */

.pub-tournoi-header {
    background: var(--pub-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 2rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
    animation: pub-fadeIn 0.5s ease;
}

.pub-screen-brand {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pub-accent);
    margin: 0 0 0.5rem;
}
.pub-screen-brand .pub-brand-logo {
    height: 1.35rem;
    width: auto;
    display: block;
}
.pub-screen-brand .pub-brand-logo-sm {
    height: 1.2rem;
}

.pub-tournoi-header h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 0.75rem;
}

.pub-tournoi-header p {
    color: var(--pub-text-dim);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.pub-tournoi-header p strong {
    color: var(--pub-text);
}

.pub-tournoi-header a {
    color: var(--pub-accent);
    text-decoration: none;
}

.pub-tournoi-header a:hover {
    text-decoration: underline;
}

.pub-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pub-accent);
}

.pub-live-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pub-accent);
    margin-left: 0.5rem;
}

/* ====================================================
   ONGLETS DÉTAIL TOURNOI (Poules | Phases finales)
   ==================================================== */

.pub-detail-tabs {
    border-bottom: 1px solid var(--pub-border);
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.pub-detail-tabs .nav-link {
    color: var(--pub-text-dim);
    border: 1px solid transparent;
    border-radius: var(--pub-radius-sm);
    padding: 0.65rem 1.1rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.pub-detail-tabs .nav-link:hover {
    color: var(--pub-text);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--pub-border);
}

.pub-detail-tabs .nav-link.active {
    color: var(--pub-accent);
    background: rgba(220, 242, 63, 0.08);
    border-color: rgba(220, 242, 63, 0.2);
}

.pub-detail-tabs .nav-link i {
    font-size: 1rem;
    opacity: 0.9;
}

.pub-detail-tab-content {
    margin-bottom: 2rem;
}

.pub-detail-tab-content .tab-pane {
    padding-top: 0.25rem;
}

/* Sous-onglets dans « Bas du tableau » (carte pub-poule-card) */
.pub-bas-tableau-subtabs {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.pub-bas-tableau-subtabs .nav-link {
    font-size: 0.84rem;
    padding: 0.5rem 0.9rem;
}

.pub-bas-tableau-subtab-content {
    margin-bottom: 0;
}

.pub-bas-tableau-subtab-content .tab-pane {
    padding-top: 0.15rem;
}

/* ====================================================
   SECTION CARDS (Poules, Bracket containers)
   ==================================================== */

.pub-section-card {
    background: var(--pub-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    animation: pub-fadeInUp 0.5s ease both;
}

.pub-section-card:has(.BracketWrapper) {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.pub-section-card h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-section-card h2::before {
    content: '';
    width: 4px;
    height: 1.2em;
    background: var(--pub-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ====================================================
   POULE CARDS
   ==================================================== */

.pub-poule-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.pub-poule-card h4 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.pub-poule-card-subtitle {
    font-weight: 500;
    color: var(--pub-text-muted);
    font-size: 0.92em;
}

/* Sous-titre secondaire dans une carte poule (ex. section TMC sous le bracket) */
.pub-poule-card-inner-heading {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pub-text);
    margin-top: 1.25rem;
    margin-bottom: 0.65rem;
}

/* Colonne « Tableau » du classement tournoi public (sans badges Bootstrap) */
.pub-classement-tableau-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pub-text-muted);
}

.pub-classement-tableau-label--principal {
    color: var(--pub-accent);
}

/* Liste équipes inscrites (page publique tournoi) */
.pub-equipes-inscrites-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}
.pub-equipes-inscrites-list li {
    color: var(--pub-text);
    font-size: 0.95rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.pub-tete-serie {
    font-size: 0.75rem;
    color: var(--pub-gold);
    font-weight: 600;
    margin-left: 0.25rem;
}

/* ====================================================
   RANKING TABLE
   ==================================================== */

.pub-ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.5rem;
}

.pub-ranking-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.5rem;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pub-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--pub-border);
}

.pub-ranking-table th:first-child,
.pub-ranking-table th:nth-child(3),
.pub-ranking-table th:nth-child(4),
.pub-ranking-table th:nth-child(5) {
    text-align: center;
}

.pub-ranking-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--pub-text);
    font-size: 0.88rem;
    transition: background 0.15s ease;
}

.pub-ranking-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

/* Podium : couleurs selon le rang affiché (#), pas selon la position de la ligne */
.pub-rank-cell--gold {
    color: var(--pub-gold) !important;
    font-weight: 800;
}

.pub-rank-cell--silver {
    color: var(--pub-silver) !important;
    font-weight: 700;
}

.pub-rank-cell--bronze {
    color: var(--pub-bronze) !important;
    font-weight: 700;
}

.pub-ranking-table tbody tr:has(.pub-rank-cell--gold) td {
    border-bottom-color: rgba(255, 215, 0, 0.1);
}

.pub-ranking-table tbody tr:has(.pub-rank-cell--silver) td {
    border-bottom-color: rgba(192, 192, 192, 0.12);
}

.pub-ranking-table tbody tr:has(.pub-rank-cell--bronze) td {
    border-bottom-color: rgba(205, 127, 50, 0.15);
}

.pub-rank-cell {
    text-align: center;
    font-weight: 700;
    color: var(--pub-text-dim);
    font-size: 0.85rem;
}

.pub-diff-positive {
    color: var(--pub-accent) !important;
}

.pub-diff-negative {
    color: var(--pub-danger) !important;
}

/* ====================================================
   MATCH ITEMS
   ==================================================== */

.pub-matchs-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-sm);
    padding: 0.5rem 0.9rem;
    color: var(--pub-text-dim);
    cursor: pointer;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pub-matchs-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pub-text);
    border-color: var(--pub-border-hover);
}

.pub-matchs-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.pub-matchs-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.matchs-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.matchs-container.show {
    opacity: 1;
}

.pub-match-item {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    transition: all 0.15s ease;
    font-size: 0.88rem;
    color: var(--pub-text);
}

.pub-match-item:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--pub-border-hover);
}

.pub-match-item .match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    max-width: 600px;
}

.pub-match-item .match-team-name {
    font-weight: 600;
    text-align: center;
    color: #fff;
}

.pub-match-item .match-team-scores {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
}

.pub-match-item .match-team-score {
    color: #fff;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.73rem;
    min-width: 24px;
    text-align: center;
}

.pub-match-item .match-team-score.score-win {
    background-color: var(--pub-accent);
    color: #0a0e18;
}

.pub-match-item .match-team-score.score-lose {
    background-color: var(--pub-danger);
}

.pub-match-item .match-vs {
    color: var(--pub-text-muted);
    font-weight: 400;
    font-size: 0.75rem;
    text-align: center;
    margin: 0.1rem 0;
}

.pub-match-item .match-status .badge {
    font-size: 0.68rem;
    padding: 0.2em 0.5em;
    font-weight: 600;
    border-radius: 4px;
}

/* ====================================================
   INFO MESSAGE
   ==================================================== */

.pub-info-message {
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 1.25rem;
    color: var(--pub-text-dim);
    text-align: center;
    font-size: 0.9rem;
}

.pub-no-results-inline {
    text-align: center;
    color: var(--pub-text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0 0.5rem;
}

.pub-no-results-inline .pub-no-results-text {
    color: var(--pub-text-dim);
}

.pub-no-results-inline .pub-no-results-query {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ====================================================
   BACK TO TOP
   ==================================================== */

.pub-back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(12, 31, 69, 0.9);
    color: var(--pub-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s, transform 0.2s;
    z-index: 1000;
}

.pub-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.pub-back-to-top:hover {
    background: rgba(220, 242, 63, 0.15);
    color: #f0ff7a;
    transform: translateY(-2px);
}

/* ====================================================
   FOOTER
   ==================================================== */

.pub-footer {
    margin-top: 4rem;
    padding: 2.5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    color: var(--pub-text-dim);
}

.pub-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.pub-footer-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.pub-footer-logo-link {
    display: inline-block;
    line-height: 0;
}

.pub-footer-logo {
    height: 40px;
    width: auto;
    display: block;
}

.pub-footer-tagline {
    font-size: 0.8rem;
    color: var(--pub-text-muted);
    margin: 0;
    font-weight: 500;
}

.pub-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 1.5rem;
}

.pub-footer-link {
    color: var(--pub-accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.pub-footer-link:hover {
    color: #f0ff7a;
}

.pub-footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.pub-footer-copy {
    font-size: 0.8rem;
    color: var(--pub-text-muted);
    margin: 0;
    text-align: center;
}

.pub-footer-legal-line {
    font-size: 0.8rem;
    margin: 0.35rem 0 0;
    text-align: center;
}

.pub-footer-sep {
    margin: 0 0.35rem;
    color: rgba(255, 255, 255, 0.25);
}

.pub-footer-legal {
    color: var(--pub-accent);
    text-decoration: none;
}

.pub-footer-legal:hover {
    color: #f0ff7a;
    text-decoration: underline;
}

@media (min-width: 576px) {
    .pub-footer-inner {
        gap: 1.75rem;
    }
    .pub-footer-logo {
        height: 46px;
    }
    .pub-footer-tagline {
        font-size: 0.85rem;
    }
}

/* ====================================================
   PAGE MENTIONS LÉGALES (public)
   ==================================================== */

.pub-legal-section {
    padding: 2rem 0 3rem;
    max-width: 720px;
    margin: 0 auto;
}

.pub-legal-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.pub-legal-intro {
    color: var(--pub-text-dim);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.pub-legal-block {
    margin-bottom: 1.5rem;
}

.pub-legal-block h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.pub-legal-block p {
    color: var(--pub-text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}
.pub-legal-block p + p {
    margin-top: 0.7rem;
}

.pub-legal-block a {
    color: var(--pub-accent);
    text-decoration: none;
}

.pub-legal-block a:hover {
    text-decoration: underline;
}

.pub-nowrap {
    white-space: nowrap;
}

.pub-legal-update {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--pub-text-muted);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 992px) {
    .pub-hero {
        padding: 3rem 1rem 2rem;
    }

    .pub-org-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .pub-hero {
        padding: 2.5rem 1rem 1.5rem;
    }

    .pub-hero-title {
        font-size: 1.8rem;
    }

    .pub-org-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .pub-org-card {
        padding: 1.25rem;
    }

    .pub-org-header {
        padding: 2rem 1rem 1.5rem;
    }

    .pub-tournoi-header {
        padding: 1.5rem;
    }

    .pub-tournoi-header h1 {
        font-size: 1.3rem;
    }

    /* Onglets détail tournoi : empiler ou scroll horizontal sur mobile/tablette */
    .pub-detail-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 2px;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .pub-detail-tabs .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
    }

    .pub-section-card {
        padding: 1.25rem;
        border-radius: var(--pub-radius);
    }

    .pub-poule-card {
        padding: 1rem;
    }

    .pub-tournoi-card {
        padding: 1.25rem;
    }

    .pub-tournoi-card-top {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pub-tournoi-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pub-hero {
        padding: 2rem 0.75rem 1rem;
    }

    .pub-hero-title {
        font-size: 1.5rem;
    }

    .pub-hero-subtitle {
        font-size: 0.88rem;
    }

    .pub-org-card {
        padding: 1rem;
        gap: 1rem;
    }

    .pub-org-logo {
        width: 48px;
        height: 48px;
    }

    .pub-org-name {
        font-size: 1rem;
    }

    .pub-section-card {
        padding: 1rem;
    }

    .pub-ranking-table th,
    .pub-ranking-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }

    .pub-match-item {
        padding: 0.5rem;
        font-size: 0.82rem;
    }

    .pub-tournoi-header {
        padding: 1.25rem;
    }

    .pub-tournoi-header h1 {
        font-size: 1.15rem;
        word-break: break-word;
    }

    .pub-tournoi-header p {
        font-size: 0.85rem;
    }

    .pub-detail-tabs .nav-link {
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Container pages publiques */
body.public-page .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    body.public-page .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ── Matchs de classement TMC (page publique) ── */
.pub-tmc-section {
    margin-bottom: 1rem;
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.pub-tmc-section-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--pub-text);
    background: rgba(255, 255, 255, 0.04);
}

.pub-tmc-section-summary::-webkit-details-marker {
    display: none;
}

.pub-tmc-chevron {
    transition: transform 0.25s ease;
    font-size: 0.9rem;
    opacity: 0.85;
}

.pub-tmc-section:not([open]) .pub-tmc-chevron {
    transform: rotate(-90deg);
}

.pub-tmc-section-inner {
    padding: 0.75rem 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pub-tmc-bracket-wrap {
    margin-bottom: 0.75rem;
}

/* Desktop : largeur « normale » (contenu utile), pas colonnes étirées sur toute la page */
@media (min-width: 993px) {
    .pub-tmc-section .pub-tmc-bracket-wrap .BracketContainer {
        width: max-content;
        max-width: 100%;
        margin-left: 0;
        margin-right: auto;
    }

    .pub-tmc-section .pub-tmc-bracket-wrap .BracketTable {
        width: max-content;
        max-width: 100%;
        justify-content: flex-start;
    }

    .pub-tmc-section .pub-tmc-bracket-wrap .BracketColumn {
        flex: 0 0 124px;
        min-width: 124px;
        max-width: 124px;
    }
}

/* Grille des scores : largeur raisonnable, pas plein viewport sur grands écrans */
.pub-tmc-section .pub-tmc-scores .ScrBody {
    max-width: 56rem;
    margin-left: 0;
    margin-right: auto;
}

.pub-tmc-section .ScrGrid {
    max-width: 56rem;
}

.pub-tmc-section .tmc-match-non-jouable,
.pub-tmc-section .MobMatch.tmc-match-non-jouable-mob {
    opacity: 0.48;
}

.pub-tmc-scores {
    margin-top: 0.25rem;
}

.pub-tmc-mob-foot {
    justify-content: center !important;
}
/* Chiffres alignés dans les classements et les scores */
/* chiffres proportionnels avec Onest (ses chiffres à largeur fixe sont très espacés) ; largeur fixe gardée sur les sets et les heures */

/* ====================================================
   LANGAGE VISUEL DE L'ACCUEIL, appliqué à tout l'espace public
   Étiquette jaune + grand titre serré, sections à plat séparées par des filets,
   listes en lignes cliquables, onglets soulignés. Pas de cartes flottantes ni d'animations d'entrée.
   ==================================================== */
/* Contenu aligné sur la barre de navigation (même largeur que le logo) */
body.public-page main > .container { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 768px) { body.public-page main > .container { padding-left: 15px; padding-right: 15px; } }
body.public-page :focus-visible { outline: 2px solid var(--pub-accent); outline-offset: 3px; }

/* En-tête de page */
.pub-page-head {
    padding: clamp(2rem, 6vw, 4rem) 0 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--pub-border);
}
.pub-crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    color: var(--pub-text-dim);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}
.pub-crumb:hover { color: var(--pub-accent); }
.pub-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pub-accent);
}
.pub-page-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    font-size: clamp(1.75rem, 6.4vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--pub-text);
    margin: 0 0 1.75rem;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.pub-page-title em { font-style: normal; color: var(--pub-accent); }
.pub-facts { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin: 0; }
.pub-facts dt {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pub-text-muted);
    margin-bottom: 0.3rem;
}
.pub-facts dd { margin: 0; font-size: 1.08rem; font-weight: 600; color: var(--pub-text); font-variant-numeric: tabular-nums; }
.pub-facts a { color: var(--pub-accent); text-decoration: none; }
.pub-facts a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Identité du club */
.pub-org-id { display: flex; align-items: center; gap: 1.25rem; }
.pub-org-id .pub-page-title { margin-bottom: 1.5rem; }
.pub-org-id-logo {
    width: 64px;
    height: 64px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(242, 239, 230, 0.06);
    color: var(--pub-text-dim);
    font-size: 1.5rem;
}
.pub-org-id-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Liste de tournois en lignes (comme les résultats de recherche de l'accueil) */
.pub-list-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--pub-text);
    margin: 0 0 1.25rem;
}
.pub-list-title span { font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--pub-text-muted); font-variant-numeric: tabular-nums; }
.pub-tlist { list-style: none; margin: 0 0 4rem; padding: 0; border-top: 2px solid var(--pub-accent); }
.pub-trow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 0.5rem;
    border-bottom: 1px solid var(--pub-border);
    color: var(--pub-text);
    text-decoration: none;
    touch-action: manipulation;
    transition: background-color 0.15s ease;
}
.pub-trow:hover { background: rgba(220, 242, 63, 0.05); color: var(--pub-text); }
.pub-trow:hover .pub-trow-name { color: var(--pub-accent); }
.pub-trow-text { min-width: 0; }
.pub-trow-name { display: block; font-size: 1.12rem; font-weight: 700; overflow-wrap: anywhere; transition: color 0.15s ease; }
.pub-trow-meta { display: block; margin-top: 0.2rem; font-size: 0.88rem; color: var(--pub-text-dim); font-variant-numeric: tabular-nums; }
.pub-trow-arrow { color: var(--pub-accent); font-size: 1.1rem; }
.pub-empty { color: var(--pub-text-dim); font-size: 1.05rem; margin: 0 0 4rem; }

/* Badges de statut : étiquettes nettes, sans halo */
.pub-badge { border-radius: var(--pub-radius-sm); letter-spacing: 0.04em; }
.pub-badge-upcoming { background: rgba(110, 160, 245, 0.12); border-color: rgba(110, 160, 245, 0.25); }
.pub-badge-finished { background: rgba(242, 239, 230, 0.05); border-color: var(--pub-border); }

/* Onglets soulignés */
.pub-detail-tabs { gap: 0 1.75rem; border-bottom: 1px solid var(--pub-border); margin-bottom: 2rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pub-detail-tabs::-webkit-scrollbar { display: none; }
.pub-detail-tabs .nav-link,
.pub-detail-tabs .nav-link:hover,
.pub-detail-tabs .nav-link.active {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding: 0.85rem 0.1rem;
    white-space: nowrap;
}
.pub-detail-tabs .nav-link { color: var(--pub-text-dim); font-weight: 600; font-size: 0.98rem; }
.pub-detail-tabs .nav-link:hover { color: var(--pub-text); }
.pub-detail-tabs .nav-link.active { color: var(--pub-text); border-bottom-color: var(--pub-accent); }
.pub-detail-tabs .nav-link.active i { color: var(--pub-accent); }

/* Sections à plat */
.pub-section-card {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 3rem;
    animation: none;
}
.pub-section-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}
.pub-section-card h2::before { display: none; }
.pub-poule-card {
    background: rgba(242, 239, 230, 0.025);
    border: 1px solid var(--pub-border);
    border-top: 2px solid var(--pub-accent);
    border-radius: var(--pub-radius-sm);
    padding: 1.25rem 1.25rem 0.75rem;
}
.pub-poule-card h4 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--pub-text); }
.pub-poule-card-subtitle { color: var(--pub-text-dim); }
.pub-ranking-table th { color: var(--pub-text-muted); letter-spacing: 0.1em; }
.pub-tournoi-card, .pub-tournoi-header, .pub-org-header { animation: none; }
.pub-back-btn { background: none; border: 0; padding: 0; color: var(--pub-text-dim); }
.pub-back-btn:hover { background: none; color: var(--pub-accent); }

/* Pages légales */
.pub-legal-section { max-width: 44rem; margin: 0 auto; padding-top: clamp(2rem, 6vw, 4rem); }
.pub-legal-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.035em;
    text-align: left;
}
.pub-legal-intro { text-align: left; }
.pub-legal-block { border-top: 1px solid var(--pub-border); padding-top: 1.5rem; }

@media (max-width: 575.98px) {
    .pub-facts { gap: 1rem 2rem; }
    .pub-trow { grid-template-columns: minmax(0, 1fr) auto; }
    .pub-trow-arrow { display: none; }
    .pub-org-id { align-items: flex-start; }
    .pub-org-id-logo { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    body.public-page *, body.public-page *::before { animation: none !important; transition: none !important; }
}

/* ====================================================
   PAGE TOURNOI — « Les Résultats » (piste 4)
   Partenaires en haut, nom du tournoi, bandeau du moment, grands onglets numérotés.
   Tout est rangé sous .pub-t4 pour ne pas toucher la page ligue ni les autres pages.
   ==================================================== */
.pub-t4 { --t4-deep: #13284f; --t4-thin: rgba(242, 239, 230, 0.12); }
/* même largeur que la barre de navigation (logo aligné sur le titre) */
body.public-page .pub-t4 .container { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 768px) { body.public-page .pub-t4 .container { padding-left: 15px; padding-right: 15px; } }
.pub-t4 .pub-info-message { background: none; border: 0; border-top: 1px solid var(--t4-thin); border-radius: 0; padding: 1rem 0 0; margin-top: 2rem; text-align: left; color: var(--pub-text-dim); }
.t4-note { margin: -0.4rem 0 1rem; font-size: 0.9rem; color: var(--pub-text-muted); }

/* Ligue : sélecteur de journées J1, J2… */
.t4-jours { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 1.75rem; }
.t4-jours::-webkit-scrollbar { display: none; }
.t4-jour { flex: none; min-width: 52px; height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(242, 239, 230, 0.3); color: var(--pub-text); font-weight: 800; text-decoration: none; }
.t4-jour:hover { border-color: var(--pub-accent); color: var(--pub-accent); }
.t4-jour.is-on { background: var(--pub-accent); border-color: var(--pub-accent); color: var(--pub-ink); }

/* Partenaires : une ligne de logos sur fond papier ; défile en boucle quand elle déborde */
.pub-sponsors { background: #13284f; border-bottom: 1px solid rgba(242, 239, 230, 0.12); overflow: hidden; }
.pub-sponsors-track { display: flex; width: max-content; min-width: 100%; justify-content: center; }
.pub-sponsors-list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; flex: none; }
.pub-sponsor { flex: none; display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 clamp(6px, 0.8vw, 10px); }
.pub-sponsor img { background: #f2efe6; }
.pub-sponsor img { display: block; box-sizing: content-box; height: 36px; max-width: 140px; width: auto; padding: 6px 10px; object-fit: contain; }
.pub-sponsors.is-scrolling .pub-sponsors-track { justify-content: flex-start; animation: t4-defile var(--t4-duree, 30s) linear infinite; }
@keyframes t4-defile { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .pub-sponsors.is-scrolling { overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 575.98px) {
    .pub-sponsor { height: 56px; padding: 0 5px; }
    .pub-sponsor img { height: 28px; max-width: 100px; padding: 5px 8px; }
}

/* En-tête */
.t4-head { border-bottom: 1px solid var(--t4-thin); padding: 1.1rem 0 1.4rem; }
.t4-crumb { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--pub-text-dim); font-size: 0.9rem; font-weight: 500; text-decoration: none; margin-bottom: 0.6rem; }
.t4-crumb:hover { color: var(--pub-accent); }
.t4-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; flex-wrap: wrap; }
.t4-title { margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--pub-text); overflow-wrap: anywhere; }
.t4-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0; margin: 0; font-size: 0.92rem; color: var(--pub-text-dim); }
.t4-meta > span + span::before { content: "·"; margin: 0 0.5rem; color: var(--pub-text-muted); }
.t4-status { font-weight: 700; color: var(--pub-text); }
.t4-status--en_cours { color: var(--pub-accent); }

/* Bandeau du moment */
.t4-strip { background: var(--t4-deep); }
.t4-strip-label { margin: 0; padding-top: 1.1rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pub-accent); }
.t4-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.t4-tile { display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem; padding: 1rem 1.75rem 1.4rem; border-left: 1px solid var(--t4-thin); min-width: 0; }
.t4-tile:first-child { border-left: 0; padding-left: 0; }
.t4-big { font-size: clamp(2.6rem, 5.5vw, 4.5rem); line-height: 0.85; font-weight: 900; letter-spacing: -0.05em; color: var(--pub-accent); }
.t4-big small { font-size: 0.45em; letter-spacing: -0.02em; color: var(--pub-text-dim); }
.t4-big--text { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1; letter-spacing: -0.03em; color: var(--pub-text); }
.t4-tile-sub { font-size: 0.9rem; color: var(--pub-text-dim); }
.t4-fill { display: block; height: 5px; margin-top: 0.4rem; background: rgba(242, 239, 230, 0.1); }
.t4-fill > span { display: block; height: 100%; background: var(--pub-accent); }
.t4-podium li:nth-child(n+4) { display: none; }
.t4-podium .t4-tile { flex-direction: row; align-items: center; justify-content: flex-start; gap: 1.1rem; }
.t4-podium-team { font-size: 1.2rem; font-weight: 800; color: var(--pub-text); overflow-wrap: anywhere; }
.t4-podium-1 .t4-big { color: var(--pub-gold); }
.t4-podium-2 .t4-big { color: var(--pub-silver); }
.t4-podium-3 .t4-big { color: var(--pub-bronze); }

/* Grands onglets numérotés (01, 02…) : l'onglet ouvert est plein jaune */
.pub-t4 .pub-detail-tabs { counter-reset: t4tab; gap: 0; margin: 0 0 2rem; border-bottom: 1px solid var(--t4-thin); flex-wrap: nowrap; overflow-x: auto; }
.pub-t4 .pub-detail-tabs .nav-item { flex: 1 1 auto; min-width: 0; }
.pub-t4 .pub-detail-tabs .nav-link,
.pub-t4 .pub-detail-tabs .nav-link:hover,
.pub-t4 .pub-detail-tabs .nav-link.active {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0;
    padding: 1.1rem 1.4rem;
    border: 0;
    border-right: 1px solid var(--t4-thin);
    border-radius: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
}
.pub-t4 .pub-detail-tabs .nav-link { background: transparent; color: var(--pub-text); }
.pub-t4 .pub-detail-tabs .nav-link:hover { background: rgba(242, 239, 230, 0.04); }
.pub-t4 .pub-detail-tabs .nav-link.active { background: var(--pub-accent); color: var(--pub-ink); }
.pub-t4 .pub-detail-tabs .nav-link i { display: none; }
.pub-t4 .pub-detail-tabs .nav-link::before {
    counter-increment: t4tab;
    content: counter(t4tab, decimal-leading-zero);
    flex: none;
    font-size: 2.3rem;
    line-height: 0.8;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: rgba(242, 239, 230, 0.25);
}
.pub-t4 .pub-detail-tabs .nav-link.active::before { color: var(--pub-ink); }

/* Titres de section */
.t4-h2,
.pub-t4 .pub-section-card > h2 { display: flex; align-items: baseline; gap: 0.9rem; margin: 0.5rem 0 1rem; font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -0.02em; color: var(--pub-text); }
.t4-h2::after,
.pub-t4 .pub-section-card > h2::after { content: ""; flex: 1; height: 1px; background: var(--t4-thin); }
.t4-h2 span { color: var(--pub-text-muted); font-weight: 600; }
.pub-t4 .pub-section-card { margin-bottom: 2.5rem; }

/* Équipes inscrites */
.t4-inscrits { margin-top: 2rem; }
.t4-inscrits-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.5rem; margin: 0 0 3rem; padding: 0; list-style: none; }
.t4-inscrits-list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0; border-top: 1px solid var(--t4-thin); font-size: 1rem; }
.t4-n { width: 1.6rem; color: var(--pub-text-muted); }
.t4-inscrit-nom { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.t4-ts { font-size: 0.7rem; font-weight: 800; padding: 0.15rem 0.4rem; background: var(--pub-accent); color: var(--pub-ink); }

/* Poules : à plat, deux colonnes sur grand écran */
.pub-t4 .t4-poules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3.5rem; }
.pub-t4 .pub-poule-card { background: none; border: 0; border-top: 1px solid var(--t4-thin); border-radius: 0; padding: 1.25rem 0 1.5rem; margin: 0; min-width: 0; }
.pub-t4 .pub-poule-card h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 900; letter-spacing: -0.03em; }
.t4-poule-prog { font-size: 0.82rem; font-weight: 500; letter-spacing: 0; color: var(--pub-text-muted); white-space: nowrap; }
.t4-poule-bar { display: block; height: 4px; margin-bottom: 0.9rem; background: rgba(242, 239, 230, 0.1); }
.t4-poule-bar > span { display: block; height: 100%; width: 0; background: var(--pub-accent); }
.pub-t4 .pub-ranking-table { background: none; }
.pub-t4 .pub-ranking-table th { font-size: 0.7rem; }
.pub-t4 .pub-ranking-table td { font-size: 1rem; }
.pub-t4 .pub-matchs-toggle { border-radius: 0; }

/* Numéro fixe de l'équipe dans la poule (repère entre le classement et la grille) */
.t4-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 8px; border: 1px solid rgba(242, 239, 230, 0.3); font-size: 0.7rem; font-weight: 800; color: var(--pub-text-dim); vertical-align: 1px; flex: none; }
.t4-note { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--pub-text-muted); }

/* Grille des matchs repliable */
.t4-grille { margin-top: 0.9rem; border-top: 1px solid var(--t4-thin); }
.t4-grille > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; font-weight: 700; touch-action: manipulation; }
.t4-grille > summary::-webkit-details-marker { display: none; }
.t4-grille-compte { font-weight: 500; color: var(--pub-text-muted); }
.t4-grille-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0 0.85rem; border: 1px solid rgba(242, 239, 230, 0.3); font-size: 0.85rem; white-space: nowrap; }
.t4-grille > summary:hover .t4-grille-btn { border-color: var(--pub-accent); color: var(--pub-accent); }
.t4-grille-btn .bi { color: var(--pub-accent); transition: transform 0.15s ease; }
.t4-grille[open] .t4-grille-btn .bi { transform: rotate(180deg); }
.t4-grille-fermer, .t4-grille[open] .t4-grille-ouvrir { display: none; }
.t4-grille[open] .t4-grille-fermer { display: inline; }
.t4-grille-scroll { overflow-x: auto; }
.t4-grille-table { width: 100%; border-collapse: separate; border-spacing: 4px; margin: 0 -4px; }
.t4-grille-table thead th { font-size: 0.72rem; font-weight: 700; color: var(--pub-text-muted); text-align: center; padding: 0 0 2px; }
.t4-grille-table tbody th { font-weight: 600; text-align: left; white-space: nowrap; padding-right: 0.5rem; }
.t4-grille-nom { display: inline-block; max-width: 13rem; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.t4-cell { width: 4.2rem; height: 2.9rem; text-align: center; vertical-align: middle; font-size: 0.75rem; font-weight: 700; line-height: 1.2; color: var(--pub-text-muted); }
.t4-cell span { display: block; }
.t4-cell.is-win { background: rgba(220, 242, 63, 0.16); color: var(--pub-accent); }
.t4-cell--soi { background: repeating-linear-gradient(45deg, rgba(242, 239, 230, 0.06) 0 4px, transparent 4px 8px); }
.t4-cell--todo { border: 1px dashed rgba(242, 239, 230, 0.2); font-size: 0.68rem; font-weight: 500; }
.t4-rang-cell { width: 3.6rem; text-align: center; }
.t4-rang { display: inline-block; min-width: 2.8rem; padding: 0.25rem 0; border: 1px solid var(--t4-thin); font-weight: 900; color: var(--pub-text-dim); }
.t4-rang--1 { color: var(--pub-gold); }
.t4-rang--2 { color: var(--pub-silver); }
.t4-rang--3 { color: var(--pub-bronze); }
.t4-grille-aide { margin: 0.6rem 0 0.25rem; font-size: 0.78rem; color: var(--pub-text-muted); }
@media (max-width: 575.98px) {
    .t4-grille-nom { max-width: 5.5rem; }
    .t4-cell { width: 2.8rem; font-size: 0.68rem; }
    .t4-rang { min-width: 2.4rem; }
}

/* Lignes de résultats : équipe 1 | score | équipe 2 ; le vainqueur en gras, « à jouer » sinon */
.t4-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--t4-thin); font-size: 0.98rem; color: var(--pub-text-dim); }
.t4-m-eq1 { text-align: right; }
.t4-m-eq { overflow-wrap: anywhere; }
.t4-m-eq.is-win { color: var(--pub-text); font-weight: 700; }
.t4-m-score { display: flex; gap: 0.6rem; min-width: 5.5rem; justify-content: center; font-weight: 800; letter-spacing: 0.04em; color: var(--pub-accent); white-space: nowrap; }
.t4-m-todo { font-size: 0.8rem; font-weight: 600; letter-spacing: 0; color: var(--pub-text-muted); }
.t4-journee { margin-bottom: 3rem; }
.t4-journee .t4-match { font-size: 1.05rem; padding: 0.85rem 0; }
@media (max-width: 575.98px) {
    .t4-match { gap: 0.6rem; font-size: 0.9rem; }
    .t4-m-score { flex-direction: column; gap: 0; min-width: 3.2rem; }
}

@media (max-width: 991.98px) {
    .t4-inscrits-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .pub-t4 .t4-poules { grid-template-columns: minmax(0, 1fr); }
    .t4-inscrits-list { grid-template-columns: minmax(0, 1fr); }
    .t4-tile { padding: 0.8rem 0.9rem 1.1rem; }
    .t4-big { font-size: 2.2rem; }
    .t4-big--text { font-size: 1.15rem; }
    .t4-tile-sub { font-size: 0.78rem; }
    .t4-tiles:not(.t4-podium) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .t4-tiles:not(.t4-podium) .t4-tile:nth-child(3) { display: none; }
    .t4-podium { grid-template-columns: minmax(0, 1fr); }
    .t4-podium .t4-tile { padding: 0.7rem 0; border-left: 0; border-top: 1px solid var(--t4-thin); }
    .t4-podium .t4-tile:first-child { border-top: 0; }
    .t4-podium-team { font-size: 1.05rem; }
    .pub-t4 .pub-detail-tabs { margin-left: -1.25rem; margin-right: -1.25rem; }
    .pub-t4 .pub-detail-tabs .nav-item { flex: none; }
    .pub-t4 .pub-detail-tabs .nav-link { white-space: nowrap; }
    .pub-t4 .pub-detail-tabs .nav-link,
    .pub-t4 .pub-detail-tabs .nav-link:hover,
    .pub-t4 .pub-detail-tabs .nav-link.active { padding: 0.85rem 1.1rem; font-size: 1rem; gap: 0.7rem; }
    .pub-t4 .pub-detail-tabs .nav-link::before { font-size: 1.8rem; }
}

/* ====================================================
   TABLEAU EN ARBRE RELIÉ (« T4 ») + MATCHS DE CLASSEMENT EN MINI-TABLEAUX
   Remplace l'affichage des fichiers bracket sur la page publique ; mêmes données.
   ==================================================== */
.t4a { --W: 230px; --G: 44px; --line: rgba(242, 239, 230, 0.22); margin-bottom: 1.5rem; }
.t4a[data-cols="4"] { --W: 205px; }
.t4a[data-cols="5"], .t4a[data-cols="6"] { --W: 178px; --G: 34px; }
.t4a--mini { --W: 210px; --G: 36px; margin-bottom: 0.5rem; }
.t4a-viewport { overflow-x: auto; padding-bottom: 4px; }
.t4a-tree { display: flex; gap: var(--G); width: max-content; }
.t4a-col { width: var(--W); flex: none; display: flex; flex-direction: column; }
.t4a-col--champ { width: 190px; }
.t4a-head { height: 1.6rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pub-text-muted); white-space: nowrap; }
.t4a-col:nth-last-child(2) .t4a-head, .t4a--mini .t4a-col:last-child .t4a-head { color: var(--pub-accent); }
.t4a-body { flex: 1; display: flex; flex-direction: column; }
.t4a-cell { flex: 1 1 0; display: flex; align-items: center; position: relative; padding: 0.5rem 0; }
.t4a-match { position: relative; width: 100%; background: var(--t4-deep, #13284f); border: 1px dashed rgba(242, 239, 230, 0.25); }
.t4a-match.is-played { border-style: solid; border-color: var(--t4-thin, rgba(242, 239, 230, 0.12)); }
.t4a-team { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 1.9rem; padding: 0 0.6rem; font-size: 0.88rem; color: var(--pub-text); }
.t4a-team + .t4a-team { border-top: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); }
.t4a-match.is-played .t4a-team { color: var(--pub-text-muted); }
.t4a-match.is-played .t4a-team.is-win { color: var(--pub-text); font-weight: 700; background: rgba(220, 242, 63, 0.12); }
.t4a-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t4a-name--vide { font-style: italic; color: var(--pub-text-muted); }
.t4a-sets { display: flex; font-weight: 800; font-variant-numeric: tabular-nums; }
.t4a-sets span { width: 1.25rem; text-align: center; }
/* chaque set : le score le plus haut en jaune, l'autre en gris */
.t4a-sets span { color: var(--pub-text-muted); }
.t4a-sets span.is-set { color: var(--pub-accent); }
.t4a-tag { display: block; padding: 0.2rem 0.6rem; border-bottom: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); color: var(--pub-accent); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
/* traits : sortie du match, montant/descendant vers son voisin, entrée dans le match suivant */
/* un seul élément par match : le trait qui sort + le demi-trait vertical, angle compris (les morceaux se raccordent au pixel) */
.t4a-col.has-next .t4a-cell::after { content: ""; position: absolute; left: 100%; width: calc(var(--G) / 2); box-sizing: border-box; border-right: 2px solid var(--line); }
.t4a-col.has-next .t4a-cell:nth-child(odd)::after { top: calc(50% - 1px); height: calc(50% + 1px); border-top: 2px solid var(--line); }
.t4a-col.has-next .t4a-cell:nth-child(even)::after { top: 0; height: calc(50% + 1px); border-bottom: 2px solid var(--line); }
/* le trait qui entre dans le match suivant part exactement du trait vertical */
.t4a-col.has-prev .t4a-match::before { content: ""; position: absolute; right: 100%; top: calc(50% - 1px); width: calc(var(--G) / 2 + 1px); border-top: 2px solid var(--line); }
.t4a-col.has-next .t4a-cell.is-done::after { border-color: var(--pub-accent); }
/* case « Vainqueurs » au bout du tableau principal */
.t4a-col--champ .t4a-cell::before { content: ""; position: absolute; right: 100%; top: 50%; width: var(--G); border-top: 2px solid var(--line); }
.t4a-champ { width: 100%; min-height: 5rem; display: flex; flex-direction: column; justify-content: center; padding: 0.75rem 1rem; border: 1px dashed rgba(242, 239, 230, 0.25); color: var(--pub-text-muted); }
.t4a-champ span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.t4a-champ.is-set { background: var(--pub-accent); border: 0; color: var(--pub-ink); }
.t4a-champ strong { margin-top: 0.3rem; font-size: 1.2rem; line-height: 1.15; font-weight: 900; }
.t4a-col--champ:has(.is-set) .t4a-cell::before { border-color: var(--pub-accent); }
/* bas du tableau : les deux places données par le dernier match */
.t4a-champ--places { gap: 0.35rem; }
.t4a-champ .t4a-place { font-size: 1.05rem; font-weight: 800; letter-spacing: 0; text-transform: none; line-height: 1.2; }
.t4a-champ .t4a-place b { display: inline-block; min-width: 2.4rem; font-weight: 900; }
.t4a-champ .t4a-place + .t4a-place { font-weight: 600; opacity: 0.75; }
/* match qui se joue à côté (ex. 7e place) : rangé sous le mini-tableau */
.t4a-side { display: flex; gap: var(--G); margin-top: 1rem; }
.t4a-champ-mobile { display: none; }
@media (max-width: 767.98px) {
    .t4a-cell--fin { flex-direction: column; align-items: stretch; justify-content: center; }
    .t4a-champ-mobile { display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.6rem; min-height: 0; margin-top: 0.5rem; padding: 0.45rem 0.6rem; }
    .t4a-champ-mobile span { font-size: 0.62rem; }
    .t4a-champ-mobile strong { margin-top: 0; font-size: 0.95rem; }
    .t4a-champ-mobile { justify-content: flex-start; }
    .t4a-champ-mobile .t4a-place { font-size: 0.85rem; }
    .t4a-champ-mobile .t4a-place b { min-width: 0; margin-right: 0.25rem; }
}
/* téléphone : une phase à la fois, la suivante dépasse à droite, on glisse */
.t4a-phases { display: flex; gap: 2px; margin: 0 -1.25rem 0.9rem 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); }
.t4a-phases::-webkit-scrollbar { display: none; }
.t4a-phases button { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.4rem 0.75rem 0.5rem; color: var(--pub-text-muted); font: 800 0.95rem 'Onest', sans-serif; text-align: left; }
.t4a-phases button small { display: block; font-size: 0.7rem; font-weight: 500; }
.t4a-phases button[aria-pressed="true"] { color: var(--pub-text); border-bottom-color: var(--pub-accent); }
@media (max-width: 767.98px) {
    .pub-t4 .t4a { --W: calc(100vw - 2.5rem - 5rem); --G: 1.25rem; }
    .t4a-phases:not([hidden]) + .t4a-viewport .t4a-head { display: none; }
    /* un seul tableau : on le fait défiler de côté, il se cale sur chaque phase ; un bout de la phase d'avant reste visible */
    /* le geste est géré par le script : le tableau suit le doigt et avance d'une seule phase à la fois */
    .t4a-viewport { overflow-x: hidden; margin-right: -1.25rem; touch-action: pan-y; overscroll-behavior-x: contain; }
    .t4a-tree { padding-right: 1.25rem; }
    /* la case « Vainqueurs » passe en bandeau au-dessus du tableau (elle sortait de l'écran à droite) */
    .t4a-col--champ { display: none; }
    /* place libre à droite : la dernière phase peut se caler au bord gauche comme les autres */
    .t4a-tree { padding-right: calc(100vw - var(--W) - 2.5rem - 28px); } /* recalculé au pixel près par le script */
    .t4a--mini .t4a-phases { margin-right: 0; }
}

/* Sections des matchs de classement (repliables, comme avant) */
.t4s { border-top: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); }
.t4s > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; touch-action: manipulation; }
.t4s > summary::-webkit-details-marker { display: none; }
.t4s-label { display: block; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 900; letter-spacing: -0.02em; color: var(--pub-text); }
.t4s-pf { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pub-accent); margin-left: 0.4rem; }
.t4s-etat { display: block; font-size: 0.85rem; color: var(--pub-text-muted); }
.t4s:hover .t4-grille-btn { border-color: var(--pub-accent); color: var(--pub-accent); }
.t4s[open] .t4-grille-btn .bi { transform: rotate(180deg); }
.t4s[open] .t4-grille-ouvrir { display: none; }
.t4s[open] .t4-grille-fermer { display: inline; }
.t4s-places { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin: -0.3rem 0 0.8rem; font-size: 0.9rem; }
.t4s-places:empty { display: none; }
.t4s-places b { color: var(--pub-accent); }
.t4s-inner { padding: 0.75rem 0 1.25rem; }
/* sous-onglets du bas du tableau : simples, sans gros numéros */
.pub-t4 .pub-bas-tableau-subtabs { counter-reset: none; margin-bottom: 1rem; }
.pub-t4 .pub-bas-tableau-subtabs .nav-item { flex: none; }
.pub-t4 .pub-bas-tableau-subtabs .nav-link, .pub-t4 .pub-bas-tableau-subtabs .nav-link:hover, .pub-t4 .pub-bas-tableau-subtabs .nav-link.active { width: auto; padding: 0.6rem 1rem; border-right: 0; border-bottom: 2px solid transparent; font-size: 0.95rem; background: none; color: var(--pub-text-dim); }
.pub-t4 .pub-bas-tableau-subtabs .nav-link.active { color: var(--pub-text); border-bottom-color: var(--pub-accent); }
.pub-t4 .pub-bas-tableau-subtabs .nav-link::before { content: none; }

/* Classement du tournoi : podium en marches, puis les autres places en deux colonnes */
.t4k-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; max-width: 640px; margin: 0.5rem auto 2.2rem; padding: 0; list-style: none; }
.t4k-marche { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.t4k-equipe { margin-bottom: 0.5rem; text-align: center; font-size: 1.15rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.t4k-equipe:empty::before { content: "à déterminer"; font-style: italic; font-weight: 500; color: var(--pub-text-muted); }
.t4k-bloc { display: flex; justify-content: center; padding-top: 0.6rem; font-size: 3.4rem; line-height: 1; font-weight: 900; background: var(--t4-deep, #13284f); border: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); }
.t4k-marche--1 .t4k-bloc { height: 150px; background: var(--pub-accent); border-color: var(--pub-accent); color: var(--pub-ink); }
.t4k-marche--2 .t4k-bloc { height: 110px; color: var(--pub-silver); }
.t4k-marche--3 .t4k-bloc { height: 84px; color: var(--pub-bronze); }
.t4k-liste { columns: 2; column-gap: 3.5rem; margin: 0 0 3rem; padding: 0; list-style: none; }
.t4k-liste li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); align-items: center; padding: 0.75rem 0; border-top: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); break-inside: avoid; }
.t4k-rang { font-size: 1.35rem; font-weight: 900; color: var(--pub-text-dim); }
.t4k-nom { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
    .t4k-podium { max-width: 380px; }
    .t4k-equipe { font-size: 0.9rem; }
    .t4k-bloc { font-size: 2.1rem; }
    .t4k-marche--1 .t4k-bloc { height: 93px; }
    .t4k-marche--2 .t4k-bloc { height: 68px; }
    .t4k-marche--3 .t4k-bloc { height: 52px; }
    .t4k-liste { columns: 1; }
}


/* Téléphone : tous les onglets visibles d'un coup, sans glisser de côté (numéro au-dessus, nom dessous) */
@media (max-width: 767.98px) {
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs) { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin-left: 0; margin-right: 0; overflow: visible; border-bottom: 0; border-top: 1px solid var(--t4-thin); border-left: 1px solid var(--t4-thin); }
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs):has(> .nav-item:nth-child(4)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs) .nav-item { flex: none; min-width: 0; }
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs) .nav-link,
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs) .nav-link:hover,
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs) .nav-link.active { height: 100%; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0.3rem; padding: 0.6rem 0.65rem 0.7rem; white-space: normal; font-size: 0.82rem; line-height: 1.15; border-bottom: 1px solid var(--t4-thin); }
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs) .nav-link::before { font-size: 1.45rem; }
}

/* Onglet Programme (« S3 ») : étapes numérotées, une carte par match ; heure, terrain et date seulement s'ils sont remplis */
.t4p-bloc { border-top: 1px solid var(--t4-thin, rgba(242, 239, 230, 0.12)); }
.t4p-bloc[open] { padding-bottom: 1.25rem; }
.t4p-etape { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 0; list-style: none; cursor: pointer; touch-action: manipulation; }
.t4p-etape::-webkit-details-marker { display: none; }
.t4p-etape h3 { flex: 1; }
.t4p-etape:hover .t4-grille-btn { border-color: var(--pub-accent); color: var(--pub-accent); }
.t4p-bloc[open] .t4-grille-btn .bi { transform: rotate(180deg); }
.t4p-bloc[open] .t4-grille-ouvrir { display: none; }
.t4p-bloc[open] .t4-grille-fermer { display: inline; }
.t4p-num { font-size: 3rem; line-height: 0.8; font-weight: 900; letter-spacing: -0.05em; color: var(--pub-accent); }
.t4p-etape h3 { margin: 0; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em; color: var(--pub-text); }
.t4p-grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.t4p-carte { min-width: 0; padding: 0.65rem 0.75rem 0.75rem; background: var(--t4-deep, #13284f); }
.t4p-carte.is-played { opacity: 0.6; }
.t4p-quand { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.2rem; }
.t4p-heure { font-size: 1.2rem; font-weight: 800; color: var(--pub-text); font-variant-numeric: tabular-nums; }
.t4p-jour { text-transform: capitalize; }
.t4p-terrain { font-size: 0.78rem; font-weight: 700; color: var(--pub-text-dim); white-space: nowrap; }
.t4p-poule + .t4p-poule { margin-top: 1rem; }
.t4p-poule-titre { margin: 0 0 0.45rem; font-size: 1.05rem; font-weight: 900; letter-spacing: -0.01em; color: var(--pub-text); }
.t4p-etiquette:empty { display: none; }
.t4p-etiquette { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pub-accent); margin-bottom: 0.25rem; }
.t4p-match { font-size: 0.9rem; line-height: 1.35; color: var(--pub-text-muted); overflow-wrap: anywhere; }
.t4p-match b { color: var(--pub-text); }
.t4p-match i { color: var(--pub-text-muted); }
.t4p-match .is-win { color: var(--pub-text); font-weight: 700; }
.t4p-score { color: var(--pub-accent) !important; white-space: nowrap; margin: 0 0.2rem; }
.t4p-contre { margin: 0 0.25rem; }
@media (max-width: 991.98px) { .t4p-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .t4p-grille { grid-template-columns: minmax(0, 1fr); }
    .t4p-num { font-size: 2.2rem; }
    .t4p-etape h3 { font-size: 1.3rem; }
}


/* Ordinateur, 5 onglets ou plus : numéro au-dessus, nom dessous sur deux lignes si besoin (plus rien de coupé) */
@media (min-width: 768px) {
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs):has(> .nav-item:nth-child(5)) .nav-item { flex: 1 1 0; min-width: 0; }
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs):has(> .nav-item:nth-child(5)) .nav-link,
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs):has(> .nav-item:nth-child(5)) .nav-link:hover,
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs):has(> .nav-item:nth-child(5)) .nav-link.active { height: 100%; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0.35rem; padding: 0.8rem 0.9rem 0.9rem; white-space: normal; font-size: 0.98rem; line-height: 1.15; overflow-wrap: break-word; }
    .pub-t4 .pub-detail-tabs:not(.pub-bas-tableau-subtabs):has(> .nav-item:nth-child(5)) .nav-link::before { font-size: 1.9rem; }
}
