/* ==========================================================================
   Orbite — Personal Relationship Manager
   Inspiration iOS / macOS : fonds groupés, cartes arrondies, grands titres.
   Palette : 4 couleurs (bleu, menthe, corail, soleil) + neutres.
   ========================================================================== */

:root {
  --prm-blue: #4C6EF5;
  --prm-mint: #12B886;
  --prm-coral: #FF6B6B;
  --prm-sun: #F59F00;

  --prm-blue-soft: rgba(76, 110, 245, .12);
  --prm-mint-soft: rgba(18, 184, 134, .13);
  --prm-coral-soft: rgba(255, 107, 107, .14);
  --prm-sun-soft: rgba(245, 159, 0, .15);

  --prm-bg: #F5F5F7;
  --prm-surface: #FFFFFF;
  --prm-text: #1D1D1F;
  --prm-muted: #6E6E73;
  --prm-line: rgba(60, 60, 67, .12);
  --prm-radius: 14px;
  --prm-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);

  --bs-primary: var(--prm-blue);
  --bs-primary-rgb: 76, 110, 245;
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--prm-bg);
  --bs-body-color: var(--prm-text);
  --bs-border-color: var(--prm-line);
  --bs-link-color: var(--prm-blue);
  --bs-link-color-rgb: 76, 110, 245;
  --bs-border-radius: 10px;
  --bs-border-radius-lg: 12px;
}

html, body { height: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 15.5px;
}

