/* Heatly — portail organisateur. Sombre, comme la régie ; ordinateur d'abord, utilisable au téléphone. */
:root {
  --bg: #0c0d10; --panel: #15171c; --panel2: #1c1f26; --raise: #232731; --line: #272b34; --line2: #343946;
  --ink: #f3f5f9; --ink2: #c3c8d2; --dim: #8a909c;
  --accent: #f26a1f; --accent2: #ff8a47; --accent-ink: #170a03; --accentSoft: #f26a1f1f;
  --red: #ef5a5f; --redSoft: #ef5a5f1c; --green: #3dd68c; --greenSoft: #3dd68c1c; --blue: #6aa8ff; --blueSoft: #6aa8ff1c;
  --r: 10px; --r2: 14px; --shadow: 0 18px 50px #00000080;
  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; color: inherit; }
.hidden { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
b { font-weight: 650; }
em { font-style: normal; color: var(--dim); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; }

/* ------------------------------------------------------------ champs */
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r); padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #5d6370; }
input:hover, select:hover { border-color: #444a58; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentSoft); }
input[type="date"] { color-scheme: dark; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a909c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); }
label > input, label > select, label > textarea, label > .pw, label > .memberGrid { margin-top: 6px; }
fieldset { border: 0; display: grid; gap: 6px; }
legend { font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.err { color: var(--red); font-size: 14px; font-weight: 500; min-height: 0; }
.err:empty { display: none; }
.note { color: var(--dim); font-size: 14px; }
.sub { color: var(--dim); }

/* ------------------------------------------------------------ boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); border-radius: var(--r); padding: 9px 16px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; }
.btn:hover { background: var(--raise); border-color: #444a58; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--panel2); }
.btn.wide { width: 100%; padding: 11px 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--accent-ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.primary).busy::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--dim); transition: background .15s, color .15s; }
.iconbtn:hover:not(:disabled) { background: var(--raise); color: var(--ink); }
.iconbtn:disabled { opacity: .3; cursor: default; }
.iconbtn.danger:hover { color: var(--red); background: var(--redSoft); }
.iconbtn.armed { width: auto; padding: 0 10px; color: #fff; background: var(--red); font-size: 13px; font-weight: 600; }
/* Bouton Google : blanc, logo officiel, libellé « Continuer avec Google » (charte Google). */
.btn.google { width: 100%; background: #fff; border-color: #dadce0; color: #1f1f1f; font-weight: 600; padding: 10px 16px; gap: 12px; }
.btn.google:hover { background: #f4f6f8; border-color: #d2d5da; }
.btn.google .g { width: 20px; height: 20px; }

/* ------------------------------------------------------------ en-tête */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 60px; background: #0c0d10e6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 18px; letter-spacing: -.01em; text-decoration: none !important; }
.mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a { display: flex; align-items: center; padding: 0 12px; color: var(--dim); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.who { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.orgName { color: var(--ink2); font-weight: 600; font-size: 14px; }
.orgSel { width: auto; padding: 6px 32px 6px 10px; font-size: 14px; font-weight: 600; background-color: var(--panel); }
.menu { position: relative; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #3a2a20, #5a3520); color: #ffd9c2; border: 1px solid #6b3f24; font-weight: 700; font-size: 13px; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r2); box-shadow: var(--shadow); padding: 6px; display: none; }
.dropdown.open { display: block; }
.ddHead { display: grid; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ddHead span { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.dropdown a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--ink2); font-weight: 500; text-decoration: none; }
.dropdown a:hover { background: var(--raise); color: var(--ink); }

/* ------------------------------------------------------------ pages */
.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 24px 80px; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.eyebrow { color: var(--accent2); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.pageHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pageHead .sub { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.meta { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 14px; }
.meta .ic { width: 16px; height: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-weight: 600; font-size: 14px; margin-bottom: 14px; text-decoration: none !important; }
.back:hover { color: var(--ink); }
.back .ic { width: 16px; height: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 20px; }
.panelHead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.panelHead .sub { font-size: 14px; margin-top: 2px; }
.panel > .sub { font-size: 14px; margin-bottom: 14px; }
.loading { display: grid; place-items: center; padding: 120px 0; }
.loading span { width: 28px; height: 28px; border: 3px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* statuts et étiquettes */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #ffffff10; color: var(--ink2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.published { color: var(--green); background: var(--greenSoft); }
.pill.live { color: var(--accent2); background: var(--accentSoft); }
.pill.closed { color: var(--blue); background: var(--blueSoft); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--dim); background: var(--raise); border-radius: 6px; padding: 1px 7px; }
.tag.wait { color: var(--accent2); background: var(--accentSoft); }
.role { font-size: 13px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.role.owner { color: var(--accent2); }

/* ------------------------------------------------------------ cartes de compétitions */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.comp { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; transition: border-color .15s, transform .15s, background .15s; text-decoration: none !important; }
.comp:hover { border-color: #f26a1f80; background: var(--panel2); transform: translateY(-1px); }
.dateTile { display: grid; place-items: center; width: 62px; height: 66px; border-radius: 12px; background: var(--accentSoft); border: 1px solid #f26a1f40; text-align: center; }
.dateTile b { font-size: 24px; font-weight: 800; line-height: 1; color: var(--accent2); }
.dateTile span { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--ink2); }
.compBody { display: grid; gap: 4px; min-width: 0; }
.compTop { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.compTop b { font-size: 17px; font-weight: 700; }
.meta { white-space: nowrap; }
.skeleton { height: 104px; border-radius: var(--r2); background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 56px 24px; border: 1px dashed var(--line2); border-radius: var(--r2); color: var(--dim); }
.empty .ic { width: 34px; height: 34px; color: var(--accent2); margin-bottom: 6px; }
.empty b { color: var(--ink); font-size: 16px; }
.empty .btn { margin-top: 10px; }
.empty.small { padding: 36px 24px; }

/* ------------------------------------------------------------ page compétition */
.statusBar { display: flex; align-items: center; gap: 14px; margin: -6px 0 24px; flex-wrap: wrap; }
.statusBar > span { color: var(--dim); font-size: 13px; font-weight: 600; }
.statusBar .pubLink { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.statusBar span.pubLink { font-weight: 500; }
.statusBar .pubLink .ic { width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button, .seg label span { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--dim); font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 7px; transition: background .15s, color .15s; }
.seg button:hover, .seg label span:hover { color: var(--ink); }
.seg button.on { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px #0006; }
.seg button.on.published { color: var(--green); } .seg button.on.live { color: var(--accent2); } .seg button.on.closed { color: var(--blue); }
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg label { position: relative; display: block; font-weight: 600; cursor: pointer; }
.seg label input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg label span { width: 100%; padding: 9px 14px; }
.seg label input:checked + span { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px #0006; }
.seg label input:focus-visible + span { box-shadow: 0 0 0 2px var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--dim); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a.soon { cursor: default; opacity: .6; }
.tabs em { font-size: 11px; font-weight: 700; color: var(--dim); background: var(--raise); border-radius: 5px; padding: 1px 6px; margin: 0; }
.count { font-size: 12px; background: var(--raise); color: var(--ink2); border-radius: 99px; padding: 0 8px; }

/* listes (divisions, membres) */
.list { list-style: none; display: grid; gap: 6px; }
.item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 10px 10px 10px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.item:hover { border-color: var(--line2); }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--raise); color: var(--ink2); font-weight: 700; font-size: 13px; }
.itemMain { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.itemMain .name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.fmt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.fmt .ic { width: 16px; height: 16px; color: var(--dim); }
.fmt.team .ic { color: var(--accent2); }
.acts { display: inline-flex; gap: 2px; }

/* ------------------------------------------------------------ fenêtres */
.modal { display: none; }
.modal.open { display: grid; position: fixed; inset: 0; z-index: 20; place-items: center; padding: 16px; }
.backdrop { position: absolute; inset: 0; background: #05060899; backdrop-filter: blur(3px); animation: fade .15s; }
.dialog { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); animation: pop .18s ease-out; }
.dialog header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 4px 24px; }
.dialog h3 { font-size: 18px; font-weight: 700; }
.form { display: grid; gap: 16px; padding: 14px 24px 22px; }
.form footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details summary { cursor: pointer; color: var(--dim); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
details summary:hover { color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ------------------------------------------------------------ connexion */
/* Gabarit des parcours de connexion (AuthLayout) : photo plein écran, voiles, texte, formulaire. */
/* Choix de la langue (FR / EN) : même dessin que sur le portail public. */
.top .langSw { margin-left: auto; display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; flex: none; }
.top .langSw + .who { margin-left: 0; }
.langSw button { border: 0; background: transparent; color: var(--dim); font: 700 12px/1 var(--font); padding: 6px 8px; cursor: pointer; }
.langSw button.on { background: var(--panel2); color: var(--ink); }
body.authMode { background: #09090a; }
body.authMode .top { background: linear-gradient(180deg, #09090ad9, #09090a00); border-bottom: 0; backdrop-filter: none; }  /* pas de bordure : le dégradé se répéterait dessous en trait sombre */
.authStage { position: fixed; inset: 0; z-index: 4; overflow-y: auto; overscroll-behavior: contain; }
.authBg, .authShade { position: fixed; inset: 0; pointer-events: none; }
.authBg { background: #0b0908; }
.authBg picture, .authBg img { display: block; width: 100%; height: 100%; }
/* Sujet à droite : l'athlète et la barre restent visibles, le formulaire occupe la zone sombre de gauche. */
.authBg img { object-fit: cover; object-position: 76% 40%; filter: brightness(.86); animation: authIn .9s ease-out both; }
.authShade { background:
  linear-gradient(90deg, #09090af2 0%, #09090ad1 24%, #09090a80 40%, #09090a1f 56%, #09090a00 70%),
  radial-gradient(130% 120% at 72% 42%, #0000 58%, #00000073 100%),
  linear-gradient(180deg, #09090a8c 0, #09090a00 150px, #09090a00 78%, #09090a99 100%); }
.authContent { position: relative; z-index: 1; min-height: 100%; display: grid; align-content: center; gap: 26px; width: min(100%, 620px);
  padding: 96px clamp(24px, 6vw, 112px) 48px; }
.authBack { display: inline-flex; align-items: center; gap: 6px; color: #c9c9cf; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }
.authBack .ic { width: 16px; height: 16px; }
.pitch h1 { font-size: clamp(30px, 2.6vw, 44px); line-height: 1.08; letter-spacing: -.03em; text-shadow: 0 2px 24px #0008; }
.pitch p { color: #d2d2d8; font-size: 16px; margin: 14px 0 0; max-width: 44ch; line-height: 1.55; text-shadow: 0 1px 12px #0009; }
.authCard { width: min(440px, 100%); display: grid; gap: 16px; padding: 30px; border-radius: 18px; background: #101012bd; border: 1px solid #ffffff17;
  backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); box-shadow: 0 30px 80px #0000008c, inset 0 1px 0 #ffffff0d; }
.authCard input { background: #ffffff0a; border-color: #ffffff1f; }
.authCard input:hover { border-color: #ffffff33; }
.authCard input:focus { border-color: var(--accent); background: #ffffff0f; }
.authCard .btn.primary { padding: 11px 16px; }
.authCard .foot { border-top-color: #ffffff14; }
@keyframes authIn { from { opacity: 0; transform: scale(1.03); } }
/* Très large (21:9…) : « couvrir » rognerait les disques et les pieds ; l'image entière, calée à droite, fondue vers la gauche. */
@media (min-aspect-ratio: 19/9) {
  .authBg img { position: absolute; top: 0; right: 0; width: auto; height: 100%; max-width: none; object-fit: fill;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%); mask-image: linear-gradient(90deg, transparent 0, #000 24%); }
}
@media (max-width: 1100px) {
  .authShade { background:
    linear-gradient(90deg, #09090af5 0%, #09090ae0 32%, #09090a8c 52%, #09090a26 72%, #09090a00 86%),
    radial-gradient(130% 120% at 72% 42%, #0000 58%, #00000073 100%),
    linear-gradient(180deg, #09090a8c 0, #09090a00 150px, #09090a00 78%, #09090a99 100%); }
  .authBg img { object-position: 80% 40%; }
  .authContent { width: min(100%, 540px); }
  .pitch h1 { font-size: 32px; }
}
/* Téléphone : recadrage portrait centré sur l'athlète en haut ; le formulaire, lisible, sur le bas assombri. */
@media (max-width: 760px) {
  .authBg img { object-position: 50% 22%; }
  .authShade { background: linear-gradient(180deg, #09090a59 0, #09090a0d 16%, #09090a1a 34%, #09090ae0 48%, #09090afa 60%); }
  .authContent { align-content: start; width: 100%; padding: max(44vh, 300px) 16px 32px; gap: 14px; }
  .pitch h1, .pitch p { display: none; }   /* le visage reste dégagé ; le titre de la carte suffit */
  .authBack { margin-bottom: 10px; }
  .authCard { padding: 22px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .authBg img { animation: none; } }
.authCard form { display: grid; gap: 14px; }
.seg label, .chip { margin: 0; }
.cardTitle { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pw { position: relative; display: block; }
.pw input { padding-right: 44px; }
.pw .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.pw .reveal.on { color: var(--accent2); }
.links { text-align: center; font-size: 14px; }
.links.small a { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }
.links.small .ic { width: 15px; height: 15px; }
.foot { text-align: center; font-size: 14px; color: var(--dim); padding-top: 14px; border-top: 1px solid var(--line); }
.foot a { font-weight: 600; }
.steps { display: flex; gap: 8px; list-style: none; counter-reset: s; font-size: 13px; font-weight: 600; color: var(--dim); }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; flex: 1; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--raise); font-size: 11px; }
.steps li.on { color: var(--ink); border-bottom-color: var(--accent); }
.steps li.on::before { background: var(--accent); color: var(--accent-ink); }
.steps li.done { color: var(--ink2); border-bottom-color: var(--green); }
.steps li.done::before { content: "✓"; background: var(--green); color: #052b18; }
input.code { font-size: 22px; letter-spacing: .3em; text-align: center; font-weight: 700; }
.meter { height: 4px; border-radius: 4px; background: var(--raise); margin-top: -6px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: var(--red); }
.meter i.m2 { background: #f2b01f; } .meter i.m3, .meter i.m4 { background: var(--green); }

.welcome { max-width: 560px; margin: 48px auto; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 40px 32px; }
.welcome p { color: var(--ink2); }
.bigIcon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accentSoft); color: var(--accent2); }
.bigIcon .ic { width: 28px; height: 28px; }
.inline { display: flex; gap: 8px; width: 100%; margin-top: 6px; }

/* ------------------------------------------------------------ notification */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; background: var(--raise); border: 1px solid var(--line2); color: var(--ink); padding: 11px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); transition: transform .2s, opacity .2s; z-index: 30; }
.toast .ic { color: var(--red); }
.toast.ok .ic { color: var(--green); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------------------ inscrits */
.btnRow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnRow.left { align-items: center; margin-top: 16px; }
.toolbar { display: grid; grid-template-columns: 1fr 240px; gap: 10px; margin-bottom: 18px; }
.group + .group { margin-top: 22px; }
.group h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.group h3 .dim { color: var(--dim); font-weight: 500; font-size: 13px; }
.dim { color: var(--dim); }
.regs .item { grid-template-columns: auto 1fr auto auto; }
.item.out { opacity: .55; }
.item.out .name { text-decoration: line-through; }
.rank.bib { width: auto; min-width: 34px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.members { flex-basis: 100%; color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memberGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form.flat { padding: 0; }
textarea { font: 13px/1.5 ui-monospace, Consolas, monospace; color: var(--ink); background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r); padding: 10px 12px; width: 100%; resize: vertical; margin: 8px 0; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentSoft); }
code { font: 13px ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; overflow-wrap: anywhere; }

/* assistant d'import */
.dialog.wide { width: min(780px, 100%); }
.drop { display: grid; justify-items: center; gap: 4px; padding: 30px 16px; border: 1.5px dashed var(--line2); border-radius: var(--r2); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accentSoft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { color: var(--accent2); font-size: 15px; }
.drop span { color: var(--dim); font-weight: 500; }
.mapGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-block; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); color: var(--dim); font-size: 13px; font-weight: 600; transition: all .15s; }
.chip input:checked + span { background: var(--accentSoft); border-color: var(--accent); color: var(--accent2); }
.preview table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.preview th { text-align: left; color: var(--dim); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.preview td { padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--ink2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divMap { display: grid; gap: 8px; }
.divRow { display: grid; grid-template-columns: 1fr 260px; gap: 12px; align-items: center; padding: 8px 10px 8px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.progress { height: 6px; border-radius: 6px; background: var(--raise); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.result { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.bad { color: var(--red); }
.errors { margin: 8px 0 0 18px; color: var(--ink2); font-size: 13px; max-height: 160px; overflow: auto; }

/* lien régie */
.kv { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px 14px; align-items: center; margin: 4px 0 6px; }
.kv > span:nth-child(3n+1) { color: var(--dim); font-size: 14px; font-weight: 600; }
.kv code { justify-self: start; }
.keyBox { margin-top: 14px; padding: 14px 16px; border: 1px solid #f26a1f60; background: var(--accentSoft); border-radius: var(--r); display: grid; gap: 10px; }
.keyRow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.keyRow code { font-size: 14px; padding: 6px 10px; }
.mt { margin-top: 26px; font-size: 15px; }
.howto { margin: 10px 0 0 20px; color: var(--ink2); display: grid; gap: 6px; }

/* ------------------------------------------------------------ épreuves */
.rank.code { width: auto; min-width: 34px; padding: 0 7px; font-size: 12px; letter-spacing: .04em; background: var(--accentSoft); color: var(--accent2); }
.wname { max-width: 420px; margin-bottom: 16px; }
.wpart { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r2); padding: 16px; margin-bottom: 12px; display: grid; gap: 12px; }
.wpartHead { display: flex; justify-content: space-between; align-items: center; }
.wgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--ink2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.mvTable { display: grid; gap: 6px; }
.mvHead, .mvRow { display: grid; grid-template-columns: 2fr 1.3fr .9fr .6fr 1fr 40px 34px; gap: 6px; align-items: center; }
.mvHead span { font-size: 12px; font-weight: 600; color: var(--dim); }
.mvHead em { display: none; }
.mvRow input, .mvRow select { padding: 8px 9px; }
.mvMax { display: grid; place-items: center; }
.mvMax input { width: 18px; height: 18px; accent-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.wcheck { margin: 14px 0 4px; padding: 12px 14px; border-radius: var(--r); font-size: 14px; }
.wcheck.good { display: flex; gap: 8px; align-items: center; color: var(--green); background: var(--greenSoft); }
.wcheck.bad { color: var(--red); background: var(--redSoft); }
.wcheck ul { margin-left: 18px; }

/* ------------------------------------------------------------ heats */
.groupHead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.groupHead h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.wodGroup + .wodGroup { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.warn { display: flex; gap: 8px; align-items: center; color: #f2b01f; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.warn .ic { width: 16px; height: 16px; }
.heats .item { grid-template-columns: auto 1fr auto; align-items: start; }
.tag.time { color: var(--accent2); background: var(--accentSoft); }
.lanes { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.ln { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px 1px 2px; }
.ln i { font-style: normal; font-weight: 700; font-size: 11px; color: var(--dim); background: var(--raise); border-radius: 4px; padding: 0 5px; }
.ln.empty { color: var(--dim); border-style: dashed; }
.ln.out { color: var(--red); text-decoration: line-through; }
table.plan { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 18px; }
.plan th { text-align: left; font-size: 12px; color: var(--dim); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.plan td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--ink2); }
.plan tr.day td { color: var(--accent2); font-weight: 700; padding-top: 16px; text-transform: capitalize; }
.laneEdit { display: grid; gap: 6px; }
.laneRow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.preview ul { margin-left: 18px; color: var(--ink2); font-size: 14px; }

/* ------------------------------------------------------------ classement */
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r2); }
table.board { width: 100%; border-collapse: collapse; font-size: 14px; }
.board th { text-align: left; font-size: 12px; color: var(--dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel2); white-space: nowrap; vertical-align: bottom; }
.board th.ev { min-width: 118px; max-width: 170px; white-space: normal; }
.board th .code { display: block; font-size: 11px; font-weight: 800; color: var(--accent2); letter-spacing: .04em; }
.board td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink2); vertical-align: top; }
.board tbody tr:last-child td { border-bottom: 0; }
.board tbody tr:hover td { background: var(--panel2); }
.board .rk { width: 40px; text-align: center; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.board tr.first .rk { color: var(--accent2); }
.board .bname { min-width: 150px; }
.board .bname b { display: block; color: var(--ink); white-space: nowrap; }
.board .bname .dim { display: block; font-size: 12px; }
.board .tot { font-weight: 800; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.board .cell .pos { display: block; font-weight: 700; color: var(--ink); }
.board .cell .res { display: block; font-size: 12px; color: var(--dim); }
.board .cell em { font-style: normal; color: var(--accent2); font-weight: 700; }
.board .cell.none .pos { color: var(--dim); }
.board sup { font-size: .7em; }
.bdTable { margin-top: 14px; }
.bdNote { margin-top: 10px; font-size: 13px; }
ul.inline { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* ------------------------------------------------------------ onglet régie */
.panel + .panel { margin-top: 16px; }
.flow { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: flow; }
.flow li { position: relative; display: grid; gap: 4px; padding: 14px 16px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--ink2); }
.flow li b { color: var(--ink); font-size: 15px; }
.flow li:nth-child(2) { border-color: #f26a1f60; background: var(--accentSoft); }
.flow li + li::before { content: "→"; position: absolute; left: -10px; top: 50%; transform: translate(-50%, -50%); color: var(--dim); font-weight: 700; }
.kv.mt0 { margin-top: 0; }
h3.step { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 8px; }
h3.step i { font-style: normal; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow li + li::before { content: "↓"; left: 50%; top: -10px; }
}

/* ------------------------------------------------------------ page publique */
.pub .top { gap: 12px; }
.pubHeadRight { display: flex; align-items: center; gap: 10px; }
h3.step i .ic { width: 15px; height: 15px; }
.pubBoard .det { display: none; }
.pubBoard .det ul { list-style: none; margin: 0; padding: 4px 0 6px; display: grid; gap: 6px; }
.pubBoard .det li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; font-size: 13px; }
.pubBoard .det li b { color: var(--ink2); font-weight: 600; }
.pubBoard .det .pos { font-weight: 700; color: var(--ink); }
.pubBoard .det .res { color: var(--dim); }
.pubFoot { margin-top: 28px; color: var(--dim); font-size: 13px; text-align: center; }
.pubTools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pubTools input { flex: 1 1 240px; }
.pubTools select { flex: 0 1 240px; }
.pubDay { margin: 22px 0 10px; font-size: 15px; color: var(--accent2); }
.pubHeat { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); margin-bottom: 8px; }
.pubTime { font-weight: 800; font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pubHeat b { color: var(--ink); }
.pubLanes { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.pubLanes li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px 2px 2px; }
.pubLanes li i { font-style: normal; font-weight: 700; font-size: 11px; color: var(--dim); background: var(--raise); border-radius: 4px; padding: 0 6px; }
.pubLanes li.empty { color: var(--dim); border-style: dashed; }
.pubLanes li.me { border-color: var(--accent); background: var(--accentSoft); color: var(--ink); }
.pubWods { display: grid; gap: 14px; }
.pubWods h3 { font-size: 18px; margin-bottom: 6px; }
.pubWods h3 .code, .pubWods .code { font-size: 12px; font-weight: 800; color: var(--accent2); letter-spacing: .04em; margin-right: 4px; }
.pubPart + .pubPart { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pubPart h4 { font-size: 15px; margin-bottom: 2px; }
.pubMoves { margin: 8px 0 0 18px; display: grid; gap: 4px; color: var(--ink2); }
.pubMoves b { color: var(--ink); }
@media (max-width: 700px) {
  .pubBoard th.ev, .pubBoard td.cell { display: none; }
  .pubBoard tr.row { cursor: pointer; }
  .pubBoard tr.row.open td { border-bottom: 0; }
  .pubBoard .det:not([hidden]) { display: table-row; }
  .pubBoard .bname { min-width: 0; }
  .pubBoard .bname b { white-space: normal; }
  .pubHeat { grid-template-columns: 52px 1fr; padding: 10px 12px; }
}

.prefix { display: flex; align-items: stretch; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.prefix span { display: grid; place-items: center; padding: 0 10px; background: var(--panel2); color: var(--dim); font-size: 13px; white-space: nowrap; }
.prefix input { border: 0; border-radius: 0; }
.geoSearch { position: relative; }
.geoSugg { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); list-style: none; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); padding: 4px; box-shadow: var(--shadow); }
.geoSugg li { display: grid; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.geoSugg li:hover { background: var(--raise); }
.geoSugg li small { color: var(--dim); font-size: 12.5px; }
.geoSugg li.none { cursor: default; color: var(--dim); }
.puBanner { height: 150px; border-radius: var(--r); overflow: hidden; border: 1px dashed var(--line2); display: grid; place-items: center; background: var(--bg); }
.puBanner img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ téléphone */
@media (max-width: 860px) {
}
@media (max-width: 640px) {
  .top { padding: 0 16px; gap: 14px; }
  .brand span { display: none; }
  .nav a { padding: 0 8px; }
  .orgName { display: none; }
  .wrap { padding: 22px 16px 70px; }
  h1 { font-size: 24px; }
  .cards { grid-template-columns: 1fr; }
  .item { grid-template-columns: auto 1fr auto; grid-template-areas: "rank main main" "rank fmt acts"; row-gap: 2px; padding: 10px 6px 6px 12px; }
  .item > .rank, .item > .avatar { grid-area: rank; align-self: start; }
  .item > .itemMain { grid-area: main; }
  .item > .fmt, .item > .role { grid-area: fmt; }
  .item > .acts { grid-area: acts; }
  .iconbtn { width: 32px; height: 32px; }
  .two { grid-template-columns: 1fr; }
  .pageHead .btn { width: 100%; }
  .statusBar .seg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .seg button { padding: 7px 4px; font-size: 13px; }
  .form footer .btn { flex: 1; }
  .toolbar, .mapGrid, .divRow, .memberGrid, .wgrid { grid-template-columns: 1fr; }
  .mvHead { display: none; }
  .mvRow { grid-template-columns: 1fr 1fr 34px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); }
  .mvRow [data-m="name"] { grid-column: 1 / -1; }
  .groupHead { flex-wrap: wrap; }
  .regs .item { grid-template-columns: auto 1fr auto; }
  .kv { grid-template-columns: 1fr auto; }
  .kv > span:nth-child(3n+1) { grid-column: 1 / -1; margin-bottom: -6px; }
  .btnRow { width: 100%; }
  .btnRow .btn { flex: 1; }
}
