/* ====================================================
   MyPadel Abidjan — Public
   Immersive dark sport experience
   Règle : pas d’emoji côté public, uniquement icônes SVG / Bootstrap Icons.
   ==================================================== */

/* ── Skip link (a11y) ── */
.skip-link:focus {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: var(--pub-accent, #00f5a0);
    color: #0d1117;
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    text-decoration: none;
}

:root {
    /* Premium palette */
    --pub-bg: #06080d;
    --pub-bg-alt: #0a0e18;
    --pub-surface: rgba(12, 18, 32, 0.85);
    --pub-surface-hover: rgba(18, 28, 48, 0.92);
    --pub-surface-light: rgba(20, 30, 50, 0.7);
    --pub-border: rgba(255, 255, 255, 0.06);
    --pub-border-hover: rgba(255, 255, 255, 0.14);
    --pub-glass: rgba(255, 255, 255, 0.03);

    /* Accent neon */
    --pub-accent: #00f5a0;
    --pub-accent-dim: #00d4aa;
    --pub-accent-glow: rgba(0, 245, 160, 0.15);
    --pub-accent-glow-strong: rgba(0, 245, 160, 0.35);

    /* 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: #00f5a0;
    --pub-upcoming: #54a0ff;
    --pub-finished: rgba(255, 255, 255, 0.35);
    --pub-danger: #ff5252;

    /* Text */
    --pub-text: #e6e9f0;
    --pub-text-dim: rgba(255, 255, 255, 0.5);
    --pub-text-muted: rgba(255, 255, 255, 0.3);

    /* Spacing */
    --pub-radius: 12px;
    --pub-radius-sm: 8px;
    --pub-radius-lg: 20px;
    --pub-radius-xl: 28px;
}

/* ====================================================
   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(0, 245, 160, 0.6);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 245, 160, 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;
}

body.public-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(0, 245, 160, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 80% 100%, rgba(0, 100, 255, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0, 245, 160, 0.02) 0%, transparent 50%),
        linear-gradient(170deg, #060810 0%, #0a0f1e 30%, #080c16 60%, #050710 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;
}

/* ====================================================
   NAVBAR PUBLIC — même structure et placement que navbar organisateur
   ==================================================== */

/* Container navbar : hérite de style.css (même place partout), pas de surcharge */

body.public-page .navbar {
    min-height: 56px;
    background: rgba(8, 12, 22, 0.96) !important;
    backdrop-filter: blur(30px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.4) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
    padding: 0.4rem 0 !important; /* identique à admin pour logo à la même place */
}

body.public-page .navbar.scrolled {
    background: rgba(6, 8, 13, 0.95) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Logo navbar : aucune surcharge — style.css gère la taille partout (28px / 26px / 24px selon breakpoint) */

body.public-page .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.2s ease !important;
}

body.public-page .navbar-nav .nav-link:hover {
    color: #fff !important;
    background: transparent !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: radial-gradient(circle, rgba(0, 245, 160, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: pub-glow-pulse 4s ease-in-out infinite;
}

.pub-hero-title {
    font-family: 'Outfit', 'Inter', 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;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 40%, var(--pub-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: 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 : cases tournois moins larges, plus de marge */
    body.public-page .container.pub-organisateur-detail {
        max-width: 640px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.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: 50px;
    color: var(--pub-text);
    font-size: 0.92rem;
    font-family: 'Inter', 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(0, 245, 160, 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(0, 245, 160, 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(0, 245, 160, 0.3);
    box-shadow: 0 0 20px rgba(0, 245, 160, 0.1);
}

.pub-org-logo img {
    width: 65%;
    height: 65%;
    object-fit: contain;
}

.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: 'Outfit', 'Inter', 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: radial-gradient(circle, rgba(0, 245, 160, 0.06) 0%, transparent 70%);
    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: 65%;
    height: 65%;
    object-fit: contain;
}

.pub-org-header-logo svg {
    width: 50%;
    height: 50%;
    color: var(--pub-text-dim);
}

.pub-org-header-name {
    font-family: 'Outfit', 'Inter', 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: 50px;
    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: 'Outfit', 'Inter', 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: 'Outfit', 'Inter', 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: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.pub-badge-live {
    background: rgba(0, 245, 160, 0.12);
    color: var(--pub-live);
    border: 1px solid rgba(0, 245, 160, 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(0, 245, 160, 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-tournoi-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pub-accent), rgba(0, 245, 160, 0.2), transparent);
}

.pub-screen-brand {
    font-family: 'Outfit', 'Inter', 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: 'Outfit', 'Inter', 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(0, 245, 160, 0.08);
    border-color: rgba(0, 245, 160, 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;
}

/* ====================================================
   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: 'Outfit', 'Inter', 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: 'Outfit', 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

/* ====================================================
   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);
}

/* Rang 1 : or */
.pub-ranking-table tbody tr:first-child td:first-child {
    color: var(--pub-gold);
    font-weight: 800;
}

.pub-ranking-table tbody tr:first-child td {
    border-bottom-color: rgba(255, 215, 0, 0.1);
}

/* Rang 2 : argent */
.pub-ranking-table tbody tr:nth-child(2) td:first-child {
    color: var(--pub-silver);
    font-weight: 700;
}

.pub-ranking-table tbody tr:nth-child(2) td {
    border-bottom-color: rgba(192, 192, 192, 0.12);
}

/* Rang 3 : bronze */
.pub-ranking-table tbody tr:nth-child(3) td:first-child {
    color: var(--pub-bronze);
    font-weight: 700;
}

.pub-ranking-table tbody tr:nth-child(3) 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(14, 22, 34, 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(0, 245, 160, 0.15);
    color: #00f5c4;
    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: 28px;
    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: #00f5c4;
}

.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: #00f5c4;
    text-decoration: underline;
}

@media (min-width: 576px) {
    .pub-footer-inner {
        gap: 1.75rem;
    }
    .pub-footer-logo {
        height: 32px;
    }
    .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: 'Outfit', 'Inter', 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: 'Outfit', 'Inter', 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 a {
    color: var(--pub-accent);
    text-decoration: none;
}

.pub-legal-block a:hover {
    text-decoration: underline;
}

.pub-legal-update {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--pub-text-muted);
}

/* ====================================================
   PAGE CONTACT (public)
   ==================================================== */

.pub-contact-section {
    padding: 2.5rem 0 3rem;
    max-width: 480px;
    margin: 0 auto;
}

.pub-contact-brand {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pub-accent);
    margin: 0 0 0.5rem;
    text-align: center;
}
.pub-contact-brand .pub-brand-logo {
    height: 1.5rem;
    width: auto;
    display: inline-block;
}

.pub-contact-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-align: center;
}

.pub-contact-intro {
    color: var(--pub-text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.pub-contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
}

.pub-contact-form .form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--pub-text);
}
.pub-contact-form .form-control::placeholder {
    color: var(--pub-text-muted);
}
.pub-contact-form .form-label {
    color: var(--pub-text-dim);
    font-size: 0.9rem;
}

.pub-contact-submit {
    margin-top: 0.5rem;
    background: var(--pub-accent);
    border: none;
    color: #0d1117;
    font-weight: 600;
}
.pub-contact-submit:hover {
    background: #3ee0a8;
    color: #0d1117;
}

.pub-contact-whatsapp-block {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.pub-contact-whatsapp-block-inside {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-top: 0;
    padding-bottom: 1.25rem;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pub-contact-whatsapp-label {
    font-size: 0.8rem;
    color: var(--pub-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}
.pub-contact-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #25d366;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    transition: background 0.2s, transform 0.15s;
}
.pub-contact-whatsapp-btn:hover {
    background: #20bd5a;
    color: #fff;
    transform: translateY(-1px);
}
.pub-contact-whatsapp-icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ====================================================
   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 (sauf la navbar : voir ci-dessous) */
body.public-page .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    max-width: 100%;
}

/* Navbar : même container que admin (forcer avec !important pour mobile/tablette) */
body.public-page .navbar .container {
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

@media (min-width: 768px) {
    body.public-page .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    body.public-page .navbar .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Mêmes paddings responsives que admin à chaque breakpoint */
@media (max-width: 992px) {
    body.public-page .navbar .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
@media (max-width: 768px) {
    body.public-page .navbar .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    body.public-page .navbar {
        padding: 0.3rem 0 !important;
    }
}
@media (max-width: 480px) {
    body.public-page .navbar .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}