/* ============================================
   ACCUEIL — hub « Que veux-tu faire ? » (maquette v2, variante A)
   Page : /accueil
   Prefixe : acc-
   ============================================ */

.acc-page {
    max-width: 1280px;
    margin: 0 auto;
}

/* === EN-TETE : titre, recherche, raccourcis === */
.acc-hero {
    text-align: center;
    padding: 24px 0 6px;
}

.acc-hero-title {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 26px;
    font-weight: 700;
}

.acc-hero-text {
    margin: 4px 0 12px;
    color: var(--color-text-muted);
}

.acc-search {
    max-width: 640px;
    margin: 0 auto 10px;
}

.acc-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.acc-chip,
.acc-chip:visited {
    padding: 5px 11px;
    border: 1px solid var(--color-border-strong);
    border-radius: 20px;
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.acc-chip:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-subtle);
}

/* === GRILLES ET SOUS-TITRES === */
.acc-sub {
    margin: 22px 0 8px;
    color: var(--color-text-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.acc-grid {
    display: grid;
    gap: 14px;
}

.acc-grid--3 { grid-template-columns: repeat(3, 1fr); }
.acc-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* === TUILE === */
.acc-tile,
.acc-tile:visited {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border-strong);
    border-radius: 12px;
    background: var(--color-bg-surface-alt);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

a.acc-tile:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-bg-elevated);
}

.acc-tile-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-primary-subtle);
    color: var(--color-primary-soft);
}

.acc-tile-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.acc-tile-title {
    color: var(--color-text-primary);
    font-size: 15.5px;
}

.acc-tile-text {
    color: var(--color-text-secondary);
    font-size: 12.5px;
}

.acc-tile-figure {
    margin-top: 2px;
    color: var(--color-success-text);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* === BLOC PREMIUM (accent or = jeton « warning », comme les pastilles Premium) === */
.acc-band {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(var(--color-warning-rgb), 0.4);
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 0 0, rgba(var(--color-warning-rgb), 0.12), transparent 60%),
        var(--color-bg-surface);
}

.acc-band-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.acc-band-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--color-text-primary);
    font-size: 17px;
}

.acc-band-title svg { color: var(--color-warning-text); }

