/* ═══════════════════════════════════════════════════════════════════════════
   GLT – Rallye FVJC 2028 · Feuille de styles (mobile first)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --navy-900: #081B33;
  --navy-800: #0B2545;
  --navy-700: #13315C;
  --navy-500: #2A4D7F;
  --navy-100: #E3EAF4;
  --gold-600: #D9A300;
  --gold-500: #F2B705;
  --gold-100: #FFF4CC;
  --white: #FFFFFF;
  --bg: #F3F5F9;
  --text: #0F1F38;
  --muted: #64728A;
  --line: #E4E8EF;
  --danger: #C8372D;
  --danger-bg: #FDECEA;
  --success: #1E8E5A;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .05), 0 6px 20px rgba(11, 37, 69, .07);
  --shadow-lg: 0 12px 40px rgba(8, 27, 51, .22);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.icon { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* ── Structure ─────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  padding-top: var(--safe-top);
  box-shadow: 0 2px 12px rgba(8, 27, 51, .25);
}
.appbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}
.appbar__title { font-size: 1.05rem; font-weight: 700; line-height: 1.2; min-width: 0; }
.appbar__title small { display: block; font-size: .72rem; font-weight: 500; color: var(--gold-500); letter-spacing: .04em; text-transform: uppercase; }
.appbar__spacer { flex: 1; }

.logo-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .04em;
}
.logo-badge--lg { width: 84px; height: 84px; border-radius: 24px; font-size: 1.7rem; box-shadow: var(--shadow-lg); }

.main { padding: 20px 0 calc(96px + var(--safe-bottom)); }

.splash, .welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  color: var(--white);
  background: radial-gradient(120% 80% at 50% 0%, var(--navy-700), var(--navy-900));
}

.spinner {
  width: 30px; height: 30px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Boutons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn--primary { background: var(--navy-800); color: var(--white); }
.btn--primary:hover { background: var(--navy-700); }
.btn--gold { background: var(--gold-500); color: var(--navy-900); }
.btn--gold:hover { background: var(--gold-600); }
.btn--ghost { background: var(--white); border-color: var(--line); color: var(--navy-800); }
.btn--ghost:hover { background: var(--navy-100); }
.btn--danger { background: var(--danger); color: var(--white); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 12px; font-size: .85rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { background: var(--navy-100); color: var(--navy-800); }
.icon-btn--danger:hover { background: var(--danger-bg); color: var(--danger); }
.appbar .icon-btn { color: var(--white); }
.appbar .icon-btn:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

.fab {
  position: fixed;
  right: max(16px, calc((100vw - 980px) / 2 + 16px));
  bottom: calc(20px + var(--safe-bottom));
  z-index: 15;
  min-height: 54px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(217, 163, 0, .45);
}

/* ── Cartes ────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card, .stack > * + * { margin-top: 14px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title:first-child { margin-top: 0; }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.hero::after {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 26px solid rgba(242, 183, 5, .16);
}
.hero__hello { font-size: 1.55rem; font-weight: 800; line-height: 1.2; }
.hero__hello span { color: var(--gold-500); }
.hero__sub { color: rgba(255, 255, 255, .72); font-size: .92rem; margin-top: 2px; }
.hero__totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; position: relative; z-index: 1; }
.hero__total { background: rgba(255, 255, 255, .09); border-radius: 14px; padding: 12px 8px; min-width: 0; }
.hero__total b { display: block; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero__total span { display: block; font-size: .66rem; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__total--accent { background: var(--gold-500); color: var(--navy-900); }
.hero__total--accent span { color: rgba(8, 27, 51, .75); }

.tiles { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11, 37, 69, .06), 0 12px 28px rgba(11, 37, 69, .12); }
.tile__icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; flex: none;
  border-radius: 16px;
  background: var(--navy-100);
  color: var(--navy-800);
}
.tile__icon svg.icon { width: 26px; height: 26px; }
.tile__icon--gold { background: var(--gold-100); color: #8A6700; }
.tile__icon--navy { background: var(--navy-800); color: var(--gold-500); }
.tile__body { flex: 1; min-width: 0; }
.tile__title { font-weight: 700; line-height: 1.25; }
.tile__meta { font-size: .86rem; color: var(--muted); margin-top: 2px; }
.tile__chev { color: #B4BDCB; }

.banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--gold-100);
  border: 1px solid #F3DC8A;
  color: #6B5200;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .88rem;
  margin-bottom: 14px;
}

/* ── Listes d'heures ───────────────────────────────────────────────────── */

.total-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.total-card__label { font-size: .85rem; color: var(--muted); }
.total-card__value { font-size: 2rem; font-weight: 800; color: var(--navy-800); font-variant-numeric: tabular-nums; line-height: 1.1; }
.total-card__count { font-size: .85rem; color: var(--muted); text-align: right; }

