/* ==========================================================================
   La Boutique des Artisans — feuille de style unique
   Thème clair/sombre automatique · mobile d'abord · impression
   ========================================================================== */

:root {
  --bg: #f7f3ec;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --surface-3: #ebe4d8;
  --border: #e3dacb;
  --border-strong: #cfc3b0;
  --text: #2b241f;
  --text-2: #5b5047;
  --muted: #716659;
  --accent: #a2461f;
  --accent-hover: #8a3a18;
  --accent-ink: #ffffff;
  --accent-soft: #f7e4d9;
  --ok: #2a6c42;
  --ok-soft: #e0f0e5;
  --warn: #8a5309;
  --warn-soft: #fbefd6;
  --bad: #b8382b;
  --bad-soft: #fbe2de;
  --info: #2b6788;
  --info-soft: #dfeef6;
  --neutral: #6f655c;
  --neutral-soft: #ece6dc;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .06);
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 4px 16px rgba(60, 40, 20, .06);
  --shadow-lg: 0 10px 40px rgba(40, 25, 10, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --topbar-h: 60px;
  --tabbar-h: 64px;
  color-scheme: light;
}

/* Mode sombre : celui de l'appareil, ou celui choisi avec le bouton ☀/☾ de l'en-tête (cookie bda_theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1814;
    --surface: #26211c;
    --surface-2: #2e2822;
    --surface-3: #39322a;
    --border: #3d352d;
    --border-strong: #554a3f;
    --text: #f1ebe3;
    --text-2: #cfc4b7;
    --muted: #9d9184;
    --accent: #e07a4b;
    --accent-hover: #ea8d62;
    --accent-ink: #1c1814;
    --accent-soft: #3f271c;
    --ok: #6cc28c;
    --ok-soft: #213a2a;
    --warn: #e9b04f;
    --warn-soft: #43351a;
    --bad: #f07d6e;
    --bad-soft: #4a2420;
    --info: #74b5d8;
    --info-soft: #1f3542;
    --neutral: #b3a89c;
    --neutral-soft: #352e27;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 4px 18px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 44px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #1c1814;
    --surface: #26211c;
    --surface-2: #2e2822;
    --surface-3: #39322a;
    --border: #3d352d;
    --border-strong: #554a3f;
    --text: #f1ebe3;
    --text-2: #cfc4b7;
    --muted: #9d9184;
    --accent: #e07a4b;
    --accent-hover: #ea8d62;
    --accent-ink: #1c1814;
    --accent-soft: #3f271c;
    --ok: #6cc28c;
    --ok-soft: #213a2a;
    --warn: #e9b04f;
    --warn-soft: #43351a;
    --bad: #f07d6e;
    --bad-soft: #4a2420;
    --info: #74b5d8;
    --info-soft: #1f3542;
    --neutral: #b3a89c;
    --neutral-soft: #352e27;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 4px 18px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 44px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

/* -------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
h1 { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .6em; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
code { font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { border-radius: 9px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; color: var(--text-2); }
.theme-btn .ic { width: 19px; height: 19px; }
.sync { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); opacity: .55; transition: background .3s; }
.sync.busy { background: var(--warn); opacity: 1; }
.sync.offline { background: var(--bad); opacity: 1; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--text);
}
.user-btn:hover { border-color: var(--border-strong); }
.user-menu {
  position: absolute; top: calc(var(--topbar-h) - 6px); right: 12px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 230px;
}
.user-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none;
  font: inherit; color: var(--text); border-radius: 8px; cursor: pointer;
}
.user-menu button:hover { background: var(--surface-2); }
.user-menu form { margin: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.danger-text { color: var(--bad) !important; }
body:not(.is-admin) .admin-only { display: none !important; }
body:not(.is-super) .super-only { display: none !important; }

/* --------------------------------------------------------------- tabs */
.tabs {
  position: sticky; top: var(--topbar-h); z-index: 20;
  display: flex; gap: 4px; padding: 8px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .95rem; white-space: nowrap;
  position: relative;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 8px 13px; }
.tab .tab-short { display: none; }
.tab.tab-off { opacity: .5; }
.tab.tab-off .tab-full::after { content: " (masqué)"; font-weight: 400; font-size: .8em; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px 16px; }
.tab-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.tab-dot.count { width: auto; height: 17px; min-width: 17px; padding: 0 5px; border-radius: 9px; color: #fff; font-size: .68rem; font-weight: 700; line-height: 17px; text-align: center; top: 1px; right: 0; }

@media (max-width: 759px) {
  .tabs {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    justify-content: space-around; gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border); border-bottom: 0;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
  }
  .tab { flex: 1; flex-direction: column; gap: 2px; padding: 7px 2px; font-size: .7rem; border-radius: 10px; justify-content: center; }
  .tab .ic { width: 22px; height: 22px; }
  .tab.active { border: 0; box-shadow: none; background: var(--accent-soft); padding: 7px 2px; }
  .tab .tab-full { display: none; }
  .tab .tab-short { display: inline; }
  .tab { min-width: 0; }
  .tab .tab-short { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tab-dot { top: 3px; right: calc(50% - 19px); box-shadow: 0 0 0 2px var(--surface); }
  .tab-dot.count { top: 1px; right: auto; left: calc(50% + 4px); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .brand-sub { display: none; }
  .user-btn .user-btn-name { display: none; }
  .user-btn { padding: 3px; }
}

/* ---------------------------------------------------------- container */
.container { max-width: 1240px; margin: 0 auto; padding: 22px 16px 60px; outline: none; }
@media (min-width: 760px) { .container { padding: 28px 24px 80px; } }

.page-head { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .lead { color: var(--text-2); margin: 4px 0 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 12px; flex-wrap: wrap; }
.section-title h2 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; }
.section-title .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- card */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 15px;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); color: #fff; }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent)); color: var(--accent); }
.btn-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: .85rem; border-radius: 8px; }
.btn-lg { min-height: 48px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; flex: none;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-icon.sm { width: 30px; height: 30px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
  color: var(--accent-ink);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------ badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; line-height: 1.5;
  background: var(--neutral-soft); color: var(--neutral); white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-muted { background: transparent; color: var(--muted); border: 1px dashed var(--border-strong); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 550;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .count { font-size: .78rem; opacity: .85; }
.chip.chip-add { border-style: dashed; color: var(--accent); background: transparent; }
.chip.chip-add .ic { width: 15px; height: 15px; }

.avatar {
  --h: 20;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: hsl(var(--h) 55% 88%); color: hsl(var(--h) 45% 28%);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.avatar.lg { width: 52px; height: 52px; font-size: 1.1rem; }
.avatar.sm { width: 24px; height: 24px; font-size: .66rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: hsl(var(--h) 30% 30%); color: hsl(var(--h) 60% 86%); } }
:root[data-theme="dark"] .avatar { background: hsl(var(--h) 30% 30%); color: hsl(var(--h) 60% 86%); }

.person {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 3px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid transparent; font-size: .85rem; max-width: 100%;
}
.person .avatar { width: 22px; height: 22px; font-size: .62rem; }
.person.me { border-color: var(--accent); background: var(--accent-soft); }
.person.option { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-2); }
.person.me.option { border-color: var(--accent); }
.person-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.person { font: inherit; color: inherit; cursor: pointer; font-size: .85rem; }

/* ---------------------------------------------------------- notices */
.notice { padding: 11px 14px; border-radius: var(--radius-sm); font-size: .92rem; margin-bottom: 14px; background: var(--surface-2); }
.notice-info { background: var(--info-soft); color: var(--info); }
.notice-warn { background: var(--warn-soft); color: var(--warn); }
.notice-bad { background: var(--bad-soft); color: var(--bad); }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice a { color: inherit; font-weight: 650; }

.empty {
  text-align: center; padding: 34px 18px; color: var(--muted);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 50%, transparent);
}
.empty .empty-icon { font-size: 2rem; margin-bottom: 6px; }
.empty p { margin-bottom: 12px; }

.trace { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.trace .ic { width: 13px; height: 13px; }
.trace b { font-weight: 600; color: var(--text-2); }

.loading-view { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 80px 0; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* ------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: .88rem; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: .8rem; color: var(--muted); }
.req { color: var(--accent); font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px; /* évite le zoom auto sur iPhone */
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 44px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.form-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.form-section:first-child { margin-top: 0; }

/* Contrôle segmenté (boutons radio) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 44px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: .9rem; color: var(--text-2); cursor: pointer; line-height: 1.25;
}
.seg span:hover { border-color: var(--text-2); }
.seg input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.seg.ok input:checked + span { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; min-height: 32px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.weekdays label { position: relative; }
.weekdays input { position: absolute; opacity: 0; }
.weekdays span { display: inline-flex; width: 46px; height: 40px; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--border-strong); font-weight: 600; font-size: .85rem; cursor: pointer; }
.weekdays input:checked + span { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); text-decoration: line-through; }
.quick-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-picks button { font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--border-strong); background: transparent; color: var(--text-2); cursor: pointer; }
.quick-picks button:hover { border-style: solid; color: var(--accent); border-color: var(--accent); }

/* -------------------------------------------------------------- modal */
dialog.modal {
  border: 0; padding: 0; margin: auto;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog.modal.modal-wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(30, 20, 10, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); margin: 0; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-family: var(--font-serif); font-weight: 600; font-size: 1.2rem; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-body > * + * { margin-top: 14px; }
.modal-error { margin: 0 18px 4px; padding: 10px 12px; border-radius: 9px; background: var(--bad-soft); color: var(--bad); font-size: .9rem; font-weight: 550; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 600px) {
  dialog.modal, dialog.modal.modal-wide {
    width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0;
  }
  dialog.modal[open] { animation: sheet .22s ease-out; }
  .modal-form { max-height: 92vh; }
  .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }

/* ------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
@media (max-width: 759px) { .toasts { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); } }
.toast {
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-weight: 550; font-size: .92rem;
  animation: toast-in .2s ease-out; transition: opacity .3s, transform .3s; pointer-events: auto;
}
.toast-bad { background: var(--bad); color: #fff; }
/* Nouvelle version du site disponible */
.update-bar { position: fixed; z-index: 101; left: 50%; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 10px 14px; border-radius: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(0,0,0,.18); width: max-content; max-width: calc(100vw - 24px); font-size: .92rem; }
@media print { .update-bar { display: none; } }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------- meters */
.meter { height: 9px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s ease; }
.meter.ok > i { background: var(--ok); }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }
.meter.neutral > i { background: var(--neutral); }
.meter .target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .5; }

/* ------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table tr.is-me td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.table tr.is-done td:not(.cell-actions):not(.cell-checkbox) { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.table tfoot td { background: var(--surface-2); font-weight: 650; border-top: 1px solid var(--border); border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.table .cell-actions .btn-icon { width: 32px; height: 32px; }
.table .cell-checkbox { width: 1%; text-align: center; }
.table .cell-checkbox input { width: 22px; height: 22px; accent-color: var(--ok); cursor: pointer; }
.table .cell-user { white-space: nowrap; }
.table .cell-user .avatar { width: 24px; height: 24px; font-size: .62rem; margin-right: 6px; }
/* Colonne « Plusieurs membres » : pastilles des inscrits + bouton « + Moi » */
.users-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.join-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 3px 11px; border-radius: 999px; border: 1px dashed var(--accent); background: transparent; color: var(--accent); font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
.join-btn .ic { width: 14px; height: 14px; }
.join-btn.on { border: 1px solid var(--border); color: var(--text-2); }
@media (hover: hover) {
  .join-btn:hover { background: var(--accent-soft); }
  .join-btn.on:hover { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
}
.join-btn:disabled { opacity: .5; cursor: wait; }
.user-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 4px 14px; max-height: 260px; overflow-y: auto; }
.user-picks .check span { display: inline-flex; align-items: center; gap: 7px; }
select.inline-select {
  min-height: 30px; width: auto; padding: 2px 26px 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650;
  border: 0; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%; background-size: 4px 4px; background-repeat: no-repeat;
}
.sel-ok { background-color: var(--ok-soft); color: var(--ok); }
.sel-warn { background-color: var(--warn-soft); color: var(--warn); }
.sel-bad { background-color: var(--bad-soft); color: var(--bad); }
.sel-info { background-color: var(--info-soft); color: var(--info); }
.sel-accent { background-color: var(--accent-soft); color: var(--accent); }
.sel-neutral, .sel-empty { background-color: var(--neutral-soft); color: var(--neutral); }

/* Tableaux → cartes sur mobile */
@media (max-width: 759px) {
  .table-wrap.stackable { border: 0; background: none; box-shadow: none; overflow: visible; }
  .stackable table, .stackable tbody, .stackable tr, .stackable td { display: block; width: 100%; }
  .stackable thead { display: none; }
  .stackable tbody tr {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 10px; position: relative;
  }
  .stackable tbody tr:hover td { background: none; }
  .stackable tr.is-me { border-color: var(--accent); }
  .stackable tr.is-me td { background: none; }
  .stackable td { border: 0; padding: 5px 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: right; min-height: 32px; }
  .stackable td::before { content: attr(data-label); font-size: .78rem; color: var(--muted); font-weight: 600; text-align: left; flex: none; max-width: 45%; }
  .stackable td.cell-title { font-weight: 650; font-size: 1rem; padding-right: 80px; text-align: left; justify-content: flex-start; }
  .stackable td.cell-title::before { display: none; }
  .stackable td.cell-empty { display: none; }
  .stackable td.cell-actions { position: absolute; top: 6px; right: 8px; width: auto; padding: 0; min-height: 0; }
  .stackable td.cell-actions::before { display: none; }
  .stackable td.cell-checkbox { width: 100%; text-align: right; }
  .stackable td.num { text-align: right; }
  .stackable td.cell-users .users-cell { justify-content: flex-end; }
  .stackable tfoot { display: block; }
  .stackable tfoot tr { display: block; background: var(--surface-2); border-radius: var(--radius); padding: 8px 14px; }
  .stackable tfoot td { display: flex; justify-content: space-between; background: none; border: 0; padding: 3px 0; }
  .stackable tfoot td::before { content: attr(data-label); font-size: .78rem; color: var(--muted); }
  .stackable tfoot td:empty { display: none; }
}

/* ================================================================== */
/*  Onglet Infos                                                       */
/* ================================================================== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.kpi-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.kpi-value { font-size: 1.25rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--text-2); }
.kpi.highlight { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi.highlight .kpi-label, .kpi.highlight .kpi-sub { color: inherit; opacity: .85; }

.composer { display: flex; gap: 10px; align-items: flex-start; }
.composer textarea { min-height: 46px; height: 46px; transition: height .15s; }
.composer textarea:focus, .composer.has-text textarea { height: 90px; }
.composer-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 560px) { .composer { flex-direction: column; } .composer > .avatar { display: none; } .composer-side { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; } }

.feed { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.post { display: flex; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.post.important { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box; box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.post-main { flex: 1; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 3px; }
.post-meta b { font-weight: 650; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 2px; align-self: flex-start; }

.pins { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.pin { display: flex; flex-direction: column; }
.pin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pin-icon { font-size: 1.45rem; width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--surface-2); }
.pin-head h3 { flex: 1; font-size: 1.08rem; }
.pin-tools { display: flex; }
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .6em; }
.md ul, .md ol { margin: 0 0 .6em; padding-left: 1.3em; }
.md li { margin: .15em 0; }
.md h3, .md h4, .md h5 { margin: .9em 0 .35em; font-size: 1rem; }
.md blockquote { margin: 0 0 .6em; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text-2); }
.md-help { font-size: .8rem; color: var(--muted); line-height: 1.7; }
.md-help code { font-size: .78rem; }
.md-preview { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 14px; min-height: 120px; background: var(--surface-2); }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-split textarea { min-height: 300px; font-size: 15px; }
@media (max-width: 700px) { .editor-split { grid-template-columns: 1fr; } .editor-split textarea { min-height: 200px; } }

/* ================================================================== */
/*  Onglet Décider (faisabilité + votes)                               */
/* ================================================================== */
.segnav { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 20px; max-width: 100%; }
.segnav a { padding: 8px 18px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .92rem; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.segnav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segnav .badge { padding: 0 7px; }

.verdict { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid transparent; }
.verdict-icon { font-size: 2rem; line-height: 1; }
.verdict h2 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; }
.verdict p { margin: 2px 0 0; font-size: .92rem; }
.verdict.go { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.verdict.watch { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.verdict.nogo { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.verdict.unset { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

.indicators { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; }
@media (max-width: 1050px) { .indicators { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .indicators { grid-template-columns: 1fr; } }
.indicator { padding: 15px 16px; display: flex; flex-direction: column; gap: 8px; }
.indicator-head { display: flex; align-items: center; gap: 8px; }
.indicator-head h3 { flex: 1; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.indicator-value { font-size: 1.45rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; }
.indicator-value small { font-size: .9rem; font-weight: 550; color: var(--muted); }
.indicator-caption { font-size: .82rem; color: var(--text-2); }
.indicator-caption a { font-weight: 600; }

.mine { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; border-left: 4px solid var(--accent); }
.mine-main { flex: 1; min-width: 220px; }
.mine-main h3 { margin-bottom: 4px; }
.mine-facts { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .88rem; color: var(--text-2); }
.mine.todo { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

.poll { display: flex; flex-direction: column; gap: 12px; }
.poll.closed { background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
.poll-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.poll-head h3 { flex: 1; font-size: 1.1rem; min-width: 200px; }
.poll-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); align-items: center; }
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  position: relative; display: block; width: 100%; text-align: left;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface);
  padding: 11px 14px; font: inherit; color: var(--text); overflow: hidden;
}
/* Zone cliquable réduite à la case + libellé : le résultat (nombre, %) n'est pas cliquable. */
.opt-pick { position: relative; flex: 0 1 auto; min-width: 0; min-height: 36px; margin-right: auto; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 6px 8px; margin-top: -6px; margin-bottom: -6px; margin-left: -8px; border-radius: 9px; }
button.opt-pick { cursor: pointer; }
button.opt-pick:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
button.opt-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.opt-line .opt-count { padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border); }
.opt.mine { border-color: var(--accent); }
.opt-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); opacity: .7; transition: width .4s ease; pointer-events: none; }
.opt.winner .opt-bar { background: color-mix(in srgb, var(--ok-soft) 100%, transparent); }
.opt-line { position: relative; display: flex; align-items: center; gap: 10px; }
.opt-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; display: flex; align-items: center; justify-content: center; color: transparent; background: var(--surface); }
.opt.multi .opt-check { border-radius: 6px; }
.opt.mine .opt-check, .opt.picked .opt-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt.open.multi.mine:not(.picked) .opt-check { background: var(--surface); border-color: var(--border-strong); color: transparent; }
.opt.open.multi.picked { border-color: var(--accent); }
.opt-check .ic { width: 14px; height: 14px; stroke-width: 3; }
.opt-label { flex: 1; font-weight: 600; min-width: 0; }
.opt-count { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.opt-count small { color: var(--muted); font-weight: 550; }
.opt-voters { position: relative; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; padding-left: 32px; font-size: .8rem; color: var(--text-2); }
.opt-comment { display: block; width: 100%; font-style: italic; color: var(--muted); }
.poll-participation { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--text-2); }
.poll-participation .meter { flex: 1; max-width: 200px; height: 6px; }
.option-editor { display: flex; flex-direction: column; gap: 8px; }
.slot-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.slot-row, .slot-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; }
.slot-cols { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: -2px; }
.slot-cols::after { content: ""; grid-column: 4 / 7; }
.slot-row input { min-width: 0; }
@media (max-width: 520px) { .slot-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto auto; } .slot-row [data-f=name] { grid-column: 1 / 3; } .slot-row [data-f=hours] { grid-column: 1; grid-row: 2; } .slot-row [data-f=hours_we] { grid-column: 2; grid-row: 2; } .slot-cols { display: none; } }
.option-editor .opt-row { display: flex; gap: 6px; align-items: center; }
details.closed-polls > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; }
details.closed-polls > summary::-webkit-details-marker { display: none; }
details.closed-polls > summary::before { content: "▸"; font-size: .9rem; color: var(--muted); transition: transform .2s; }
details.closed-polls[open] > summary::before { transform: rotate(90deg); }
.polls-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); align-items: start; }

