:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #f0eff7;
  --text: #1b1a29;
  --muted: #6b6a7d;
  --border: #e4e2ef;
  --bde: #1c3298;
  --primary: #1c3298;
  --primary-text: #ffffff;
  --danger: #dc2626;
  --success: #15803d;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 18 50 / 6%), 0 4px 16px rgb(20 18 50 / 5%);
  --tabbar-h: 64px;
  --logo-bg: #ffffff;
  --birthday: #f59e0b;
  --birthday-text: #1b1a29;
  --av-bg-l: 86%;
  --av-fg-l: 28%;
  --st-todo: #6b6a7d;
  --st-doing: #c2410c;
  --st-done: #15803d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111019;
    --surface: #1b1a26;
    --surface-2: #252433;
    --text: #edecf6;
    --muted: #a09fb3;
    --border: #2f2e40;
    --bde: #8ea0ff;
    --primary: #4c66e8;
    --danger: #f87171;
    --success: #4ade80;
    --shadow: none;
    --birthday: #fbbf24;
    --birthday-text: #111019;
    --av-bg-l: 30%;
    --av-fg-l: 86%;
    --st-todo: #a09fb3;
    --st-doing: #fb923c;
    --st-done: #4ade80;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 8px 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 6px 0 4px; }
p { margin: 0 0 8px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 6px; font-size: .9em; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* --- Mise en page --- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.logo { border-radius: 50%; background: var(--logo-bg); object-fit: contain; flex: none; }
.auth-card .logo { width: 132px; height: 132px; box-shadow: var(--shadow); }
.topbar-link { font-size: .9rem; font-weight: 600; }

.page { max-width: 720px; margin: 0 auto; padding: 12px 16px; }
section { margin: 24px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head a { font-size: .9rem; white-space: nowrap; }
.section-head .actions { margin-top: 0; flex-wrap: nowrap; }
.greeting { margin-top: 12px; }

.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.actions form { margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.empty { color: var(--muted); padding: 12px 0; }

/* --- Barre d'onglets --- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tabbar a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .7rem; font-weight: 600;
}
.tabbar a:hover { text-decoration: none; }
.tabbar a.active { color: var(--primary); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .68rem; line-height: 18px; text-align: center;
}

/* --- Formulaires --- */
label { font-weight: 600; font-size: .9rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 8px 0; }
legend { font-weight: 700; margin-bottom: 4px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); flex: none; }
.code-input { font-size: 1.6rem; letter-spacing: .35em; text-align: center; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-size: .8rem; }
.search { margin: 8px 0 12px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
}
.button:hover { text-decoration: none; background: var(--surface-2); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.button.primary:hover { filter: brightness(1.08); }
.button.danger { color: var(--danger); }
.button.light { background: rgb(255 255 255 / 92%); color: #1b1a29; border-color: transparent; }
.button.small { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.button.wide { width: 100%; margin-top: 8px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--primary); }
.link-button.danger { color: var(--danger); }
.inline-form { margin-top: 6px; }

.flash { padding: 12px 14px; border-radius: 10px; margin: 8px 0; font-weight: 500; border: 1px solid var(--border); background: var(--surface); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.flash-success { border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.flash-info { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }

/* --- Connexion --- */
.auth { min-height: 100dvh; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 380px; text-align: center; }
.auth-card form { text-align: left; margin: 16px 0; }

/* --- Pôles --- */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
  color: var(--pole); background: color-mix(in srgb, var(--pole) 14%, transparent);
}
.tag-bde { --pole: var(--bde); }
.tag-private { --pole: var(--muted); }
.role { font-size: .72rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.role.off { color: var(--danger); }
.pole-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--pole); flex: none; }


.pole-row { display: flex; align-items: center; gap: 14px; color: var(--text); border-left: 5px solid var(--pole); }
.pole-row:hover { text-decoration: none; background: var(--surface-2); }
.pole-row > div { flex: 1; }
.pole-row p { margin: 0; }

.pole-hero {
  margin: 8px -16px 0; padding: 24px 16px 20px; color: #fff;
  background: linear-gradient(135deg, var(--pole), color-mix(in srgb, var(--pole) 70%, #000));
}
.pole-hero h1 { margin-top: 0; }
.pole-hero p { opacity: .92; }

.pole-role { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pole-role label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pole-role select { width: 160px; }

/* --- Annonces --- */
.announcement-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.announcement.unread { border-left: 4px solid var(--primary); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chip {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.chip:hover { text-decoration: none; }
.chip.active { background: var(--pole, var(--primary)); border-color: var(--pole, var(--primary)); color: #fff; }

/* --- Événements --- */
.event {
  display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); box-shadow: var(--shadow);
}
.event:hover { text-decoration: none; background: var(--surface-2); }
.event-date {
  flex: none; width: 52px; height: 56px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--pole) 14%, transparent); color: var(--pole);
}
.event-day { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.event-month { font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.event-body { display: flex; flex-direction: column; min-width: 0; }
.event-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-body .muted { font-size: .85rem; }
.event-pole { font-size: .72rem; font-weight: 700; color: var(--pole); }

.event-detail { border-top: 5px solid var(--pole); }
.event-detail .when { font-weight: 600; }

/* --- Calendrier mensuel --- */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.month-nav h2 { margin: 0; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 6px; gap: 2px; }
.dow { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cell { min-height: 74px; padding: 3px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell.other { opacity: .4; }
.cell.today { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.cell.today .num { background: var(--primary); color: #fff; }
.num { font-size: .75rem; font-weight: 700; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; }
.pill {
  display: block; font-size: .65rem; font-weight: 600; line-height: 1.3;
  padding: 1px 4px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #fff; background: var(--pole);
}
.pill:hover { text-decoration: none; filter: brightness(1.1); }
.more { font-size: .65rem; color: var(--muted); padding-left: 2px; }

.subscribe details { margin-top: 12px; }
.subscribe summary { cursor: pointer; font-weight: 600; }

/* --- Listes de membres --- */
.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.member-list li:last-child { border-bottom: 0; }
.member-list.card { padding: 4px 16px; }
.admin-list li { flex-wrap: wrap; }
.admin-list li > a { color: var(--text); flex: 1; min-width: 160px; }
.admin-list li.inactive { opacity: .55; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.errors { color: var(--danger); margin: 0; padding-left: 18px; }

.push-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.push-card p { margin: 0; }

@media (min-width: 720px) {
  .cell { min-height: 96px; }
  .pill { font-size: .72rem; }
}
.member-actions { display: flex; align-items: center; gap: 12px; }

/* --- Profils --- */
.profile-pole { padding: 0; overflow: hidden; }
.profile-pole > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.profile-pole > header h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.profile-pole .member-list { padding: 0 16px; }
.profile-pole .member-list li { padding: 0; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; color: var(--text); }
.profile-row:hover { text-decoration: none; }
.profile-row:hover .button { background: var(--surface-2); }
.profile-who { min-width: 0; }
.profile-pole li.inactive { opacity: .55; }
.access-note { font-size: .8rem; color: var(--muted); }
.role-grid { display: grid; gap: 10px; }
.role-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.role-row label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.role-row select { width: 190px; }
.role-help { grid-column: 1 / -1; margin: -4px 0 0 20px; font-size: .8rem; color: var(--muted); }
@media (max-width: 420px) { .role-row select { width: 150px; } }

/* --- Photos de profil --- */
.avatar { width: var(--size); height: var(--size); border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-initials {
  display: inline-grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * .38); line-height: 1;
  background: hsl(var(--hue) 55% var(--av-bg-l)); color: hsl(var(--hue) 50% var(--av-fg-l));
}
.topbar-me { display: flex; border-radius: 50%; }
.topbar-me:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.author { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.me-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; }
.me-head h1 { margin: 0; }
.me-head p { margin: 0; }
.photo-form { display: flex; flex-direction: column; gap: 8px; }
.photo-form input[type="file"], .person input[type="file"] { min-height: 0; padding: 8px; font-size: .9rem; }
.profile-row .avatar { margin-right: -2px; }
.profile-row { justify-content: flex-start; }
.profile-row .profile-who { flex: 1; }

/* --- Tâches --- */
.status { display: inline-block; flex: none; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap;
  color: var(--st); background: color-mix(in srgb, var(--st) 15%, transparent); }
.status-a_faire { --st: var(--st-todo); }
.status-en_cours { --st: var(--st-doing); }
.status-validee { --st: var(--st-done); }
.task { padding: 12px; border-left: 4px solid var(--pole); }
.task-main { display: flex; align-items: center; gap: 12px; color: var(--text); }
.task-main:hover { text-decoration: none; }
.task-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.task-text strong { overflow-wrap: anywhere; }
.task[data-status="validee"] .task-text strong { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.late { color: var(--danger); font-weight: 600; }
.status-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.status-switch button {
  min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; white-space: nowrap; padding: 0 4px;
}
.status-switch button[aria-pressed="true"] { background: var(--surface); color: var(--st); box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }
.status-switch button:focus-visible { outline: 2px solid var(--primary); }
.task-detail { border-top: 5px solid var(--pole); }
.task-detail h1 { margin: 4px 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); border-top: 3px solid var(--st, var(--danger)); }
.kpi:hover { text-decoration: none; background: var(--surface-2); }
.kpi.active { outline: 2px solid var(--st, var(--danger)); outline-offset: -1px; }
.kpi b { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.kpi-late { --st: var(--danger); }
.pole-progress { display: flex; flex-direction: column; gap: 10px; }
.progress-row { display: grid; grid-template-columns: 8.5rem 1fr 3rem; align-items: center; gap: 10px; color: var(--text); font-size: .88rem; }
.progress-row:hover { text-decoration: none; }
.progress-row.active .progress-label { color: var(--primary); }
.progress-label { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.progress-bar .seg { background: var(--st); }
.progress-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 420px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .progress-row { grid-template-columns: 8.8rem 1fr 2.2rem; gap: 8px; } }
#suivi, #abonnement { scroll-margin-top: 72px; }
.topbar-me.active .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.admin-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.admin-entry:hover { text-decoration: none; background: var(--surface-2); }
.admin-entry > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* --- Première connexion --- */
.onboarding { max-width: 480px; margin: 12px auto 0; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.promo-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); font-weight: 500; font-size: .88rem; cursor: pointer; }
.promo-option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.promo-option input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); flex: none; }
@media (max-width: 420px) { .promo-grid { grid-template-columns: 1fr; } }
.waiting { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.waiting .card { width: 100%; text-align: left; }
.waiting-list { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }

/* --- Catégories d'événements --- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.category-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.category-option { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px;
  border: 2px solid color-mix(in srgb, var(--cat) 30%, var(--border)); border-radius: 10px; cursor: pointer;
  color: var(--cat); font-weight: 700; font-size: .85rem; text-align: center; }
.category-option input { position: absolute; opacity: 0; pointer-events: none; }
.category-option:has(input:checked) { background: var(--cat); border-color: var(--cat); color: #fff; }
.category-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 420px) { .category-picker { grid-template-columns: 1fr; } }

/* --- Widget « Reste à faire » --- */
.remaining { display: flex; flex-direction: column; gap: 8px; color: var(--text); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.remaining:hover { text-decoration: none; background: var(--surface-2); }
.remaining-head { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.remaining-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.remaining-cell { display: flex; flex-direction: column; }
.remaining-cell b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--st, var(--text)); }
.remaining-cell span { font-size: .72rem; font-weight: 600; color: var(--muted); }
.remaining-cell.team { border-left: 1px solid var(--border); padding-left: 10px; }
.remaining-cell.team b { color: var(--primary); }
.logo-preview { width: 72px; height: 72px; border: 1px solid var(--border); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
#widget-script { font: .72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.row > * { min-width: 0; }

/* --- Logos des pôles (ronds) --- */
.pole-badge { display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: none;
  border-radius: 50%; background: var(--pole); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--pole) 60%, #fff); overflow: hidden; }
.pole-badge.has-logo { background: #fff; box-shadow: 0 0 0 2px var(--pole); }
.pole-badge img { width: 100%; height: 100%; object-fit: cover; }
.pole-dots { display: flex; justify-content: space-between; gap: 8px; padding: 4px 2px 8px; }
.pole-dot-link { display: flex; border-radius: 50%; transition: transform .15s ease; }
.pole-dot-link:hover { transform: scale(1.06); text-decoration: none; }
.pole-dot-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.pole-dot-link.mine .pole-badge { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--pole); }
.pole-hero-title { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.pole-hero-title h1 { margin: 0; }
.pole-hero .pole-badge { box-shadow: 0 0 0 3px rgb(255 255 255 / 85%); }
.pole-row .pole-badge { --size: 44px; }
.pole-bg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pole-bg-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.pole-bg-list li > form:last-child:not(.pole-bg-form) { grid-column: 2; }
.pole-logo-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 600; text-align: center; }
.pole-bg-form { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pole-bg-form input[type="file"] { min-height: 0; padding: 6px; font-size: .8rem; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .pole-dot-link { transition: none; } }
#apparence h3 { margin-top: 10px; }

/* --- Anniversaires --- */
.pill-birthday { background: var(--birthday); color: var(--birthday-text); text-align: center; }
@media (max-width: 719px) { .pill-birthday .pill-name { display: none; } }
.birthday-list li.is-today { font-weight: 700; }
.birthday-list li.is-today .small { color: var(--birthday); font-weight: 700; }

/* --- Installation sur iPhone --- */
.install { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.install .logo { width: 96px; height: 96px; }
.install-steps { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.install-steps li { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.install-steps p { margin: 4px 0 0; }
.step-num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: var(--primary-text); font-weight: 800; }
.share-icon { width: 22px; height: 22px; vertical-align: middle; margin-left: 6px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-hint { display: flex; flex-direction: column; gap: 2px; text-align: left; color: var(--text); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.install-hint:hover { text-decoration: none; background: var(--surface-2); }

/* --- Invitations --- */
.invite-code-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; text-align: center;
  border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.invite-code-big { font: 800 1.9rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--primary); }
.invite-code { letter-spacing: .2em; text-transform: uppercase; }
.request-code { text-align: left; margin-top: 8px; }
.request-code summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.request-code form { margin-top: 8px; }
.invite .stack { margin-top: 12px; }
#invite-message { font-size: .85rem; }
.role.pending { color: var(--st-doing); }