.btn-primary {
  --bs-btn-bg: var(--prm-blue); --bs-btn-border-color: var(--prm-blue);
  --bs-btn-hover-bg: #3B5BDB; --bs-btn-hover-border-color: #3B5BDB;
  --bs-btn-active-bg: #364FC7; --bs-btn-active-border-color: #364FC7;
  --bs-btn-disabled-bg: var(--prm-blue); --bs-btn-disabled-border-color: var(--prm-blue);
  font-weight: 500;
}
.btn { border-radius: 10px; }
.btn-soft { background: var(--prm-blue-soft); color: var(--prm-blue); border: 0; font-weight: 500; }
.btn-soft:hover, .btn-soft:focus-visible { background: rgba(76, 110, 245, .2); color: var(--prm-blue); }
.btn-soft-danger { background: var(--prm-coral-soft); color: #E03131; border: 0; font-weight: 500; }
.btn-soft-danger:hover { background: rgba(255, 107, 107, .24); color: #C92A2A; }
.form-control, .form-select { border-radius: 10px; background-color: #fff; }
.form-control:focus, .form-select:focus, .btn:focus-visible {
  border-color: var(--prm-blue);
  box-shadow: 0 0 0 .2rem var(--prm-blue-soft);
}
.form-label { font-size: .82rem; font-weight: 500; color: var(--prm-muted); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--prm-blue); border-color: var(--prm-blue); }

/* ---- Connexion ----------------------------------------------------------- */
.auth-screen {
  min-height: 100%;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(600px 300px at 15% 10%, var(--prm-blue-soft), transparent 70%),
    radial-gradient(500px 300px at 90% 90%, var(--prm-coral-soft), transparent 70%),
    var(--prm-bg);
}
.auth-card {
  width: 100%; max-width: 360px; text-align: center;
  background: var(--prm-surface); border-radius: 20px; padding: 36px 28px;
  box-shadow: var(--prm-shadow);
}
.auth-sep { display: flex; align-items: center; gap: 10px; color: var(--prm-muted); font-size: .82rem; margin: 18px 0 14px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; border-top: 1px solid var(--prm-line); }
.auth-card .btn-link { font-weight: 500; text-decoration: none; padding: 0; vertical-align: baseline; }

.side-user {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  color: inherit; text-decoration: none;
}
.side-user:hover { background: rgba(0, 0, 0, .04); }
.side-user .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: .75rem; }
.scope-select { font-size: .88rem; font-weight: 500; background-color: rgba(118, 118, 128, .1); border: 0; }
.space-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; background: rgba(118, 118, 128, .12); color: var(--prm-muted); white-space: nowrap;
}
.invite-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; flex-wrap: wrap; }
.rel-row { display: grid; grid-template-columns: 150px 1fr 38px; gap: 6px; margin-bottom: 6px; }
@media (max-width: 575.98px) { .rel-row { grid-template-columns: 1fr 1fr 38px; } }
.cat-toggle { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cat-toggle label {
  border: 1px solid var(--prm-line); border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 500; cursor: pointer; background: #fff;
}
.cat-toggle input:checked + label { background: var(--prm-blue); border-color: var(--prm-blue); color: #fff; }
.cat-toggle input:focus-visible + label { box-shadow: 0 0 0 .2rem var(--prm-blue-soft); }
.member-row .form-select { width: auto; }

.auth-logo { width: 64px; height: 64px; display: block; margin: 0 auto 16px; filter: drop-shadow(0 6px 14px rgba(76, 110, 245, .25)); }

/* Mise en page connexion : illustration + carte */
.auth-layout {
  width: 100%; max-width: 1080px; display: grid; gap: 24px; align-items: center;
  grid-template-columns: 1fr;
  justify-items: center;
}
.auth-showcase { text-align: center; }
.auth-art { width: 100%; max-width: 250px; height: auto; margin-bottom: -24px; }
.auth-pitch h2 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 18px; color: var(--prm-text); }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; text-align: left; }
.auth-pitch li { display: flex; gap: 12px; align-items: baseline; color: var(--prm-muted); font-size: 1rem; }
.auth-pitch .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; transform: translateY(-1px); }
@media (min-width: 992px) {
  .auth-layout { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .auth-showcase { text-align: left; }
  .auth-art { max-width: 460px; margin: 0 0 4px -20px; }
  .auth-card { justify-self: start; }
}
@media (max-width: 991.98px) {
  .auth-screen { align-content: start; padding-top: 8px; }
}

/* Bandeau de bienvenue (accueil connecté) */
.hero-welcome {
  position: relative; overflow: hidden; border-radius: 20px; color: #fff; margin-bottom: 18px;
  padding: 22px 22px 20px; min-height: 150px;
  background: linear-gradient(120deg, #5B7BFF 0%, #4C6EF5 45%, #12B886 120%);
  box-shadow: 0 10px 30px rgba(76, 110, 245, .25);
}
.hero-welcome .art { position: absolute; right: -10px; bottom: -6px; width: 300px; max-width: 55%; opacity: .95; pointer-events: none; }
.hero-welcome .who { display: flex; align-items: center; gap: 14px; position: relative; }
.hero-welcome .who .avatar { width: 56px; height: 56px; flex-basis: 56px; font-size: 1.2rem; box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.hero-welcome h1 { font-size: 1.6rem; font-weight: 700; margin: 0; letter-spacing: -.01em; color: #fff; }
.hero-welcome .date { opacity: .85; text-transform: capitalize; }
.hero-welcome .stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; max-width: 62%; }
.hero-welcome .stat {
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  backdrop-filter: blur(6px);
}
.hero-welcome .stat:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.hero-welcome .settings-btn { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(255,255,255,.18); border: 0; }
@media (max-width: 575.98px) {
  .hero-welcome .art { width: 190px; right: -40px; top: -22px; bottom: auto; opacity: .28; }
  .hero-welcome .stats { max-width: 100%; }
  .hero-welcome h1 { font-size: 1.4rem; }
}
.brand-icon { width: 30px; height: 30px; border-radius: 8px; }

/* Avatars avec photo */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- Structure ----------------------------------------------------------- */
.app { display: flex; min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: 248px; flex: 0 0 248px;
  flex-direction: column; padding: 20px 12px;
  background: rgba(255, 255, 255, .7); border-right: 1px solid var(--prm-line);
  backdrop-filter: saturate(180%) blur(20px);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; padding: 4px 12px 20px; }
.brand-dot {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, var(--prm-blue), var(--prm-mint));
}
.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px; color: var(--prm-text);
  padding: 9px 12px; border-radius: 10px; font-weight: 500; margin-bottom: 2px;
}
.sidebar .nav-link i { font-size: 1.1rem; color: var(--prm-blue); width: 20px; text-align: center; }
.sidebar .nav-link:hover { background: rgba(0, 0, 0, .04); }
.sidebar .nav-link.active { background: var(--prm-blue); color: #fff; }
.sidebar .nav-link.active i { color: #fff; }
.sidebar .nav-link .badge { margin-left: auto; }

.main { flex: 1; min-width: 0; padding: 28px 32px 48px; outline: none; }
.page { max-width: 1100px; margin: 0 auto; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .85); border-top: 1px solid var(--prm-line);
  backdrop-filter: saturate(180%) blur(20px);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #8E8E93; text-decoration: none; font-size: .68rem; font-weight: 500; padding: 4px 0;
}
.tabbar a i { font-size: 1.35rem; line-height: 1; }
.tabbar a.active { color: var(--prm-blue); }

@media (max-width: 991.98px) {
  .main { padding: calc(14px + env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom)); }
}

/* ---- En-têtes de page ---------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-head .sub { color: var(--prm-muted); font-size: .95rem; text-transform: capitalize; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }
.btn-round {
  width: 38px; height: 38px; border-radius: 50%; padding: 0;
  display: inline-grid; place-items: center; font-size: 1.15rem;
}
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--prm-blue); text-decoration: none; font-weight: 500; margin-bottom: 8px; }

/* ---- Cartes & listes groupées (style iOS) ----------------------------------- */
.card-g {
  background: var(--prm-surface); border-radius: var(--prm-radius);
  box-shadow: var(--prm-shadow); overflow: hidden; margin-bottom: 16px;
}
.card-g-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px;
  font-weight: 600; font-size: .95rem;
}
.card-g-head .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: .95rem; }
.card-g-head .more { margin-left: auto; font-weight: 500; font-size: .85rem; text-decoration: none; }
.card-g-body { padding: 6px 16px 16px; }
.section-label {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--prm-muted);
  font-weight: 600; margin: 22px 4px 8px;
}

