/* ==========================================================================
   VOLLEYSCORE — Pages Matchs et Ranking V3 (s'appuie sur profile3.css, match3.css et les blocs .h3-*)
   ========================================================================== */

/* Barre de tête : titre, onglets, filtres, bande des jours */
.m3-bar-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px 0; }
.m3-bar-top h1 { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 30px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.m3-tabs { margin-left: auto; border-bottom: 0; overflow: visible !important; } /* deux onglets : jamais de barre de défilement */
.m3-livecount { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .04em; }
.m3-bar-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; }
.m3-sel select { height: 32px; max-width: 100%; padding: 0 30px 0 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card); color: var(--text-main); font: 600 13px/1 inherit; cursor: pointer; }
.m3-sel select:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.m3-bar .date-strip { border-top: 1px solid var(--border); border-bottom: 0; }

/* Jours */
.m3-dh h2 span:first-child::first-letter { text-transform: uppercase; }
.m3-day.sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 55%, transparent); }
.m3-day .comp-group, .m3-live .comp-group { margin: 0; border: 0; border-radius: 0; }
.m3-day .comp-group + .comp-group { border-top: 1px solid var(--border); }
.m3-live { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.m3-live .h3-bh h2 { display: inline-flex; align-items: center; gap: 6px; color: var(--red); }

/* Filtre par compétition (colonne latérale) */
.m3-cf { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; transition: background .12s ease; }
.m3-cf:last-child { border-bottom: 0; }
.m3-cf:hover { background: var(--bg-hover); }
.m3-cf.on { background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.m3-cf b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m3-cf.on b { font-weight: 800; }
.m3-cf .mono { font-size: 12px; color: var(--text-dim); }
.m3-cf .mstars { font-size: 10px; letter-spacing: -1px; }
.m3-cf-lg { display: inline-flex; align-items: center; gap: 2px; }
.m3-cf { grid-template-columns: 44px minmax(0, 1fr) auto; }
.m3-cf-all { text-align: center; font-weight: 900; color: var(--text-dim); }
/* Le sélecteur sert sur mobile ; sur grand écran, la liste latérale fait le même travail */
@media (min-width: 861px) { .l3 .m3-sel { display: none; } }

/* Ranking */
.r3-sub { font-size: 12.5px; color: var(--text-dim); }
.r3-lgs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 12px; scrollbar-width: thin; }
.r3-lgs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 7px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-muted); white-space: nowrap; transition: border-color .12s ease, background .12s ease; }
.r3-lgs button:hover { border-color: var(--text-dim); }
.r3-lgs button.on { background: var(--text-main); border-color: var(--text-main); color: var(--bg-card); }
.r3-head, .r3-row { display: grid; grid-template-columns: 34px 46px 40px minmax(0, 1fr) 96px 48px 150px; align-items: center; gap: 10px; padding: 8px 14px; }
.r3-head { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.r3-head > :last-child { text-align: right; }
.r3-row { width: 100%; border-bottom: 1px solid var(--border); text-align: left; transition: background .12s ease; }
.r3-row:last-child { border-bottom: 0; }
.r3-row:hover { background: var(--bg-hover); }
.r3-n { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 22px; line-height: 1; }
.r3-row.top .r3-n { color: var(--red); font-size: 28px; }
.r3-logo img, .r3-logo .team-logo { width: 34px; height: 34px; object-fit: contain; }
.r3-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.r3-name b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r3-row.top .r3-name b { font-size: 16.5px; }
.r3-name em { display: flex; align-items: center; gap: 5px; font-style: normal; font-size: 11.5px; color: var(--text-dim); min-width: 0; }
.r3-name em span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r3-form { display: flex; gap: 2px; }
.r3-form i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 3px; font-size: 9.5px; font-style: normal; font-weight: 800; color: #fff; }
.r3-form i.V { background: var(--green, #16A34A); } .r3-form i.D { background: var(--red); }
.r3-rec { font-size: 12.5px; color: var(--text-muted); }
.r3-pts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.r3-pts b { font-size: 15px; font-weight: 800; }
.r3-pts i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--red) 35%, transparent), var(--red)); align-self: stretch; transform-origin: left; margin-left: auto; max-width: 100%; }
.r3-lead { width: 100%; display: grid; grid-template-columns: auto 20px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; transition: background .12s ease; }
.r3-lead:hover { background: var(--bg-hover); }
.r3-lead.on { background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.r3-lead b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r3-lead img, .r3-lead .team-logo { width: 20px; height: 20px; object-fit: contain; }
.r3-lead .mono { font-size: 12.5px; font-weight: 700; }
.r3-lead .r3-to { color: var(--text-dim); font-weight: 600; }
.r3-method { padding: 6px 14px 10px; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.r3-method p { margin: 6px 0; }

/* Compétitions : grille de classements */
.c3-sec { margin: 6px 0 -2px; font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.c3-card { scroll-margin-top: 72px; } /* le sommaire ne cache pas le titre sous l'en-tête fixe */
.c3-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.c3-head { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; transition: background .12s ease; }
.c3-head:hover { background: var(--bg-hover); }
.c3-head:hover .go { color: var(--red); transform: translateX(2px); }
.c3-head .crest-img, .c3-head .crest-img img { width: 40px; height: 40px; object-fit: contain; }
.c3-head .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c3-head .tx b { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 18px; line-height: 1.1; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3-head .tx em { display: flex; align-items: center; gap: 4px; font-style: normal; font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; }
.c3-head .go { color: var(--text-dim); font-weight: 800; transition: transform .15s ease, color .15s ease; }
.c3-th, .c3-tr { display: grid; grid-template-columns: 20px 20px minmax(0, 1fr) 24px 40px 30px; align-items: center; gap: 7px; padding: 5px 12px; }
.c3-th { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.c3-th > :nth-child(n+4) { text-align: right; }
.c3-tr { width: 100%; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; transition: background .12s ease; }
.c3-tr:last-of-type { border-bottom: 0; }
.c3-tr:hover { background: var(--bg-hover); }
.c3-tr .n { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.c3-tr:first-of-type .n { color: var(--red); }
.c3-tr img, .c3-tr .team-logo { width: 20px; height: 20px; object-fit: contain; }
.c3-tr .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3-tr .c3-j, .c3-tr .c3-vd { font-size: 12px; color: var(--text-dim); text-align: right; }
.c3-tr b { text-align: right; font-size: 13px; }
.c3-tr.m3-cut { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--green) 70%, transparent); }
.c3-foot { margin: 0; border-radius: 6px; }
@media (max-width: 1180px) { .c3-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .c3-index { display: none; } .c3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .c3-grid { grid-template-columns: 1fr; } }

/* Tablette et mobile */
@media (max-width: 1100px) {
  .r3-head, .r3-row { grid-template-columns: 30px 42px 36px minmax(0, 1fr) 90px 44px 110px; gap: 8px; }
}
@media (max-width: 640px) {
  .m3-bar-top h1 { font-size: 24px; }
  .m3-tabs { margin-left: 0; width: 100%; }
  .m3-sel, .m3-sel select { width: 100%; }
  .r3-head, .r3-row { grid-template-columns: 26px 34px 28px minmax(0, 1fr) 64px; gap: 7px; padding: 8px 10px; }
  .r3-head > :nth-child(5), .r3-head > :nth-child(6), .r3-row .r3-form, .r3-row .r3-rec { display: none; }
  .r3-logo img, .r3-logo .team-logo { width: 28px; height: 28px; }
  .r3-n { font-size: 19px; } .r3-row.top .r3-n { font-size: 23px; }
  .r3-name b { font-size: 14px; } .r3-row.top .r3-name b { font-size: 15px; }
}
@media (pointer: coarse) { .r3-lgs button, .m3-sel select { min-height: 36px; } }
@media (prefers-reduced-motion: reduce) { .m3-cf, .r3-row, .r3-lead, .r3-lgs button { transition: none; } }