.acc-band-text {
    margin: 2px 0 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

.acc-btn,
.acc-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* a.acc-btn : passe devant la couleur des liens de 01-reset.css */
a.acc-btn--gold,
a.acc-btn--gold:visited,
a.acc-btn--gold:hover {
    background: var(--color-warning);
    color: var(--color-warning-subtle);
}

a.acc-btn--ghost,
a.acc-btn--ghost:visited,
a.acc-btn--ghost:hover {
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.acc-tile--premium,
.acc-tile--premium:visited {
    border-color: rgba(var(--color-warning-rgb), 0.4);
    background:
        linear-gradient(160deg, rgba(var(--color-warning-rgb), 0.10), transparent 55%),
        var(--color-bg-surface);
}

a.acc-tile--premium:hover {
    border-color: var(--color-warning);
    background:
        linear-gradient(160deg, rgba(var(--color-warning-rgb), 0.16), transparent 55%),
        var(--color-bg-surface);
}

.acc-tile--premium .acc-tile-icon {
    background: var(--color-warning-subtle);
    color: var(--color-warning-text);
}

.acc-tile--premium .acc-tile-figure { color: var(--color-warning-text); }

.acc-tags {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 4px;
}

.acc-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.acc-pill--gold {
    border: 1px solid rgba(var(--color-warning-rgb), 0.4);
    background: var(--color-warning-subtle);
    color: var(--color-warning-text);
}

.acc-pill--soon {
    background: var(--color-bg-surface-alt);
    color: var(--color-text-secondary);
}

/* Apercu d'exemple, floute sous « Reserve Premium » */
.acc-pv {
    position: relative;
    overflow: hidden;
    margin-top: auto;
    padding: 8px 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 9px;
    background: var(--color-bg-page);
    font-size: 12px;
}

.acc-pv-in {
    filter: blur(3px);
    opacity: 0.55;
    user-select: none;
}

.acc-pv::after {
    content: attr(data-lock);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(var(--color-bg-page-rgb), 0.35);
    color: var(--color-warning-text);
    font-size: 12px;
    font-weight: 700;
}

.acc-pv-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
    color: var(--color-text-muted);
}

.acc-pv-row strong {
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.acc-spark {
    height: 44px;
    background: linear-gradient(to bottom, var(--color-success-text), transparent);
    opacity: 0.6;
}

/* === BANDE DES MATCHS === */
.acc-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.acc-strip::-webkit-scrollbar { display: none; }

.acc-strip-game,
.acc-strip-game:visited {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    background: var(--color-bg-surface-alt);
    color: var(--color-text-primary);
    font-size: 12.5px;
    text-decoration: none;
}

a.acc-strip-game:hover { border-color: var(--color-primary-hover); }

.acc-strip-game small { color: var(--color-text-muted); }

.acc-strip-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* === TUILES + CARTE DES EQUIPES (components/accueil/team_map.py, assets/team-map.js) ===
   Tuiles a gauche sur deux colonnes, carte a droite. Sans carte (donnee indisponible),
   les tuiles reprennent toute la largeur sur trois colonnes. */
.acc-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
    gap: 18px;
    align-items: start;
}
.acc-split:not(:has(.acc-map)) { grid-template-columns: minmax(0, 1fr); }
.acc-split:has(.acc-map) .acc-grid--3 { grid-template-columns: 1fr 1fr; }

.tm-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border-strong);
    border-radius: 12px;
    background: radial-gradient(120% 90% at 50% 0%, var(--color-bg-elevated) -40%, var(--color-bg-surface) 55%, var(--color-bg-page) 130%);
    box-shadow: var(--shadow-sm);
}
.tm-card svg { display: block; width: 100%; height: auto; }
.tm-word { fill: var(--color-text-primary); opacity: 0.05; font-size: 64px; font-weight: 800; letter-spacing: 0.12em; pointer-events: none; }
.tm-canada { fill: var(--color-bg-surface); stroke: var(--color-border-light); stroke-width: 0.8; }
.tm-state { fill-opacity: 0.24; stroke: var(--color-bg-page); stroke-width: 0.6; transition: fill-opacity 200ms ease; }
.tm-div-line { fill: none; stroke: rgba(var(--color-text-primary-rgb), 0.22); stroke-width: 1; stroke-dasharray: 3 4; pointer-events: none; }
.tm-conf-line { fill: none; stroke: var(--color-text-secondary); stroke-width: 2; stroke-linejoin: round; filter: url(#tm-glow); pointer-events: none; }
.tm-city { fill: var(--color-text-primary); opacity: 0.55; }
.tm-lead { stroke: rgba(var(--color-text-primary-rgb), 0.3); stroke-width: 0.8; }
.tm-team { cursor: pointer; transition: opacity 200ms ease; }
.tm-team circle { fill: var(--color-bg-page); stroke-width: 1.6; transition: stroke-width 150ms ease; }
.tm-team:hover circle { stroke-width: 3.2; }
/* une division survolee : le reste de la carte s'efface */
.tm-dim .tm-team:not(.lit) { opacity: 0.3; }
.tm-dim .tm-state:not(.lit) { fill-opacity: 0.07; }
.tm-dim .tm-state.lit { fill-opacity: 0.34; }

.tm-tip {
    position: absolute;
    z-index: 5;
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 10px;
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}
.tm-tip.show { opacity: 1; }
.tm-tip b { display: block; color: var(--color-text-primary); font-size: 14px; }
.tm-tip span { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tm-tip em {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tm-legend { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 10px; }
.tm-conf { color: var(--color-text-light); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tm-chip + .tm-conf { margin-left: 8px; }
.tm-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--color-border-strong);
    border-radius: 20px;
    background: var(--color-bg-elevated);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.tm-chip i { width: 9px; height: 9px; border-radius: 50%; }
.tm-chip span { color: var(--color-text-primary); }
.tm-chip.lit { border-color: currentColor; background: var(--color-bg-surface-alt); }

/* equipes d'une division en lignes : telephone seulement */
.tm-groups { display: none; }

/* === MOBILE === */
@media (max-width: 1023.98px) {   /* bp mobile */
    .acc-hero { padding: 16px 0 4px; }
    .acc-hero-title { font-size: 21px; }
    .acc-chip { padding: 10px 12px; }
    .acc-grid--3 { grid-template-columns: 1fr 1fr; gap: 8px; }
    .acc-grid--4 { grid-template-columns: 1fr; gap: 8px; }
    .acc-tile { padding: 12px; }
    .acc-tile-title { font-size: 14px; }
    .acc-band { padding: 12px; }
    .acc-tags { position: static; order: -1; }

    /* Carte des equipes : au-dessus des tuiles ; on touche une division, ses equipes
       s'affichent en lignes (les logos sont trop petits pour etre vises). */
    .acc-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .acc-split .acc-map { order: -1; }
    .tm-team { pointer-events: none; }
    .tm-state { cursor: pointer; }
    .tm-legend { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .tm-conf { display: none; }
    .tm-chip { min-height: 40px; }
    .tm-groups {
        display: block;
        margin-top: 10px;
        overflow: hidden;
        border: 1px solid var(--color-border-strong);
        border-radius: 12px;
        background: var(--color-bg-surface-alt);
    }
    .tm-group { display: none; }
    .tm[data-div="atlantic"] .tm-group[data-div="atlantic"],
    .tm[data-div="central"] .tm-group[data-div="central"],
    .tm[data-div="southeast"] .tm-group[data-div="southeast"],
    .tm[data-div="northwest"] .tm-group[data-div="northwest"],
    .tm[data-div="pacific"] .tm-group[data-div="pacific"],
    .tm[data-div="southwest"] .tm-group[data-div="southwest"] { display: block; }
    .tm-group-title {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        color: var(--color-text-muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
    .tm-group-title i { width: 9px; height: 9px; border-radius: 50%; }
    a.tm-row,
    a.tm-row:visited {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 48px;
        padding: 6px 12px;
        border-top: 1px solid var(--color-border-light);
        color: var(--color-text-primary);
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
    }
    .tm-row img { width: 28px; height: 28px; object-fit: contain; }
    .tm-row small { margin-left: auto; color: var(--color-text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
    .tm-row::after { content: "›"; color: var(--color-text-light); font-size: 18px; }
}

@media (min-width: 768px) and (max-width: 1023.98px) {   /* bp tablette */
    .acc-grid--3,
    .acc-split:has(.acc-map) .acc-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .acc-grid--4 { grid-template-columns: 1fr 1fr; }
}