.slot-head { display: flex; align-items: center; gap: 8px; }
.slot-name { flex: 1; font-size: .82rem; font-weight: 650; color: var(--text-2); }
.slot-hours { font-weight: 500; color: var(--muted); margin-left: 2px; }
.slot-people { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; align-items: center; }
.slot-empty { font-size: .82rem; color: var(--muted); font-style: italic; }

/* ================================================================== */
/*  Onglet Listes                                                      */
/* ================================================================== */
.list-panel-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.list-panel-head .titles { flex: 1; min-width: 220px; }
.list-panel-head h2 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.list-panel-head p { margin: 4px 0 0; color: var(--text-2); font-size: .92rem; }
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list-search { max-width: 260px; min-height: 38px !important; padding: 7px 12px !important; }
.col-editor { display: flex; flex-direction: column; gap: 10px; }
.col-row { display: grid; grid-template-columns: 1fr 170px auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.col-row .col-choices { grid-column: 1 / -1; }
.col-row-tools { display: flex; align-items: center; gap: 2px; }
.col-show { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 550; color: var(--text-2); margin-right: 6px; cursor: pointer; white-space: nowrap; }
.col-show input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.person .tag-ic { font-size: .8rem; line-height: 1; }
.person .tag-ic small { font-size: .68rem; font-weight: 650; color: var(--muted); }
.tag-editor { display: flex; flex-direction: column; gap: 8px; }
.tag-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.tag-row [data-f=emoji] { text-align: center; }
/* Tableaux : les puces s'empilent sur plusieurs lignes */
.list-chips { margin-bottom: 18px; }
/* (ancienne rangée avec flèches, conservée pour le Calendrier) */
.nav-arrow { flex: none; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); }
.nav-arrow:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) { .col-row { grid-template-columns: 1fr auto; } .col-row select { grid-column: 1 / -1; grid-row: 2; } }

