:root{
    --paper:#fcfaf7;
    --cream:#fffdf9;
    --ink:#1a1a1a;
    --brand:#4b1f6f;
    --brand-dark:#2f0f4f;
    --brand-light:#6f3bbb;
    --lime:#e6ef6b;
    --green:#74d157;
    --green-light:#9be86d;
    --coral:#ff5a63;
    --orange:#ff9a57;
    --cyan:#6ce7df;
    --tournament-primary:#4b1f6f;
    --tournament-secondary:#2f0f4f;
    --line:rgba(75,31,111,.14);
    --soft-shadow:0 18px 60px rgba(47,15,79,.11);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit}
img{max-width:100%;display:block}
button,input,select,textarea{font:inherit}
.site-shell{min-height:100vh}
.container{width:min(1280px,calc(100% - 32px));margin-inline:auto}

/* En-tête commun du site */
.public-site-header a{text-decoration:none}
.public-site-header summary::-webkit-details-marker{display:none}
.public-site-header summary{list-style:none}
.public-site-header details[open]>summary{color:var(--brand)}
#tournois-menu-btn{
    appearance:none;
    min-height:2.5rem;
    padding:0;
    background:transparent;
    color:var(--brand-dark);
    box-shadow:none;
    line-height:1;
}
#tournois-menu-btn:hover{transform:none;filter:none;background:rgba(75,31,111,.05);box-shadow:none}

/* En-tête éditorial */
.hero{
    position:relative;
    isolation:isolate;
    overflow:hidden;
    padding:clamp(3.5rem,7vw,6.5rem) 0;
    color:var(--brand-dark);
    background:
        radial-gradient(circle at 86% 16%,rgba(108,231,223,.38),transparent 24rem),
        radial-gradient(circle at 8% 100%,rgba(230,239,107,.5),transparent 22rem),
        linear-gradient(135deg,#fff 0%,rgba(75,31,111,.06) 55%,rgba(116,209,87,.12) 100%);
    border-bottom:1px solid var(--line);
}
.hero::before{
    content:"";
    position:absolute;
    z-index:-1;
    width:15rem;
    height:15rem;
    right:-4rem;
    bottom:-7rem;
    border:2.5rem solid rgba(255,90,99,.12);
    border-radius:999px;
    transform:rotate(18deg);
}
.hero.has-cover{min-height:430px;display:flex;align-items:flex-end;color:#fff;background:var(--tournament-secondary)}
.hero-cover{position:absolute;z-index:-2;inset:0;background-size:cover;background-position:center;opacity:.42}
.hero-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(25,7,40,.95) 0%,rgba(25,7,40,.77) 48%,rgba(25,7,40,.18) 100%)}
.hero-content{position:relative;max-width:850px}
.eyebrow{display:inline-flex;align-items:center;gap:.45rem;color:var(--brand);font-weight:900;text-transform:uppercase;letter-spacing:.16em;font-size:.75rem}
.eyebrow::before{content:"";width:1.65rem;height:.22rem;border-radius:999px;background:var(--green)}
.hero.has-cover .eyebrow{color:var(--lime)}
.hero.has-cover .eyebrow::before{background:var(--tournament-primary)}
.hero h1{max-width:950px;margin:.25em 0 0;font-size:clamp(2.65rem,6vw,5.5rem);font-weight:950;letter-spacing:-.055em;line-height:.98}
.hero p{max-width:720px;margin:1.25rem 0 0;color:rgba(26,26,26,.7);font-size:clamp(1rem,1.5vw,1.18rem);line-height:1.75}
.hero.has-cover p{color:rgba(255,255,255,.82)}
.hero .meta{margin-top:1.25rem;color:rgba(26,26,26,.62)}
.hero.has-cover .meta{color:rgba(255,255,255,.78)}
.hero-actions,.actions{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.5rem}

