@font-face { font-family: "Titre"; src: url("/fonts/titre.ttf"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Chiffres"; src: url("/fonts/chiffres.ttf"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Texte"; src: url("/fonts/texte.ttf"); font-weight: 100 900; font-display: swap; }

:root {
  /* Charte : Bleu Vanta #181761 · Bleu Inter #2F2A95 · Bleu Clair #5BC2E7 · Rouge Racing #E6150B · blanc · noir */
  --bg: #050507; --panel: #0C0C14; --panel2: #13131F; --panel3: #1D1B3D; --border: #1F1E33;
  --vanta: #181761; --inter: #2F2A95; --racing: #E6150B; --header: #08080D;
  --accent: #5BC2E7; --accent-dark: rgba(91,194,231,.14); --text: #FFFFFF; --muted: #A3A2BF; --faint: #646381;
  --green: #3DD68C; --red: #FF4A3D; --blue: #4DA3FF; --orange: #FF8A3D; --purple: #B07CFF;
  --gold: #FFC83D; --silver: #C9CED6; --bronze: #D08A52;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Texte", "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
.t { font-family: "Chiffres", "Arial Narrow", sans-serif; font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .2px; line-height: 1.05; }
h1, h2, h3 { font-family: "Titre", "Arial Black", sans-serif; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; margin: 0; line-height: 1.12; }
h1 { font-size: 32px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
nav.main a.t, .tabs a.t, .mobile-nav a.t, .logo.t { font-family: "Titre", "Arial Black", sans-serif; font-style: normal; font-weight: 700; letter-spacing: .5px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .accent { color: var(--accent); }
.red { color: var(--red); } .green { color: var(--green); } .orange { color: var(--orange); }

/* Barre du haut */
header.top { position: sticky; top: 0; z-index: 20; background: var(--header); border-bottom: 3px solid var(--racing); }
.top-in { max-width: 1260px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo i { display: inline-block; width: 12px; height: 24px; background: var(--racing); box-shadow: 7px 0 0 var(--accent); transform: skewX(-18deg); }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main a { color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 3px solid transparent; }
nav.main a:hover { color: var(--text); text-decoration: none; }
nav.main a.on { color: var(--accent); border-bottom-color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bell { position: relative; width: 38px; height: 34px; border-radius: 6px; background: var(--panel2); display: grid; place-items: center; color: var(--text); }
.bell:hover { background: var(--panel3); text-decoration: none; }
.bell b { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.usermenu { position: relative; }
.usermenu > button { display: flex; align-items: center; gap: 8px; }
.dropdown { position: absolute; right: 0; top: 42px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-width: 220px; display: none; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.dropdown.open { display: block; }
.dropdown a { display: block; padding: 8px 10px; color: var(--text); border-radius: 5px; }
.dropdown a:hover { background: var(--panel2); text-decoration: none; }
.btn.burger { display: none; }
.mobile-nav { display: none; padding: 0 12px 12px; }
.mobile-nav a { display: block; padding: 10px 12px; margin-top: 6px; background: var(--panel2); border-radius: 6px; color: var(--text); font-size: 14px; }
.mobile-nav a.on { color: var(--accent); background: var(--accent-dark); }

main { max-width: 1260px; margin: 0 auto; padding: 22px 24px 60px; }
.stack > * + * { margin-top: 12px; }

/* Boutons */
.btn { font: inherit; font-size: 14px; border-radius: 5px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--panel3); text-decoration: none; }
.btn.primary { background: var(--racing); border-color: var(--racing); color: #fff; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: #FF6B60; background: #3A0F22; border-color: #6B1A2C; }
.btn.sm { font-size: 12.5px; padding: 4px 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.discord { background: #5865F2; border-color: #5865F2; color: #fff; justify-content: center; width: 100%; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); padding: 5px 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }

/* Panneaux */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.sub { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.section { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.panel > .section:first-child { margin-top: 0; }
.section::before { content: ""; width: 8px; height: 22px; background: var(--racing); transform: skewX(-16deg); }
.section h2 { font-size: 18px; }
.badge { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; padding: 3px 7px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.caps { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.empty { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 14px; color: var(--muted); }
.plate { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 8px; background: #FFFFFF; color: var(--vanta); font-size: 19px; clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%); }

/* Bannières */
.banner { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #0A0A12; }
.banner .art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.banner .art.gen { background:
  repeating-linear-gradient(115deg, transparent 0 60%, rgba(255,255,255,.06) 60% 63%, transparent 63% 66%, rgba(230,21,11,.8) 66% 68.5%, transparent 68.5% 72%, rgba(255,255,255,.07) 72% 75%, transparent 75% 78%, rgba(91,194,231,.35) 78% 80%, transparent 81%),
  linear-gradient(90deg, rgba(0,0,0,0) 0%, var(--tint) 100%); }
.banner .art.gen::after { content: ""; position: absolute; right: 14px; top: 12px; width: 108px; height: 54px; opacity: .22;
  background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 36px 36px; }
.banner .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,7,0) 20%, rgba(5,5,7,.93) 100%); }
.banner .content { position: relative; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }

/* Accueil */
.promo { min-height: 190px; margin-bottom: 14px; border-color: var(--racing); }
.promo .veil { background: linear-gradient(90deg, rgba(5,5,7,.92) 0%, rgba(5,5,7,.6) 55%, rgba(5,5,7,.15) 100%); }
.promo .content { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.promo h2 { font-size: 30px; margin: 8px 0 4px; } .promo p { margin: 0 0 12px; max-width: 640px; color: var(--text); }
.promo-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.promo-nav { display: flex; align-items: center; gap: 6px; }
.promo-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel2); padding: 0; cursor: pointer; }
.promo-dot.on { background: var(--racing); border-color: var(--racing); }
.hero { min-height: 240px; }
.hero .content { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 40px; margin: 6px 0 8px; }
.countdown { display: flex; gap: 6px; }
.countdown div { background: rgba(5,5,7,.88); border: 1px solid var(--border); border-radius: 6px; width: 76px; text-align: center; padding: 6px 0 5px; }
.countdown b { display: block; font-size: 42px; color: var(--accent); }
.countdown span { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.countdown.sm div { width: 56px; } .countdown.sm b { font-size: 28px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; color: var(--text); display: block; }
.card:hover { border-color: var(--accent); text-decoration: none; }
.card .banner { height: 112px; border: 0; border-radius: 0; }
.card .banner .content { padding: 12px 14px; }
.card .body { padding: 8px 14px 14px; }
.card .body > * + * { margin-top: 7px; }
.bar { height: 4px; background: var(--panel3); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.cal-item { display: flex; gap: 12px; align-items: center; padding: 6px 0; color: var(--text); }
.cal-item:hover { text-decoration: none; }
.cal-date { width: 50px; text-align: center; background: var(--panel2); border-radius: 4px; padding: 4px 0; }
.cal-date b { display: block; font-size: 22px; color: var(--accent); }
.cal-date span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; }

/* Avatars */
.av { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; font-family: "Chiffres", sans-serif; font-style: italic; font-weight: 700; border: 1px solid; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.who:hover { text-decoration: none; color: var(--accent); }

/* Onglets */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 12px 0 14px; }
.tabs a { font-size: 12.5px; color: var(--muted); padding: 9px 12px 8px; border-bottom: 3px solid transparent; border-radius: 4px 4px 0 0; }
.tabs a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.tabs a.on { color: var(--accent); background: var(--accent-dark); border-bottom-color: var(--accent); }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 500; padding: 8px 10px; white-space: nowrap; }
td { padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
tbody tr:nth-child(odd) td { background: rgba(255,255,255,.025); }
td.pos { font-size: 22px; } td.num { font-size: 19px; color: var(--muted); }
td.total { font-size: 22px; color: var(--accent); }
.dropped { text-decoration: line-through; color: var(--faint); }

/* Formulaires */
label.f { display: block; margin-top: 10px; }
label.f > span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 7px 10px; width: 100%; max-width: 100%; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=number] { width: 90px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

/* Incidents */
.inc-row { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; color: var(--text); }
.inc-row:hover { border-color: var(--accent); text-decoration: none; }
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.steps .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--panel3); color: var(--muted); }
.steps .line { width: 36px; height: 2px; background: var(--border); }
.video { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video a.link { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); }
.video a.link span.play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #fff; }
.video .tag { position: absolute; left: 12px; top: 10px; font-size: 17px; }
.decision { border-left: 4px solid; }
.verdict { font-size: 26px; }

/* Podium */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: center; align-items: end; gap: 12px; margin: 8px 0 4px; }
.podium .who { flex-direction: column; gap: 3px; }
.podium .step { border-top: 4px solid; border-radius: 6px 6px 0 0; text-align: center; padding-top: 6px; }
.podium .step b { display: block; font-size: 40px; }

/* Profil */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.tile b { display: block; font-size: 32px; }
.gauge { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; }
.gauge div { width: 76px; height: 76px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; text-align: center; }

/* Texte riche */
.rich h1 { font-size: 22px; margin: 6px 0; } .rich h2 { font-size: 15px; color: var(--accent); margin: 16px 0 6px; }
.rich p { margin: 4px 0; color: #DDDCF2; } .rich ul { margin: 4px 0; padding-left: 20px; color: #DDDCF2; }
.rich li::marker { color: var(--accent); } .rich strong { color: #fff; background: rgba(91,194,231,.12); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 6px; z-index: 50; max-width: 90vw; border: 1px solid; }
.toast.ok { background: #142B20; border-color: var(--green); } .toast.ko { background: #34151A; border-color: var(--red); }
.notif { display: block; padding: 10px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--text); }
.notif.unread { background: #111027; border-color: var(--accent); }
.notif:hover { text-decoration: none; border-color: var(--accent); }
.back { color: var(--muted); font-size: 13px; display: inline-block; margin-bottom: 8px; }
.auth { max-width: 440px; margin: 30px auto; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  nav.main { display: none; }
  .btn.burger { display: inline-flex; }
  .mobile-nav.open { display: block; }
  .top-in { padding: 10px 12px; gap: 10px; }
  .usermenu .name { display: none; }
  main { padding: 14px 12px 50px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 26px; }
  .banner .content { padding: 16px; }
  .countdown div { width: 62px; } .countdown b { font-size: 30px; }
  .podium { gap: 6px; }
  .podium .step b { font-size: 30px; }
  .tabs a { font-size: 11.5px; padding: 8px 8px; }
}

/* Équipes */
.tbadge { display: inline-grid; place-items: center; flex: none; overflow: hidden; clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); font-style: italic; }
.tbadge img { width: 100%; height: 100%; object-fit: contain; padding: 2px 12%; }
.tcol { display: inline-block; width: 9px; height: 15px; transform: skewX(-16deg); margin-right: 2px; flex: none; }
.teamcard .body > * + * { margin-top: 0; }
input[type=color] { width: 70px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; }
/* Création de championnat en étapes */
.wizsteps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.wstep { font: inherit; text-align: left; display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px; color: var(--muted); cursor: pointer; }
.wstep i { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-style: italic; font-size: 17px; background: var(--panel3); color: var(--text); clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); }
.wstep b { display: block; color: var(--text); font-size: 13.5px; } .wstep small { display: block; font-size: 11.5px; color: var(--faint); }
.wstep.on { border-color: var(--accent); background: var(--accent-dark); } .wstep.on i { background: var(--racing); color: #fff; }
.wstep.done i { background: var(--accent); color: var(--bg); } .wstep.bad { border-color: var(--red); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 8px 0; }
.opt { font: inherit; text-align: left; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; color: var(--text); cursor: pointer; }
.opt b { display: block; margin-bottom: 4px; } .opt span { display: block; font-size: 12.5px; color: var(--muted); }
.cargrp { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.cargrp.top { border-color: var(--accent); }
.opt:hover { border-color: var(--accent); } .opt.on { border-color: var(--racing); box-shadow: inset 4px 0 0 var(--racing); background: #121126; }
.help { font-size: 12px; color: var(--faint); margin-top: 4px; }
.ptsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 6px; }
.ptsgrid label { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 6px; text-align: center; }
.ptsgrid span { display: block; font-size: 11px; color: var(--muted); } .ptsgrid input { width: 100%; text-align: center; padding: 4px; }
.wiz { grid-template-columns: minmax(0, 1fr) 320px; margin-top: 4px; }
.wizside { position: sticky; top: 90px; }
code.pw { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; color: var(--accent); font-size: 14px; }

/* Manches ajoutées à la création d'un championnat : une carte par manche */
.roundrow { display: flex; gap: 12px; align-items: flex-start; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.rr-num { font-size: 24px; width: 42px; flex: none; padding-top: 24px; }
.rr-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 12px; }
.rr-fields label.f { margin-top: 0; margin-bottom: 8px; min-width: 0; }
.rr-fields input { width: 100%; }
.rr-circuit { grid-column: span 4; } .rr-config { grid-column: span 2; }
.rr-date { grid-column: span 2; } .rr-time { grid-column: span 1; } .rr-format { grid-column: span 3; }
.rr-del { flex: none; margin-top: 22px; }
@media (max-width: 900px) {
  .layout.wiz { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .rr-fields { grid-template-columns: 1fr 1fr; }
  .rr-circuit, .rr-config, .rr-format { grid-column: 1 / -1; }
  .rr-date, .rr-time { grid-column: span 1; }
  .rr-num { width: 34px; }
}
@media (max-width: 900px) { .wizsteps { grid-template-columns: repeat(5, minmax(0, 1fr)); } .wstep span { display: none; } .wstep { justify-content: center; } .wizside { position: static; } }