/* IBAA CONNECT — feuille de style unique.
   Thème « Parquet » aux couleurs du logo IBAA : vert #5ACA02, bleu #2F67C4, nuit #060D18.
   Polices : Unbounded (titres), Manrope (texte), IBM Plex Mono (étiquettes).
   Pour changer une couleur partout, modifie la variable correspondante dans :root ci-dessous.
   Thème clair choisi volontairement : identité éditoriale d'un magazine sportif imprimé. */
:root {
  color-scheme: light;
  /* Couleurs du logo IBAA : vert ballon, bleu, nuit */
  --ibaa-green: #5ACA02; --ibaa-blue: #2F67C4; --ibaa-night: #060D18;
  --paper: #F1F5EC; --paper-2: #E2EADA; --paper-3: #FAFCF7; --ink: #060D18; --ink-2: #111C2C; --ink-3: #0B1422;
  --orange: #5ACA02; --orange-deep: #2F67C4; --orange-light: #8EE04A; --ochre: #F2A900; --forest: #5ACA02; --forest-deep: #2C6B00;
  --green: #5ACA02; --green-ink: #060D18; --green-light: #8EE04A; --green-btn: #5ACA02;
  --blue: #2F67C4; --blue-dark: #1D4A94; --blue-soft: #DCE7FA; --navy: #060D18; --navy-2: #2F67C4; --navy-dark: #060D18; --pale: #E2EADA; --gpale: #E4F5D6;
  --bg: #E2EADA; --line: #D3DDC9; --muted: #4E5D6E; --text: #060D18; --card: #FAFCF7; --soft: #F1F5EC;
  --ok-bg: #E4F5D6; --ok: #2C6B00; --warn-bg: #FFF0C7; --warn: #7A5300; --warn-soft: #FFF6DD; --bad-bg: #FBE1DD; --bad: #A3271B; --bad-strong: #D64532;
  --on-ink-soft: #C3CEDC; --on-ink-muted: #9AAAC0;
  --serif: "Unbounded", "Arial Black", sans-serif; --body: "Manrope", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --court-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200' preserveAspectRatio='xMaxYMid slice'%3E%3Cg fill='none' stroke='%235ACA02' stroke-opacity='.22' stroke-width='2'%3E%3Ccircle cx='400' cy='100' r='62'/%3E%3Ccircle cx='400' cy='100' r='22'/%3E%3Cpath d='M0 22h96a78 78 0 0 1 0 156H0'/%3E%3Crect x='0' y='68' width='112' height='64'/%3E%3Ccircle cx='112' cy='100' r='32'/%3E%3C/g%3E%3C/svg%3E");
  --court-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' preserveAspectRatio='xMidYMax slice'%3E%3Cg fill='none' stroke='%23060D18' stroke-opacity='.2' stroke-width='2.5'%3E%3Ccircle cx='200' cy='400' r='70'/%3E%3Ccircle cx='200' cy='400' r='24'/%3E%3Cpath d='M0 400H400'/%3E%3Cpath d='M30 0v40a170 170 0 0 0 340 0V0'/%3E%3Crect x='140' y='0' width='120' height='130'/%3E%3Ccircle cx='200' cy='130' r='40'/%3E%3Ccircle cx='200' cy='22' r='9'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--text); }
body { font-family: var(--body); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--orange-deep); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sport { font-family: var(--body); font-weight: 700; }
h1.sport, legend.sport { font-family: var(--serif); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
h2.sport { font-family: var(--mono); font-size: 12px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
h2.sport::before { content: ""; width: 14px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--ibaa-green) 50%, var(--ibaa-blue) 50%); flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 2px; }
.pad { padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 2px; border: 0; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; letter-spacing: .01em; transition: background .15s, color .15s; }
.btn.sport { white-space: normal; text-align: center; font-size: 15px !important; text-transform: uppercase; letter-spacing: .08em; padding-top: 8px; padding-bottom: 8px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-green { background: var(--orange); color: var(--ink); }
.btn-green:hover { background: #4FB302; }
.btn-blue { background: var(--ink); color: var(--paper); }
.btn-blue:hover { background: var(--ibaa-blue); color: #fff; }
.btn-red { background: var(--bad-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.linkish { background: none; border: 0; color: var(--orange-deep); font-weight: 700; font-size: 13.5px; cursor: pointer; min-height: 38px; padding: 0 4px; text-align: left; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.linkish.red { color: var(--bad); }
.input { width: 100%; min-height: 44px; border-radius: 0; border: 0; border-bottom: 2px solid var(--ink); background: var(--paper-3); padding: 0 12px; font-size: 15px; }
.input:focus { border-bottom-color: var(--orange); outline: none; background: #fff; }
textarea.input { padding: 10px 12px; border: 1px solid var(--line); border-bottom: 2px solid var(--ink); }
.input.sm { min-height: 36px; font-size: 13.5px; }
.input:disabled { color: var(--muted); border-bottom-style: dotted; }
label.f { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; min-width: 0; color: var(--muted); }
label.f .input, label.f select, label.f span { font-family: var(--body); text-transform: none; letter-spacing: 0; }
label.f .input { font-weight: 400; color: var(--text); font-size: 15px; }
label.chk { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13.5px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--orange); }
.pill { display: inline-block; padding: 2px 7px; border-radius: 0; font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; border: 1px solid currentColor; background: transparent; }
.p-ok { color: var(--ok); background: var(--ok-bg); }
.p-warn { color: var(--warn); background: var(--warn-bg); }
.p-bad { color: var(--bad); background: var(--bad-bg); }
.p-blue { color: var(--blue-dark); background: var(--blue-soft); }
.p-grey { color: var(--muted); }
.alert { border-radius: 0; padding: 10px 14px; font-weight: 600; font-size: 13.5px; border-left: 5px solid currentColor; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: var(--blue-soft); color: var(--blue-dark); }
.scroll-x { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
caption { caption-side: top; text-align: left; padding: 16px 14px 10px; font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
th { text-align: left; font-family: var(--mono); color: var(--muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--paper); }
tr.click:hover td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
.av { border-radius: 32%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; background: var(--paper-2); color: var(--ink); font-family: var(--mono); }
.av img, .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo { background: #fff; border-radius: 50%; object-fit: contain; flex: none; padding: 2px; }

.rates { display: flex; height: 7px; border-radius: 0; overflow: hidden; background: var(--paper-2); }
.rates i { display: block; height: 100%; }
.c-p { background: var(--ibaa-green); } .c-r { background: var(--ochre); } .c-a { background: var(--bad-strong); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }

/* E01 Connexion : terrain orange */
.login { min-height: 100vh; background: var(--paper); display: flex; align-items: stretch; justify-content: center; padding: 0; }
.login-card { width: 100%; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); background: var(--paper); }
.login-side { background: var(--orange) var(--court-dark) center bottom / cover no-repeat; color: var(--ink); padding: 48px; display: flex; flex-direction: column; gap: 22px; min-height: 560px; }
.login-side h1 { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 62px) !important; font-weight: 800; line-height: .95; letter-spacing: -.04em !important; }
.login-side p { color: var(--ink) !important; }
.login-side .logo { width: 64px; height: 64px; }
.login-side > .row:first-child { flex-direction: column; align-items: flex-start; flex-wrap: wrap !important; gap: 18px; }
.login-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-width: 460px; }
.login-side li { border-top: 1.5px solid var(--ink); padding: 10px 0; font-size: 14px; color: var(--ink); }
.login-side li b { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.login-side .xs { color: var(--ink) !important; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.login-form { padding: 48px; display: flex; flex-direction: column; gap: 16px; justify-content: center; max-width: 520px; width: 100%; margin: 0 auto; }
.login-form h2 { font-family: var(--serif); font-size: 28px !important; font-weight: 700; letter-spacing: -.02em; color: var(--ink) !important; }
.accounts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.accounts button { border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 12px; color: var(--muted); text-align: left; font-family: var(--mono); }
.accounts button:nth-child(odd) { border-right: 1px solid var(--line); }
.accounts button:hover { background: var(--paper-2); }
.accounts button b { font-size: 14px; color: var(--ink); font-family: var(--body); }

/* Direction : barre noire + sommaire numéroté */
.admin { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: var(--ink) var(--court-light) right center / auto 100% no-repeat; color: var(--paper); padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 5px solid var(--ibaa-green); box-shadow: 0 5px 0 var(--ibaa-blue); margin-bottom: 5px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand b { font-family: var(--serif); font-size: 19px; font-weight: 800; letter-spacing: -.02em; display: block; line-height: 1; }
.brand small { display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--on-ink-muted); margin-top: 3px; }
.season-tag { border: 1px solid var(--ibaa-green); color: var(--green-light); padding: 4px 10px; font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.who small { display: block; color: var(--on-ink-muted); font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.who .av { background: var(--orange) !important; color: var(--ink) !important; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(244,237,225,.3); background: transparent; color: var(--paper); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; position: relative; }
.icon-btn:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.shell { display: flex; flex: 1; min-height: 0; }
.side { width: 256px; flex: none; background: var(--paper-2); border-right: 1.5px solid var(--ink); padding: 18px 12px 28px; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; counter-reset: nav; }
.navgroup h3 { font-family: var(--mono); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 0 10px 4px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.nav li { counter-increment: nav; }
.nav button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 0; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; font-size: 14px; min-height: 38px; font-weight: 500; }
.nav button svg { display: none; }
.nav button::before { content: counter(nav, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 700; width: 20px; flex: none; }
.nav button:hover { background: var(--paper); }
.nav button[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.nav button[aria-current="page"]::before { color: var(--orange); }
.nav .badge { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; background: var(--orange); color: var(--ink); }
.main { flex: 1; min-width: 0; padding: 30px 36px 64px; }
.wrap { max-width: 1180px; display: flex; flex-direction: column; gap: 22px; }
.head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; padding-bottom: 16px; border-bottom: 3px solid var(--ink); }
.head h1 { font-size: clamp(26px, 3.2vw, 40px); }
.head p { font-size: 14px; max-width: 70ch; margin-top: 6px; }
.head p.small.muted:first-child, .head > div > p:first-child { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.kpi { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0; background: transparent; }
.kpi:first-child { border-left: 0 !important; }
.kpi > span:first-child { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.kpi.dark { background: var(--ink) var(--court-light) right center / auto 100% no-repeat; color: var(--paper); }
.kpi.dark .big { color: var(--orange); }
.kpi .big { font-family: var(--serif); font-weight: 800; font-size: 56px; line-height: .9; letter-spacing: -.04em; }
.kpi .mid { font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: .95; letter-spacing: -.03em; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.gw { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 16px; }
.panel { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel > h2:first-child, .panel > .row:first-child { padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.teamrates { display: grid; grid-template-columns: 120px 1fr 52px; gap: 10px 12px; align-items: center; font-size: 13.5px; }
.hero { background: var(--ink) var(--court-light) right center / auto 100% no-repeat; color: var(--paper); border-radius: 0; padding: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; border-bottom: 6px solid var(--orange); }
.hero .sport { font-size: clamp(22px, 3vw, 34px) !important; color: var(--paper) !important; }
.hero .av { border: 3px solid var(--orange); }
.chip { border: 1px solid rgba(244,237,225,.3); padding: 10px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chip .sport { font-family: var(--serif); font-size: 22px !important; }
.chip small { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--on-ink-soft); }
dl.info { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 0; margin: 0; font-size: 13.5px; }
dl.info dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 9px 0; border-bottom: 1px dashed var(--line); }
dl.info dd { margin: 0; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; background: transparent !important; border-radius: 0; padding: 10px 2px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.doc { border: 0; border-top: 1.5px solid var(--ink); border-radius: 0; padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.list .doc { border-bottom: 0; }
.thumb { width: 88px; height: 88px; border-radius: 0; overflow: hidden; background: var(--paper-2); border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; flex: none; }
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.thumb b { font-family: var(--mono); font-size: 15px; color: var(--orange-deep); }
.queue { display: grid; grid-template-columns: 88px minmax(0,1fr) auto; gap: 16px; align-items: start; padding: 16px; }
.att-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.att-grid li { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line); padding: 9px 10px 9px 0; }
.day { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.day > b { font-family: var(--serif); font-size: 14px; font-weight: 700; padding: 10px 14px 6px; }
.day > .stack-s { padding: 4px 14px 12px; gap: 0; }
.ev-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.ev-row.cancel { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(26,20,16,.35); }
.ev-row.cancel button { text-decoration: none; }
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; align-items: end; }
.span2 { grid-column: span 2; }
.full { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.card legend { font-family: var(--serif); font-size: 18px !important; font-weight: 700; padding-bottom: 10px; }
.score { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 0; border: 1.5px solid var(--ink); }
.score button { height: 46px; border-radius: 0; border: 0; border-left: 1px solid var(--line); background: var(--paper-3); font-family: var(--mono); font-weight: 700; cursor: pointer; color: var(--ink); font-size: 15px; }
.score button:first-child { border-left: 0; }
.score button[aria-pressed="true"] { background: var(--orange); color: var(--ink); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: transparent; border: 1.5px solid var(--line); display: block; }
.dots i.on { background: var(--orange); border-color: var(--orange); }

/* Coach et parent : mobile d'abord */
.mobile { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.m-head { background: var(--ink) var(--court-light) right center / auto 100% no-repeat; color: var(--paper); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 5px solid var(--orange); }
.m-head .top .row { flex-wrap: nowrap; }
.m-head .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-head .top .sport { font-family: var(--serif); font-size: 16px !important; letter-spacing: -.01em; }
.m-head .top .xs { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.m-head h1 { font-size: 24px !important; color: var(--paper); }
.m-head p.small:first-child { font-family: var(--mono); letter-spacing: .1em !important; color: var(--orange-light) !important; }
.m-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; padding-bottom: 90px; }
.m-body > h1.sport { font-size: 26px !important; }
.m-body > h2.sport { margin-top: 10px; }
.tabbar { position: sticky; bottom: 0; background: var(--ink); display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar button { background: none; border: 0; padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--on-ink-muted); cursor: pointer; min-height: 56px; }
.tabbar button[aria-current="page"] { color: var(--orange); }
.ev { display: flex; align-items: center; gap: 14px; padding: 10px 12px; width: 100%; text-align: left; cursor: pointer; }
.ev:hover { box-shadow: inset 4px 0 0 var(--orange); }
.datechip { width: 54px; flex: none; border-radius: 0; background: var(--ink); color: var(--paper); text-align: center; padding: 6px 0 7px; }
.datechip small { display: block; font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--orange-light); letter-spacing: .08em; }
.datechip b { font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; text-align: center; border-top: 1px solid rgba(244,237,225,.25); }
.counts div { padding: 10px 4px 0; border-left: 1px solid rgba(244,237,225,.25); }
.counts div:first-child { border-left: 0; }
.counts b { display: block; font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1; }
.counts small { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-ink-soft); }
.pcard { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; border: 1.5px solid var(--ink); }
.opts button { height: 48px; border-radius: 0; font-size: 13px; font-weight: 700; cursor: pointer; border: 0; border-left: 1px solid var(--line); background: var(--paper-3); color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.opts button:first-child { border-left: 0; }
.opts button[aria-pressed="true"][data-v="PRESENT"] { background: var(--ibaa-green); color: var(--ink); }
.opts button[aria-pressed="true"][data-v="RETARD"] { background: var(--ochre); color: var(--ink); }
.opts button[aria-pressed="true"][data-v="ABSENT"] { background: var(--bad-strong); color: #fff; }
.sticky-save { position: sticky; bottom: 0; background: var(--paper); border-top: 1.5px solid var(--ink); padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trio > span { background: transparent !important; border-radius: 0 !important; border-left: 1px solid var(--line); }
.trio > span:first-child { border-left: 0; }
.trio b { display: block; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.trio .xs { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-left: 5px solid var(--orange); font-weight: 600; font-size: 13.5px; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(26,20,16,.3); }
input[type="file"] { font-size: 13.5px; max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 10px; border: 0; border-radius: 0; background: var(--ink); color: var(--paper); font-weight: 700; padding: 8px 12px; cursor: pointer; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
details > summary::-webkit-details-marker { display: none; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } .kpi:nth-child(3) { border-left: 0 !important; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line) !important; } .g2, .gw { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; max-height: none; position: static; padding: 8px 10px; border-right: 0; border-bottom: 1.5px solid var(--ink); flex-direction: row; overflow-x: auto; gap: 2px; }
  .navgroup h3 { display: none; }
  .navgroup { flex: none; }
  .nav { flex-direction: row; }
  .nav li { flex: none; }
  .nav button { white-space: nowrap; }
  .brand small, .who span:not(.av), .season-tag { display: none; }
  .topbar { padding: 10px 16px; }
  .main { padding: 20px 16px 48px; }
  .fgrid { grid-template-columns: minmax(0,1fr); }
  .span2 { grid-column: auto; }
  .att-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .queue { grid-template-columns: 72px minmax(0,1fr); }
  .queue > :last-child { grid-column: 1 / -1; }
  .thumb { width: 72px; height: 72px; }
  .login-card { grid-template-columns: minmax(0,1fr); }
  .login-side { min-height: 0; padding: 28px 20px 40px; }
  .login-form { padding: 28px 20px 40px; }
  .kpi .big { font-size: 46px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0,1fr); }
  .kpi { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .kpi:first-child { border-top: 0 !important; }
  .teamrates { grid-template-columns: 96px 1fr 40px; }
  .att-grid { grid-template-columns: minmax(0,1fr); }
  dl.info { grid-template-columns: 120px minmax(0,1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise .2s ease-out; } @keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
}

/* ───── Compléments de la version PHP ───── */
a.btn { text-decoration: none; }
a.btn-blue, a.btn-red, a.btn-green { color: inherit; }
a.btn-blue { color: #fff; } a.btn-green { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flash { margin-bottom: 4px; }
.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.chart { position: relative; }
.chart canvas { max-width: 100%; }
.chart-fallback { font-size: 13px; color: var(--muted); }
.empty { padding: 18px; color: var(--muted); }
.code-tag { display: inline-block; background: var(--ibaa-green); color: var(--ink); font-family: var(--mono); font-weight: 700; font-size: 11px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
.nav a { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--ink); text-decoration: none; font-size: 14px; min-height: 38px; font-weight: 500; }
.nav a::before { content: counter(nav, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 700; width: 20px; flex: none; }
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 700; }
.nav a[aria-current="page"]::before { color: var(--ibaa-green); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 10px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--on-ink-muted); text-decoration: none; min-height: 56px; }
.tabbar a[aria-current="page"] { color: var(--ibaa-green); }
.m-head a { color: inherit; text-decoration: none; }
a.ev, a.card.ev { color: inherit; text-decoration: none; }
.pager { display: flex; gap: 8px; align-items: center; }
.danger-zone { border-color: var(--bad-strong); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.install { max-width: 640px; margin: 40px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
@media print {
  .side, .topbar, .tabbar, .no-print, form.filters { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; }
}

/* ───── Version simplifiée : un menu court par rôle ───── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar .brand small { text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 12px; }
.appnav { background: var(--paper-2); border-bottom: 1.5px solid var(--ink); position: sticky; top: 0; z-index: 30; }
.appnav ul { list-style: none; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; max-width: 1100px; }
.appnav a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; position: relative; }
.appnav a:hover { background: var(--paper); }
.appnav a[aria-current="page"] { border-bottom-color: var(--ibaa-green); }
.appnav a svg { color: var(--ibaa-blue); }
.appnav .badge { font-family: var(--mono); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; background: var(--ibaa-green); color: var(--ink); }
.app-main { flex: 1; padding: 24px 16px 56px; }
.container { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.container.narrow { max-width: 720px; }
.band { background: var(--ink) var(--court-light) right center / auto 100% no-repeat; color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 5px solid var(--ibaa-green); }
.band h1 { font-size: 24px !important; color: #fff; }
@media (max-width: 760px) {
  .appnav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; background: var(--ink); border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .appnav ul { padding: 0; gap: 0; }
  .appnav li { flex: 1; min-width: 0; }
  .appnav a { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px 10px; font-size: 11px; color: var(--on-ink-muted); border-bottom: 0; border-top: 3px solid transparent; text-align: center; min-height: 60px; }
  .appnav a:hover { background: transparent; }
  .appnav a[aria-current="page"] { color: var(--ibaa-green); border-top-color: var(--ibaa-green); }
  .appnav a svg { color: inherit; }
  .appnav .badge { position: absolute; top: 4px; left: 54%; }
  .app-main { padding: 16px 12px 96px; }
  /* Le bouton « Valider le pointage » reste au-dessus du menu du bas */
  .sticky-save { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .topbar .brand small { display: block !important; }
}

/* Tuiles : chiffres clés */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--ibaa-blue); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.tile .l { font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tile .n { font-family: var(--serif); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.tile .s { font-size: 13px; color: var(--muted); }
a.tile:hover { box-shadow: inset 0 0 0 2px var(--ibaa-green); }
.tile.dark { background: var(--ink) var(--court-light) right center / auto 100% no-repeat; color: #fff; border-color: var(--ink); border-top-color: var(--ibaa-green); }
.tile.dark .n { color: var(--ibaa-green); }
.tile.dark .l, .tile.dark .s { color: var(--on-ink-soft); }
.tile.warn { border-top-color: #F2A900; }
.tile.bad { border-top-color: var(--bad-strong); }
.tile.ok { border-top-color: var(--ibaa-green); }

/* Effectifs par catégorie */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.catcard { background: var(--card); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
a.catcard:hover { box-shadow: inset 0 0 0 2px var(--ibaa-green); }
.catcard .name { font-weight: 800; font-size: 16px; }
.catcard .age { font-size: 12px; color: var(--muted); }
.catcard .n { font-family: var(--serif); font-weight: 800; font-size: 40px; line-height: 1; }
.fg { display: flex; height: 8px; background: var(--paper-2); overflow: hidden; }
.fg i { display: block; height: 100%; }
.fg .f { background: var(--ibaa-blue); } .fg .g { background: var(--ibaa-green); }
.fg-legend { display: flex; gap: 12px; font-size: 13px; }
.fg-legend b { font-variant-numeric: tabular-nums; }

/* Listes de personnes */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--card); }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.people li:last-child .person { border-bottom: 0; }
.person:hover { background: var(--paper); }
.person b { display: block; }
.person .meta { display: block; font-size: 12.5px; color: var(--muted); }
.person .end { margin-left: auto; text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* Onglets secondaires */
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.seg a { padding: 8px 14px; border: 1.5px solid var(--ink); font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; font-size: 14px; background: var(--card); }
.seg a[aria-current="true"] { background: var(--ink); color: #fff; }
.seg a small { font-family: var(--mono); font-weight: 600; margin-left: 4px; opacity: .75; }

/* Grand bouton d'action */
a.big-action { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--ibaa-green); color: var(--ink); text-decoration: none; }
a.big-action .t { font-family: var(--serif); font-weight: 800; font-size: 19px; display: block; }
a.big-action .s { font-size: 13.5px; }
a.big-action .go { margin-left: auto; font-size: 28px; font-weight: 800; }
a.big-action.done { background: var(--card); border: 1px solid var(--line); }

/* À faire / annonces */
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo a, .todo li > span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--warn-soft); border-left: 4px solid #F2A900; color: inherit; text-decoration: none; font-weight: 600; }
.todo a::after { content: "›"; margin-left: auto; font-size: 22px; color: var(--ibaa-blue); }
.news { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ibaa-blue); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.news .d { font-size: 12px; color: var(--muted); }
.contact { display: flex; gap: 8px; flex-wrap: wrap; }
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.hub a { background: var(--card); border: 1px solid var(--line); padding: 16px; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.hub a:hover { box-shadow: inset 0 0 0 2px var(--ibaa-green); }
.hub a b { font-size: 16px; }
.hub a span { font-size: 13px; color: var(--muted); }

/* Lien de retour vers le site public (page de connexion) */
.back-site { align-self: flex-start; font-weight: 800; color: var(--ink); text-decoration: none; background: rgba(255,255,255,.75); padding: 8px 14px; border-radius: 999px; }
.back-site:hover { background: #fff; }