/* ================================================================== */
/*  Onglet Équipe                                                      */
/* ================================================================== */
.members { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.member { display: flex; flex-direction: column; gap: 12px; }
.member.me { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.member-top { display: flex; gap: 12px; align-items: flex-start; }
.member-id { flex: 1; min-width: 0; }
.member-id h3 { font-size: 1.05rem; }
.member-workshop { font-weight: 600; color: var(--accent); font-size: .92rem; }
.member-spec { font-size: .88rem; color: var(--text-2); }
.member-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.member-seen { font-size: .76rem; color: var(--muted); }
.invite-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--info-soft); border-color: transparent; margin-bottom: 18px; }
.invite-box { flex-direction: column; align-items: stretch; gap: 0; padding-top: 6px; padding-bottom: 6px; }
.invite-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.invite-row + .invite-row { border-top: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.invite-box .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: .12em; color: var(--info); background: var(--surface); padding: 4px 12px; border-radius: 8px; }
.popover {
  position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 230px;
}
.popover button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; font: inherit; color: var(--text); border-radius: 8px; cursor: pointer; }
.popover button:hover { background: var(--surface-2); }
.temp-pass { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25rem; font-weight: 700; background: var(--surface-2); padding: 12px; border-radius: 10px; text-align: center; letter-spacing: .04em; user-select: all; }

/* ================================================================== */
/*  Pages connexion / inscription                                      */
/* ================================================================== */
.auth-body { display: flex; min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth-wrap { width: 100%; max-width: 520px; margin: auto; padding: 28px 16px 40px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding: 0 4px; }
.auth-brand img { border-radius: 11px; }
.auth-brand-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; }
.auth-brand-sub { font-size: .85rem; color: var(--muted); }
.auth-card { padding: 24px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 16px; }
/* Pied de page et mentions légales */
.site-foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 22px 16px 26px; margin-top: auto; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > .container { width: 100%; flex: 1 0 auto; }
.site-foot a { color: inherit; }
.site-foot a:hover { color: var(--accent); }
.auth-body { flex-direction: column; }
.auth-body .site-foot { padding-top: 0; }
.legal-wrap { max-width: 760px; }
.legal h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.legal p, .legal li { font-size: .93rem; line-height: 1.6; }
.legal ul { padding-left: 18px; margin: 0; }
.auth-foot { text-align: center; margin: 16px 0 0; font-size: .92rem; }
.setup-list li { margin-bottom: 8px; }

