/* LuxFutsal — Coupe V5.3 : carrousel GSM, bracket PC, stepper. */
.app-footer { grid-template-columns:repeat(4,minmax(0,1fr)); }
.app-view--cup:not(.is-active) { display:none; }
.cup-page {
    position:fixed;
    inset:0 0 var(--cup-footer-space,calc(var(--footer-h,58px) + var(--safe-bottom,0px))) 0;
    z-index:90;
    display:flex;
    flex-direction:column;
    min-height:0;
    overflow:hidden;
    background:#f0f1f5;
    color:#18202a;
    padding:0;
    margin:0;
    box-sizing:border-box;
}
.cup-page button { font:inherit; -webkit-tap-highlight-color:transparent; }
.cup-choices {
    flex:0 0 auto;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    padding:0 6px;
    background:#fff;
    border-top:1px solid #e3e5e9;
}
.cup-choices button,.cup-round-tabs button {
    position:relative;
    border:0;
    background:transparent;
    color:#737b85;
    min-width:0;
    white-space:nowrap;
    cursor:pointer;
    font-weight:700;
}
.cup-choices button { font-size:clamp(10px,2.9vw,13px); min-height:48px; padding:6px 2px; }
.cup-choices button.is-active { color:var(--orange,#ffa000); }
.cup-choices button.is-active::after {
    content:"";position:absolute;bottom:0;left:8px;right:8px;height:3px;
    background:var(--orange,#ffa000);border-radius:3px 3px 0 0;
}
.cup-round-tabs {
    flex:0 0 auto;
    display:flex;
    justify-content:center;
    gap:0;
    background:#fff;
    border-bottom:2px solid var(--orange,#ffa000);
    padding:calc(var(--safe-top,0px) + 8px) 8px 6px;
    overflow:hidden;
}
.cup-round-tabs button {
    flex:1 1 0;
    max-width:110px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:5px;
    padding:2px 0 3px;
    min-height:40px;
    font-size:11px;
    isolation:isolate;
}
.cup-round-tabs button:not(:last-child)::after {
    content:"";
    position:absolute;
    top:10px;
    left:50%;
    width:100%;
    height:2px;
    background:#d8dce2;
    z-index:-1;
}
.cup-step-dot {
    width:18px;
    height:18px;
    box-sizing:border-box;
    flex:0 0 18px;
    border:2px solid #c6cbd3;
    border-radius:50%;
    background:#fff;
    z-index:1;
    position:relative;
}
.cup-round-tabs button.is-active {color:#b66500;}
.cup-round-tabs button.is-active .cup-step-dot {border-color:var(--orange,#ffa000);}
.cup-round-tabs button.is-active .cup-step-dot::after {
    content:"";position:absolute;inset:3px;border-radius:50%;background:var(--orange,#ffa000);
}
.cup-step-label {white-space:nowrap;line-height:1.2;}
/* Un carrousel horizontal à crans, pas un grand tableau à explorer.
   Chaque panneau fait 75% de la zone ; le suivant reste visible à droite. */
.cup-carousel-shell {
    position:relative;flex:1 1 0;min-height:0;min-width:0;display:flex;overflow:hidden;
}
.cup-preview-lines {
    position:absolute;inset:0;width:100%;height:100%;pointer-events:none;
    fill:none;stroke:#a8adb6;stroke-width:1.5;z-index:2;
}
.cup-carousel {
    flex:1 1 0;
    min-height:0;
    min-width:0;
    position:relative;
    display:flex;
    align-items:stretch;
    gap:16px;
    padding:10px 0 0 10px;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-x:contain;
    touch-action:pan-x;
    scroll-snap-type:x mandatory;
    scroll-padding-inline-start:10px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    box-sizing:border-box;
}
.cup-carousel::-webkit-scrollbar,.cup-slide::-webkit-scrollbar {display:none;}
.cup-slide {
    flex:0 0 75%;
    min-width:0;
    min-height:0;
    overflow-x:hidden;
    overflow-y:hidden;
    overflow-anchor:none;
    overscroll-behavior-y:contain;
    scroll-snap-align:start;
    scroll-snap-stop:always;
    scrollbar-width:none;
    padding:0 0 12px;
    box-sizing:border-box;
}
.cup-slide.is-current {overflow-y:auto;}
/* L'aperçu conserve le pan horizontal ; le geste vertical est relayé au tour actif. */
.cup-slide:not(.is-current) {touch-action:pan-x;}
.cup-slide-stack {position:relative;min-height:100%;display:flow-root;}
.cup-slide-match {min-width:0;margin:0 0 8px;}
/* Espacement entre branches du tour suivant, pas entre les deux matchs de la même branche. */
.cup-slide-match--group-end {margin-bottom:18px;}
.cup-carousel::after {content:"";flex:0 0 calc(25% - 16px);}
@media (max-width:360px) {
    .cup-round-tabs button {font-size:10px;}
}
.cup-empty { flex:1; padding:24px 12px; text-align:center; color:#737b85; }
#cup-page .cup-match { margin:0; min-width:0; }
#cup-page .cup-match-number { margin-left:auto; opacity:.72; }
#cup-page .cup-match--clickable { cursor:pointer; }
#cup-page .cup-match--unplanned { cursor:default; }
#cup-page .cup-team-unknown { font-style:italic; }
#cup-page .cup-match:focus-visible { outline:2px solid var(--orange,#ffa000); outline-offset:2px; }
.cup-board-scroll {
    flex:1 1 0;
    min-height:0;
    min-width:0;
    overflow:auto;
    overscroll-behavior:contain;
    touch-action:pan-x pan-y pinch-zoom;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    position:relative;
}
.cup-board-scroll::-webkit-scrollbar { display:block;height:5px;width:5px; }
.cup-board-scroll::-webkit-scrollbar-thumb { background:#c5c8cf;border-radius:8px; }
.cup-board { position:relative;min-width:100%;min-height:100%; }
.cup-lines { position:absolute;top:0;left:0;fill:none;stroke:#a8adb6;stroke-width:1.6;pointer-events:none; }
.cup-column { position:absolute;top:0; }
.cup-board-match { position:absolute;left:0;width:100%; }
/* Sécurité visuelle pour la fiche consultative, même si le Home possède un Live. */
body:has(.app-view--cup.is-active) .match-detail-info--live { display:none!important; }

/* Emplacement d'une équipe dispensée du tour préliminaire : purement visuel. */
#cup-page .cup-match--placeholder {
    display:block;
    box-sizing:border-box;
    height:var(--cup-placeholder-height,74px);
    border:1px dashed #d4d8df;
    border-radius:12px;
    background:rgba(255,255,255,.45);
    pointer-events:none;
    box-shadow:none;
}