.list { list-style: none; margin: 0; padding: 0; }
.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry__main { flex: 1; min-width: 0; }
.entry__date { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry__comment { font-weight: 500; overflow-wrap: anywhere; }
.entry__comment--empty { color: #A3ADBD; font-weight: 400; font-style: italic; }
.entry__time {
  flex: none;
  font-weight: 800;
  color: var(--navy-800);
  background: var(--navy-100);
  border-radius: 10px;
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
}
.entry__actions { display: flex; flex: none; margin-right: -8px; }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty svg.icon { width: 40px; height: 40px; color: #B4BDCB; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); margin-bottom: 2px; }

/* ── Événements ────────────────────────────────────────────────────────── */

.event { display: flex; gap: 14px; align-items: flex-start; }
.event__date {
  flex: none;
  width: 62px;
  text-align: center;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy-100);
  color: var(--navy-800);
}
.event__date i { display: block; font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--navy-800); color: var(--gold-500); padding: 3px 0; }
.event__date b { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.25; }
.event__date span { display: block; font-size: .7rem; font-weight: 600; padding-bottom: 5px; }
.event__body { flex: 1; min-width: 0; }
.event__title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.event__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .86rem; color: var(--muted); }
.event__meta span { display: inline-flex; align-items: center; gap: 5px; }
.event__meta svg.icon { width: 15px; height: 15px; }
.event__desc { margin-top: 8px; font-size: .92rem; color: #3D4C66; white-space: pre-line; overflow-wrap: anywhere; }
.event__actions { display: flex; flex: none; margin: -6px -8px 0 0; }
.event--past { opacity: .62; }
.chip {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
  background: var(--gold-100); color: #7A5C00;
  margin-bottom: 4px;
}

details.past { margin-top: 22px; }
details.past summary { cursor: pointer; font-size: .86rem; font-weight: 700; color: var(--muted); padding: 6px 0; }

/* ── Administration ────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  border-radius: 14px;
  padding: 4px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px;
  border-radius: 10px;
  font-size: .86rem; font-weight: 700;
  color: var(--muted);
}
.tab svg.icon { width: 17px; height: 17px; }
.tab[aria-current="page"] { background: var(--navy-800); color: var(--white); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.stat__label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.stat__value { font-size: 1.6rem; font-weight: 800; color: var(--navy-800); font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 4px; }
.stat--accent { background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); }
.stat--accent .stat__label { color: rgba(255, 255, 255, .75); }
.stat--accent .stat__value { color: var(--gold-500); }

.rank { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank:first-child { padding-top: 0; }
.rank:last-child { border-bottom: 0; padding-bottom: 0; }
.rank__pos { width: 40px; flex: none; text-align: center; font-weight: 800; color: var(--muted); font-size: .9rem; }
.rank__pos--medal { font-size: 1.5rem; }
.rank__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__bar { display: block; height: 6px; border-radius: 3px; background: var(--navy-100); margin-top: 5px; overflow: hidden; }
.rank__bar i { display: block; height: 100%; border-radius: 3px; background: var(--gold-500); }
.rank__total { flex: none; font-weight: 800; color: var(--navy-800); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin: 0 -18px -18px; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: right;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th:first-child, .table td:first-child { text-align: left; padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table th, .table td { padding-left: 6px; padding-right: 6px; }
.lg-only { display: none; }
.table td { padding-top: 13px; padding-bottom: 13px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td:first-child { font-weight: 600; white-space: normal; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #F7F9FC; }
.table tfoot td { font-weight: 800; background: #F7F9FC; border-bottom: 0; }
.table .col-total { font-weight: 800; color: var(--navy-800); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.toolbar .btn { flex: 1; }

.lock-card { max-width: 420px; margin: 24px auto 0; text-align: center; }
.lock-card .tile__icon { margin: 0 auto 14px; width: 64px; height: 64px; border-radius: 20px; }
.lock-card h2 { font-size: 1.25rem; }
.lock-card p { color: var(--muted); font-size: .92rem; margin: 6px 0 18px; }

.member-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid; place-items: center;
  width: 54px; height: 54px; flex: none;
  border-radius: 50%;
  background: var(--navy-800); color: var(--gold-500);
  font-weight: 800; font-size: 1.1rem;
}
.member-head h2 { font-size: 1.25rem; line-height: 1.2; }
.totals-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.totals-row div { background: var(--bg); border-radius: 12px; padding: 10px 8px; min-width: 0; }
.totals-row b { display: block; font-size: 1.1rem; font-weight: 800; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.totals-row span { display: block; font-size: .66rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Formulaires & dialogues ───────────────────────────────────────────── */

.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 6px; color: #33435E; }
.field__label em { font-style: normal; font-weight: 500; color: var(--muted); }
.input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 16px; /* évite le zoom automatique sur iOS */
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.input:focus { outline: 0; border-color: var(--navy-500); box-shadow: 0 0 0 4px rgba(42, 77, 127, .14); }
textarea.input { min-height: 92px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--danger); background: var(--danger-bg); border-radius: 10px; padding: 10px 12px; font-size: .88rem; font-weight: 600; margin-bottom: 14px; }

