/* ============================================================
   TCV Tournois — Styles de base (Tailwind complète le reste)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #f0f4f8;
    color: #1a1f2e;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow', system-ui, sans-serif;
    font-weight: 700;
}

.tcv-header-bg {
    background: linear-gradient(135deg, #0d6e3f 0%, #0a4f2c 55%, #073d22 100%);
}

.admin-nav-bg {
    background: #094f2d;
}

/* ---- Radio pill filters (barre horizontale) -------------- */
.filter-pills input[type="radio"] { display: none; }

.filter-pills label {
    display: inline-block;
    padding: .3rem .85rem;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid #e5e9ef;
    color: #6b7280;
    background: #fff;
    transition: all .18s ease;
    user-select: none;
    white-space: nowrap;
}

.filter-pills label:hover {
    border-color: #0d6e3f;
    color: #0d6e3f;
    background: #e8f5ee;
}

.filter-pills input[type="radio"]:checked + label,
.filter-pills label.active {
    background: #0d6e3f;
    border-color: #0d6e3f;
    color: #fff;
    font-weight: 600;
}

/* ---- Dropdown catégories --------------------------------- */
.filter-cat-check {
    accent-color: #0d6e3f;
    width: .875rem;
    height: .875rem;
    flex-shrink: 0;
}

/* ---- Sélecteur de vue (cartes / tableau / agenda) -------- */
.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .375rem;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all .18s ease;
    line-height: 0;
}

.view-btn:hover {
    color: #0d6e3f;
    background: #fff;
}

.view-btn.active {
    color: #0d6e3f;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* ---- Badge statut (tableau + agenda) --------------------- */
.status-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Carte filtres JS ------------------------------------ */
.tournament-card.hidden { display: none !important; }

/* ---- Description tronquée à 2 lignes -------------------- */
.desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Alpine.js — cache les éléments avant initialisation */
[x-cloak] { display: none !important; }

/* ---- Barre de disponibilité (inline) --------------------- */
.avail-bar {
    display: inline-flex;
    flex-direction: column;
    min-width: 140px;
    max-width: 100%;
    margin-bottom: .5rem;
}

/* ---- Calendrier agenda ------------------------------------ */
.cal-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f0f9f4;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.cal-header-cell {
    padding: .35rem 0;
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    color: #0d6e3f;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid #e9ecef;
    border-top: 1px solid #e9ecef;
}

.cal-day {
    min-height: 80px;
    padding: .25rem .3rem;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    vertical-align: top;
    box-sizing: border-box;
}

.cal-day--empty {
    background: #f9fafb;
}

.cal-day--today {
    background: #f0f9f4;
}

.cal-day--last-row { border-bottom: none; }
.cal-day--last-col { border-right: none; }

.cal-day-num {
    display: block;
    font-size: .7rem;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1.6;
}

.cal-day-num--today {
    color: #0d6e3f;
    font-weight: 700;
}

.cal-marker {
    display: block;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: .68rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-top: 2px;
    border: none;
    cursor: pointer;
    transition: filter .12s ease;
    line-height: 1.5;
}

.cal-marker:hover {
    filter: brightness(.92);
}
