/* ==========================================================================
   VOLLEYSCORE — Accueil V3 (dense, trois colonnes) + animations d'interface.
   Animations : transform et opacity uniquement, une fois ou au survol, toutes coupées
   si l'utilisateur a demandé moins de mouvement (prefers-reduced-motion).
   ========================================================================== */
body.wide .shell:has(.h3) { max-width: 1380px; }

.h3 { display: flex; flex-direction: column; gap: 14px; padding-top: 2px; }
.h3-rail .lc-rail { grid-auto-columns: 214px; gap: 8px; padding-bottom: 2px; }

.h3-grid { display: grid; grid-template-columns: 292px minmax(0, 1fr) 312px; grid-template-areas: "left center right"; gap: 18px; align-items: start; }
.h3-left { grid-area: left; } .h3-center { grid-area: center; } .h3-right { grid-area: right; }
.h3-c { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Blocs : en-tête fin, contenu en lignes serrées */
.h3-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.h3-bh { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px 8px; border-bottom: 1px solid var(--border); }
.h3-bh h2 { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 17px; letter-spacing: .03em; text-transform: uppercase; }
.h3-bh h2::before { content: ''; display: inline-block; width: 3px; height: 13px; background: var(--red); margin-right: 7px; vertical-align: -1px; border-radius: 1px; }
.h3-more, .h3-link { font-size: 12px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.h3-more:hover, .h3-link:hover { color: var(--red); }
.h3-link { display: block; width: 100%; text-align: center; padding: 8px; border-top: 1px solid var(--border); }
.h3-empty { padding: 14px 12px; font-size: 13px; color: var(--text-dim); }

/* Matchs */
.h3-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.h3-tabs > button { font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 4px; color: var(--text-muted); }
.h3-tabs > button.on { background: var(--bg-card); color: var(--text-main); box-shadow: 0 0 0 1px var(--border); }
.h3-g { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.h3-g button { font-size: 11px; font-weight: 800; padding: 4px 7px; color: var(--text-muted); min-width: 26px; }
.h3-g button.on { background: var(--text-main); color: var(--bg-card); }
.h3-day { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); padding: 8px 12px 4px; background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.h3-day::first-letter { text-transform: uppercase; }
.h3-m { width: 100%; display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-bottom: 1px solid var(--border); text-align: left; transition: background .12s ease; }
.h3-m:hover { background: var(--bg-hover); }
.h3-m.live { box-shadow: inset 3px 0 0 var(--red); }
.h3-mt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 11.5px; color: var(--text-muted); }
.h3-mteams { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h3-t { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 13px; line-height: 1.25; color: var(--text-muted); }
.h3-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3-t.w { color: var(--text-main); font-weight: 700; }
.h3-t b { font-family: 'JetBrains Mono', monospace; font-size: 13px; min-width: 10px; text-align: right; }
.h3-t img, .h3-t .team-logo { width: 18px; height: 18px; object-fit: contain; }
.h3-livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; position: relative; }
.h3-livedot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--red); animation: h3Ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes h3Ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* Une */
.h3-une { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
.h3-une .s2-lead { height: 100%; }
.h3-une .s2-lead .s2-title { font-size: 26px; line-height: 1.12; }
.h3-une .s2-lead .s2-dek { font-size: 14px; }
.h3-une-side { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.h3-une-side .h3-news { flex: 1; }

/* Lignes d'actualité (une, mag) */
.h3-news { width: 100%; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; transition: background .12s ease; }
.h3-news:last-child { border-bottom: 0; }
.h3-news:hover { background: var(--bg-hover); }
.h3-news:hover b { color: var(--red); }
.h3-thumb { position: relative; width: 92px; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; background: var(--bg-dark-2); display: flex; align-items: center; justify-content: center; gap: 4px; }
.h3-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h3-thumb.duel { background: linear-gradient(135deg, var(--bg-dark-2), var(--bg-dark)); }
.h3-thumb.duel img, .h3-thumb.duel .team-logo { width: 30px; height: 30px; object-fit: contain; }
.h3-thumb.mg > * { width: 100%; height: 100%; }
.h3-thumb.mg img { object-fit: cover; }
.h3-thumb .vplay { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(0, 0, 0, .62); }
.h3-thumb .vplay::after { content: ''; position: absolute; left: 10px; top: 7px; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.h3-nt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.h3-nt em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-dim); display: flex; align-items: center; gap: 5px; letter-spacing: .02em; text-transform: uppercase; }
.h3-nt em .h3-ago { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-weight: 500; text-transform: none; }
.h3-nt b { font-size: 13.5px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .12s ease; }
.h3-maglist { display: grid; grid-template-columns: 1fr 1fr; }
.h3-maglist .h3-news:nth-child(odd) { border-right: 1px solid var(--border); }
.h3-maglist .h3-news:nth-last-child(-n+2) { border-bottom: 0; }

/* Vidéos */
.h3-vids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; }

/* Colonne droite */
.h3-select { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.h3-select select { flex: 1; min-width: 0; font: inherit; font-size: 13px; font-weight: 700; background: transparent; border: 0; color: var(--text-main); cursor: pointer; }
.h3-tr { width: 100%; display: grid; grid-template-columns: 18px 20px minmax(0, 1fr) 24px 30px; align-items: center; gap: 7px; padding: 5px 12px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: left; }
.h3-tr:hover { background: var(--bg-hover); }
.h3-tr:last-child { border-bottom: 0; }
.h3-tr .n { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-dim); font-weight: 700; }
.h3-tr:nth-child(-n+1) .n { color: var(--red); }
.h3-tr .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3-tr .pl { color: var(--text-dim); font-size: 12px; text-align: right; }
.h3-tr b { text-align: right; }
.h3-tr img, .h3-tr .team-logo { width: 20px; height: 20px; object-fit: contain; }
.h3-w, .h3-f { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; text-align: left; }
.h3-w:hover, .h3-f:hover { background: var(--bg-hover); }
.h3-w:last-child, .h3-f:last-child { border-bottom: 0; }
.h3-w .nm, .h3-f .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.h3-w { flex-direction: column; align-items: flex-start; gap: 4px; }
.h3-w .nm { max-width: 100%; }
.h3-w .tv { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.h3-w .tv i { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 2px 5px; border-radius: 3px; background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-muted); }
.h3-w .tv i.free { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.h3-f .n { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.h3-potw { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.h3-potw:last-child { border-bottom: 0; }
.h3-potw:hover { background: var(--bg-hover); }
.h3-potw .av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; background: var(--bg-subtle); }
.h3-potw .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h3-potw em { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3-potw .tx b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3-potw .rt { font-size: 16px; color: var(--green); }

/* Tablette : deux colonnes (centre + droite), matchs sous la une */
@media (max-width: 1180px) {
  .h3-grid { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "center right" "left right"; }
  .h3-left .h3-mlist { max-height: none; }
}
/* Mobile : une seule colonne — une, matchs, actualités, puis le reste */
@media (max-width: 760px) {
  .h3-grid { display: flex; flex-direction: column; gap: 14px; }
  .h3-center { display: contents; }
  .h3-une { order: 1; grid-template-columns: 1fr; }
  .h3-left { order: 2; }
  .h3-center > .h3-box { order: 3; }
  .h3-right { order: 4; }
  .h3-une .s2-lead .s2-title { font-size: 22px; }
  .h3-maglist { grid-template-columns: 1fr; }
  .h3-maglist .h3-news:nth-child(odd) { border-right: 0; }
  .h3-maglist .h3-news:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .h3-vids { grid-template-columns: 1fr; }
  .h3-rail .lc-rail { grid-auto-columns: 72%; }
  .h3-x { display: none; }
}

/* ---------- Animations d'interface (sobres, sans effet de démo) ---------- */
/* Logo : le plateau rouge reste fixe ; seul le ballon tourne sur lui-même (un tour au chargement, un tour au survol) */
.brand-btn svg .brand-ball { transform-box: fill-box; transform-origin: 50% 50%; animation: vsBallSpin 1s cubic-bezier(.2, .8, .2, 1) both; }
.brand-btn:hover svg .brand-ball { animation: vsBallTurn .6s cubic-bezier(.2, .8, .2, 1); }
.brand-btn svg text { animation: vsWordIn .55s ease-out both; }
.brand-btn svg text:nth-of-type(2) { animation-delay: .08s; }
.brand-btn svg text:nth-of-type(3) { animation-delay: .16s; }
@keyframes vsBallSpin { from { transform: rotate(-360deg); } to { transform: rotate(0); } }
@keyframes vsBallTurn { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes vsWordIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* Menu : soulignement rouge qui se déploie depuis le centre au survol et sur l'onglet actif */
.nav-tab { position: relative; border-bottom-color: transparent !important; }
.nav-tab::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--red); border-radius: 2px 2px 0 0; transform: scaleX(0); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.nav-tab:hover::after { transform: scaleX(.45); }
.nav-tab.active::after { transform: scaleX(1); }

/* Cartes : légère élévation au survol */
.lc-card, .s2-card, .vid-card, .mg-card { transition: transform .16s ease, box-shadow .16s ease; }
.lc-card:hover, .s2-card:hover, .vid-card:hover, .mg-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 17, 21, .12); }
.h3-thumb img, .s2-card img { transition: transform .35s ease; }
.h3-news:hover .h3-thumb img, .s2-card:hover img { transform: scale(1.04); }

/* Apparition douce du contenu à chaque changement de page */
#center-col > * { animation: vsFade .24s ease-out both; }
@keyframes vsFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .brand-btn svg image, .brand-btn svg text, #center-col > *, .h3-livedot::after { animation: none !important; }
  .nav-tab::after, .lc-card, .s2-card, .vid-card, .mg-card, .h3-thumb img, .s2-card img { transition: none !important; }
  .lc-card:hover, .s2-card:hover, .vid-card:hover, .mg-card:hover, .h3-news:hover .h3-thumb img, .s2-card:hover img { transform: none; }
}

/* Menu « Plus » */
.nav-more { position: relative; display: flex; align-items: stretch; }
.nav-more > .nav-tab { gap: 5px; }
.nav-more-menu { position: absolute; top: 100%; right: 0; min-width: 170px; background: #11151C; border: 1px solid var(--border-dark); border-radius: 0 0 6px 6px; padding: 4px; display: flex; flex-direction: column; z-index: 60; box-shadow: 0 12px 28px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .14s ease, transform .14s ease; }
.nav-more-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.nav-more-menu button { text-align: left; padding: 9px 12px; border-radius: 4px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: #A7B0BF; }
.nav-more-menu button:hover, .nav-more-menu button.on { color: #fff; background: #1B2029; }
@media (prefers-reduced-motion: reduce) { .nav-more-menu { transition: none; } }

/* Ligne de match : heure et compétition côte à côte */
.h3-m { grid-template-columns: 82px minmax(0, 1fr); }
.h3-mt { flex-direction: row; align-items: center; gap: 6px; }
.h3-mt .mono { min-width: 34px; }
.h3-mt { gap: 5px; }

/* En images (galerie) dans la colonne centrale */
.h3-photos .v2-photos { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 9px 10px 10px; }
.h3-photos .v2-sec-head { margin: -1px -10px 10px; padding: 0 12px 8px; border-bottom: 1px solid var(--border); }
.h3-photos .v2-sec-head h2 { font-size: 17px; letter-spacing: .03em; }
.h3-photos .v2-sec-head h2::before { content: ''; display: inline-block; width: 3px; height: 13px; background: var(--red); border-radius: 1px; }
.h3-photos .v2-sec-head button { font-size: 12px; font-weight: 700; color: var(--text-dim); }

/* En images */
.h3-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; }
.h3-pic { position: relative; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: var(--bg-dark-2); }
.h3-pic > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.h3-pic:hover > img { transform: scale(1.04); }
.h3-pic .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 5px; align-items: center; text-align: left; }
.h3-pic .cap img, .h3-pic .cap .team-logo { width: 16px; height: 16px; object-fit: contain; }
.h3-pic .cap b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3-pic .cap em { grid-column: 1 / -1; font-style: normal; font-size: 9.5px; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .h3-pics { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .h3-pic > img { transition: none; } .h3-pic:hover > img { transform: none; } }

/* ---------- En-tête : jamais de débordement ---------- */
.navbar-inner { max-width: 1380px; }
#desktop-nav { flex: 1 1 auto; min-width: 0; }
.brand-btn { margin-right: 6px; }
/* Sous 1500 px : boutons d'outils en icônes seules (libellé en infobulle), langue toujours lisible */
@media (max-width: 1499px) {
  .nav-tools .hide-sm, .nav-tools .kbd-key, #theme-lbl { display: none; }
  .nav-tools .nav-btn { padding: 0 9px; min-width: 34px; justify-content: center; }
  .nav-tools { gap: 6px; }
}
@media (max-width: 1279px) {
  .nav-tab { padding: 0 9px; font-size: 14px; }
  .brand-btn svg { width: 196px; height: auto; }
}