dialog.sheet {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
dialog.sheet::backdrop { background: rgba(8, 27, 51, .55); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet__head h2 { font-size: 1.15rem; }
.sheet__body { padding: 12px 20px calc(20px + var(--safe-bottom)); }
.sheet__body > p { color: var(--muted); margin-bottom: 18px; }
.sheet__actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet__actions .btn { flex: 1; }

.welcome__card { width: 100%; max-width: 400px; background: var(--white); color: var(--text); border-radius: 24px; padding: 26px 22px; box-shadow: var(--shadow-lg); }
.welcome__head { text-align: center; }
.welcome__head h1 { font-size: 1.7rem; font-weight: 800; margin-top: 18px; }
.welcome__head p { color: rgba(255, 255, 255, .75); margin-top: 6px; }
.welcome__head p b { color: var(--gold-500); font-weight: 700; }
.welcome__card h2 { font-size: 1.1rem; margin-bottom: 4px; }
.welcome__card > p { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }

/* ── Toasts ────────────────────────────────────────────────────────────── */

#toasts {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  background: var(--navy-900);
  color: var(--white);
  font-size: .9rem; font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease-out;
  max-width: 100%;
}
.toast--error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ── Tablette & ordinateur ─────────────────────────────────────────────── */

@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .main { padding-top: 28px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { padding: 20px; }
  .hero { padding: 28px; }
  .hero__hello { font-size: 1.9rem; }
  .hero__total b { font-size: 1.6rem; }
  .hero__total span { font-size: .82rem; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .toolbar .btn { flex: none; }
  .card { padding: 22px; }
  .table-wrap { margin: 0 -22px -22px; }
  .table th, .table td { padding-left: 14px; padding-right: 14px; }
  .lg-only { display: inline; }
  .sm-only { display: none; }
  .table th:first-child, .table td:first-child { padding-left: 22px; }
  .table th:last-child, .table td:last-child { padding-right: 22px; }
  dialog.sheet { max-width: 480px; margin: auto; border-radius: 24px; }
  #toasts { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Membres, commissions, pointage (v2)
   ═══════════════════════════════════════════════════════════════════════════ */

.muted, .note { color: var(--muted); font-size: .84rem; }
.note { margin-top: 12px; }
.section-title a { color: var(--navy-500); text-transform: none; letter-spacing: 0; font-size: .84rem; }
.section-title .btn { text-transform: none; letter-spacing: 0; }
.section-title > span { font-variant-numeric: tabular-nums; }

/* Champs supplémentaires */
select.input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364728A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.field__hint { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.field > .field__hint:not(:last-child) { margin: -2px 0 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; cursor: pointer; }
.check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.check span {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: #33435E; background: var(--white);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.check input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.check input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.input--code { text-align: center; font-weight: 700; letter-spacing: .12em; }
.input--code::placeholder { font-weight: 500; letter-spacing: .04em; }

.btn--text-danger { background: transparent; color: var(--danger); }
.btn--text-danger:hover { background: var(--danger-bg); }
.sheet__body > .btn--text-danger { margin-top: 10px; }
.link-btn { background: none; border: 0; padding: 12px 8px 0; color: var(--navy-500); font-weight: 700; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }

/* Bienvenue */
.welcome__slot { width: 100%; }
.welcome .lock-card { color: var(--text); margin-top: 0; padding: 26px 22px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.welcome__hint { max-width: 420px; text-align: center; font-size: .8rem; color: rgba(255, 255, 255, .7); }

/* Pastilles */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chips--tight { margin-top: 4px; margin-bottom: 4px; }
.chips--tight:empty { display: none; }
.chips .chip { margin-bottom: 0; }
.chip--navy { background: var(--navy-100); color: var(--navy-800); }

/* Lignes de personnes (pointage, présences, membres) */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person:first-child { padding-top: 0; }
.person:last-child { border-bottom: 0; padding-bottom: 0; }
.person__main { flex: 1; min-width: 0; }
.person__name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.person__meta { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.person--here .person__meta { color: var(--success); font-weight: 600; }
.person--here .avatar { background: var(--success); color: var(--white); }
.person--done .avatar { background: var(--gold-500); color: var(--navy-900); }
.person--link, .entry--link { cursor: pointer; }
.person--link:hover .person__name, .entry--link:hover .entry__comment { color: var(--navy-500); }
.person .icon-btn { margin: 0 -8px 0 -6px; }
.avatar--sm { width: 40px; height: 40px; font-size: .85rem; background: var(--navy-100); color: var(--navy-800); }

.stats--3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats--3 .stat { padding: 12px; }
.stats--3 .stat__value { font-size: 1.3rem; }
.stats--3 .stat__label { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totals-row--2 { grid-template-columns: repeat(2, 1fr); }
.table--static tbody tr { cursor: default; }
.table--static tbody tr:hover { background: transparent; }
.rank__name small { font-weight: 500; color: var(--muted); font-size: .8rem; }

.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; }
.code-box__value { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 1.35rem; font-weight: 700; letter-spacing: .08em; color: var(--navy-800); user-select: all; }

/* Onglets : icône au-dessus du libellé sur mobile */
.tab { flex-direction: column; gap: 2px; min-height: 52px; font-size: .72rem; padding: 4px 2px; min-width: 0; }
.tab svg.icon { width: 19px; height: 19px; }

@media (min-width: 640px) {
  .tab { flex-direction: row; gap: 8px; min-height: 44px; font-size: .9rem; }
  .stats--3 .stat { padding: 16px; }
  .stats--3 .stat__value { font-size: 1.6rem; }
  .stats--3 .stat__label { font-size: .78rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Statut, calendrier, budget, échéancier (v3)
   ═══════════════════════════════════════════════════════════════════════════ */

.status { display: flex; align-items: center; gap: 14px; }
.status__role { font-weight: 800; font-size: 1.1rem; color: var(--navy-800); line-height: 1.2; }
.status__label { font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: 16px; }

.cal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; font-size: .84rem; color: var(--muted); }
.cal-links span { display: inline-flex; align-items: center; gap: 5px; }
.cal-links svg.icon { width: 15px; height: 15px; }
.cal-links .link-btn { padding: 4px 0; font-size: .84rem; }

.is-negative { color: var(--danger) !important; }
.progress { height: 8px; border-radius: 4px; background: var(--navy-100); overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--gold-500); }
.progress--over i { background: var(--danger); }
.total-card__value { white-space: nowrap; }

.deadline { display: flex; align-items: flex-start; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.deadline:first-child { padding-top: 0; }
.deadline:last-child { border-bottom: 0; padding-bottom: 0; }
.deadline__main { flex: 1; min-width: 0; }
.deadline__desc { font-size: .88rem; color: #3D4C66; margin-top: 2px; white-space: pre-line; overflow-wrap: anywhere; }
.deadline .chip { margin: 8px 0 0; }
.deadline--done .entry__comment { text-decoration: line-through; color: var(--muted); }
.chip--late { background: var(--danger-bg); color: var(--danger); }
.chip--ok { background: #E3F4EB; color: var(--success); }
.banner--late { background: var(--danger-bg); border-color: #F3C2BD; color: var(--danger); }


/* ═══════════════════════════════════════════════════════════════════════════
   Connexion, rappels, comptes (v4)
   ═══════════════════════════════════════════════════════════════════════════ */

.lock-card__fields { text-align: left; }
.welcome__hint .link-btn { color: var(--gold-500); padding: 2px 0; font-size: .8rem; }
.welcome__back { color: rgba(255, 255, 255, .75); font-size: .88rem; font-weight: 600; }
.welcome__back:hover { color: var(--white); }

.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

.check-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  margin-top: 2px;
  border: 2px solid #C5CEDB; border-radius: 50%;
  background: var(--white); color: transparent;
}
.check-btn svg.icon { width: 16px; height: 16px; }
.check-btn:hover { border-color: var(--navy-500); color: #C5CEDB; }
.check-btn--on { background: var(--success); border-color: var(--success); color: var(--white); }
.check-btn--on:hover { color: var(--white); }

.chip--dark { background: var(--navy-800); color: var(--gold-500); }
.code-box__link { font-size: .8rem; color: var(--navy-800); overflow-wrap: anywhere; user-select: all; min-width: 0; }
.sheet__head h2 { display: flex; align-items: center; gap: 8px; }


/* Filtres de rappels, arrivée groupée (v5) */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--white); color: #33435E; font-size: .88rem; font-weight: 600;
}
.filter b { font-weight: 700; color: var(--muted); }
.filter--on { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.filter--on b { color: var(--gold-500); }
.deadline .chip + .chip { margin-left: 4px; }

.toolbar--2 { display: grid; grid-template-columns: 1fr 1fr; }
.toolbar--2 .btn { padding: 0 10px; font-size: .88rem; white-space: normal; line-height: 1.2; }
.check-all { display: flex; gap: 16px; margin: -2px 0 10px; }
.check-all .link-btn { padding: 0; font-size: .84rem; }