/* ================================================================== */
/*  Impression                                                         */
/* ================================================================== */
.print-only { display: none; }
@media print {
  @page { margin: 12mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --text: #000; --text-2: #222; --muted: #555; --border: #bbb; --border-strong: #888; color-scheme: light; }
  body { background: #fff; padding: 0 !important; font-size: 11pt; }
  .topbar, .tabs, .toasts, .site-foot, .no-print, .btn, .btn-icon, .chips, .segnav, dialog { display: none !important; }
  .print-only { display: block !important; }
  .container { max-width: none; padding: 0; }
  .card, .table-wrap { box-shadow: none !important; }
  .screen-only { display: none !important; }
  .print-title { font-family: var(--font-serif); font-size: 18pt; margin: 0 0 4pt; }
  .print-sub { color: #444; margin: 0 0 10pt; font-size: 10pt; }
  table.print-table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .print-table th, .print-table td { border: 1px solid #999; padding: 5pt 6pt; text-align: left; vertical-align: top; }
  .print-table th { background: #eee; }
  .print-table tr { break-inside: avoid; }
  .print-table .phase-row td { background: #f4f4f4; font-weight: 700; }
  .print-check { display: inline-block; width: 11pt; height: 11pt; border: 1.2pt solid #000; vertical-align: -2pt; margin-right: 4pt; }
  .print-check.on::after { content: "✓"; display: block; font-size: 9pt; line-height: 11pt; text-align: center; }
  a { color: #000; text-decoration: none; }
  /* Planning imprimable : une page par mois */
  .pv-page { break-after: page; }
  .pv-page:last-child { break-after: auto; }
  .pv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10pt; border-bottom: 1.5pt solid #000; padding-bottom: 3pt; margin-bottom: 6pt; }
  .pv-head h1 { font-family: var(--font-serif); font-size: 17pt; margin: 0; }
  .pv-head span { font-size: 9pt; color: #444; }
  .pv-foot { font-size: 7.5pt; color: #555; margin: 4pt 0 0; }
  .pv table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .pv th { background: #eee; font-size: 8.5pt; padding: 3pt 4pt; border: 0.8pt solid #888; text-align: left; }
  .pv td { border: 0.8pt solid #888; vertical-align: top; }
  .pv-empty { color: #888; }
  .pv i { font-style: normal; color: #555; }
  .pv-cal td { height: 24mm; padding: 2pt 3pt; font-size: 7.5pt; line-height: 1.25; overflow-wrap: anywhere; }
  .pv-cal tr { break-inside: avoid; }
  .pv-num { display: block; font-weight: 800; font-size: 10pt; line-height: 1; margin-bottom: 2pt; }
  .pv-slot + .pv-slot { margin-top: 1.5pt; padding-top: 1.5pt; border-top: 0.5pt dotted #aaa; }
  .pv-tag { font-weight: 700; font-size: 7pt; text-transform: uppercase; letter-spacing: .03em; color: #333; }
  .pv-out, .pv-blank, .pv-closed { background: #f3f3f3; }
  .pv-out .pv-num { color: #aaa; }
  .pv-closed { color: #666; }
  .pv-phase { background: #f8f8f8; }
  .pv-list td { padding: 2.5pt 4pt; font-size: 8.5pt; line-height: 1.3; }
  .pv-list tr { break-inside: avoid; }
  .pv-list .pv-day { width: 22%; }
  .pv-list .pv-day small { display: block; font-size: 7pt; color: #555; }
}

/* ================================================================== */
/*  Onglet Calendrier (vue mensuelle)                                  */
/* ================================================================== */
/* Couleurs bien distinctes : vert franc, jaune citron, orange vif, rouge profond. */
:root { --c-max: #1f1f1f; --c-teal: #0e9f9a; --c-helped: #8fd4a4; --c-lightgreen: #5cc97f; --c-blue: #4cc3ff; --c-green: #1f9d4c; --c-yellow: #ffd500; --c-orange: #ff7a00; --c-red: #c81e1e; }
.c-max { --c: var(--c-max); } .c-teal { --c: var(--c-teal); } .c-blue { --c: var(--c-blue); } .c-green { --c: var(--c-green); } .c-yellow { --c: var(--c-yellow); } .c-orange { --c: var(--c-orange); } .c-red { --c: var(--c-red); }
.cal-wrap { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .cal-wrap { grid-template-columns: minmax(0, 1fr) 360px; } .cal-side { position: sticky; top: 76px; } }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-nav h2 { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; text-transform: capitalize; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-wd { text-align: center; font-size: .72rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 2px; }
.cal-cell {
  position: relative; aspect-ratio: 1 / 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; padding: 0; display: flex; align-items: center; justify-content: center;
}
button.cal-cell { cursor: pointer; }
button.cal-cell:hover { border-color: var(--border-strong); }
.cal-cell.blank { border: 0; background: none; }
.cal-cell.out { background: none; border-style: dashed; color: var(--muted); opacity: .5; }
.cal-cell.closed { background: var(--surface-2); color: var(--muted); }
.cal-cell.closed .cal-num { text-decoration: line-through; }
.cal-cell.good { background: color-mix(in srgb, var(--c-green) 14%, var(--surface)); }
.cal-cell.bad { background: color-mix(in srgb, var(--c-red) 11%, var(--surface)); }
.cal-cell.above { background: color-mix(in srgb, var(--c-teal) 16%, var(--surface)); }
.cal-cell.full { background: color-mix(in srgb, var(--c-max) 13%, var(--surface)); }
.cal-cell.today .cal-num { background: var(--text); color: var(--bg); border-radius: 999px; padding: 0 6px; }
.cal-cell.sel { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.cal-num { font-weight: 650; font-size: .95rem; line-height: 1.4; }
.cal-dot { position: absolute; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 65%, #000); }
.cal-dot.l { left: 5px; } .cal-dot.r { right: 5px; }
.cal-line { position: absolute; left: 22%; right: 22%; bottom: 25%; height: 7px; border-radius: 4px; background: var(--c); border: 1px solid color-mix(in srgb, var(--c) 65%, #000); }
.cal-counts { position: absolute; left: 5px; right: 5px; bottom: 2px; display: flex; justify-content: space-between; font-size: .7rem; font-weight: 700; line-height: 1.1; color: var(--text-2); pointer-events: none; }
.cal-phase { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: .58rem; font-weight: 650; color: var(--info); }
.cal-legend { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--text-2); }
.cal-legend > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cal-sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 65%, #000); vertical-align: -2px; }
.cal-side { padding: 16px; }
.cal-side-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-side-head h3 { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; flex: 1; text-transform: capitalize; }
.cal-slot { padding: 12px 0; border-top: 1px solid var(--border); }
.cal-slot .slot-people { margin: 8px 0; }
.cal-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-choice { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px dashed var(--accent); background: transparent; color: var(--accent); font: inherit; font-size: .84rem; font-weight: 650; cursor: pointer; }
.cal-choice .ic { width: 14px; height: 14px; }
.cal-choice.on { border-style: solid; background: var(--accent); color: var(--accent-ink); }
.cal-choice:disabled { opacity: .5; cursor: wait; }
@media (max-width: 520px) { .cal-grid { gap: 3px; } .cal-cell { border-radius: 8px; } .cal-dot { top: 3px; width: 11px; height: 11px; } .cal-dot.l { left: 3px; } .cal-dot.r { right: 3px; } .cal-line { height: 6px; left: 25%; right: 25%; bottom: 27%; } .cal-num { font-size: .85rem; } .cal-counts { left: 3px; right: 3px; font-size: .64rem; } }

/* Équipe : statistiques de présence */
.team-stats { margin-bottom: 18px; }
.team-stats summary { cursor: pointer; font-weight: 650; padding: 4px 0 10px; }
.craft-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 2px 14px; }
.craft-picks .check { font-weight: 500; font-size: .92rem; min-height: 30px; }
.craft-summary { padding: 14px 16px; margin-bottom: 18px; }
.craft-summary-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.craft-summary-head h3 { font-size: 1rem; }
.member-crafts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.member-contact-line { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-2); overflow-wrap: anywhere; }
.member-contact-line .ic { width: 15px; height: 15px; flex: none; }
.member-contact-line a { color: inherit; }
.cal-key { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; white-space: nowrap; }
.stats-wrap { overflow-x: auto; }
.stats-table td, .stats-table th { padding: 7px 10px; }
.stats-table .cell-user { white-space: nowrap; }
.stats-table th[title] { cursor: help; }
@media (max-width: 759px) { .stats-table { font-size: .85rem; } .stats-table .cell-user .avatar { width: 20px; height: 20px; font-size: .55rem; margin-right: 4px; } }

/* ------------------------------------------------------------ Support */
.support-btn { position: relative; }
.support-btn.active { color: var(--accent); background: var(--accent-soft); }
.topbar .support-btn .tab-dot, .support-btn .tab-dot { top: 3px; right: 3px; box-shadow: 0 0 0 2px var(--surface); }
.support-wrap { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) {
  .support-wrap { grid-template-columns: 340px minmax(0, 1fr); }
  .support-thread { position: sticky; top: 76px; }
  .thread-back { display: none; }
}
@media (max-width: 899px) {
  .support-wrap.has-thread .support-list, .support-wrap:not(.has-thread) .support-thread { display: none; }
}
.ticket-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: inherit; text-decoration: none; }
.ticket-row:hover { border-color: var(--border-strong); }
.ticket-row.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ticket-row.unread .ticket-subject { font-weight: 700; }
.ticket-ic { font-size: 1.25rem; flex: none; }
.ticket-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ticket-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ticket-meta { font-size: .8rem; color: var(--muted); }
.thread-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.thread-title { flex: 1; min-width: 0; }
.thread-title h2 { margin: 0 0 2px; font-size: 1.1rem; overflow-wrap: anywhere; }
.thread-msgs { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; max-height: min(60vh, 560px); overflow-y: auto; }
.msg { max-width: 85%; align-self: flex-start; }
.msg.msg-mine { align-self: flex-end; }
.msg-meta { font-size: .75rem; color: var(--muted); margin: 0 4px 3px; }
.msg.msg-mine .msg-meta { text-align: right; }
.msg-text { padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); overflow-wrap: anywhere; line-height: 1.45; }
.msg.from-admin .msg-text { background: var(--info-soft); }
.msg.msg-mine .msg-text { background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.thread-compose { display: flex; gap: 8px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.thread-compose textarea { flex: 1; min-height: 64px; resize: vertical; }
.quick-replies { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.quick-reply { font-size: 1.25rem; line-height: 1; width: 44px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.quick-reply:hover { border-color: var(--accent); background: var(--accent-soft); }
.quick-reply:disabled { opacity: .5; cursor: wait; }
.quick-replies + .thread-compose { border-top: 0; padding-top: 8px; }
/* Champ « Autre » : visible seulement si la case « Autre » est cochée. */
.craft-other { display: none; margin-top: 8px; }
.craft-picks:has(input[value="autre"]:checked) + .craft-other { display: block; }
.msg-text.msg-emoji { font-size: 1.9rem; line-height: 1.1; padding: 4px 10px; }

/* ------------------------------------------------- Barre d'onglets (téléphone)
   Couleur contrastée : foncée en mode clair, claire en mode sombre. */
:root { --nav-bg: #2b241f; --nav-fg: #ffffff; --nav-fg-2: #d9d1c7; --nav-active: #a2461f; --nav-dot: #ff9a5c; --nav-dot-ink: #2b241f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --nav-bg: #f1ebe3; --nav-fg: #2b241f; --nav-fg-2: #4a4038; --nav-active: #a2461f; --nav-dot: #a2461f; --nav-dot-ink: #ffffff; } }
:root[data-theme="dark"] { --nav-bg: #f1ebe3; --nav-fg: #2b241f; --nav-fg-2: #4a4038; --nav-active: #a2461f; --nav-dot: #a2461f; --nav-dot-ink: #ffffff; }

@media (max-width: 759px) {
  :root { --tabbar-h: 70px; }
  .tabs { background: var(--nav-bg); border-top: 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .18); padding-top: 6px; }
  .tab { color: var(--nav-fg-2); font-size: .72rem; font-weight: 600; padding: 8px 2px; gap: 3px; }
  .tab .ic { width: 24px; height: 24px; }
  .tab:hover { background: color-mix(in srgb, var(--nav-fg) 10%, transparent); color: var(--nav-fg); }
  .tab.active { background: var(--nav-active); color: #ffffff; padding: 8px 2px; }
  .tab.tab-off { opacity: .45; }
  .tabs .tab-dot { background: var(--nav-dot); box-shadow: 0 0 0 2px var(--nav-bg); }
  .tabs .tab-dot.count { color: var(--nav-dot-ink); }
  .tab.active .tab-dot { box-shadow: 0 0 0 2px var(--nav-active); }

  /* Cibles tactiles plus confortables (≈ 44 px) */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; padding: 7px 13px; font-size: .88rem; }
  .btn-icon { width: 42px; height: 42px; }
  .btn-icon.sm { width: 36px; height: 36px; }
  .theme-btn { width: 40px; height: 40px; }
  .topbar-right { gap: 6px; }
  .chip { padding: 9px 14px; font-size: .9rem; }
  .check { min-height: 40px; }
  .cal-choice { min-height: 40px; padding: 6px 14px; font-size: .88rem; }
  .quick-reply { width: 48px; height: 42px; }
  .user-menu button { padding: 13px 12px; }
  .site-foot a { display: inline-block; padding: 6px 2px; }
}.cal-cell:has(.cal-line) .cal-num { transform: translateY(-5px); }
.cron-cmd { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.cron-cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: none; padding: 0; font-size: .8rem; }
.backup-table td, .backup-table th { font-size: .85rem; }
/* Étiquettes de personnes : le nom seul, sans pastille d'initiales */
.person { padding: 4px 11px; }
/* Corbeille */
.trash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trash-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.trash-ic { font-size: 1.1rem; flex: none; width: 1.4em; text-align: center; }
.trash-main { flex: 1; min-width: 0; }
.trash-title { font-weight: 600; overflow-wrap: anywhere; }
.trash-actions { display: flex; gap: 4px; flex: none; }
@media (max-width: 560px) { .trash-item { flex-wrap: wrap; } .trash-actions { width: 100%; justify-content: flex-end; } }
/* Barre du bas sur téléphone : libellés entiers (« Annonces », « Planning ») même avec 8 onglets */
@media (max-width: 759px) {
  .tabs { padding-left: 2px; padding-right: 2px; gap: 1px; }
  .tab, .tab.active { font-size: clamp(.58rem, 2.55vw, .72rem); letter-spacing: -.015em; padding-left: 0; padding-right: 0; }
}
/* Calendrier : légende repliable */
.cal-legend > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); font-size: .88rem; padding: 6px 2px; min-height: 36px; user-select: none; }
.cal-legend > summary::-webkit-details-marker { display: none; }
.cal-legend-arrow { display: inline-flex; transition: transform .15s ease; }
.cal-legend-arrow svg { width: 16px; height: 16px; }
.cal-legend[open] .cal-legend-arrow { transform: rotate(180deg); }
.cal-legend:not([open]) { gap: 0; }
/* Types de créateurs : icône */
.craft-ic { margin-right: 3px; }
.badge-btn { cursor: pointer; border: 1px dashed var(--border-strong, var(--border)); font: inherit; font-size: .75rem; }
.badge-btn:hover { color: var(--accent); border-color: var(--accent); }
/* Connexion : zone « Rejoindre le groupe » */
.auth-join { margin-top: 16px; padding: 20px 24px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); }
.auth-join-ic { font-size: 1.9rem; line-height: 1; }
.auth-join h2 { font-size: 1.12rem; margin: 0 0 2px; }
.auth-join p { margin: 0; font-size: .9rem; color: var(--text-2); }
.auth-join .btn { grid-column: 1 / -1; margin-top: 10px; }
.auth-back { margin: -6px 0 10px -8px; }
.team-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
/* Quel nom ? */
.names-add { display: flex; gap: 8px; padding: 12px; margin-bottom: 8px; }
.names-add input { flex: 1; min-width: 0; font-size: 1.05rem; }
.names-rules { margin: 0 0 14px; }
.names-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.name-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.name-row.leader { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 2px var(--accent-soft); }
.name-row.is-out { opacity: .75; }
.name-rank { flex: none; width: 2rem; text-align: center; font-weight: 700; font-size: 1.15rem; color: var(--muted); }
.name-main { flex: 1; min-width: 0; }
.name-label { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.name-who { margin-top: 3px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.name-votes { display: flex; align-items: center; gap: 4px; flex: none; }
.name-vote { display: inline-flex; align-items: center; gap: 4px; min-width: 52px; min-height: 40px; justify-content: center; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; }
.name-vote b { font-weight: 700; font-variant-numeric: tabular-nums; }
.name-vote:hover { border-color: var(--accent); }
.name-vote.on.v-pour { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); border-color: var(--ok); }
.name-vote.on.v-neutre { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border-color: var(--warn); }
.name-vote.on.v-contre { background: color-mix(in srgb, var(--bad, #b3261e) 14%, var(--surface)); border-color: var(--bad, #b3261e); }
@media (max-width: 560px) {
  .name-row { flex-wrap: wrap; gap: 8px 10px; }
  .name-votes { width: 100%; justify-content: flex-end; }
  .name-vote { flex: 1; }
}
@media (max-width: 759px) { .tabs-many .tab, .tabs-many .tab.active { font-size: clamp(.52rem, 2.28vw, .72rem); letter-spacing: -.025em; } }
/* Carte membre : « Vu il y a… » à gauche, rôle à droite */
.member-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
/* Quel nom ? : boutons de vote plus grands et mieux espacés (doigts sur téléphone) */
.name-votes { gap: 8px; }
.name-vote { min-width: 64px; min-height: 46px; padding: 6px 12px; font-size: 1.02rem; gap: 6px; }
.name-vote > span[aria-hidden] { font-size: 1.25rem; line-height: 1; }
.name-votes .btn-icon { margin-left: 4px; }
@media (max-width: 560px) {
  .name-votes { gap: 10px; }
  .name-vote { min-height: 52px; font-size: 1.08rem; }
  .name-vote > span[aria-hidden] { font-size: 1.4rem; }
  .name-votes .btn-icon { margin-left: 2px; width: 44px; height: 44px; }
}
/* Zone Historique (Votes, Quel nom ?) */
details.history { margin-top: 28px; border-top: 1px solid var(--border); }
details.history > summary { flex-wrap: wrap; }
details.history > summary::before { content: '▸'; font-size: .9em; color: var(--muted); transition: transform .15s ease; }
details.history[open] > summary::before { transform: rotate(90deg); }
.history-sub { font-family: var(--font-sans, inherit); font-weight: 400; }
/* Historique : éléments retirés (lecture seule) */
.name-row.is-out .name-gone { margin-top: 4px; }
.name-votes.is-frozen { flex-wrap: wrap; justify-content: flex-end; }
.name-votes.is-frozen .name-vote { cursor: default; opacity: .75; min-height: 38px; min-width: 52px; }
.name-gone-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; width: 100%; }
.name-trash { color: var(--bad, #b42318); }
.name-tools { display: inline-flex; gap: 2px; align-items: center; }
/* Réseau social principal */
.social-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.social-pick { position: relative; cursor: pointer; }
.social-pick input { position: absolute; opacity: 0; pointer-events: none; }
.social-pick > span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; background: var(--surface, #fff); }
.social-pick > span .ic { width: 18px; height: 18px; }
.social-pick > span b { font-weight: 550; }
.social-pick input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft, rgba(0,0,0,.08)); font-weight: 600; }
.social-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.social-handle { margin-top: 8px; display: none; }
.social-picks:has(input:checked:not([value=""])) + .social-handle { display: block; }
.member-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.social-link span { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-link.is-static { cursor: default; }
.social-instagram .ic { color: #c13584; }
.social-facebook .ic { color: #1877f2; }
.social-tiktok .ic { color: #111; }
.social-pinterest .ic { color: #e60023; }
.social-youtube .ic { color: #ff0000; }
.social-x .ic { color: #111; }
.social-discord .ic { color: #5865f2; }
:root[data-theme="dark"] .social-tiktok .ic, :root[data-theme="dark"] .social-x .ic { color: #eee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .social-tiktok .ic, :root:not([data-theme="light"]) .social-x .ic { color: #eee; } }
/* Carte membre : actions (📞 💬 réseau, site) toujours en bas, sur une ligne */
.member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.member-actions .member-call { width: 38px; height: 38px; border-radius: 999px; background: var(--accent-soft, #f6e3d8); color: var(--accent); }
.member-actions .member-call:hover { filter: brightness(.96); }
.member-actions + .member-foot { margin-top: 0; }
.cal-stats { margin-top: 28px; }
.member-actions .member-site { background: var(--surface-2, rgba(0,0,0,.05)); color: var(--text, inherit); }
.member-actions .social-link { min-height: 38px; }
/* Carte membre : réseau social sur sa ligne, « Appeler » en grand */
.member-social a, .member-social { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.member-social span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-actions .member-call-main { flex: 1 1 auto; justify-content: center; min-height: 38px; border-radius: 999px; }
/* Apparence : photo de logo et couleur choisie */
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--surface-2); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.7rem; }
.member-workshop.has-hue { color: hsl(var(--h) 50% 32%); }
:root[data-theme="dark"] .member-workshop.has-hue { color: hsl(var(--h) 60% 76%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .member-workshop.has-hue { color: hsl(var(--h) 60% 76%); } }
.look-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; }
.look-name { font-weight: 700; }
.look-hues { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.look-hue.avatar { width: 40px; height: 40px; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: .8rem; }
.look-hue.on { outline: 3px solid var(--text); outline-offset: 2px; }
.look-default { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--border); background: transparent; cursor: pointer; font: inherit; font-size: .85rem; color: var(--text); }
.look-default.on { border-style: solid; }
.look-photo { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.look-photo label.btn { cursor: pointer; }
/* Tableaux : bouton « Modifier » par ligne (les cellules ne sont plus cliquables) */
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.row-edit-btn { gap: 5px; }
.row-edit-btn .ic { width: 15px; height: 15px; }
@media (max-width: 759px) {
  /* Tableaux en fiches (téléphone) : « Modifier » en bas de la fiche, jamais par-dessus le contenu */
  .stackable td.cell-actions:has(.row-actions) { position: static; width: 100%; padding: 8px 0 0; margin-top: 4px; border-top: 1px solid var(--border); }
  .stackable tr:has(.row-actions) td.cell-title { padding-right: 0; }
  .stackable .row-actions .row-edit-btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
}
/* « Me retirer » : visuellement identique à « + Moi » (pointillés, même couleur) */
.join-btn.on, .join-btn.leave-btn { border: 1px dashed var(--accent); color: var(--accent); background: transparent; }
@media (hover: hover) { .join-btn.on:hover, .join-btn.leave-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); } }
/* Nom d'un créateur, partout pareil : mini-logo + nom à sa couleur (choisie dans « Modifier l'apparence »), sans fond */
.avatar.xs { width: 18px; height: 18px; font-size: .52rem; letter-spacing: 0; }
.who-n { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; vertical-align: middle; font-weight: 600; color: hsl(var(--h, 20) 50% 32%); white-space: nowrap; }
.who-t { overflow: hidden; text-overflow: ellipsis; }
.who-n.gone { color: var(--muted); font-weight: 500; font-style: italic; }
.who-list { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; vertical-align: middle; }
:root[data-theme="dark"] .who-n:not(.gone) { color: hsl(var(--h, 20) 60% 76%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .who-n:not(.gone) { color: hsl(var(--h, 20) 60% 76%); } }
.users-cell { gap: 6px 10px; }
.opt-voters .opt-comment .who-n { font-size: inherit; }
.name-who { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.name-who-group { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .who-n { font-size: inherit; }

/* Calendrier / Planning : même nom, encadré (trait fin à sa couleur) parce qu'il porte des icônes */
.person { --h: 20; padding: 2px 10px 2px 3px; gap: 5px; background: transparent; border: 1px solid hsl(var(--h) 40% 62%); }
.person .person-name { font-weight: 600; color: hsl(var(--h) 50% 32%); }
.person.me { background: transparent; border-color: hsl(var(--h) 45% 45%); box-shadow: inset 0 0 0 1px hsl(var(--h) 45% 45%); }
.person.option, .person.me.option { background: transparent; border-style: dashed; border-color: hsl(var(--h) 40% 62%); color: inherit; }
.person.option .person-name { opacity: .85; }
:root[data-theme="dark"] .person { border-color: hsl(var(--h) 35% 45%); }
:root[data-theme="dark"] .person .person-name { color: hsl(var(--h) 60% 76%); }
:root[data-theme="dark"] .person.me { border-color: hsl(var(--h) 50% 62%); box-shadow: inset 0 0 0 1px hsl(var(--h) 50% 62%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .person { border-color: hsl(var(--h) 35% 45%); }
  :root:not([data-theme="light"]) .person .person-name { color: hsl(var(--h) 60% 76%); }
  :root:not([data-theme="light"]) .person.me { border-color: hsl(var(--h) 50% 62%); box-shadow: inset 0 0 0 1px hsl(var(--h) 50% 62%); }
}
.trace .who-n, .name-gone .who-n { font-size: inherit; }
.cal-side-tools { display: inline-flex; align-items: center; gap: 6px; }
/* Calendrier : mes jours (numéro souligné) et rangée « Vos créneaux » */
.cal-cell.mine .cal-num { text-decoration: underline 2.5px var(--accent); text-underline-offset: 3px; }
.cal-cell.closed.mine .cal-num { text-decoration: line-through; }
.cal-key-mine { font-weight: 700; text-decoration: underline 2.5px var(--accent); text-underline-offset: 3px; }
.cal-mine { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 22px 0 0; }
.cal-mine .chips { gap: 6px; }
.cal-mine .chip { min-height: 32px; font-size: .84rem; text-transform: none; }
.cal-mine-label { font-size: .85rem; font-weight: 650; color: var(--text-2); }
/* Agenda / appli : réservés aux administrateurs tant que la coche « Affichage info » n'est pas activée */
body:not(.can-install) .install-only { display: none !important; }
.cal-ics { margin-left: auto; }
/* Page d'erreur « Erreur XXX » */
.error-card { text-align: center; }
.error-card h1 { margin-bottom: 8px; }
.error-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.error-code { font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.error-actions { margin: 20px 0 14px; display: flex; justify-content: center; }

/* Stats (administrateurs) */
.stats-h { font-size: 1.02rem; margin: 6px 0 10px; display: flex; align-items: center; gap: 8px; }
.kpi.is-warn { border-color: var(--warn); }
.kpi.is-warn .kpi-value { color: var(--warn); }
.kpi.is-bad { border-color: var(--bad); }
.kpi.is-bad .kpi-value { color: var(--bad); }
.stats-errors { margin-top: 26px; scroll-margin-top: 80px; }
.stats-err-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stats-err-filters { margin: 4px 0 10px; }
.err-table td { vertical-align: top; }
.err-table .nowrap { white-space: nowrap; }
.err-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.err-row { cursor: pointer; }
.err-row:hover, .err-row.open { background: var(--accent-soft); }
.err-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.err-msg { min-width: 220px; max-width: 520px; }
.err-msg span { display: block; overflow-wrap: anywhere; }
.err-msg small { display: block; overflow-wrap: anywhere; font-size: .78rem; }
.err-detail td { background: var(--surface-2, var(--bg)); }
.err-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: .85rem; }
.err-detail dt { color: var(--muted); font-weight: 650; }
.err-detail dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.err-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .78rem; max-height: 260px; overflow: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pager-info { font-size: .88rem; color: var(--text-2); padding: 0 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .err-detail dl { grid-template-columns: 1fr; } .err-detail dt { margin-top: 6px; } }
/* Installer l'appli : marche à suivre */
.install-for { font-weight: 700; margin: 14px 0 6px; color: var(--accent); }
.install-steps { padding-left: 1.3em; margin: 0 0 10px; display: grid; gap: 8px; }
.install-steps li { line-height: 1.5; padding-left: 2px; }
.install-ic { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; vertical-align: -6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin: 0 1px; }
.install-ic svg { width: 17px; height: 17px; }
.install-tip { font-size: .9rem; background: var(--surface-2, var(--bg)); border-radius: var(--radius); padding: 8px 10px; }
/* Équipe : étiquette « Membre » (ni coordinateur ni administrateur), grise */
.badge-member { background: var(--neutral-soft); color: var(--neutral); }

/* Pastille « Installer l'appli » pas encore vue : bouton du compte + entrée du menu */
.user-btn { position: relative; }
.user-btn .tab-dot { top: -2px; right: -2px; box-shadow: 0 0 0 2px var(--surface); }
.user-menu button.has-dot { display: flex; align-items: center; gap: 8px; }
.user-menu button.has-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; }
/* Carte membre, « Noms affichés : atelier » : atelier en titre, prénom / nom dessous */
.member-id h3.member-workshop { font-size: 1.05rem; font-weight: 700; }
.member-person { font-weight: 600; color: var(--text-2); font-size: .92rem; }

/* Listes : « Je m'ajoute » à droite, à côté de « Modifier » */
.row-actions .join-btn { min-height: 32px; margin-right: 2px; }
@media (max-width: 759px) {
  .stackable .row-actions { flex-wrap: wrap; }
  .stackable .row-actions .join-btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
}
/* Calendrier : vert foncé = minimum atteint, vert clair (réglable) = au-delà */
:root { --c-blue: #5cc97f; }
/* « Vos créneaux » dépliable (enroulé par défaut) */
details.cal-mine { display: block; margin: 22px 0 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 0 12px; }
details.cal-mine > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; }
details.cal-mine > summary::-webkit-details-marker { display: none; }
details.cal-mine > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.cal-mine[open] > summary::before { transform: rotate(90deg); }
details.cal-mine .cal-mine-hint { margin-left: auto; }
details.cal-mine[open] .cal-mine-hint { font-size: 0; }
details.cal-mine[open] .cal-mine-hint::after { content: "Masquer"; font-size: .82rem; }
details.cal-mine .cal-mine-body, details.cal-mine > p { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 0 0 12px; margin: 0; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; margin: 4px 0 10px; }
.pc-item { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; }
.pc-item input[type=color] { flex: 0 0 auto; width: 44px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.color-field { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.color-field input[type=color] { width: 72px; height: 40px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
/* Support : en cours / historique, demandes publiques ou privées, réactions */
.support-h { font-size: .85rem; font-weight: 700; color: var(--text-2); margin: 0 0 8px; }
.support-hist { margin-top: 16px; }
.support-hist > summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--text-2); padding: 8px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.support-hist > summary::-webkit-details-marker { display: none; }
.support-hist > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.support-hist[open] > summary::before { transform: rotate(90deg); }
.support-hist .ticket-row { opacity: .85; }
.ticket-private { flex: none; font-size: .95rem; }
.ticket-reacts { display: inline-flex; gap: 6px; flex: none; font-size: .8rem; color: var(--text-2); }
.ticket-react-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.react-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: .9rem; cursor: pointer; }
.react-btn span { font-weight: 650; color: var(--text-2); }
.react-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.react-btn.is-static { cursor: default; }
@media (hover: hover) { button.react-btn:hover { border-color: var(--accent); } }
/* Présences au planning : moins de 3 jours en rouge, moins de 5 en orange */
.stats-table tr.days-low td.col-days, .days-low-t { color: #d11f1f; }
.stats-table tr.days-goal td.col-days { color: var(--ok); }
.stats-table tr.days-low td.col-days .muted, .stats-table tr.days-goal td.col-days .muted { color: inherit; opacity: .7; }
/* Planning masqué : bandeau + cases sans couleur */
.cal-hidden-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2, var(--bg)); border: 1px dashed var(--border-strong, var(--border)); font-size: .92rem; }
.cal-hidden-note span { flex: 1 1 260px; }
.cal-cell.neutral { background: var(--surface); }
/* Interrupteur « Vue coord. » (administrateur seulement) */
body:not(.real-super) .real-super-only { display: none !important; }
.view-switch { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .78rem; font-weight: 650; cursor: pointer; border-radius: 999px; white-space: nowrap; }
.view-switch-track { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--border-strong, #bbb); transition: background .15s; flex: none; }
.view-switch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.view-switch[aria-checked="true"] .view-switch-track { background: var(--accent); }
.view-switch[aria-checked="true"] .view-switch-knob { transform: translateX(14px); }
.view-switch[aria-checked="true"] { color: var(--accent); }
@media (hover: hover) { .view-switch:hover { background: var(--surface-2, var(--bg)); } }
@media (max-width: 759px) { .view-switch-label { display: none; } .view-switch { padding: 0 4px; } }
body.view-coord .topbar { box-shadow: inset 0 -3px 0 var(--accent); }
/* Planning : interrupteur Journée / Demi-journée + mode Journée */
.cal-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 10px; border-radius: 999px; background: var(--surface-2, var(--bg)); border: 1px solid var(--border); }
.cal-mode-btn { min-height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; }
.cal-mode-btn.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.day-slots { display: grid; gap: 8px; margin-bottom: 12px; }
.day-slot-row { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 8px; align-items: start; }
.day-slot-name { font-weight: 650; font-size: .88rem; padding-top: 3px; }
.day-slot-row .slot-people { display: flex; flex-wrap: wrap; gap: 4px; }
.day-partial { margin: 0 0 10px; }
.day-choices .day-choice { justify-content: center; }
.day-choices .day-leave { flex-basis: 100%; justify-content: center; }
@media (max-width: 759px) {
  .cal-mode-btn { min-height: 40px; font-size: .9rem; }
  .day-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .day-choices .day-choice { min-height: 46px; }
  .day-choices .day-choice:first-child { grid-column: 1 / -1; }
  .day-choices .day-leave { grid-column: 1 / -1; min-height: 42px; }
}
/* Paramètres du local : remise à zéro */
.reset-zone { border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--border)); background: color-mix(in srgb, var(--bad) 5%, var(--surface)); border-radius: var(--radius-sm); padding: 10px 12px; }
.reset-zone p { margin: 0 0 8px; }
/* Objectifs par jour */
.recap-v { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-variant-numeric: tabular-nums; }
.recap-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.recap-table tr.recap-past td { opacity: .55; }
.recap-day { border: 0; background: none; padding: 0; font: inherit; color: inherit; font-weight: 650; cursor: pointer; text-align: left; }
.recap-day:hover { color: var(--accent); }
.recap-table .recap-day { white-space: nowrap; }
@media (max-width: 759px) {
  .recap-table .recap-lbl { display: none; }
  .recap-table td, .recap-table th { padding: 7px 6px; }
  .recap-v { gap: 4px; font-size: .85rem; }
}

/* Planning, mode Journée : une seule liste, ◐ = demi-journée */
.day-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.half-ic { margin-left: 4px; font-size: .95em; color: var(--accent); cursor: help; line-height: 1; }
.day-legend { margin: -4px 0 10px; }
/* Légende du planning en bas de page */
.cal-legend-bottom { margin-top: 22px; }

/* Présences au planning : Jours en gras, détail (renfort / ouverture / fermeture) mis à l'écart */
.stats-table .col-days { font-weight: 600; }
.stats-table th.col-days { font-size: inherit; }
.stats-table .col-gap { padding-left: 34px; }
.stats-table .col-gap, .stats-table .col-gap ~ td, .stats-table .col-gap ~ th { opacity: .7; font-size: .88rem; }
@media (max-width: 759px) { .stats-table .col-gap { padding-left: 18px; } }

/* Présences au planning : sous l'objectif rouge, objectif atteint vert, au-delà noir */
.stats-table tr.days-ok td { color: var(--text); }
/* Objectifs par jour : texte normal, pas de gras */
.recap-table td, .recap-table .cell-title, .recap-day, .recap-v { font-weight: 400; }
.recap-table th { font-weight: 600; }

/* Présences au planning : jours en gras seulement à 0 (le nom garde sa couleur) */
.stats-table td.col-days { font-weight: 400; }
.stats-table tr.days-zero td.col-days { font-weight: 700; }
.stats-table tr.days-zero td.col-days .muted { opacity: 1; }
/* Modifier le planning : minimum selon le jour */
.min-wd { margin: 6px 0 4px; }
.min-wd > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.min-wd-table { width: auto; }
.min-wd-table td, .min-wd-table th { padding: 4px 8px; }
.min-wd-table input { width: 64px; text-align: center; padding: 4px 6px; }
.min-wd-table tr.min-wd-off td { opacity: .45; }
.min-wd-table input::placeholder { color: var(--muted); opacity: .55; }
@media (max-width: 759px) { .min-wd-table input { width: 52px; } }
/* Objectifs par jour : « Ouverture possible » aligné à gauche */
.recap-table .col-possible { text-align: left; }

/* Objectifs par jour : trois colonnes de même largeur */
.recap-table { table-layout: fixed; width: 100%; }
.recap-table th, .recap-table td { width: 33.333%; white-space: normal; }

/* Présences au planning : jours en semi-gras sous 4 (en couleur), gras à 0 */
.stats-table tr.days-low td.col-days, .stats-table tr.days-goal td.col-days { font-weight: 600; }
.stats-table tr.days-zero td.col-days { font-weight: 700; }
/* Objectifs par jour : vert clair = ouverture et fermeture assurées */
.c-lightgreen { --c: var(--c-lightgreen); }
.c-helped { --c: var(--c-helped); } /* Planning : minimum atteint grâce à un renfort */

/* Annonces : fichiers joints */
.composer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.composer-main textarea { width: 100%; }
.picked:empty { display: none; }
.picked, .post-files { display: flex; flex-wrap: wrap; gap: 6px; }
.post-files { margin-top: 8px; align-items: flex-start; }
.attach-btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.attach-btn svg { width: 16px; height: 16px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 4px 3px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: .85rem; }
.file-chip > a:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: inherit; text-decoration: none; }
.file-chip > a:first-child:hover .file-name { text-decoration: underline; }
.file-chip svg { width: 16px; height: 16px; flex: none; }
.file-tools { display: inline-flex; align-items: center; gap: 4px; }
.file-chip.has-thumb { flex-direction: column; align-items: stretch; padding: 4px; }
.file-chip.has-thumb > a:first-child { flex-direction: column; align-items: flex-start; }
.file-chip.has-thumb .file-tools { justify-content: space-between; padding-left: 2px; }
.file-chip img { display: block; width: 140px; height: 105px; object-fit: cover; border-radius: 6px; background: var(--border); }
.file-chip.has-thumb .file-name { max-width: 140px; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
@media (max-width: 560px) { .file-name { max-width: 170px; } .composer-main { width: 100%; } }
/* Annonces : « Ajouter un fichier » et « Important » à gauche, « Publier » à droite */
.composer-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-bar > [type=submit] { margin-left: auto; }
.attach-short { display: none; }
@media (max-width: 560px) { .composer-bar { flex-wrap: nowrap; gap: 8px; } .attach-long { display: none; } .attach-short { display: inline; } }

/* Annonces : Historique des messages retirés */
.post-gone { margin: 2px 0 4px; }
.history .post { opacity: .85; }

/* Planning : « Inscrire un artisan » (administrateurs) */
.assign-wrap { max-height: 55vh; overflow: auto; margin-top: 4px; }
.assign-table td, .assign-table th { padding-top: 4px; padding-bottom: 4px; }
.assign-table input[type=checkbox] { width: 18px; height: 18px; }
.assign-month th { text-align: left; text-transform: capitalize; background: var(--surface-2, transparent); }
/* Planning, ordinateur : le détail du jour reste visible sous la barre d'onglets (fixe elle aussi) */
@media (min-width: 900px) {
  .cal-side { top: calc(var(--topbar-h) + 70px); max-height: calc(100vh - var(--topbar-h) - 82px); overflow-y: auto; }
}
/* Infos & Repères : fond de caisse */
.cash { padding: 14px; margin-bottom: 22px; }
.cash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.cash-last { font-size: .95rem; margin-bottom: 2px; }
.cash-last-note { margin-top: 2px; }
.cash-tools { display: flex; flex-wrap: wrap; gap: 4px; flex-shrink: 0; }
.cash-conflict { display: flex; gap: 8px; margin-bottom: 10px; }
.cash-conflict .link { background: none; border: 0; padding: 0; font: inherit; color: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
.cash-groups { display: grid; gap: 4px 28px; }
@media (min-width: 760px) { .cash-groups { grid-template-columns: 1fr 1fr; } }
.cash-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 4px; }
.cash-row { display: grid; grid-template-columns: 58px 44px minmax(52px, 110px) 44px minmax(84px, 1fr); align-items: center; gap: 6px; padding: 5px 6px; border-radius: var(--radius-sm); }
.cash-row.changed { background: var(--accent-soft); }
.cash-chip { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: #2b241f; white-space: nowrap; user-select: none; }
.cash-chip.coin { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .2); }
.cash-chip.coin-cu { background: radial-gradient(circle at 35% 30%, #f0b38a, #b8693a); }
.cash-chip.coin-au { background: radial-gradient(circle at 35% 30%, #fbe7a1, #c9a135); }
.cash-chip.coin-1e { background: radial-gradient(circle, #e8e8e8 0 52%, #e0b94e 54%); }
.cash-chip.coin-2e { background: radial-gradient(circle, #f1cf6b 0 52%, #cfcfcf 54%); }
.cash-chip.note { width: 56px; height: 32px; border-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); font-size: .85rem; }
.cash-chip.note-5 { background: linear-gradient(135deg, #cfd8c6, #8e9e88); }
.cash-chip.note-10 { background: linear-gradient(135deg, #f2a7a0, #c9544a); }
.cash-chip.note-20 { background: linear-gradient(135deg, #a9c6ef, #4a78c0); }
.cash-chip.note-50 { background: linear-gradient(135deg, #f8c58f, #dd7f2a); }
.cash-chip.other { width: 56px; height: 32px; border-radius: 5px; border: 2px dashed var(--border-strong); color: var(--text-2); font-size: .78rem; }
.cash-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.cash-btn:active { background: var(--surface-3); transform: scale(.94); }
.cash-btn[data-cash-step="1"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cash-btn[data-cash-step="1"]:active { background: var(--accent-hover); }
.cash-n { width: 100%; height: 44px; text-align: center; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); padding: 0 4px; }
.cash-n:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cash-sub { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: .92rem; }
.cash-note-row { grid-template-columns: 58px 1fr; cursor: text; }
.cash-note-row .input { height: 44px; }
.cash-bar { position: sticky; bottom: 8px; z-index: 5; margin: 14px -6px -6px; padding: 12px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 759px) { .cash-bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 6px); } }
.cash-total { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 10px; padding: 6px 12px; border-radius: var(--radius-sm); border: 2px solid transparent; }
.cash-total-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); grid-column: 1 / -1; }
.cash-total strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cash-diff { font-size: .85rem; font-weight: 600; }
.cash-total.is-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.cash-total.is-bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.cash-total.is-warn { background: var(--warn-soft); border-color: #d9822b; color: var(--warn); }
.cash-total.is-none { background: var(--surface-2); }
.cash-total.is-none .cash-diff { color: var(--muted); font-weight: 400; }
.cash-total.is-ok .cash-total-label, .cash-total.is-bad .cash-total-label, .cash-total.is-warn .cash-total-label { color: inherit; opacity: .8; }
.cash-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
@media (max-width: 480px) {
  .cash-row { grid-template-columns: 50px 44px minmax(46px, 1fr) 44px 70px; gap: 5px; padding: 4px 2px; }
  .cash-chip.note, .cash-chip.other { width: 50px; }
  .cash-note-row { grid-template-columns: 50px 1fr; }
  .cash-head { flex-direction: column; }
  .cash-bar { padding: 8px; gap: 8px; }
  .cash-total { width: 100%; padding: 4px 10px; }
  .cash-total strong { font-size: 1.45rem; }
  .cash-actions { width: 100%; }
  .cash-actions .btn-primary { flex: 1; justify-content: center; }
}
.cash-hist { border-top: 1px solid var(--border); }
.cash-hist summary { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; padding: 10px 2px; cursor: pointer; list-style: none; }
.cash-hist summary::-webkit-details-marker { display: none; }
.cash-hist-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.cash-hist-total.is-ok { color: var(--ok); }
.cash-hist-total.is-bad { color: var(--bad); }
.cash-hist-total.is-warn { color: var(--warn); }
.cash-hist-who { font-size: .9rem; }
.cash-hist-delta { font-variant-numeric: tabular-nums; font-size: .9rem; }
.cash-hist-detail { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0 2px 12px; }
.cash-mini { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-variant-numeric: tabular-nums; }
.cash-mini .cash-chip.coin { width: 30px; height: 30px; font-size: .62rem; }
.cash-mini .cash-chip.note, .cash-mini .cash-chip.other { width: 40px; height: 24px; font-size: .7rem; }
/* Sections repliables d'Infos & Repères (Inviter, Fond de caisse) : choix mémorisé */
details.fold { margin-bottom: 8px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 44px; margin: 6px 0 10px; user-select: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary h2 { margin: 0; }
.fold-info { font-size: .9rem; color: var(--text-2); }
details.fold[open] > summary .fold-info { display: none; }
.fold-info .mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; }
.cash-pill { padding: 1px 8px; border-radius: 99px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.cash-pill.is-ok { background: var(--ok-soft); color: var(--ok); }
.cash-pill.is-bad { background: var(--bad-soft); color: var(--bad); }
.cash-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.cash-hist-del { color: var(--bad); margin-left: auto; }
/* Statuts spéciaux */
body:not(.is-modo) .modo-only { display: none !important; }
body:not(.rib-ask) .rib-only { display: none !important; }
.member-roles { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.badge-perm { background: var(--warn-soft); color: var(--warn); }
.perm-picks { display: grid; gap: 8px; }
.perm-pick { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
/* Onglet Compta */
.compta-sheets { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--border); margin-bottom: 18px; scrollbar-width: none; }
.compta-sheet { flex-shrink: 0; border: 1px solid transparent; border-bottom: 0; background: none; padding: 10px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font: inherit; font-weight: 650; color: var(--text-2); cursor: pointer; margin-bottom: -2px; }
.compta-sheet:hover { color: var(--text); background: var(--surface-2); }
.compta-sheet.active { background: var(--surface); border-color: var(--border); border-bottom: 2px solid var(--surface); color: var(--accent); }
.compta-kpis { margin-bottom: 14px; }
.kpi.is-bad { border-color: var(--bad); background: var(--bad-soft); }
.kpi.is-bad .kpi-value { color: var(--bad); }
.compta-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.compta-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; margin-left: auto; }
.compta-help { margin-top: 10px; }
.compta-wrap { max-height: 70vh; overflow: auto; }
.compta-table { font-size: .9rem; }
.compta-table th, .compta-table td { padding: 6px 8px; white-space: nowrap; }
.compta-table thead th { position: sticky; top: 0; z-index: 2; }
.compta-table thead tr:nth-child(2) th { top: 37px; }
.compta-table .c-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 220px; max-width: 300px; white-space: normal; box-shadow: 1px 0 0 var(--border); }
.compta-table thead .c-name { z-index: 3; background: var(--surface-2); }
.compta-table .c-start { border-left: 1px solid var(--border); }
.compta-table .c-per { text-align: center; border-left: 1px solid var(--border); }
.compta-table .c-tot { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.compta-table thead .c-tot { background: var(--accent-soft); color: var(--accent); }
.compta-table tfoot th, .compta-table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border-strong); position: sticky; bottom: 0; }
.compta-table tfoot .c-name { z-index: 3; }
.compta-table tbody tr:hover .c-name { background: var(--surface-2); }
.per-btn, .name-btn { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 2px 4px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; text-align: left; }
.per-btn { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--text); font-weight: 700; }
.per-btn .ic { width: 15px; height: 15px; color: var(--muted); }
.per-btn:hover, .name-btn:hover { background: var(--surface-3); }
.per-btn:hover .ic { color: var(--accent); }
.per-btn.per-del:hover .ic { color: var(--bad); }
.per-btn:disabled { opacity: .3; cursor: default; background: none; }
.per-head { display: inline-flex; align-items: center; gap: 2px; text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--text); font-weight: 700; }
.per-head .per-btn:first-of-type { margin-left: 4px; }
.name-btn { font-weight: 600; }
.name-cell { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.name-txt { font-weight: 600; min-width: 0; overflow-wrap: anywhere; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); }
.name-acts { display: inline-flex; flex-shrink: 0; }
.name-acts .per-btn { padding: 3px; }
.name-acts .per-btn .ic { width: 14px; height: 14px; }
.c-in { padding: 3px 4px !important; }
.sale-in { width: 96px; height: 34px; text-align: right; font: inherit; font-variant-numeric: tabular-nums; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); padding: 0 8px; transition: border-color .2s, background .2s; }
.sale-in:hover { border-color: var(--border-strong); }
.sale-in:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.sale-in.is-saving { background: var(--surface-2); }
.sale-in.is-saved { border-color: var(--ok); background: var(--ok-soft); }
.sale-in.is-error { border-color: var(--bad); background: var(--bad-soft); }
.compta-table td.b, .compta-list td.b { font-weight: 700; }
.compta-two { display: grid; gap: 16px; align-items: start; }
@media (min-width: 960px) { .compta-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }
.compta-card { padding: 14px; margin-bottom: 16px; }
.compta-two .compta-card { margin-bottom: 0; }
.compta-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.compta-card-head h2 { font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.compta-card-head .row { gap: 6px; }
.compta-list th, .compta-list td { padding: 8px 10px; }
.compta-list tfoot th, .compta-list tfoot td { border-top: 2px solid var(--border-strong); background: var(--surface-2); font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; font-size: .92rem; }
.row-click { cursor: pointer; }
.row-click:focus-visible td { outline: 2px solid var(--accent); outline-offset: -2px; }
.compta-none { padding: 6px 2px; }
@media (max-width: 600px) {
  .compta-exp thead { display: none; }
  .compta-exp tbody tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
  .compta-exp tbody td { border: 0; padding: 0; }
  .compta-exp tbody td[data-label="Désignation"] { grid-column: 2; font-weight: 600; }
  .compta-exp tbody td[data-label="Montant"] { grid-column: 3; grid-row: 1; }
  .compta-exp tbody td[data-label="Payé par"] { grid-column: 2 / 4; color: var(--muted); font-size: .85rem; }
  .compta-exp tfoot tr { display: flex; justify-content: space-between; }
}
/* RIB */
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.my-rib .rib-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 4px; }
.rib-privacy { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.rib-privacy .ic { width: 14px; height: 14px; }
.rib-search { width: 100%; max-width: 320px; margin-bottom: 10px; }
.rib-list { display: grid; }
.rib-row { display: grid; grid-template-columns: minmax(150px, 1fr) max-content minmax(140px, .7fr) auto; gap: 8px 16px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--border); }
.rib-row:first-child { border-top: 0; }
.rib-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rib-val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rib-cp { flex-shrink: 0; padding-inline: 10px; }
.rib-holder { font-weight: 650; }
.rib-iban { font-size: .95rem; user-select: all; }
@media (min-width: 861px) { .rib-cell .rib-iban { white-space: nowrap; } }
.rib-acts { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
@media (max-width: 860px) {
  .rib-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 2px; }
  .rib-iban, .rib-bic { font-size: .88rem; }
  .rib-acts { justify-content: flex-start; }
}
.rib-missing { margin-top: 12px; }
.rib-missing summary { cursor: pointer; font-weight: 600; color: var(--warn); padding: 6px 0; }
.rib-missing .chips { margin-top: 6px; }
.iban-state { margin: -6px 0 10px; min-height: 1.2em; }
.iban-state.is-ok { color: var(--ok); font-weight: 600; }
.iban-state.is-bad { color: var(--bad); font-weight: 600; }
@media (max-width: 600px) {
  .compta-table .c-name { min-width: 104px; max-width: 132px; }
  .compta-table th, .compta-table td { padding: 5px 6px; }
  .sale-in { width: 80px; }
}

@media (max-width: 600px) {
  .compta-table .c-name { min-width: 140px; }
  .name-cell { flex-wrap: wrap; }
  .rib-cell .rib-cp { padding-inline: 8px; }
}
/* RIB chiffrés */
.rib-safe { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--text-2); font-size: .85rem; }
.rib-safe .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--ok); }
.rib-locked { color: var(--bad); font-size: .85rem; font-weight: 600; }
.rib-locked .ic { width: 15px; height: 15px; flex-shrink: 0; }
/* Compta : feuilles et actions (lisibles sur téléphone) */
.compta-sheet { display: inline-flex; align-items: center; gap: 7px; }
.compta-sheet .ic { width: 17px; height: 17px; }
.compta-sheet .cs-short { display: none; }
.compta-extra { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px; margin-top: -4px; }
.compta-extra .btn { color: var(--text-2); }
.compta-extra .btn:hover { color: var(--accent); }
@media (max-width: 759px) {
  .compta-sheets {
    position: sticky; top: var(--topbar-h); z-index: 15;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; overflow: visible;
    margin: 0 -16px 14px; padding: 8px 16px; border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .compta-sheet {
    flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 6px 4px; margin: 0;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: .85rem;
  }
  .compta-sheet .ic { width: 20px; height: 20px; }
  .compta-sheet.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
  .compta-sheet .cs-full { display: none; }
  .compta-sheet .cs-short { display: inline; }
  .compta-toolbar { gap: 8px; }
  .compta-toolbar > .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex-basis: 100%; padding-bottom: 2px; }
  .compta-toolbar > .chips .chip { flex-shrink: 0; }
  .compta-tools { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 0; }
  .compta-tools .btn { justify-content: center; }
  .compta-extra { justify-content: center; margin-top: 0; }
}
/* Compte visiteur */
.visitor-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; font-size: .88rem; background: var(--info-soft); color: var(--info); border-bottom: 1px solid var(--border); text-align: center; }
.visitor-bar .ic { width: 17px; height: 17px; flex-shrink: 0; }
.badge-visitor { background: var(--ok-soft); color: var(--ok); }
body.is-visitor .cal-choices { display: none !important; }