/* Boutons */
.button,button{
    appearance:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.4rem;
    min-height:44px;
    border:0;
    border-radius:999px;
    padding:.72rem 1.15rem;
    background:var(--tournament-primary);
    color:#fff;
    font-weight:900;
    line-height:1.1;
    text-decoration:none;
    cursor:pointer;
    box-shadow:0 10px 25px rgba(47,15,79,.12);
    transition:transform .15s ease,filter .15s ease,box-shadow .15s ease;
}
.button:hover,button:hover{transform:translateY(-1px);filter:brightness(.96);box-shadow:0 14px 32px rgba(47,15,79,.18)}
.button:focus-visible,button:focus-visible,.player-link:focus-visible{outline:3px solid rgba(75,31,111,.25);outline-offset:3px}
.button.secondary,button.secondary{background:#fff;color:var(--brand);border:1px solid rgba(75,31,111,.22);box-shadow:none}
.button.danger,button.danger{background:#b5323c;color:#fff}
.button.small,button.small{min-height:38px;padding:.58rem .95rem;font-size:.84rem}
button:disabled,.button:disabled{opacity:.45;cursor:not-allowed;transform:none;filter:none;box-shadow:none}

/* Structure des pages publiques */
.page{padding:clamp(2.25rem,5vw,4.5rem) 0 clamp(4rem,8vw,7rem)}
.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:1.25rem;margin-bottom:1.4rem}
.page-title h1,.page-title h2,.section-title{margin:0;color:var(--brand-dark);font-weight:950;letter-spacing:-.035em;line-height:1.08}
.page-title h1,.page-title h2{font-size:clamp(1.8rem,3vw,2.6rem)}
.section-title{margin:clamp(2.8rem,6vw,5rem) 0 1.35rem;font-size:clamp(1.75rem,3vw,2.5rem)}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem}
.card{
    position:relative;
    overflow:hidden;
    background:#fff;
    border:1px solid var(--line);
    border-radius:2rem;
    box-shadow:0 8px 28px rgba(47,15,79,.06);
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.card:hover{transform:translateY(-3px);border-color:rgba(75,31,111,.25);box-shadow:var(--soft-shadow)}
.card-body{padding:1.35rem}
.card-image{width:100%;height:220px;padding:1rem;object-fit:contain;background:linear-gradient(135deg,rgba(75,31,111,.06),rgba(116,209,87,.12),rgba(255,90,99,.07))}
.card h2,.card h3{margin:.55rem 0 .55rem;color:var(--brand-dark);font-weight:950;letter-spacing:-.025em;line-height:1.15}
.card h2{font-size:1.35rem}.card h3{font-size:1.2rem}
.meta{display:flex;gap:.45rem;flex-wrap:wrap;color:rgba(26,26,26,.57);font-size:.9rem;font-weight:650}
.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.38rem .7rem;border-radius:999px;background:rgba(75,31,111,.08);color:var(--brand-dark);font-size:.74rem;font-weight:900;line-height:1.15}
.badge-running,.badge-active{background:rgba(116,209,87,.2);color:#285b1d}
.badge-registration{background:rgba(108,231,223,.25);color:#145f5b}
.badge-tv_ready{background:rgba(255,154,87,.22);color:#87400d}
.badge-overtime{background:rgba(255,154,87,.24);color:#87400d}
.badge-completed,.badge-closed{background:rgba(75,31,111,.08);color:rgba(47,15,79,.72)}
.badge-draft,.badge-pending{background:rgba(255,154,87,.2);color:#87400d}
.badge-cancelled,.badge-dropped,.badge-absent{background:rgba(255,90,99,.15);color:#9f2530}
.player-link{color:var(--brand-dark);font-weight:850;text-decoration:none}
.player-link:hover{color:var(--brand);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.empty{padding:clamp(2rem,5vw,3.5rem);text-align:center;background:#fff;border:1px dashed rgba(75,31,111,.25);border-radius:2rem;color:rgba(26,26,26,.55);font-weight:750}

/* Accueil public des tournois */
.tournament-index-page{padding-top:clamp(2.8rem,5vw,4.5rem)}
.index-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1.5rem;margin-bottom:1.5rem}
.index-section-heading>div{max-width:760px}
.index-section-heading h2{margin:.35rem 0 0;color:var(--brand-dark);font-size:clamp(2rem,4vw,3.2rem);font-weight:950;letter-spacing:-.045em;line-height:1}
.index-section-heading p{margin:.75rem 0 0;color:rgba(26,26,26,.62);font-size:.98rem;line-height:1.6}
.index-section-count{flex:0 0 auto;padding:.48rem .78rem;border-radius:999px;background:rgba(75,31,111,.08);color:var(--brand);font-size:.78rem;font-weight:950}
.tournament-index-card{display:flex;min-width:0;flex-direction:column;color:inherit;text-decoration:none}
.tournament-index-card .card-body{display:flex;flex:1;flex-direction:column}
.tournament-card-top{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.tournament-card-arrow{display:grid;width:2rem;height:2rem;place-items:center;border-radius:999px;background:rgba(75,31,111,.07);color:var(--brand);font-size:1rem;font-weight:950;transition:transform .18s ease,background .18s ease,color .18s ease}
.tournament-index-card:hover .tournament-card-arrow{transform:translateX(3px);background:var(--brand);color:#fff}
.tournament-card-cta{display:inline-flex;align-items:center;align-self:flex-start;margin-top:auto;padding-top:1.15rem;color:var(--brand);font-size:.82rem;font-weight:950}
.player-directory-section{margin-top:clamp(3.5rem,8vw,7rem);scroll-margin-top:5.5rem}
.player-directory{padding:clamp(1rem,2.5vw,1.6rem);border:1px solid rgba(75,31,111,.13);border-radius:2rem;background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(230,239,107,.1) 55%,rgba(108,231,223,.1));box-shadow:0 12px 42px rgba(47,15,79,.07)}
.player-directory-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.player-search{flex:1;max-width:620px;margin:0}
.player-search>span{display:block;margin-bottom:.42rem;color:var(--brand-dark);font-size:.78rem;font-weight:900}
.player-search input{min-height:48px;border-width:1px;border-radius:999px;padding-inline:1.15rem;background:rgba(255,255,255,.94)}
.player-directory-status{flex:0 0 auto;margin:0 0 .78rem;color:rgba(26,26,26,.52);font-size:.78rem;font-weight:850}
.player-directory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:.7rem}
.player-directory-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;min-width:0;padding:.85rem;border:1px solid rgba(75,31,111,.1);border-radius:1.15rem;background:rgba(255,255,255,.9);color:inherit;text-decoration:none;box-shadow:0 4px 16px rgba(47,15,79,.035);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}
.player-directory-card:hover{transform:translateY(-2px);border-color:rgba(75,31,111,.25);background:#fff;box-shadow:0 10px 24px rgba(47,15,79,.09)}
.player-directory-card:focus-visible{outline:3px solid rgba(75,31,111,.22);outline-offset:3px}
.player-directory-avatar{display:grid;width:2.55rem;height:2.55rem;place-items:center;border-radius:.85rem;background:linear-gradient(145deg,var(--brand),var(--brand-dark));color:var(--lime);font-size:1rem;font-weight:950;box-shadow:0 7px 16px rgba(47,15,79,.16)}
.player-directory-main{min-width:0}
.player-directory-main strong{display:block;overflow:hidden;color:var(--brand-dark);font-size:.98rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
.player-directory-main span{display:block;margin-top:.22rem;overflow:hidden;color:rgba(26,26,26,.5);font-size:.72rem;font-weight:730;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.player-directory-arrow{color:rgba(75,31,111,.38);font-weight:950;transition:transform .16s ease,color .16s ease}
.player-directory-card:hover .player-directory-arrow{transform:translateX(2px);color:var(--brand)}
.player-directory-empty{margin:.8rem 0 0;padding:1.5rem;border:1px dashed rgba(75,31,111,.2);border-radius:1.2rem;background:rgba(255,255,255,.72);color:rgba(26,26,26,.55);font-weight:800;text-align:center}
.player-directory-footer{display:flex;justify-content:center;margin-top:1rem}
.player-directory-toggle{min-width:min(100%,260px)}
.player-profile-link{color:inherit;text-decoration:underline;text-decoration-color:transparent;text-decoration-thickness:2px;text-underline-offset:3px;transition:color .15s ease,text-decoration-color .15s ease}
.player-profile-link:hover{color:var(--brand);text-decoration-color:currentColor}
.player-profile-link:focus-visible{outline:3px solid rgba(75,31,111,.22);outline-offset:2px;border-radius:.25rem}

/* Tournoi et classement */
.tournament-hero.has-cover{min-height:clamp(330px,36vw,420px);padding:clamp(2.8rem,5vw,4.8rem) 0}
.tournament-hero .hero-content{max-width:940px}
.tournament-meta{gap:.55rem;margin-top:1.4rem!important}
.tournament-meta-item{display:inline-flex;align-items:center;min-height:2.15rem;padding:.42rem .78rem;border:1px solid rgba(75,31,111,.12);border-radius:999px;background:rgba(255,255,255,.72);color:var(--brand-dark);font-size:.8rem;font-weight:850;line-height:1.15;box-shadow:0 5px 18px rgba(47,15,79,.06);backdrop-filter:blur(8px)}
.hero.has-cover .tournament-meta-item{border-color:rgba(255,255,255,.2);background:rgba(25,7,40,.48);color:#fff;box-shadow:none}
.tournament-public-page{position:relative}
.grid-main{display:grid;grid-template-columns:minmax(300px,1fr) minmax(0,2fr);gap:1.5rem;align-items:start}
.tournament-public-page.is-completed .grid-main{margin-top:clamp(2.4rem,5vw,4rem)}
.panel{margin-bottom:1.1rem;padding:1.35rem;background:#fff;border:1px solid var(--line);border-radius:1.75rem;box-shadow:0 8px 28px rgba(47,15,79,.05)}
.panel h2,.panel h3{margin:0 0 .9rem;color:var(--brand-dark);font-weight:950;letter-spacing:-.025em}
.sticky{position:sticky;top:5.5rem}
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:1.5rem;background:#fff;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:collapse}
th,td{padding:.82rem .9rem;text-align:left;border-bottom:1px solid rgba(75,31,111,.1);vertical-align:middle}
th{background:transparent;color:#64748b;font-size:.78rem;font-weight:850;letter-spacing:.035em}
tbody tr:last-child td{border-bottom:0}
tbody tr{transition:background .15s ease}
tbody tr:hover{background:rgba(75,31,111,.025)}
.rank{color:var(--brand-dark);font-weight:950;font-size:1.05rem}
.score{color:var(--tournament-primary);font-weight:950}
.muted{color:rgba(26,26,26,.52)}

/* Classement public */
.standings-panel{margin:0;overflow:hidden;border:1px solid rgba(75,31,111,.13);border-radius:1.7rem;background:#fff;box-shadow:0 10px 34px rgba(47,15,79,.07)}
.standings-header{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:.8rem;overflow:hidden;padding:1.2rem 1.25rem;background:linear-gradient(125deg,var(--brand-dark),var(--brand));color:#fff}
.standings-header::after{content:"";position:absolute;z-index:-1;right:-3rem;top:-4.8rem;width:10rem;height:10rem;border:1.65rem solid rgba(230,239,107,.15);border-radius:999px}
.standings-kicker{display:block;margin-bottom:.2rem;color:var(--lime);font-size:.69rem;font-weight:950;letter-spacing:.15em;text-transform:uppercase}
.standings-header h2{margin:0;color:#fff;font-size:clamp(1.35rem,2.2vw,1.8rem);font-weight:950;letter-spacing:-.035em;line-height:1.05}
.standings-count{position:relative;flex:0 0 auto;padding:.42rem .65rem;border-radius:999px;background:var(--lime);color:var(--brand-dark);font-size:.7rem;font-weight:950;line-height:1}
.standings-list{margin:0;padding:0;background:#fff;font-variant-numeric:tabular-nums;list-style:none}
.standings-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;min-width:0;padding:.78rem .9rem;border-bottom:1px solid rgba(75,31,111,.085);transition:background .15s ease}
.standings-row:hover{background:rgba(108,231,223,.1)}
.standings-row:last-child{border-bottom:0}
.standings-row.is-top-1{background:linear-gradient(90deg,rgba(230,239,107,.26),rgba(255,255,255,0) 70%)}
.standings-row.is-top-2{background:linear-gradient(90deg,rgba(223,229,236,.5),rgba(255,255,255,0) 70%)}
.standings-row.is-top-3{background:linear-gradient(90deg,rgba(220,167,120,.2),rgba(255,255,255,0) 70%)}
.standing-rank-badge{display:grid;width:2.05rem;height:2.05rem;place-items:center;border-radius:999px;background:rgba(75,31,111,.085);color:var(--brand-dark);font-size:.82rem;font-weight:950}
.is-top-1 .standing-rank-badge{background:#f1cf70;color:#5d3d00;box-shadow:0 5px 15px rgba(215,164,59,.2)}
.is-top-2 .standing-rank-badge{background:#dfe5ec;color:#3e4a56}
.is-top-3 .standing-rank-badge{background:#dca778;color:#5e2f10}
.standing-player{min-width:0}
.standing-player strong{display:block;overflow-wrap:anywhere;color:var(--brand-dark);font-weight:900;line-height:1.2}
.standing-player small{display:block;margin-top:.18rem;color:rgba(26,26,26,.5);font-size:.72rem;font-weight:750}
.standing-player-heading{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.standing-status-badge{display:inline-flex;align-items:center;min-height:1.25rem;padding:.18rem .42rem;border-radius:999px;font-size:.58rem;font-weight:950;letter-spacing:.07em;line-height:1;text-transform:uppercase}
.standing-status-badge.is-dropped{background:rgba(255,90,99,.15);color:#9f2530}
.standing-status-badge.is-absent{background:rgba(75,31,111,.09);color:rgba(47,15,79,.62)}
.standings-row.participant-is-dropped{background:linear-gradient(90deg,rgba(255,90,99,.13),rgba(255,255,255,0) 78%);box-shadow:inset 4px 0 var(--coral)}
.standings-row.participant-is-absent{background:rgba(75,31,111,.035);opacity:.72}
.standings-row.participant-is-dropped .standing-points,.standings-row.participant-is-absent .standing-points{color:rgba(47,15,79,.52)}
.standing-metrics{display:flex!important;gap:.55rem;flex-wrap:wrap}
.standing-metrics span+span::before{content:"·";margin-right:.55rem;color:rgba(75,31,111,.28)}
.standing-metrics b{color:rgba(47,15,79,.72);font-weight:900}
.standing-points{display:flex;min-width:3.15rem;align-items:flex-end;flex-direction:column;color:var(--tournament-primary);line-height:1}
.standing-points strong{font-size:.95rem;font-weight:950}
.standing-points small{margin-top:.18rem;color:rgba(26,26,26,.42);font-size:.58rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.standings-note{display:flex;align-items:flex-start;gap:.65rem;margin:0;padding:.9rem 1.2rem;border-top:1px solid rgba(75,31,111,.08);background:rgba(108,231,223,.11);color:rgba(26,26,26,.62);font-size:.76rem;font-weight:680;line-height:1.45}
.standings-note span{flex:0 0 auto;padding:.22rem .48rem;border-radius:999px;background:rgba(108,231,223,.42);color:#145f5b;font-size:.64rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}
.standings-final,.standings-provisional{margin:0}
.standings-provisional .standing-rank-badge{width:1.9rem;height:1.9rem}
.standings-empty{margin:0;padding:2rem;text-align:center;color:rgba(26,26,26,.55);font-weight:750}

.round{margin-bottom:1rem;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:1.5rem;box-shadow:0 6px 22px rgba(47,15,79,.04)}
.round summary{display:flex;justify-content:space-between;gap:1rem;padding:1.05rem 1.2rem;color:var(--brand-dark);font-weight:900;cursor:pointer;list-style:none}
.round summary::-webkit-details-marker{display:none}
.round summary::after{content:"＋";margin-left:auto;color:var(--brand);font-size:1.1rem;line-height:1}
.round[open] summary::after{content:"−"}
.round[open] summary{border-bottom:1px solid rgba(75,31,111,.1);background:rgba(75,31,111,.025)}
.round summary>span:last-of-type{margin-left:auto}
.matches{padding:.45rem .7rem}
.match-row{display:grid;grid-template-columns:82px minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.85rem;padding:.8rem .55rem;border-bottom:1px solid rgba(75,31,111,.08)}
.match-row:last-child{border:0}
.match-row>strong{color:var(--brand-dark);font-size:.84rem}
.match-summary,.match-scoreline{grid-column:2/-1;min-width:0}
.match-scoreline{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.8rem}
.match-side{min-width:0;overflow-wrap:anywhere}
.match-side.home{text-align:right}
.match-result{min-width:4.3rem;padding:.3rem .62rem;border-radius:.7rem;background:rgba(75,31,111,.07);color:var(--brand-dark);font-size:.88rem;font-weight:950;text-align:center;white-space:nowrap}
.match-result.is-overtime{background:rgba(255,154,87,.2);color:#87400d}
.match-result.is-overtime.is-expired{background:rgba(255,90,99,.15);color:#91232d}
.match-outcome{display:inline-flex;align-items:center;margin-right:.38rem;color:rgba(26,26,26,.48);font-size:.72rem;font-weight:900;letter-spacing:.035em;text-transform:uppercase;white-space:nowrap}
.match-outcome.is-win{color:var(--tournament-primary)}
.match-outcome.is-loss{color:rgba(26,26,26,.46)}
.admin-match-scoreline{margin:.8rem 0;padding:.8rem;border-radius:.85rem;background:#fff;border:1px solid rgba(75,31,111,.1)}
.match-ranking{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.match-ranking-separator{color:rgba(26,26,26,.32)}
.winner{color:var(--tournament-primary);font-weight:950}
.final-highlight{position:relative;isolation:isolate;margin-bottom:2rem;padding:clamp(1.4rem,3vw,2.25rem);overflow:hidden;border:1px solid rgba(75,31,111,.14);border-radius:2rem;background:linear-gradient(135deg,#fff,rgba(230,239,107,.22) 48%,rgba(108,231,223,.2));box-shadow:var(--soft-shadow)}
.tournament-public-page.is-completed .final-highlight{margin-bottom:1.5rem}
.tournament-public-page.is-completed .standings-final{margin-top:0}
.final-highlight::after{content:"";position:absolute;z-index:-1;right:-5rem;bottom:-6rem;width:15rem;height:15rem;border:2.6rem solid rgba(255,90,99,.08);border-radius:999px}
.final-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.4rem}
.final-heading h2{margin:.3rem 0 0;color:var(--brand-dark);font-size:clamp(2rem,4vw,3.25rem);font-weight:950;letter-spacing:-.045em;line-height:1}
.final-heading p{margin:0;color:rgba(26,26,26,.58);font-weight:750}
.final-highlight.has-podium-photo{background:linear-gradient(145deg,#fff 0%,rgba(230,239,107,.18) 52%,rgba(108,231,223,.2) 100%)}
.has-podium-photo .final-heading{position:relative;z-index:3;margin-bottom:1.25rem}
.has-podium-photo .podium-showcase{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);align-items:stretch;gap:1.1rem}
.podium-photo-stage{position:relative;isolation:isolate;min-height:clamp(360px,38vw,540px);overflow:hidden;border:1px solid rgba(255,255,255,.34);border-radius:1.65rem;background:var(--brand-dark);box-shadow:0 18px 44px rgba(47,15,79,.16)}
.podium-photo-stage::before{content:"";position:absolute;z-index:3;inset:0;border-radius:inherit;background:linear-gradient(90deg,rgba(47,15,79,.18),transparent 24%,transparent 76%,rgba(47,15,79,.18));box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);pointer-events:none}
.podium-photo-stage::after{content:"";position:absolute;z-index:3;inset:auto 0 0;height:16%;background:linear-gradient(180deg,transparent,rgba(25,7,40,.2));pointer-events:none}
.podium-photo-ambient{position:absolute;z-index:0;inset:-2.5rem;background-position:center;background-size:cover;filter:blur(28px) saturate(.82);opacity:.66;transform:scale(1.08)}
.podium-photo-image{position:absolute;z-index:2;inset:0;display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 18px 36px rgba(25,7,40,.28))}
.podium-results{position:relative;z-index:2}
.has-podium-photo .podium-results{display:flex;flex-direction:column;padding:1.1rem;border:1px solid rgba(75,31,111,.12);border-radius:1.65rem;background:rgba(255,255,255,.86);box-shadow:0 14px 38px rgba(47,15,79,.09);backdrop-filter:blur(10px)}
.podium-results-heading{display:grid;grid-template-columns:minmax(2rem,1fr) auto minmax(2rem,1fr);align-items:center;gap:.9rem;margin:0 0 1.2rem;color:rgba(47,15,79,.55);font-size:.7rem;font-weight:950;letter-spacing:.12em;text-align:center;text-transform:uppercase}
.podium-results-heading span{height:1px;background:linear-gradient(90deg,transparent,rgba(75,31,111,.18))}
.podium-results-heading span:last-child{background:linear-gradient(90deg,rgba(75,31,111,.18),transparent)}
.podium-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(290px,.7fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:.9rem}
.has-podium-photo .podium-grid{flex:1;grid-template-columns:1fr;grid-template-rows:none}
.has-podium-photo .podium-rank-1{grid-row:auto;padding:1.3rem;border-width:1px}
.has-podium-photo .podium-rank-1 h3{font-size:clamp(1.4rem,2.3vw,2rem)}
.has-podium-photo .podium-rank-1>strong{font-size:1.1rem}
.has-podium-photo .podium-rank-1 .podium-medal{width:3.5rem;height:3.5rem;font-size:1.55rem}
.podium-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;min-width:0;padding:1.15rem;border:1px solid rgba(75,31,111,.12);border-radius:1.5rem;background:rgba(255,255,255,.88);box-shadow:0 8px 25px rgba(47,15,79,.045)}
.podium-card h3{margin:.15rem 0 0;overflow-wrap:anywhere;color:var(--brand-dark);font-size:clamp(1.05rem,2vw,1.45rem);font-weight:950;line-height:1.1}
.podium-card>strong{white-space:nowrap;color:var(--tournament-primary);font-size:1.05rem;font-weight:950}
.podium-medal{display:grid;width:2.8rem;height:2.8rem;place-items:center;border-radius:999px;background:rgba(75,31,111,.1);color:var(--brand-dark);font-size:1.15rem;font-weight:950}
.podium-label{color:rgba(26,26,26,.52);font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.podium-rank-1{grid-row:1/3;padding:clamp(1.5rem,3vw,2.25rem);border:2px solid rgba(215,164,59,.45);background:linear-gradient(135deg,#fffdf4,#fff 68%)}
.podium-rank-1 h3{font-size:clamp(1.65rem,3vw,2.7rem)}
.podium-rank-1>strong{font-size:1.3rem}
.podium-rank-1 .podium-medal{width:clamp(3.7rem,6vw,5rem);height:clamp(3.7rem,6vw,5rem);background:#f1cf70;color:#5d3d00;font-size:clamp(1.5rem,3vw,2.25rem);box-shadow:0 10px 28px rgba(215,164,59,.22)}
.podium-rank-2 .podium-medal{background:#dfe5ec;color:#3e4a56}
.podium-rank-3 .podium-medal{background:#dca778;color:#5e2f10}
.podium-card.participant-is-dropped{border-color:rgba(255,90,99,.38);box-shadow:inset 4px 0 var(--coral),0 8px 25px rgba(47,15,79,.045)}
.podium-card.participant-is-absent{opacity:.72}
.podium-card .standing-status-badge{margin-top:.45rem}

/* Photo du podium · administration */
.podium-photo-admin{scroll-margin-top:7rem}
.podium-photo-admin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1.5rem;margin-bottom:1.25rem}
.podium-photo-admin-head h2{margin:.25rem 0 .4rem}
.podium-photo-admin-head p{max-width:760px;margin:0;color:rgba(26,26,26,.6);font-weight:700;line-height:1.55}
.podium-photo-admin-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);align-items:stretch;gap:1.2rem}
.podium-photo-admin-preview{position:relative;display:grid;min-height:280px;max-height:480px;overflow:hidden;place-items:center;border:1px dashed rgba(75,31,111,.24);border-radius:1.5rem;background:linear-gradient(135deg,rgba(75,31,111,.07),rgba(108,231,223,.12))}
.podium-photo-admin-preview.has-image{border-style:solid;background:var(--brand-dark)}
.podium-photo-admin-preview img{display:block;width:100%;height:100%;max-height:480px;object-fit:contain}
.podium-photo-admin-preview [hidden]{display:none}
.podium-photo-admin-placeholder{display:flex;align-items:center;flex-direction:column;gap:.35rem;padding:2rem;color:rgba(47,15,79,.55);text-align:center}
.podium-photo-admin-placeholder::before{content:"✦";display:grid;width:4rem;height:4rem;margin-bottom:.35rem;place-items:center;border-radius:999px;background:rgba(255,255,255,.75);color:var(--brand);font-size:1.8rem;box-shadow:0 8px 24px rgba(47,15,79,.08)}
.podium-photo-admin-placeholder strong{color:var(--brand-dark);font-size:1.05rem}
.podium-photo-admin-placeholder span{font-size:.78rem;font-weight:750}
.podium-photo-admin-controls{display:flex;justify-content:center;flex-direction:column;gap:.85rem;padding:clamp(.2rem,2vw,1rem)}
.podium-photo-admin-controls form{margin:0}
.podium-photo-admin-controls form:first-child{display:grid;gap:.8rem}
.podium-photo-admin-controls p{margin:0}
.podium-photo-admin-controls button{width:100%}

/* Statistiques joueur */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}
.stat{padding:1.25rem;background:#fff;border:1px solid var(--line);border-radius:1.5rem;color:rgba(26,26,26,.58);font-weight:750;box-shadow:0 6px 22px rgba(47,15,79,.04)}
.stat:nth-child(2){background:rgba(116,209,87,.12)}
.stat:nth-child(3){background:rgba(108,231,223,.12)}
.stat:nth-child(4){background:rgba(255,90,99,.08)}
.stat strong{display:block;margin-bottom:.15rem;color:var(--brand-dark);font-size:clamp(1.8rem,4vw,2.5rem);font-weight:950;line-height:1}

/* Messages */
.alert{margin-top:1rem;padding:.85rem 1rem;border-radius:1rem;font-weight:750}
.alert-success{background:rgba(116,209,87,.18);color:#285b1d}
.alert-error{background:rgba(255,90,99,.15);color:#91232d}
.alert-info{background:rgba(108,231,223,.2);color:#165b58}

/* Administration */
.admin-bar{background:var(--brand-dark);color:#fff;border-bottom:1px solid rgba(255,255,255,.12)}
.admin-nav{min-height:58px;display:flex;justify-content:space-between;align-items:center;gap:1.25rem}
.admin-nav nav{display:flex;gap:.55rem;flex-wrap:wrap}
.admin-nav a{padding:.45rem .7rem;border-radius:999px;color:rgba(255,255,255,.8);font-size:.88rem;font-weight:750;text-decoration:none}
.admin-nav a:hover{background:rgba(255,255,255,.1);color:var(--lime)}
.admin-body .page{padding-top:2.5rem}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.form-grid .full{grid-column:1/-1}
.form-grid>p{min-width:0;margin:0}
label{display:block;margin-bottom:.45rem;color:var(--brand-dark);font-weight:850;line-height:1.35}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{
    display:block;
    width:100%;
    min-width:0;
    min-height:50px;
    border:2px solid rgba(75,31,111,.2);
    border-radius:1rem;
    padding:.78rem 1rem;
    background:#fff;
    background-clip:padding-box;
    color:var(--ink);
    line-height:1.4;
    outline:none;
}
select{padding-right:2.75rem}
input::placeholder,textarea::placeholder{color:rgba(26,26,26,.42);opacity:1}
input:focus,select:focus,textarea:focus{border-color:rgba(75,31,111,.52);box-shadow:0 0 0 4px rgba(75,31,111,.1)}
input:disabled,select:disabled,textarea:disabled{background:rgba(75,31,111,.06);color:rgba(26,26,26,.48);cursor:not-allowed}
input[type=color]{height:50px;padding:.25rem}
input[type=checkbox],input[type=radio]{width:1.05rem;height:1.05rem;margin:0 .45rem 0 0;vertical-align:-.15rem}
input[type=file]{padding:.45rem .55rem}
input::file-selector-button{margin-right:.75rem;border:0;border-radius:.7rem;padding:.55rem .75rem;background:rgba(75,31,111,.1);color:var(--brand-dark);font-weight:800;cursor:pointer}
textarea{min-height:120px;padding-top:.9rem;line-height:1.55;resize:vertical}
.help{display:block;margin-top:.4rem;color:rgba(26,26,26,.56);font-size:.82rem;line-height:1.45}
.field-with-suffix{position:relative;display:block}
.field-with-suffix input{padding-right:6.25rem}
.field-with-suffix>span{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:rgba(26,26,26,.52);font-size:.82rem;font-weight:800;pointer-events:none}
.duration-field{transition:opacity .15s ease}
.duration-field.is-disabled{opacity:.55}
.inline-form{display:flex;align-items:flex-end;gap:.55rem;flex-wrap:wrap}
.inline-form>*{flex:1}.inline-form button,.inline-form .button{flex:0 0 auto}
.tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1.25rem}
.tabs a{padding:.55rem .8rem;border-radius:999px;background:rgba(75,31,111,.08);color:var(--brand-dark);font-weight:800;text-decoration:none}
.tabs a.active{background:var(--brand);color:#fff}
.participant-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.7rem 0;border-bottom:1px solid rgba(75,31,111,.08)}
.participant-row:last-child{border:0}
.pilot-summary{margin:.25rem 0 0;padding:.8rem 1rem;border-radius:1rem;background:rgba(108,231,223,.14);color:#165b58}
.round-timer-admin{display:grid;grid-template-columns:minmax(230px,.75fr) minmax(0,1.25fr);gap:1.25rem;align-items:center;margin:1rem 0;padding:1.2rem;border:1px solid rgba(75,31,111,.14);border-radius:1.3rem;background:linear-gradient(135deg,rgba(75,31,111,.06),rgba(108,231,223,.12))}
.round-timer-copy{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.35rem 1rem}.round-timer-copy .eyebrow{grid-column:1/-1}.round-timer-copy>strong{font-variant-numeric:tabular-nums;font-size:clamp(3rem,7vw,5.8rem);font-weight:950;letter-spacing:-.06em;line-height:.9;color:var(--brand-dark)}
.round-timer-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.round-timer-set{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.round-timer-set label{margin:0;font-size:.78rem;font-weight:900}.round-timer-set input{width:90px;min-height:44px;padding:.65rem .7rem;text-align:center;font-variant-numeric:tabular-nums;font-weight:900}.round-timer-feedback{grid-column:2;margin:0;color:rgba(26,26,26,.62);font-size:.86rem;font-weight:750}
.round-timer-admin.is-running{border-color:rgba(43,151,44,.28);background:linear-gradient(135deg,rgba(43,151,44,.08),rgba(108,231,223,.12))}.round-timer-admin.is-paused{border-color:rgba(246,136,51,.38);background:rgba(246,136,51,.08)}.round-timer-admin.is-finished{border-color:rgba(218,62,73,.35);background:rgba(218,62,73,.07)}.round-timer-admin.is-overtime{box-shadow:inset 5px 0 var(--orange)}
.deck-timer-admin{box-shadow:inset 5px 0 var(--cyan)}
.bandai-endgame-help{margin:-.45rem 0 .8rem;border:1px solid rgba(246,136,51,.3);border-radius:1rem;background:rgba(246,136,51,.07)}.bandai-endgame-help summary{padding:.7rem .9rem;color:#77400d;font-weight:900;cursor:pointer}.bandai-endgame-help-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem 1rem;padding:0 .9rem .85rem}.bandai-endgame-help-body p{margin:0;font-size:.84rem;line-height:1.45}.bandai-endgame-help-body ol{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem;margin:0;padding:0;list-style:none;counter-reset:bandai-tiebreak}.bandai-endgame-help-body li{counter-increment:bandai-tiebreak;padding:.55rem .65rem;border-radius:.75rem;background:#fff;font-size:.78rem;line-height:1.35}.bandai-endgame-help-body li::before{content:counter(bandai-tiebreak);display:inline-grid;width:1.35rem;height:1.35rem;margin-right:.4rem;place-items:center;border-radius:999px;background:var(--orange);color:#fff;font-weight:950}
.pairing-source-actions{margin:.5rem 0 1rem}.pairing-editor{padding-top:.35rem}.pairing-table{min-width:720px}.pairing-table th:first-child,.pairing-table td:first-child{width:100px}.pairing-table th:nth-child(3),.pairing-table td:nth-child(3){width:62px;text-align:center}.pairing-table input,.pairing-table select{min-width:0}.pairing-swap{width:2.6rem;padding:.65rem .4rem;font-size:1.2rem}.pairing-validation{margin:.85rem 0}.pairing-validation ul{margin:0;padding:.8rem 1rem .8rem 2rem;border-radius:1rem;background:rgba(75,31,111,.045)}.pairing-validation li+li{margin-top:.35rem}.pairing-validation .is-error{color:#91232d}.pairing-validation .is-warning{color:#8a5300}.pairing-validation .is-success{color:#285b1d;font-weight:850}
.sound-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem;border:1px solid rgba(75,31,111,.12);border-radius:1.2rem;background:rgba(75,31,111,.035)}.sound-setting{min-width:0}.sound-setting>label{display:block;margin-bottom:.4rem}.sound-setting>input[type="file"]{margin-top:.55rem}.sound-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem}.sound-picker button{white-space:nowrap}
.sound-upload-panel{display:grid;grid-template-columns:minmax(240px,.65fr) minmax(0,1.35fr);align-items:end;gap:1.25rem}.sound-upload-panel p{margin:.25rem 0 0}.sound-upload-form{display:grid;grid-template-columns:minmax(180px,.75fr) minmax(260px,1.25fr) auto;align-items:end;gap:.75rem}.sound-upload-form p{margin:0}.sound-library-heading{display:flex;align-items:end;justify-content:space-between;margin-top:1.5rem}.sound-library-heading .section-title{margin:0}.sound-library-table td:last-child,.sound-library-table th:last-child{text-align:right}.sound-library-table form{display:inline}.sound-library-table .help{margin-top:.15rem}
.demo-intro,.demo-status-head,.danger-zone{display:flex;align-items:flex-start;justify-content:space-between;gap:1.75rem}
.demo-intro>div,.demo-status-head>div,.danger-zone>div{min-width:0;max-width:820px}
.demo-intro h2,.demo-status-head h2,.danger-zone h2{margin:.55rem 0 .6rem}
.demo-list{margin:1rem 0;padding-left:1.4rem}.demo-list li+li{margin-top:.55rem}
.demo-safety{margin:1.15rem 0 0;padding:.8rem 1rem;border-radius:1rem;background:#eef8e9;color:#255a1c;font-weight:800}
.demo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.9rem;margin-top:1.4rem}
.demo-card{display:flex;min-width:0;flex-direction:column;justify-content:space-between;gap:1rem;padding:1.15rem;border:1px solid #e3dce9;border-radius:1.15rem;background:#fcfaf7}
.demo-card h3{margin:.75rem 0 .45rem;line-height:1.2}.demo-card p{margin:0}.demo-card .actions{margin-top:0}
.danger-zone{margin-top:1.6rem;border-color:#f0c7c9;background:#fffafa}.danger-zone .eyebrow{color:#a93232}
.result-form{padding:1rem;background:rgba(75,31,111,.035);border-radius:1rem;margin:.55rem 0}
.result-grid{display:grid;grid-template-columns:repeat(4,minmax(90px,1fr));gap:.65rem;align-items:flex-end}
.table-ranking-help{margin:.8rem 0 1rem;padding:.7rem .85rem;border-radius:.85rem;background:rgba(108,231,223,.15);color:#165b58;font-size:.86rem;font-weight:750}
.ranking-grid{align-items:stretch}
.score-entry{min-width:0;padding:.85rem;border:1px solid rgba(75,31,111,.12);border-radius:1rem;background:#fff}
.score-entry p{margin:.75rem 0 0}
.score-entry-head{display:flex;align-items:center;gap:.65rem;min-height:2rem;color:var(--brand-dark)}
.live-rank{display:grid;flex:0 0 2rem;height:2rem;place-items:center;border-radius:999px;background:rgba(75,31,111,.09);color:var(--brand);font-size:.8rem;font-weight:950}
.result-save-row{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;margin-top:.85rem}
.save-status{display:inline-flex;align-items:center;gap:.4rem;color:rgba(26,26,26,.55);font-size:.82rem;font-weight:800}
.save-status::before{content:"";width:.55rem;height:.55rem;border-radius:999px;background:rgba(75,31,111,.25)}
.save-status.is-saving::before{background:var(--orange);animation:save-pulse .8s ease-in-out infinite alternate}
.save-status.is-saved{color:#285b1d}.save-status.is-saved::before{background:var(--green)}
.save-status.is-error{color:#91232d}.save-status.is-error::before{background:var(--coral)}
.save-status.is-waiting::before{background:var(--orange)}
.ajax-result-enabled [data-result-form][data-scoring-mode="result"]:not(.has-save-error) .manual-result-save,
.ajax-result-enabled [data-result-form][data-match-status="completed"]:not(.has-save-error) .manual-result-save{display:none}

/* Administration d'un tournoi : densité utile en soirée */
.tournament-admin-page.container{width:min(1600px,calc(100% - 24px))}
.admin-body .tournament-admin-page{padding-top:1.15rem;padding-bottom:3.5rem}
.tournament-admin-page .page-title{margin-bottom:.75rem}
.tournament-admin-page form.is-ajax-submitting{opacity:.55;pointer-events:none}.tournament-ajax-notice{position:fixed;z-index:90;top:5.2rem;right:1rem;width:min(430px,calc(100vw - 2rem));margin:0;box-shadow:0 18px 45px rgba(47,15,79,.2)}
.tournament-admin-page .page-title h1{font-size:clamp(1.65rem,2.4vw,2.25rem)}
.tournament-admin-page .page-title .actions{margin-top:0}
.tournament-tabs{position:sticky;z-index:35;top:4.1rem;margin:0 0 .8rem;padding:.45rem;border:1px solid rgba(75,31,111,.1);border-radius:1rem;background:rgba(252,250,247,.94);backdrop-filter:blur(10px)}
.tournament-tabs a{padding:.42rem .68rem;font-size:.82rem}
.tournament-admin-page .panel{margin-bottom:.7rem;padding:.9rem;border-radius:1.15rem}
.tournament-admin-page .panel h2{margin-bottom:.55rem;font-size:1.18rem}
.tournament-admin-page .alert{margin-top:.55rem;padding:.6rem .75rem;font-size:.85rem}
.tournament-admin-page .pilot-summary{padding:.55rem .7rem;font-size:.85rem}
.tournament-admin-page .round-timer-admin{grid-template-columns:minmax(190px,.55fr) minmax(0,1.45fr);gap:.75rem;margin:.65rem 0;padding:.7rem;border-radius:1rem}
.tournament-admin-page .round-timer-copy>strong{font-size:clamp(2.6rem,4.7vw,4.2rem)}
.tournament-admin-page .round-timer-actions{gap:.45rem}.tournament-admin-page .round-timer-set{padding-left:.25rem;border-left:1px solid rgba(75,31,111,.14)}.tournament-admin-page .round-timer-set input{min-height:38px;padding:.45rem .55rem}
.tournament-admin-page .round-timer-actions button{min-height:38px;padding:.58rem .85rem;font-size:.84rem}
.tournament-admin-page .round-timer-feedback{font-size:.78rem}
.tournament-admin-page #pilotage>.actions{margin-top:.65rem;gap:.45rem}
.tournament-admin-page #pilotage>.actions button{min-height:38px;padding:.58rem .85rem;font-size:.84rem}
.pairing-intro{margin:.1rem 0 .55rem}
.pairing-import-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.75rem}
.pairing-import-row p{margin:0}.pairing-import-row textarea{min-height:86px;padding:.55rem .7rem}
.pairing-source-actions{flex-direction:column;align-items:stretch;margin:1.7rem 0 0}.pairing-source-actions button{min-height:38px;padding:.55rem .8rem;font-size:.82rem}
.pairing-table{min-width:650px}.pairing-table th,.pairing-table td{padding:.32rem .4rem}.pairing-table th:first-child,.pairing-table td:first-child{width:76px}.pairing-table th:nth-child(3),.pairing-table td:nth-child(3),.pairing-table th:last-child,.pairing-table td:last-child{width:46px;text-align:center}.pairing-table input,.pairing-table select{min-height:38px;padding:.42rem .58rem;border-width:1px;border-radius:.7rem}.pairing-table select{padding-right:1.8rem}.pairing-swap,.pairing-remove{width:2.15rem;min-height:36px;padding:.35rem;font-size:1rem}.pairing-remove{color:#9f2530}.pairing-validation{margin:.45rem 0}.pairing-validation ul{display:flex;gap:.4rem 1.25rem;flex-wrap:wrap;margin:0;padding:.5rem .7rem .5rem 1.7rem;font-size:.8rem}.pairing-validation li+li{margin-top:0}.pairing-final-actions{position:sticky;z-index:10;bottom:.5rem;align-items:center;margin-top:.5rem;padding:.45rem;border:1px solid rgba(75,31,111,.1);border-radius:1rem;background:rgba(255,255,255,.96);box-shadow:0 8px 25px rgba(47,15,79,.1)}.pairing-final-actions button{min-height:38px;padding:.55rem .85rem;font-size:.82rem}
.tournament-admin-page .grid-main{grid-template-columns:minmax(0,1fr) 310px;gap:.75rem}.tournament-admin-page .participant-row{gap:.6rem;padding:.45rem 0}.participant-controls{display:flex;align-items:center;gap:.4rem;flex-shrink:0}.participant-controls form{margin:0}.tournament-admin-page .participant-row select{min-height:38px;padding:.4rem 2rem .4rem .6rem;border-width:1px;border-radius:.7rem}.tournament-admin-page .participant-controls button{min-height:38px;padding:.5rem .7rem}
.section-heading-compact{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin:.9rem 0 .55rem}.section-heading-compact .section-title{margin:0;font-size:1.55rem}.section-heading-compact p{margin:0;font-size:.82rem}
.tournament-admin-page .round{margin-bottom:.65rem;border-radius:1.1rem}.tournament-admin-page .round summary{padding:.65rem .8rem}.tournament-admin-page .matches{display:grid;grid-template-columns:repeat(auto-fit,minmax(480px,1fr));gap:.55rem;padding:.55rem}
.tournament-admin-page .result-form{min-width:0;margin:0;padding:.65rem;border:1px solid rgba(75,31,111,.1);border-radius:.85rem;background:rgba(75,31,111,.028)}
.tournament-admin-page .result-form>.participant-row{padding:0 0 .35rem}
.tournament-admin-page .result-form .admin-match-scoreline{margin:.3rem 0;padding:.48rem;gap:.45rem}
.tournament-admin-page .result-form .match-side{font-size:.9rem;line-height:1.2}.tournament-admin-page .result-form .match-outcome{display:block;margin:0 0 .08rem;font-size:.6rem}
.tournament-admin-page .result-form [data-result-form]>p{margin:.4rem 0}.tournament-admin-page .result-form [data-result-help]{display:none}.tournament-admin-page .result-form form[data-match-status="overtime"] [data-result-help]{display:block;margin-top:.25rem;font-size:.74rem}
.tournament-admin-page .result-form input:not([type=hidden]),.tournament-admin-page .result-form select{min-height:40px;padding:.5rem .7rem;border-width:1px;border-radius:.72rem}
.tournament-admin-page .result-form label{margin-bottom:.25rem;font-size:.78rem}
.tournament-admin-page .result-grid{grid-template-columns:repeat(2,minmax(120px,1fr));gap:.45rem}.tournament-admin-page .score-entry{padding:.55rem;border-radius:.75rem}.tournament-admin-page .score-entry p{margin:.4rem 0 0}
.match-note{margin-top:.35rem}.match-note summary{display:inline-flex;padding:.25rem 0;color:rgba(26,26,26,.58);font-size:.76rem;font-weight:800;cursor:pointer}.match-note input{margin-top:.25rem}
.tournament-admin-page .result-save-row{margin-top:.4rem;gap:.5rem}.tournament-admin-page .save-status{font-size:.74rem}
.tournament-admin-page #classement .section-title{margin:1.2rem 0 .65rem;font-size:1.55rem}
.bandai-ranking-status{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.55rem;padding:.65rem .75rem;border:1px solid rgba(75,31,111,.1);border-radius:.9rem;background:rgba(108,231,223,.1)}.bandai-ranking-status>div{min-width:0}.bandai-ranking-status p{margin:.3rem 0 0;color:rgba(26,26,26,.62);font-size:.8rem}.bandai-ranking-status>.badge{flex:0 0 auto}
.bandai-ranking-table .drag-column,.bandai-ranking-table .drag-handle{width:42px;text-align:center}.bandai-ranking-table tbody tr{cursor:grab}.bandai-ranking-table tbody tr:active{cursor:grabbing}.bandai-ranking-table tbody tr.is-dragging{opacity:.45;background:rgba(108,231,223,.22)}.drag-handle{color:rgba(75,31,111,.55);font-size:1.2rem;font-weight:950;user-select:none}
.bandai-ranking-actions{position:sticky;z-index:12;bottom:.5rem;display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin-top:.55rem;padding:.5rem;border:1px solid rgba(75,31,111,.12);border-radius:1rem;background:rgba(255,255,255,.97);box-shadow:0 8px 25px rgba(47,15,79,.1)}.bandai-ranking-actions button{min-height:38px;padding:.55rem .85rem;font-size:.82rem}.clear-tv-ranking{margin-top:.5rem}
@keyframes save-pulse{to{transform:scale(1.45);opacity:.45}}
.login-shell{min-height:65vh;display:grid;place-items:center;padding:2rem}
.login-card{width:min(470px,100%);padding:2rem;background:#fff;border:1px solid var(--line);border-radius:2rem;box-shadow:var(--soft-shadow)}
.login-card h1{margin:.35rem 0 1.4rem;color:var(--brand-dark);font-size:2.2rem;font-weight:950;letter-spacing:-.04em}
.cover-preview{width:170px;max-height:210px;object-fit:contain;border-radius:1rem;margin-top:.55rem;background:rgba(75,31,111,.05);padding:.5rem}

/* Affichage TV : l'univers du tournoi reste prioritaire */
.tv-body{background:#070707;color:#fff;overflow:hidden}
.tv-shell{height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,25vw);background:linear-gradient(145deg,#111,#050505)}
.tv-main{padding:2.2vh 3.2vw;display:flex;flex-direction:column;min-width:0}
.tv-side{position:relative;background:#111;border-left:4px solid var(--tournament-primary);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}
.tv-cover{position:absolute;inset:0;background-size:cover;background-position:center;opacity:.38}
.tv-side-content{position:relative;padding:4vh 2vw;z-index:1}
.tv-logo{max-height:18vh;max-width:100%;object-fit:contain;margin-bottom:3vh}
.tv-title{font-size:clamp(1.5rem,3vw,3.4rem);font-weight:950;line-height:1.05;margin:0}
.tv-kicker{color:var(--tournament-primary);font-weight:900;text-transform:uppercase;letter-spacing:.12em}
.tv-round-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:2vw;margin:1.6vh 0 2.2vh}.tv-round-copy{min-width:0}.tv-timer-block{min-width:clamp(290px,29vw,560px);padding:1.1vh 1.2vw;border:2px solid #303030;border-radius:1.3vw;background:#0d0d0d;text-align:center}.tv-round-state{display:block;margin-bottom:.2vh;color:#aaa;font-size:clamp(.7rem,1.1vw,1.2rem);font-weight:950;letter-spacing:.11em;text-transform:uppercase}.tv-clock{font-variant-numeric:tabular-nums;font-size:clamp(4.8rem,9.5vw,10.5rem);font-weight:950;color:var(--tournament-primary);letter-spacing:-.065em;line-height:.78}.tv-timer-block.is-ready .tv-clock{color:#bbb}.tv-timer-block.is-paused{border-color:#c07730}.tv-timer-block.is-paused .tv-clock{color:#f0a24f}.tv-timer-block.is-last-minute{border-color:#ff9a57;box-shadow:0 0 2.2vw rgba(255,154,87,.24)}.tv-timer-block.is-last-minute .tv-clock,.tv-timer-block.is-overtime .tv-clock{color:#ffb06f}.tv-timer-block.is-finished{border-color:#da3e49;background:rgba(218,62,73,.16)}.tv-timer-block.is-finished .tv-clock{color:#ff7d86}.tv-timer-block.is-untimed .tv-clock{font-size:clamp(2.7rem,5vw,5.4rem);letter-spacing:-.03em}
.tv-shell.is-deck-building{grid-template-columns:1fr}
.tv-shell.is-deck-building .tv-side,.tv-shell.is-deck-building .tv-progress,.tv-shell.is-deck-building #tv-content{display:none}
.tv-shell.is-deck-building .tv-main{display:grid;place-items:center;padding:3vh 4vw}
.tv-shell.is-deck-building .tv-round-head{display:flex;width:100%;height:100%;margin:0;flex-direction:column;align-items:center;justify-content:center;gap:4vh;text-align:center}
.tv-shell.is-deck-building .tv-round-copy{display:flex;flex-direction:column;align-items:center;gap:1.2vh}
.tv-shell.is-deck-building .tv-kicker{font-size:clamp(1rem,2vw,2.4rem)}
.tv-shell.is-deck-building .tv-view-title{margin:0;font-size:clamp(3rem,7vw,8rem);line-height:.95}
.tv-shell.is-deck-building .tv-timer-block{width:min(94vw,1800px);padding:3.5vh 3vw;border-width:4px;border-radius:2vw}
.tv-shell.is-deck-building .tv-round-state{margin-bottom:1.5vh;font-size:clamp(1rem,2.2vw,2.6rem)}
.tv-shell.is-deck-building .tv-clock{font-size:clamp(11rem,29vw,34rem);line-height:.72}
.tv-view-title{font-size:clamp(1.5rem,2.4vw,3rem);font-weight:950;margin:.45vh 0 0}
.tv-table{font-size:clamp(.85rem,1.35vw,1.55rem)}
.tv-table th,.tv-table td{padding:.75vh .8vw;border-color:#333}
.tv-table th{background:#181818;color:#aaa}
.tv-table tr:nth-child(even) td{background:#111}
.tv-table .score{color:var(--tournament-primary)}
.tv-standings-table{font-size:clamp(.85rem,min(1.25vw,2.2vh),1.45rem);line-height:1.08}
.tv-standings-table th,.tv-standings-table td{padding:.38vh .75vw}
.tv-standings-table tr.tv-standings-top td{background:#171717;font-weight:850}
.tv-standings-table tr.tv-standings-top td:first-child{border-left:4px solid var(--tournament-primary)}
.tv-standings-separator td{padding:.42vh .75vw!important;background:var(--tournament-primary)!important;color:#080808!important;font-size:.68em;font-weight:950;letter-spacing:.12em;text-transform:uppercase}
.tv-match-line{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:1vw;min-width:0}
.tv-match-side{min-width:0;overflow-wrap:anywhere}
.tv-match-side.home{text-align:right}
.tv-match-result{min-width:5.5vw;padding:.35vh .7vw;border-radius:.55vw;background:#252525;color:#fff;text-align:center;white-space:nowrap}
.tv-match-result.is-overtime{background:rgba(255,154,87,.22);color:#ffd0ae}
.tv-overtime-clock.is-expired{color:#ff8b91}
.tv-match-line .is-winner{color:var(--tournament-primary);font-weight:950}
.tv-match-outcome{display:inline-flex;margin-right:.5vw;color:#888;font-size:.62em;font-weight:950;letter-spacing:.06em;text-transform:uppercase;vertical-align:.12em;white-space:nowrap}
.tv-match-outcome.is-win{color:var(--tournament-primary)}
.tv-match-outcome.is-loss{color:#888}
.tv-match-line.is-multiplayer{display:flex;gap:.65vw;flex-wrap:wrap}
.tv-match-dot{color:#666}
.tv-message{position:relative;z-index:1;padding:2vh 2vw;background:rgba(0,0,0,.72);font-size:1.05rem}
.tv-progress{height:5px;background:#222}.tv-progress span{display:block;height:100%;background:var(--tournament-primary);transition:width .5s}
.tv-final-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:1.2vw;margin:2vh 0 3vh}
.tv-podium-card{display:flex;min-width:0;min-height:21vh;flex-direction:column;justify-content:space-between;gap:1.5vh;padding:2.2vh 1.4vw;border:1px solid #333;border-radius:1.5vw;background:linear-gradient(145deg,#1c1c1c,#0f0f0f)}
.tv-podium-card h2{margin:.35vh 0 0;overflow-wrap:anywhere;font-size:clamp(1.15rem,2.15vw,2.55rem);font-weight:950;line-height:1.02}
.tv-podium-card small{color:#aaa;font-size:clamp(.65rem,.9vw,1rem);font-weight:900;letter-spacing:.09em;text-transform:uppercase}
.tv-podium-card>strong{color:var(--tournament-primary);font-size:clamp(1rem,1.45vw,1.7rem)}
.tv-podium-rank{display:grid;width:clamp(2.5rem,4.2vw,4.8rem);height:clamp(2.5rem,4.2vw,4.8rem);place-items:center;border-radius:999px;background:#292929;color:#fff;font-size:clamp(1.2rem,2vw,2.2rem);font-weight:950}
.tv-podium-1{order:2;min-height:27vh;border-color:var(--tournament-primary);box-shadow:0 0 3vw rgba(255,255,255,.08)}
.tv-podium-1 .tv-podium-rank{background:var(--tournament-primary);color:#080808}
.tv-podium-2{order:1}.tv-podium-3{order:3}
.tv-final-table{margin-top:auto}
.tv-body .hidden{display:none!important}
.tv-sound-gate{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:2rem;background:rgba(0,0,0,.9);backdrop-filter:blur(14px)}.tv-sound-card{width:min(560px,100%);padding:2.3rem;border:2px solid var(--tournament-primary);border-radius:1.7rem;background:#111;text-align:center;box-shadow:0 1.5rem 5rem rgba(0,0,0,.6)}.tv-sound-icon{display:block;font-size:3.2rem}.tv-sound-card h2{margin:.7rem 0 .5rem;font-size:2rem}.tv-sound-card p{margin:0 auto 1.5rem;color:#bbb;line-height:1.55}.tv-sound-card button{margin:.35rem}
.tv-waiting{display:grid;min-height:52vh;place-content:center;gap:1vh;padding:3vw;border:2px dashed #333;border-radius:1.5vw;background:#0d0d0d;text-align:center}.tv-waiting strong{color:var(--tournament-primary);font-size:clamp(2rem,4vw,4.5rem);font-weight:950}.tv-waiting span{color:#aaa;font-size:clamp(1rem,1.5vw,1.45rem)}

@media(max-width:980px){
    .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
    .grid-main{grid-template-columns:1fr}
    .sticky{position:static}
    .tournament-standings-aside{order:-1}
    .demo-grid{grid-template-columns:1fr}
    .demo-intro,.demo-status-head,.danger-zone{flex-direction:column}
    .round-timer-admin{grid-template-columns:1fr}.round-timer-feedback{grid-column:1}
    .tv-shell{grid-template-columns:minmax(0,1fr) minmax(220px,29vw)}
    .result-grid{grid-template-columns:repeat(2,minmax(90px,1fr))}
    .sound-upload-panel{grid-template-columns:1fr}.sound-upload-form{grid-template-columns:1fr 1fr}.sound-upload-form button{grid-column:1/-1;justify-self:start}
    .tournament-admin-page .grid-main{grid-template-columns:1fr}
    .tournament-admin-page .round-timer-admin{grid-template-columns:1fr}.tournament-admin-page .round-timer-feedback{grid-column:1}
    .tournament-admin-page .matches{grid-template-columns:1fr 1fr}
    .podium-photo-admin-layout{grid-template-columns:1fr}.podium-photo-admin-controls{padding:0}
    .has-podium-photo .podium-showcase{grid-template-columns:1fr}.podium-photo-stage{min-height:clamp(340px,62vw,520px)}
}

@media(max-width:700px){
    .container{width:min(100% - 24px,1280px)}
    .hero{padding:3.25rem 0}
    .hero.has-cover{min-height:360px}
    .hero-cover::after{background:linear-gradient(0deg,rgba(25,7,40,.95),rgba(25,7,40,.45))}
    .hero h1{font-size:clamp(2.3rem,13vw,3.7rem)}
    .cards,.form-grid{grid-template-columns:1fr}
    .form-grid .full{grid-column:auto}
    .index-section-heading{align-items:flex-start;flex-direction:column;gap:.8rem}
    .index-section-heading h2{font-size:clamp(2rem,10vw,2.8rem)}
    .player-directory{padding:.85rem;border-radius:1.45rem}
    .player-directory-toolbar{align-items:stretch;flex-direction:column;gap:.25rem}
    .player-search{max-width:none}
    .player-directory-status{margin:.25rem 0 .45rem}
    .player-directory-grid{grid-template-columns:1fr}
    .sound-settings{grid-template-columns:1fr}
    .page-title,.admin-nav{align-items:flex-start;flex-direction:column}
    .admin-nav{padding:.8rem 0}
    .match-row{grid-template-columns:60px minmax(0,1fr)}
    .match-scoreline{gap:.45rem}
    .match-result{min-width:3.7rem;padding-inline:.45rem}
    .match-outcome{display:block;margin:0 0 .12rem;font-size:.64rem}
    .final-heading{align-items:flex-start;flex-direction:column}
    .final-highlight.has-podium-photo{padding:1rem;border-radius:1.5rem}
    .has-podium-photo .final-heading{margin-bottom:1rem}
    .podium-photo-stage{min-height:clamp(260px,82vw,440px);border-radius:1.25rem}
    .podium-photo-stage::before{background:linear-gradient(90deg,rgba(47,15,79,.14),transparent 22%,transparent 78%,rgba(47,15,79,.14))}
    .podium-photo-stage::after{height:14%}
    .podium-photo-ambient{filter:blur(20px) saturate(.8)}
    .has-podium-photo .podium-results{padding:1rem;border-radius:1.25rem}
    .podium-results-heading{gap:.6rem;margin-bottom:.9rem;font-size:.62rem;letter-spacing:.09em}
    .podium-grid{grid-template-columns:1fr;grid-template-rows:none}
    .podium-rank-1{grid-row:auto;padding:1.3rem;border-width:1px}
    .podium-rank-1 h3{font-size:clamp(1.35rem,7vw,1.9rem)}
    .podium-rank-1 .podium-medal{width:3.25rem;height:3.25rem;font-size:1.4rem}
    .tournament-meta{gap:.4rem}
    .tournament-meta-item{min-height:1.9rem;padding:.35rem .62rem;font-size:.72rem}
    .standings-panel{border-radius:1.45rem}
    .standings-header{padding:1.05rem 1.1rem}
    .standings-header h2{font-size:1.45rem}
    .standings-row{padding:.72rem .82rem}
    .standing-rank-badge{width:1.9rem;height:1.9rem}
    .standings-note{display:block;padding:.8rem .9rem;font-size:.72rem}
    .standings-note span{display:table;margin-bottom:.38rem}
    .round summary{align-items:flex-start;flex-wrap:wrap}
    .round summary>span:last-of-type{order:3;width:100%;margin-left:0;font-size:.78rem}
    .stat-grid{grid-template-columns:repeat(2,1fr)}
    .result-grid{grid-template-columns:1fr}
    .sound-upload-form{grid-template-columns:1fr}.sound-upload-form button{grid-column:auto;width:100%}.sound-library-table th:nth-child(2),.sound-library-table td:nth-child(2),.sound-library-table th:nth-child(3),.sound-library-table td:nth-child(3){display:none}
    .tournament-tabs{top:4rem;overflow-x:auto;flex-wrap:nowrap}.tournament-tabs a{white-space:nowrap}
    .pairing-import-row{grid-template-columns:1fr}.pairing-source-actions{flex-direction:row;margin:.25rem 0 .5rem}.pairing-source-actions button{flex:1}
    .tournament-admin-page .matches{grid-template-columns:1fr}
    .podium-photo-admin-head{align-items:flex-start;flex-direction:column;gap:.7rem}.podium-photo-admin-preview{min-height:220px;border-radius:1.2rem}
    .section-heading-compact{align-items:flex-start;flex-direction:column;gap:.25rem}
    .bandai-endgame-help-body{grid-template-columns:1fr}.bandai-endgame-help-body ol{grid-template-columns:1fr 1fr}
    .bandai-ranking-status{align-items:flex-start;flex-direction:column}.bandai-ranking-table{min-width:760px}.bandai-ranking-actions{position:static}.bandai-ranking-actions button{flex:1}
    .tv-shell{grid-template-columns:1fr}
    .tv-side{display:none}
    .tv-round-head{grid-template-columns:1fr}.tv-timer-block{width:100%;min-width:0}.tv-clock{font-size:clamp(4.5rem,20vw,8rem)}
}

@media(max-width:430px){
    .stat-grid{grid-template-columns:1fr 1fr}
    .card-body{padding:1.15rem}
    .table-wrap{border-radius:1.15rem}
    th,td{padding:.72rem .75rem}
    .standings-header{align-items:flex-start;flex-direction:column}
    .standings-count{align-self:flex-start}
    .podium-card{grid-template-columns:auto minmax(0,1fr);gap:.75rem}
    .podium-card>strong{grid-column:2;margin-top:-.2rem}
}

@media(prefers-reduced-motion:reduce){
    html{scroll-behavior:auto}
    *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