.list-g { list-style: none; margin: 0; padding: 0; }
.list-g > li { position: relative; }
.list-g > li + li::before {
  content: ""; position: absolute; top: 0; right: 0; left: 60px; border-top: 1px solid var(--prm-line);
}
.list-g.flat > li + li::before { left: 16px; }
.row-g {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 52px;
  color: inherit; text-decoration: none; background: none; border: 0; width: 100%; text-align: left;
}
button.row-g:hover, a.row-g:hover { background: rgba(0, 0, 0, .025); }
.row-g .main-txt { flex: 1; min-width: 0; }
.row-g .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-g .s { color: var(--prm-muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-g .end { color: var(--prm-muted); font-size: .85rem; text-align: right; flex-shrink: 0; }
.row-g .chev { color: #C7C7CC; }

.icon-tile {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.05rem;
}
.c-blue  { color: var(--prm-blue);  background: var(--prm-blue-soft); }
.c-mint  { color: var(--prm-mint);  background: var(--prm-mint-soft); }
.c-coral { color: var(--prm-coral); background: var(--prm-coral-soft); }
.c-sun   { color: var(--prm-sun);   background: var(--prm-sun-soft); }

.avatar {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: .9rem; color: #fff;
}
.avatar.lg { width: 88px; height: 88px; flex-basis: 88px; font-size: 2rem; }
.av-0 { background: linear-gradient(135deg, #748FFC, var(--prm-blue)); }
.av-1 { background: linear-gradient(135deg, #38D9A9, var(--prm-mint)); }
.av-2 { background: linear-gradient(135deg, #FFA8A8, var(--prm-coral)); }
.av-3 { background: linear-gradient(135deg, #FFD43B, var(--prm-sun)); }

.empty {
  text-align: center; color: var(--prm-muted); padding: 28px 16px; font-size: .92rem;
}
.empty i { display: block; font-size: 2rem; margin-bottom: 6px; opacity: .45; }

/* ---- Pastilles / chips ---------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: .85rem; font-weight: 500; border: 0; line-height: 1.3;
}
.chip .x { background: none; border: 0; padding: 0; color: inherit; opacity: .6; line-height: 1; }
.chip .x:hover { opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.seg {
  display: inline-flex; background: rgba(118, 118, 128, .12); border-radius: 10px; padding: 2px;
}
.seg button {
  border: 0; background: none; padding: 6px 14px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: var(--prm-text); white-space: nowrap;
}
.seg button.active { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.filter-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button {
  border: 1px solid var(--prm-line); background: #fff; border-radius: 999px; padding: 5px 13px;
  font-size: .85rem; font-weight: 500; white-space: nowrap; color: var(--prm-text);
}
.filter-chips button.active { background: var(--prm-text); color: #fff; border-color: var(--prm-text); }

.searchbar { position: relative; }
.searchbar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8E8E93; }
.searchbar input { padding-left: 36px; background: rgba(118, 118, 128, .12); border: 0; }
.searchbar input:focus { background: #fff; }

/* ---- Accueil ---------------------------------------------------------------- */
.quick-add { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.quick-add button {
  border: 0; border-radius: var(--prm-radius); padding: 14px 8px; background: var(--prm-surface);
  box-shadow: var(--prm-shadow); display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-weight: 500; font-size: .85rem; color: var(--prm-text);
}
.quick-add button:hover { transform: translateY(-1px); }
.quick-add .icon-tile { width: 40px; height: 40px; border-radius: 12px; font-size: 1.2rem; }

.date-badge {
  width: 44px; flex: 0 0 44px; text-align: center; border-radius: 10px; padding: 4px 0;
  background: #fff; border: 1px solid var(--prm-line); line-height: 1.1;
}
.date-badge .m { font-size: .62rem; text-transform: uppercase; font-weight: 700; color: var(--prm-coral); }
.date-badge .d { font-size: 1.15rem; font-weight: 600; }

.pill-when {
  font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}

/* ---- Agenda ---------------------------------------------------------------- */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { font-size: 1.35rem; font-weight: 700; margin: 0; text-transform: capitalize; white-space: nowrap; }
@media (max-width: 575.98px) { .cal-head h2 { font-size: 1.15rem; } .cal-head .btn-sm { padding: 4px 8px; } }
h1, h2, h3, .modal-title { color: var(--prm-text); }
.cal-head .nav-btns { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow {
  text-align: center; font-size: .72rem; font-weight: 600; color: var(--prm-muted);
  text-transform: uppercase; padding: 10px 0 6px;
}
.cal-day {
  min-height: 92px; border-top: 1px solid var(--prm-line); padding: 4px; cursor: pointer;
  background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.cal-day:hover { background: rgba(0, 0, 0, .02); }
.cal-day .num {
  align-self: flex-end; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; font-size: .9rem; font-weight: 500;
}
.cal-day.out .num { color: #C7C7CC; }
.cal-day.today .num { background: var(--prm-coral); color: #fff; font-weight: 600; }
.cal-day.sel .num { background: var(--prm-text); color: #fff; }
.cal-day.today.sel .num { background: var(--prm-coral); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--prm-coral); }
.cal-ev {
  font-size: .72rem; border-radius: 5px; padding: 1px 5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-weight: 500;
}
.cal-more { font-size: .7rem; color: var(--prm-muted); padding-left: 4px; }
.cal-dots { display: none; justify-content: center; gap: 3px; }
.cal-dots span { width: 6px; height: 6px; border-radius: 50%; }
.dot-blue { background: var(--prm-blue); } .dot-mint { background: var(--prm-mint); }
.dot-coral { background: var(--prm-coral); } .dot-sun { background: var(--prm-sun); }

@media (max-width: 767.98px) {
  .cal-day { min-height: 52px; align-items: center; padding: 4px 0; border-top-color: transparent; }
  .cal-day .num { align-self: center; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; }
}

.day-group { margin-bottom: 14px; }
.day-label {
  position: sticky; top: 0; z-index: 2; background: var(--prm-bg);
  font-size: .82rem; font-weight: 600; color: var(--prm-muted); padding: 8px 4px 6px; text-transform: capitalize;
}
.day-label.is-today { color: var(--prm-coral); }
.time-col { width: 52px; flex: 0 0 52px; font-size: .82rem; color: var(--prm-muted); font-variant-numeric: tabular-nums; }
.kind-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: 0 0 4px; }

/* ---- Fiche personne ------------------------------------------------------- */
.hero { text-align: center; padding: 8px 0 18px; }
.hero h1 { font-size: 1.7rem; font-weight: 700; margin: 12px 0 2px; letter-spacing: -.01em; }
.hero .meta { color: var(--prm-muted); }
.hero-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-actions .ha {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 74px;
  padding: 10px 8px; border-radius: 12px; background: var(--prm-surface); box-shadow: var(--prm-shadow);
  border: 0; color: var(--prm-blue); font-size: .75rem; font-weight: 500; text-decoration: none;
}
.hero-actions .ha i { font-size: 1.25rem; }
@media (max-width: 575.98px) { .hero-actions { gap: 6px; } .hero-actions .ha { min-width: 0; flex: 1 1 0; padding: 8px 2px; font-size: .7rem; } }
.turn-banner { display: flex; gap: 14px; align-items: center; padding: 16px; }
.turn-banner .big { font-weight: 600; font-size: 1.05rem; }
.kv { display: flex; padding: 11px 16px; gap: 12px; }
.kv .k { width: 110px; flex: 0 0 110px; color: var(--prm-muted); font-size: .88rem; }
.kv .v { flex: 1; min-width: 0; word-break: break-word; }
.allergy-alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--prm-coral-soft); color: #C92A2A; font-weight: 500; margin-bottom: 16px;
}

.contacts-index .letter {
  font-size: .78rem; font-weight: 700; color: var(--prm-muted); padding: 10px 16px 4px;
  background: #FAFAFC; border-top: 1px solid var(--prm-line);
}
.contacts-index .list-g > li:first-child::before { display: none; }
.person-pane { position: sticky; top: 20px; }
.row-g.active { background: var(--prm-blue-soft); }

/* ---- Formulaires ----------------------------------------------------------- */
.kind-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.kind-picker label {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; cursor: pointer;
  border-radius: 12px; border: 1.5px solid var(--prm-line); font-size: .78rem; font-weight: 500; text-align: center;
}
.kind-picker input { position: absolute; opacity: 0; pointer-events: none; }
.kind-picker input:checked + label { border-color: var(--prm-blue); background: var(--prm-blue-soft); }
.kind-picker input:focus-visible + label { box-shadow: 0 0 0 .2rem var(--prm-blue-soft); }
.kind-picker i { font-size: 1.3rem; }

.picker { position: relative; }
.picker .box {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px;
  border: 1px solid var(--prm-line); border-radius: 10px; padding: 6px 8px; background: #fff;
}
.picker .box:focus-within { border-color: var(--prm-blue); box-shadow: 0 0 0 .2rem var(--prm-blue-soft); }
.picker .box input { border: 0; outline: 0; flex: 1; min-width: 120px; padding: 4px; background: transparent; }
.picker .menu {
  position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 4px); max-height: 220px; overflow: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); padding: 4px;
}
.picker .menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none;
  padding: 7px 10px; border-radius: 8px; text-align: left;
}
.picker .menu button:hover, .picker .menu button.hl { background: var(--prm-blue-soft); }
.picker .menu .avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: .7rem; }

.dish-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.dish-row .form-select { max-width: 130px; }
.dish-warn { font-size: .8rem; color: #C92A2A; margin: -2px 0 8px 2px; }
.dish-warn i { margin-right: 4px; }

.form-section {
  background: #F9F9FB; border-radius: 12px; padding: 14px; margin-bottom: 14px;
}
.form-section-title { font-weight: 600; font-size: .9rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

.modal-content { border: 0; border-radius: 18px; }
.modal-header, .modal-footer { border-color: var(--prm-line); }
@media (max-width: 575.98px) { .modal-content { border-radius: 0; } }

.toast { border: 0; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); }

.ics-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem;
  background: #F2F2F7; border-radius: 8px; padding: 10px; word-break: break-all;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Confidentialité ------------------------------------------------------- */
.auth-legal { font-size: .78rem; color: var(--prm-muted); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--prm-line); line-height: 1.45; }
.auth-legal a { display: block; font-weight: 500; text-decoration: none; margin-top: 2px; }
.side-legal { display: block; font-size: .75rem; color: var(--prm-muted); text-decoration: none; padding: 6px 10px 0; }
.side-legal:hover { color: var(--prm-blue); }

/* ---- Compte en attente de confirmation ---------------------------------------- */
.pending-banner {
  display: flex; gap: 12px; align-items: center; margin-bottom: 16px;
  padding: 14px 16px; border-radius: var(--prm-radius); background: #FFF8E6; border: 1px solid rgba(245, 159, 0, .35);
}
.status-chip { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st-active { background: var(--prm-mint-soft); color: #0C8F68; }
.st-pending { background: var(--prm-sun-soft); color: #B86E00; }
.st-blocked { background: var(--prm-coral-soft); color: #C92A2A; }

/* ---- Console plateforme ------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--prm-surface); border-radius: var(--prm-radius); box-shadow: var(--prm-shadow); padding: 14px 16px; }
.kpi .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--prm-muted); font-size: .82rem; font-weight: 500; }
.kpi .d { font-size: .75rem; color: var(--prm-muted); margin-top: 4px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 6px 0 0; }
.spark .bar { flex: 1; background: var(--prm-blue); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.spark .bar:hover { opacity: 1; }
.spark .bar.zero { background: var(--prm-line); }
.spark-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--prm-muted); margin-top: 4px; }
.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--prm-line); }
.stack span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .82rem; color: var(--prm-muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.users-table { width: 100%; font-size: .88rem; }
.users-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--prm-muted); font-weight: 600; padding: 8px 10px; white-space: nowrap; }
.users-table td { padding: 10px; border-top: 1px solid var(--prm-line); vertical-align: middle; }
.users-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.users-table .who { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.users-table .who .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: .72rem; }
@media (max-width: 767.98px) {
  .users-table .hide-sm { display: none; }
}
@media (max-width: 575.98px) { .pending-banner { flex-wrap: wrap; } }
