/* =====================================================================
   FlexiJob — interface de l'application
   Même identité que la landing : papier presque blanc, un accent vert profond, ambre pour les étoiles.
   Manrope (titres), Geist (texte), Geist Mono (montants, horaires, comptes à rebours).
   Mouvement : transform / opacity / filter uniquement ; 160–420 ms ; courbes nommées ;
   sorties ~30 % plus rapides que les entrées ; prefers-reduced-motion → fondus courts.
   ===================================================================== */

:root {
  --bg: #fafbfa;
  --surface: #ffffff;
  --surface-2: #f1f5f3;
  --surface-3: #e7eeea;
  --text: #0c1612;
  --text-2: #34433d;
  --muted: #64746d;
  --border: #e3e9e6;
  --border-strong: #cdd8d3;
  --accent: #0b6e4f;
  --accent-text: #0b6e4f;
  --accent-hover: #095b41;
  --accent-soft: #e5f2ec;
  --on-accent: #ffffff;
  --star: #e3a008;
  --star-empty: #d6dfdb;
  --ok: #0b6e4f;
  --ok-soft: #e5f2ec;
  --warn: #93590a;
  --warn-soft: #fdf3e1;
  --danger: #be3428;
  --danger-soft: #fcebe9;
  --overlay: rgb(8 18 14 / .45);
  --toast-bg: #0c1612;
  --toast-text: #ffffff;
  --shimmer: rgb(255 255 255 / .65);
  --sh: 160 30% 12%;

  --font-display: "Manrope", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --shadow-sm: 0 1px 2px hsl(var(--sh) / .06), 0 1px 1px hsl(var(--sh) / .04);
  --shadow-md: 0 1px 2px hsl(var(--sh) / .05), 0 10px 28px -8px hsl(var(--sh) / .16);
  --shadow-lg: 0 2px 6px hsl(var(--sh) / .06), 0 28px 64px -16px hsl(var(--sh) / .3);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --ease-std: cubic-bezier(.2, 0, 0, 1);
  --t-fast: 160ms;
  --t-med: 260ms;
  --t-enter: 420ms;

  --radius: 14px;
  --radius-sm: 10px;
  --top-h: 60px;
  --tab-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --side-w: 256px;
  --side-bg: #0b3a2c;
  --side-ink: #ffffff;
  --side-muted: #a9cdbf;
  color-scheme: light;
  interpolate-size: allow-keywords;
}

/* Mode clair par défaut. Le mode sombre s'applique uniquement quand l'utilisateur le choisit
   avec l'icône lune / soleil (data-theme="dark", posé par js/theme-init.js). */
:root[data-theme="dark"] {
  --bg: #0a110e; --surface: #111a16; --surface-2: #16201c; --surface-3: #1d2924;
  --text: #e9f0ec; --text-2: #bccac3; --muted: #8b9b94; --border: #1e2925; --border-strong: #2c3a34;
  --accent: #149a6d; --accent-text: #5fd3a6; --accent-hover: #18b17e; --accent-soft: #11302a; --on-accent: #ffffff;
  --star: #f2b632; --star-empty: #2f3c36;
  --ok: #5fd3a6; --ok-soft: #11302a; --warn: #f2b632; --warn-soft: #30260c; --danger: #f08a80; --danger-soft: #371a17;
  --overlay: rgb(0 0 0 / .6); --toast-bg: #e9f0ec; --toast-text: #0c1612; --shimmer: rgb(255 255 255 / .05);
  --sh: 160 40% 2%;
  --side-bg: #0d2a21; --side-muted: #8fbfac;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
code { font-family: var(--font-mono); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#view:focus { outline: none; }
[hidden] { display: none !important; }

.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.strong { font-weight: 600; }
.right { text-align: right; }
.num, .amount { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; display: flex; justify-content: center; }
p.center { display: block; }
.grow { flex: 1; min-width: 0; }
.link { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color var(--t-fast); }
.link:hover { text-decoration-color: currentColor; }
.link-quiet { transition: color var(--t-fast); }
.link-quiet:hover { color: var(--text); }
.pre { white-space: pre-line; }
.danger-text { color: var(--danger) !important; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

.row { display: flex; align-items: center; }
.row.gap, .gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.align-start { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) var(--gutter-r) 0 var(--gutter-l);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { flex: 1; font-size: 1.02rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-logo { border-radius: 8px; }
.topbar-actions { display: flex; gap: 6px; }
body.no-top .topbar { display: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; margin-left: -8px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--text);
  transition: background-color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .ic { width: 22px; height: 22px; }
.sheet .icon-btn { margin-left: 0; }

/* ---------- contenu ---------- */
#view {
  max-width: 720px; margin: 0 auto;
  padding: 24px var(--gutter-r) calc(var(--tab-h) + var(--safe-b) + 32px) var(--gutter-l);
  display: flex; flex-direction: column; gap: 16px;
}
body.no-nav #view { padding-bottom: calc(var(--safe-b) + 32px); }
body.no-top #view { padding-top: calc(var(--safe-t) + 28px); }

/* entrée de page : les blocs montent en fondu, en léger décalage */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.view-enter > * { animation: rise var(--t-enter) var(--ease-out) both; }
.view-enter > :nth-child(2) { animation-delay: 40ms; }
.view-enter > :nth-child(3) { animation-delay: 80ms; }
.view-enter > :nth-child(4) { animation-delay: 120ms; }
.view-enter > :nth-child(5) { animation-delay: 160ms; }
.view-enter > :nth-child(6) { animation-delay: 200ms; }
.view-enter > :nth-child(n+7) { animation-delay: 240ms; }
.view-enter .list-cards > * { animation: rise var(--t-enter) var(--ease-out) both; }
.view-enter .list-cards > :nth-child(2) { animation-delay: 50ms; }
.view-enter .list-cards > :nth-child(3) { animation-delay: 100ms; }
.view-enter .list-cards > :nth-child(4) { animation-delay: 150ms; }
.view-enter .list-cards > :nth-child(n+5) { animation-delay: 200ms; }

.page-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; }
.section { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.section-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.count { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; background: var(--surface-2); color: var(--muted); padding: 1px 8px; border-radius: 99px; }
.title-lg { font-size: 1.4rem; font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.card-title { font-size: .98rem; font-weight: 700; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; color: var(--accent-text); }
.eyebrow .ic { width: 15px; height: 15px; }
/* pictogrammes dans les titres, puces et badges : on comprend sans lire */
.section-title .ic { width: 18px; height: 18px; color: var(--accent-text); }
.chip .ic { width: 13px; height: 13px; margin-left: -2px; }
.compat { display: inline-flex; align-items: center; gap: 4px; }
.compat .ic { width: 12px; height: 12px; }
.chip-btn .ic { width: 15px; height: 15px; margin-left: -2px; opacity: .8; }
.chip-toggle span { display: inline-flex !important; align-items: center; gap: 6px; }
.chip-toggle span .ic { width: 15px; height: 15px; }
.card-foot .muted .ic { width: 14px; height: 14px; }

/* ---------- navigation : onglets (mobile) / barre latérale (desktop) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: stretch;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 0 var(--gutter-r) var(--safe-b) var(--gutter-l);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--border);
}
body.no-nav .tabbar { display: none; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .7rem; font-weight: 600; color: var(--muted); min-width: 0;
  transition: color var(--t-fast) var(--ease-std);
}
.tab .ic { width: 22px; height: 22px; transition: transform var(--t-med) var(--ease-out); }
.tab:active .ic { transform: scale(.88); }
.tab.active { color: var(--accent-text); }
.tab-ic { position: relative; isolation: isolate; display: grid; place-items: center; width: 54px; height: 30px; border-radius: 9px; }
.tab-ic::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent-soft);
  opacity: 0; transform: scale(.6); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.tab.active .tab-ic::before { opacity: 1; transform: none; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.badge {
  position: absolute; top: -5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--danger); color: #fff; font: 600 .66rem/1 var(--font-mono);
  display: grid; place-items: center; border: 2px solid var(--surface);
  animation: pop 360ms var(--ease-out) both;
}
.nav-brand, .user-menu-side, .side-ticks { display: none; }

@media (min-width: 900px) {
  .tabbar {
    top: 0; right: auto; width: var(--side-w); height: auto;
    flex-direction: column; justify-content: flex-start; gap: 2px;
    padding: 22px 14px calc(20px + var(--safe-b)) max(14px, env(safe-area-inset-left, 0px));
    border-top: 0; border-right: 1px solid var(--border);
    background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; padding: 4px 10px 26px; }
  .nav-brand img { border-radius: 8px; }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 6px; font-size: .92rem; padding: 3px 6px; border-radius: 10px; color: var(--text-2); font-weight: 500; isolation: isolate; position: relative; }
  .tab::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--surface-2);
    opacity: 0; transition: opacity var(--t-fast) var(--ease-std);
  }
  .tab:hover::before { opacity: 1; }
  .tab.active { color: var(--accent-text); font-weight: 600; }
  .tab.active::before { opacity: 1; background: var(--accent-soft); }
  .tab.active .tab-ic::before { opacity: 0; }
  .tab-ic { width: 36px; }
  .badge { right: -2px; }
  body:not(.no-nav) .topbar { margin-left: var(--side-w); }
  body:not(.no-nav) .top-logo { display: none; }
  body:not(.no-nav) #view { margin-left: max(var(--side-w), calc(var(--side-w) + (100vw - var(--side-w) - 720px) / 2)); padding-bottom: 56px; }
  .hide-xs { display: inline; }
}
@media (max-width: 420px) { .hide-xs { display: none; } }

/* ---------- cartes ---------- */
.card {
  position: relative; isolation: isolate;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
}
/* survol : la carte se soulève, l'ombre portée apparaît en fondu (pas d'animation de box-shadow) */
.card-link { transition: transform var(--t-med) var(--ease-out), border-color var(--t-fast) var(--ease-std); }
.card-link::after {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  box-shadow: var(--shadow-md); opacity: 0; transition: opacity var(--t-med) var(--ease-out); pointer-events: none;
}
@media (hover: hover) {
  .card-link:hover { transform: translateY(-2px); border-color: var(--border-strong); }
  .card-link:hover::after { opacity: 1; }
}
.card-link:active { transform: scale(.99); }
.card.row { flex-direction: row; }
.card-head { display: flex; align-items: flex-start; gap: 12px; }
.card-head h3, .job-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.card.highlight { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); background: linear-gradient(var(--warn-soft), var(--surface) 64px); }
.urgent-card { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.list-cards { display: flex; flex-direction: column; gap: 12px; }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: .86rem; }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.price { font-weight: 600; white-space: nowrap; font-size: 1rem; }
.price .amount, .price-big .amount { font-weight: 600; letter-spacing: -.02em; }
.price small, .price-big small { font-family: var(--font-mono); font-size: .7em; font-weight: 400; color: var(--muted); }
.price-big { font-size: 1.6rem; white-space: nowrap; line-height: 1.1; }

.quote { padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .9rem; color: var(--text-2); border-left: 2px solid var(--border-strong); }
.bio { color: var(--text-2); max-width: 65ch; }

/* cases qui s'étirent pour remplir chaque ligne : jamais de case vide, quel que soit le nombre d'éléments */
.info-grid { display: flex; flex-wrap: wrap; gap: 1px; margin: 0; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.info-grid div { flex: 1 1 140px; background: var(--surface); padding: 11px 13px; }
.info-grid dt { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.info-grid dd { margin: 3px 0 0; font-weight: 600; }

/* ---------- puces ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 6px;
  font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--text); white-space: nowrap;
}
.chip-brand { background: var(--accent-soft); color: var(--accent-text); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); white-space: normal; }
.chip-muted { background: var(--surface-2); color: var(--muted); }

.compat { flex: none; font-family: var(--font-mono); font-size: .76rem; padding: 2px 7px; border-radius: 6px; border: 1px solid currentColor; }
.compat b { font-weight: 600; }
.compat-ok { color: var(--ok); }
.compat-warn { color: var(--warn); }
.compat-muted { color: var(--muted); }

.chips-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding: 2px var(--gutter-r) 6px var(--gutter-l); scrollbar-width: none; scroll-snap-type: x proximity; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none; display: inline-flex; align-items: center; gap: 4px; scroll-snap-align: start;
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  font-size: .86rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std);
}
.chip-btn:hover { border-color: var(--border-strong); }
.chip-btn:active { transform: scale(.96); }
.chip-btn.sm { padding: 3px 9px; font-size: .8rem; }
.chip-btn.active { background: var(--text); border-color: var(--text); color: var(--bg); }

.chip-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle span {
  display: inline-block; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); font-size: .88rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: background-color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std);
}
.chip-toggle span:active { transform: scale(.96); }
.chip-toggle input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: .86rem; animation: pop 280ms var(--ease-out) both; }
.tag button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; transition: background-color var(--t-fast); }
.tag button:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.tag .ic { width: 14px; height: 14px; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.day-dots { display: flex; gap: 4px; }
.day-dots span { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.day-dots span.on { background: var(--accent); color: var(--on-accent); }

/* ---------- boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--text); text-align: center;
  transition: background-color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std),
              color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std), opacity var(--t-fast);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--text-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 8px; }
.btn-block { width: 100%; }
/* état « en cours » : le libellé s'estompe, un anneau tourne à sa place (retour immédiat) */
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-busy { cursor: progress; opacity: 1; color: transparent; transition: none; }
.btn.is-busy > * { opacity: 0; }
.btn.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; border: 2px solid currentColor; border-color: var(--on-accent) transparent var(--on-accent) var(--on-accent);
  animation: spin .7s linear infinite;
}
.btn-ghost.is-busy::after, .btn-sm.btn-ghost.is-busy::after { border-color: var(--text) transparent var(--text) var(--text); }

.action-bar { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 899px) {
  .action-bar {
    position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 5;
    padding: 12px; border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .action-bar:empty { display: none; }
}

/* ---------- formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: .86rem; font-weight: 600; padding: 0; }
.field em { font-style: normal; font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); outline: none; font-size: 16px;
  transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std);
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: color-mix(in srgb, var(--text) 25%, var(--border-strong)); }
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type="number"], input[type="time"], input[type="date"] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hint { font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.hint .ic { margin-top: 2px; }
.hint.center { justify-content: center; }

.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { padding-right: 76px; }
.input-suffix > span { position: absolute; right: 12px; color: var(--muted); font: .8rem var(--font-mono); pointer-events: none; }
.input-suffix.sm input { min-height: 38px; padding: 6px 70px 6px 10px; }
.input-suffix.sm > span { right: 9px; font-size: .74rem; }

.searchbar { position: relative; }
.searchbar .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbar input { padding-left: 42px !important; background: var(--surface-2) !important; border-color: transparent !important; }
.searchbar input:focus { background: var(--surface) !important; border-color: var(--accent) !important; }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters .rate-filter { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.filters .rate-filter input { width: 120px; }
.filters .rate-filter span:last-child { font: .8rem var(--font-mono); }
@media (min-width: 640px) { .filters { grid-template-columns: 1fr 1fr auto; } .filters .rate-filter { grid-column: auto; } }
.select-sm { width: auto !important; min-height: 34px !important; padding: 4px 10px !important; font-size: .86rem !important; border-radius: 8px !important; }

/* disponibilités jour par jour */
.days { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.day-row { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; transition: background-color var(--t-med) var(--ease-std); }
.day-row + .day-row { border-top: 1px solid var(--border); }
.day-row.on { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.day-row:not(.on) .day-fields { display: none; }
.day-row.on .day-fields { animation: rise 260ms var(--ease-out) both; }
.day-fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.day-fields input[type="time"] { min-height: 38px; padding: 6px 8px; }
.day-fields .input-suffix { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .day-row { flex-direction: row; align-items: center; justify-content: space-between; min-height: 58px; }
  .day-fields { grid-template-columns: 104px auto 104px 150px; }
  .day-fields .input-suffix { grid-column: auto; }
}
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 32px; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--border-strong); transition: background-color var(--t-med) var(--ease-std); flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--t-med) var(--ease-out); box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch:active .switch-ui::after { transform: scaleX(1.15); }
.switch input:checked:active + .switch-ui::after { transform: translateX(14px) scaleX(1.15); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.day-name { font-weight: 600; min-width: 80px; }
.summary { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; }

.sticky-submit { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 5; }
.sticky-submit .btn { box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .sticky-submit { bottom: 16px; } }

.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color var(--t-fast), background-color var(--t-fast); }
.radio-card:hover { border-color: var(--border-strong); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.segmented a { position: relative; z-index: 1; text-align: center; padding: 8px; border-radius: 8px; font-weight: 600; font-size: .88rem; color: var(--muted); transition: color var(--t-fast); }
.segmented a:hover { color: var(--text); }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- avatars ---------- */
.avatar {
  --h: 160; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 700;
  background: hsl(var(--h) 28% 92%); color: hsl(var(--h) 35% 26%);
  width: 42px; height: 42px; font-size: .84rem; letter-spacing: .02em;
}
:root[data-theme="dark"] .avatar { background: hsl(var(--h) 18% 20%); color: hsl(var(--h) 40% 82%); }
.avatar-sm { width: 34px; height: 34px; font-size: .74rem; }
.avatar-lg { width: 48px; height: 48px; font-size: .92rem; }
.avatar-xl { width: 76px; height: 76px; font-size: 1.4rem; }

/* ---------- étoiles ---------- */
.stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 1px; white-space: nowrap; font-size: .92rem; vertical-align: -1px; }
.stars-md { font-size: 1.25rem; }
.stars-bg { color: var(--star-empty); }
.stars-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); }
.rating-inline { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; }
.rating-inline strong { font-family: var(--font-mono); font-weight: 600; }

.star-input-wrap { border: 0; padding: 0; margin: 0; text-align: center; }
.star-input { display: flex; justify-content: center; gap: 4px; }
.star-input label { cursor: pointer; padding: 2px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input .star { display: block; font-size: 2.5rem; line-height: 1; color: var(--star-empty); transition: color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-out); }
.star-input label:hover .star { transform: scale(1.08); }
.star-input label.on .star { color: var(--star); }
@keyframes star-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-8deg); } 100% { transform: scale(1); } }
.star-input label.pop .star { animation: star-pop 360ms var(--ease-out); }
.star-input input:focus-visible + .star { outline: 2px solid var(--accent); border-radius: 8px; }
.star-caption { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.star-caption.set { color: var(--text); font-weight: 600; animation: fade 200ms ease-out; }

.rating-summary { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.rating-big { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 104px; }
.rating-num { font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rating-bars { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 5px; font-size: .78rem; }
.bar-row { display: grid; grid-template-columns: 30px 1fr 18px; gap: 8px; align-items: center; font-family: var(--font-mono); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--star); border-radius: 99px; transform: scaleX(var(--v, 0)); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.view-enter .bar > span, .view-enter .progress > span { animation: grow 800ms var(--ease-out) 200ms both; }

.review { border-top: 1px solid var(--border); padding: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.review-head { display: flex; align-items: center; gap: 10px; }

/* compte à rebours de la fenêtre d'avis */
.countdown { display: inline-flex; align-items: center; gap: 5px; font: 500 .8rem var(--font-mono); color: var(--warn); }
.countdown.urgent { color: var(--danger); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transform: scaleX(var(--v, 0)); transform-origin: left; }
.progress.urgent > span { background: var(--danger); }
.deadline { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); font-size: .9rem; }
.deadline .ic { margin-top: 2px; }

.rules { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; background: var(--surface); }
.rules summary { cursor: pointer; padding: 13px 0; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; transition: color var(--t-fast); }
.rules summary:hover { color: var(--accent-text); }
.rules summary::-webkit-details-marker { display: none; }
.rules::details-content { block-size: 0; overflow: hidden; transition: block-size var(--t-med) var(--ease-out), content-visibility var(--t-med) allow-discrete; }
.rules[open]::details-content { block-size: auto; }
.rules ul { margin: 0 0 14px; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.rules strong { color: var(--text); }

.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.checks li.ok .ic { color: var(--ok); }
.checks li.ko .ic { color: var(--danger); }

/* ---------- listes ---------- */
.list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.list-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
  border: 0; border-bottom: 1px solid var(--border); background: transparent; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-std);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item > .ic:last-child { transition: transform var(--t-med) var(--ease-out); }
.list-item:hover > .ic:last-child { transform: translateX(3px); }
div.list-item { cursor: default; }
div.list-item:hover { background: transparent; }

.table-wrap { overflow-x: auto; }
.avail-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.avail-table th { text-align: left; font-weight: 600; padding: 9px 0; width: 38%; }
.avail-table td { padding: 9px 0; }
.avail-table td.num { font-size: .84rem; }
.avail-table tr + tr { border-top: 1px solid var(--border); }
.avail-table tr.off { color: var(--muted); }
.avail-table tr.off th { font-weight: 400; }

.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head p { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.notice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: .9rem; transition: transform var(--t-med) var(--ease-out); }
.notice:hover { transform: translateY(-1px); }
.notice span { flex: 1; }

.empty { text-align: center; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.empty strong { color: var(--text); font-size: 1.02rem; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 4px; }
.empty-ic .ic { width: 24px; height: 24px; }
.empty .btn { margin-top: 8px; }
.boot-error { min-height: 60dvh; justify-content: center; }

/* ---------- chargement : squelette à la forme de l'écran, visible après 200 ms ---------- */
.skeleton { display: flex; flex-direction: column; gap: 14px; opacity: 0; animation: fade 240ms ease-out 200ms forwards; }
.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--shimmer), transparent);
  animation: shimmer 1.4s var(--ease-std) infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; }
.sk-line.lg { height: 18px; }
.sk-line.xl { height: 30px; }
.w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; }
.sk-search { height: 44px; border-radius: var(--radius-sm); margin: 6px 0; }
.sk-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sk-row { display: flex; gap: 10px; }
.sk-pill { width: 90px; height: 14px; }

/* ---------- connexion / inscription ---------- */
.auth { position: relative; width: 100%; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.auth::before { /* trame discrète, comme sur la landing */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .7;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 10%, transparent 70%);
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 52px; }
.auth-home {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 8px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-weight: 600; font-size: .88rem; box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std);
}
.auth-home .ic { width: 17px; height: 17px; }
.auth-home .ic:first-child { transition: transform var(--t-med) var(--ease-out); }
.auth-home:hover { border-color: var(--border-strong); color: var(--text); }
.auth-home:hover .ic:first-child { transform: translateX(-3px); }
.auth-home:active { transform: scale(.97); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; align-self: flex-start; }
.auth-brand img { border-radius: 9px; }
.auth-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.auth-alt { display: flex; flex-direction: column; gap: 10px; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; align-self: center; transition: color var(--t-fast); }
.auth-back:hover { color: var(--text); }
.switch-card { gap: 16px; }
.switch-who { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.switch-who strong { font-size: 1.05rem; }
.demo-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--border-strong); animation: rise var(--t-enter) var(--ease-out) both; }
@media (max-width: 480px) { .auth-card { padding: 20px 18px; } }

/* ---------- feuille modale ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop::before {
  content: ""; position: absolute; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity var(--t-med) var(--ease-std);
}
.sheet-backdrop.open::before { opacity: 1; }
.sheet-backdrop.closing::before { transition-duration: 180ms; }
.sheet {
  position: relative; width: 100%; max-width: 540px; max-height: 92dvh; overflow-y: auto; outline: none;
  background: var(--surface); border-radius: 20px 20px 0 0; border: 1px solid var(--border); border-bottom: 0;
  padding: 8px var(--gutter-r) calc(18px + var(--safe-b)) var(--gutter-l);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform 320ms var(--ease-out);
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet-backdrop.closing .sheet { transition: transform 200ms var(--ease-in); }
.sheet-handle { width: 36px; height: 4px; border-radius: 99px; background: var(--border-strong); margin: 4px auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sheet-head h2 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; border-bottom: 1px solid var(--border); padding: 18px 22px 22px; transform: translateY(8px) scale(.97); opacity: 0; transition: transform 300ms var(--ease-out), opacity 220ms var(--ease-out); }
  .sheet-backdrop.open .sheet { opacity: 1; transform: none; }
  .sheet-backdrop.closing .sheet { transition: transform 180ms var(--ease-in), opacity 160ms var(--ease-in); }
  .sheet-handle { display: none; }
}

/* ---------- toasts ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 var(--gutter-r) 0 var(--gutter-l); }
body.no-nav #toast-root { bottom: calc(var(--safe-b) + 18px); }
@media (min-width: 900px) { body:not(.no-nav) #toast-root { left: var(--side-w); } }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: 460px; padding: 11px 16px 11px 13px; border-radius: 12px; font-weight: 500; font-size: .9rem;
  background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out);
}
.toast.show { opacity: 1; transform: none; }
.toast.hide { opacity: 0; transform: translateY(4px); transition-duration: 180ms; transition-timing-function: var(--ease-in); }
.toast-ic { width: 18px; height: 18px; flex: none; }
.toast-ok .toast-ic { color: #5fd3a6; }
.toast-error { background: #be3428; color: #fff; }

/* ---------- animations permanentes, discrètes, qui signalent ce qui attend une action ---------- */
/* sablier des comptes à rebours d'avis : il se retourne régulièrement */
@keyframes flip { 0%, 80% { transform: rotate(0); } 92%, 100% { transform: rotate(180deg); } }
.countdown .ic, .deadline .ic { animation: flip 3.2s var(--ease-out) infinite; }
/* délai presque écoulé : le compte à rebours pulse */
@keyframes urgent-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.countdown.urgent { animation: urgent-pulse 1.6s ease-in-out infinite; }
/* pastilles de notification : une onde part régulièrement */
.badge::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--danger);
  opacity: 0; animation: badge-ping 2.6s var(--ease-out) 1s infinite; pointer-events: none;
}
@keyframes badge-ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
/* bouton « Donner mon avis » / « Noter » : un reflet attire l'œil */
[data-review].btn-primary { overflow: hidden; isolation: isolate; }
[data-review].btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .22) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 4.5s var(--ease-std) 1s infinite;
}
@keyframes shine { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }
/* proposition reçue : l'icône de l'enveloppe oscille */
@keyframes wiggle { 0%, 84%, 100% { transform: rotate(0); } 88% { transform: rotate(-10deg); } 92% { transform: rotate(8deg); } 96% { transform: rotate(-4deg); } }
.section-title .ic { transform-origin: 50% 60%; }
.card.highlight .avatar, .section-title:has(+ .list-cards .card.highlight) .ic { animation: wiggle 3.5s ease-in-out infinite; }

/* ---------- suggestions de villes ---------- */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  animation: rise 180ms var(--ease-out) both;
}
.combo-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li .ic { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.combo-list li span { display: flex; flex-direction: column; min-width: 0; }
.combo-list li strong { font-weight: 500; }
.combo-list li small { color: var(--muted); font-size: .78rem; }
.combo-list li mark { background: none; color: var(--accent-text); font-weight: 700; }
.combo-list li:hover, .combo-list li[aria-selected="true"] { background: var(--accent-soft); }

/* ---------- compte à rebours après trop d'échecs de connexion ---------- */
.lock-timer {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  animation: rise 260ms var(--ease-out) both;
}
.lock-timer strong { color: var(--danger); }
.lock-timer .progress { margin-top: 8px; }
.lock-timer .progress > span { transition: transform 1s linear; }
.lock-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--danger); }
.lock-count { font: 600 1.4rem/1 var(--font-mono); color: var(--danger); font-variant-numeric: tabular-nums; }

/* ---------- bouton lune / soleil (clair ↔ sombre) ---------- */
.theme-btn { margin-left: 0; border: 1px solid var(--border); }
.theme-btn:hover { border-color: var(--border-strong); }
.theme-btn .ic { width: 19px; height: 19px; }
.theme-btn .i-sun, [data-theme="dark"] .theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
@keyframes theme-icon-in { from { transform: rotate(-90deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.theme-btn .ic { animation: theme-icon-in 420ms var(--ease-out); }
/* sur les écrans sans barre du haut (connexion, inscription) : bouton flottant en haut à droite */
.theme-fab {
  display: none; position: fixed; z-index: 40; top: calc(var(--safe-t) + 14px); right: var(--gutter-r);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
body.no-top .theme-fab { display: inline-grid; }
body.landing-open .theme-fab { display: none; }
/* fondu des couleurs pendant la bascule uniquement */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, fill 300ms ease, stroke 300ms ease !important;
}

/* ---------- landing page affichée par-dessus l'app ---------- */
.landing-frame {
  position: fixed; inset: 0; z-index: 400; width: 100%; height: 100%; border: 0; background: var(--bg);
  transition: opacity 240ms var(--ease-in), transform 240ms var(--ease-in);
}
.landing-frame.is-leaving { opacity: 0; transform: scale(.985); pointer-events: none; }
body.landing-open { overflow: hidden; }

/* =====================================================================
   Espaces candidat et recruteur : mêmes codes que la landing
   (vert profond de la bande finale, trame quadrillée, motif des 14 traits, pastilles d'icônes)
   ===================================================================== */

/* fond : un halo vert très léger en haut de page */
body:not(.no-nav) {
  background:
    radial-gradient(60rem 26rem at 85% -8rem, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

/* ---------- barre latérale vert profond (desktop) ---------- */
@media (min-width: 900px) {
  .tabbar {
    background: var(--side-bg); color: var(--side-ink); border-right: 0; isolation: isolate;
  }
  .tabbar::before { /* lueur et trame, comme la bande finale de la landing */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(22rem 16rem at 0% 0%, rgb(255 255 255 / .09), transparent 70%),
      linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px) 0 0 / 32px 32px,
      linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px) 0 0 / 32px 32px;
    mask-image: linear-gradient(#000, transparent 55%);
    -webkit-mask-image: linear-gradient(#000, transparent 55%);
  }
  .nav-brand { color: #fff; }
  .nav-brand img { box-shadow: 0 0 0 1px rgb(255 255 255 / .18); }
  .tab { color: var(--side-muted); }
  .tab::before { background: rgb(255 255 255 / .08); }
  .tab:hover { color: #fff; }
  .tab.active { color: #fff; }
  .tab.active::before { background: rgb(255 255 255 / .13); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
  .tab.active::after { /* trait d'accent à gauche de l'onglet actif */
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #5fd3a6;
    animation: rise var(--t-med) var(--ease-out) both;
  }
  .tab.active .tab-ic .ic { color: #5fd3a6; }
  .tabbar .badge { border-color: var(--side-bg); }

  /* motif des 14 traits (fenêtre d'avis) en bas de la barre */
  .side-ticks { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; margin: 14px 10px 0; opacity: .5; }
  .side-ticks i { height: 5px; border-radius: 2px; background: rgb(255 255 255 / .22); }
  .side-ticks i:nth-child(-n+5) { background: #5fd3a6; }
  .user-menu-side { display: block; margin-top: auto; }
  body .top-user { display: none; }
}

/* ---------- menu du compte : initiales colorées ---------- */
.avatar-vivid {
  color: #fff !important; font-weight: 800; letter-spacing: .03em;
  background: linear-gradient(135deg, hsl(var(--h) 62% 48%), hsl(calc(var(--h) + 40) 66% 36%)) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 2px 8px -2px hsl(var(--h) 60% 30% / .55);
  text-shadow: 0 1px 1px rgb(0 0 0 / .18);
}
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; text-align: left;
  transition: background-color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std);
}
.user-btn:active { transform: scale(.98); }
.user-btn .avatar { transition: transform var(--t-med) var(--ease-out); }
.user-btn:hover .avatar { transform: scale(1.06); }
.user-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.user-id strong { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-id small { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-btn > .ic { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform var(--t-med) var(--ease-out); }
.user-menu.open .user-btn > .ic { transform: rotate(90deg); }

/* dans la barre latérale */
.user-menu-side { padding-top: 12px; border-top: 1px solid rgb(255 255 255 / .12); }
.user-menu-side .user-btn { color: #fff; }
.user-menu-side .user-btn:hover, .user-menu-side.open .user-btn { background: rgb(255 255 255 / .09); }
.user-menu-side .user-id small, .user-menu-side .user-btn > .ic { color: var(--side-muted); }
/* en haut à droite (mobile) : seulement la pastille */
.top-user { display: flex; }
.top-user:empty { display: none; }
.user-menu-top .user-btn { padding: 3px; border-radius: 50%; }
.user-menu-top .user-id, .user-menu-top .user-btn > .ic { display: none; }

.user-pop {
  position: absolute; z-index: 80; min-width: 248px; padding: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px;
  animation: pop-in 200ms var(--ease-out) both;
}
.user-pop.closing { animation: pop-out 140ms var(--ease-in) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(var(--from, 6px)) scale(.97); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(var(--from, 6px)) scale(.98); } }
.user-menu-side .user-pop { left: 0; right: 0; min-width: 0; bottom: calc(100% + 8px); transform-origin: bottom left; }
.user-menu-top .user-pop { right: 0; top: calc(100% + 8px); transform-origin: top right; --from: -6px; }
.user-pop-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.user-pop-head > .grow { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-pop-head strong { font-weight: 700; }
.user-pop-head small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pop [role="menuitem"] {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: transparent; text-align: left; font-weight: 500; font-size: .9rem; cursor: pointer; color: var(--text-2);
  transition: background-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std);
}
.user-pop [role="menuitem"] .ic { width: 17px; height: 17px; color: var(--muted); transition: transform var(--t-med) var(--ease-out); }
.user-pop [role="menuitem"]:hover, .user-pop [role="menuitem"]:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.user-pop .user-logout { color: var(--danger); margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; padding-top: 11px; }
.user-pop .user-logout .ic { color: currentColor; }
.user-pop .user-logout:hover, .user-pop .user-logout:focus-visible { background: var(--danger-soft); color: var(--danger); }
.user-pop .user-logout:hover .ic { transform: translateX(3px); }

/* ---------- en-tête de page façon « hero » ---------- */
#view { isolation: isolate; overflow-x: clip; } /* la trame des en-têtes ne doit pas élargir la page */
.page-head { position: relative; gap: 12px; padding: 10px 0 8px; }
.page-grid {
  position: absolute; inset: -40px -60px -10px; z-index: -1; pointer-events: none; opacity: .75;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 65% 70% at 75% 20%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 65% 70% at 75% 20%, #000 10%, transparent 70%);
}
.page-head h1 { font-size: clamp(2rem, 5.4vw, 2.7rem); line-height: 1.05; letter-spacing: -.04em; }
.page-head .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
.page-head .w > span { display: inline-block; }
.view-enter .page-head .w > span { animation: word 700ms var(--ease-out) both; animation-delay: calc(var(--d) * 55ms + 40ms); }
@keyframes word { from { transform: translateY(105%); } }
.page-head .accent { color: var(--accent-text); }
.page-head .lead { color: var(--text-2); font-size: 1.02rem; max-width: 54ch; }
.kicker {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface);
  font: 500 .76rem var(--font-mono); color: var(--text-2); box-shadow: var(--shadow-sm);
}
.kicker .ic { width: 14px; height: 14px; color: var(--accent-text); }

/* ---------- tuiles de chiffres clés ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), border-color var(--t-fast) var(--ease-std);
}
.stat::after { /* soulignement vert qui se déploie au survol */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out);
}
@media (hover: hover) {
  .stat:hover { transform: translateY(-2px); border-color: var(--border-strong); }
  .stat:hover::after { transform: none; }
}
.stat:active { transform: scale(.98); }
.stat-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 8px; }
.stat-ic .ic { width: 17px; height: 17px; }
.stat-num { font: 700 1.7rem/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.stat-alert .stat-ic { background: var(--warn-soft); color: var(--warn); }
.stat-alert .stat-ic::after { /* point d'attention */
  content: ""; position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 50%, transparent); animation: dot-ping 2.4s var(--ease-out) infinite;
}
@keyframes dot-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@media (max-width: 420px) {
  .stats { gap: 8px; }
  .stat { padding: 12px 10px; }
  .stat-num { font-size: 1.4rem; }
}

/* ---------- cartes : un peu plus de relief ---------- */
.section-title .ic { box-sizing: content-box; padding: 6px; border-radius: 9px; background: var(--accent-soft); }
.card-link::before { /* liseré vert en haut au survol */
  content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 2px; border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--accent), #5fd3a6); transform: scaleX(0); transition: transform var(--t-med) var(--ease-out);
}
@media (hover: hover) { .card-link:hover::before { transform: none; } }
.job-card .eyebrow .ic, .job-card .eyebrow svg { box-sizing: content-box; padding: 5px; border-radius: 8px; background: var(--accent-soft); }
.price .amount { color: var(--accent-text); }

/* ---------- vérification d'identité (KYC) ---------- */
/* pastille à côté du nom : verte = utilisateur validé, orange = non validé ; bulle au survol */
.id-badge {
  position: relative; display: inline-grid; place-items: center; vertical-align: -.12em;
  width: 1.25em; height: 1.25em; margin-left: .35em; border-radius: 50%; cursor: help; outline-offset: 2px;
}
.id-badge .ic { width: .95em; height: .95em; }
.id-badge.is-ok { color: #fff; background: #16a34a; box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 22%, transparent), 0 0 10px color-mix(in srgb, #16a34a 55%, transparent); }
.id-badge.is-ko { color: #fff; background: #ea7a0c; box-shadow: 0 0 0 3px color-mix(in srgb, #ea7a0c 20%, transparent); }
/* « s'allume » : un halo vert respire doucement autour des comptes validés */
.id-badge.is-ok::before {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; border: 2px solid #16a34a;
  opacity: 0; animation: badge-glow 2.8s var(--ease-out) infinite; pointer-events: none;
}
@keyframes badge-glow { 0% { transform: scale(.9); opacity: .7; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.id-badge::after { /* bulle « Utilisateur validé / non validé » */
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 90;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  font: 600 .74rem/1.2 var(--font-body); letter-spacing: 0; text-transform: none;
  background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--shadow-md);
  opacity: 0; transform: translate(-50%, 4px); transition: opacity var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-out);
}
.id-badge.is-ok::after { background: #15803d; color: #fff; }
.id-badge.is-ko::after { background: #c2410c; color: #fff; }
.id-badge:hover::after, .id-badge:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.profile-head .id-badge { font-size: .8em; }

.kyc-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
  transition: transform var(--t-med) var(--ease-out);
}
.kyc-banner strong { color: var(--text); }
.kyc-banner .small { color: var(--text-2); }
.kyc-banner:hover { transform: translateY(-1px); }
.kyc-banner > .ic:last-child { width: 18px; height: 18px; }
.kyc-banner-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--surface); }
.kyc-banner-ic .ic { width: 20px; height: 20px; }

.kyc-status { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-sm); }
.kyc-status.ok { background: var(--ok-soft); }
.kyc-status.warn { background: var(--warn-soft); }
.kyc-status.danger { background: var(--danger-soft); }
.kyc-status-ic { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; color: #fff; }
.kyc-status-ic .ic { width: 24px; height: 24px; }
.kyc-status.ok .kyc-status-ic { background: #16a34a; box-shadow: 0 0 16px color-mix(in srgb, #16a34a 50%, transparent); }
.kyc-status.warn .kyc-status-ic { background: #ea7a0c; }
.kyc-status.danger .kyc-status-ic { background: var(--danger); }
.kyc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.kyc-steps li { display: flex; align-items: center; gap: 12px; }
.kyc-step-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.kyc-step-ic .ic { width: 20px; height: 20px; }
.kyc-row .muted { display: inline-flex; align-items: center; gap: 6px; }
.kyc-row:hover .chip { filter: brightness(.97); }

/* ---------- messages vocaux ---------- */
/* lecteur : bouton rond, forme d'onde qui se colore pendant la lecture, durée */
.voice-player {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; max-width: 360px;
  background: var(--accent-soft); border-radius: 99px; color: var(--accent-text);
}
.voice-player.compact { padding: 5px 10px 5px 5px; max-width: 280px; }
.voice-play {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease-std), background-color var(--t-fast) var(--ease-std);
}
.voice-player.compact .voice-play { width: 30px; height: 30px; }
.voice-play:hover { background: var(--accent-hover); }
.voice-play:active { transform: scale(.92); }
.voice-play .ic { width: 15px; height: 15px; stroke: none; }
.voice-play .ic:first-child { margin-left: 2px; }
.voice-play .ic:last-child, .voice-player.playing .voice-play .ic:first-child { display: none; }
.voice-player.playing .voice-play .ic:last-child { display: block; }
.voice-player.loading .voice-play::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent);
  border-right-color: transparent; animation: spin .7s linear infinite;
}
.voice-wave { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.voice-player.compact .voice-wave { height: 20px; }
.voice-wave i {
  flex: 1; min-width: 2px; height: calc(var(--v) * 100%); border-radius: 2px;
  background: color-mix(in srgb, var(--accent-text) 30%, transparent); transition: background-color 120ms linear;
}
.voice-wave i.on { background: var(--accent-text); }
.voice-time { font-size: .78rem; min-width: 34px; text-align: right; }
.voice-block { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.voice-block > .muted { display: inline-flex; align-items: center; gap: 6px; }
.job-card .voice-player { margin-top: 2px; }

/* enregistreur */
.voice-box { display: flex; flex-direction: column; gap: 10px; }
.voice-rec-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color var(--t-fast) var(--ease-std), background-color var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-std);
}
.voice-rec-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.voice-rec-btn:active { transform: scale(.99); }
.voice-rec-btn strong { font-weight: 600; font-size: .92rem; }
.voice-mic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.voice-mic .ic { width: 19px; height: 19px; }
.voice-recording {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 99px;
  background: var(--danger-soft); color: var(--danger);
}
.rec-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--danger); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.voice-level { flex: 1; min-width: 0; height: 26px; display: flex; align-items: center; gap: 2px; }
.voice-level i { flex: 1; min-width: 2px; height: calc(var(--v, .12) * 100%); border-radius: 2px; background: currentColor; opacity: .75; transition: height 80ms linear; }
.voice-recording .voice-time { min-width: 0; white-space: nowrap; }

/* =====================================================================
   Messagerie façon WhatsApp
   ===================================================================== */
:root {
  --wa-bg: #efeae2; --wa-out: #d9fdd3; --wa-in: #ffffff; --wa-text: #111b21; --wa-meta: #667781;
  --wa-tick: #53bdeb; --wa-head: #f0f2f5; --wa-sys: #fff3c2; --wa-sys-text: #54656f; --wa-day: #ffffff;
  --wa-green: #25d366; --wa-teal: #00a884; --wa-doodle: rgb(17 27 33 / .06); --wa-input: #ffffff; --wa-line: #e9edef;
}
:root[data-theme="dark"] {
  --wa-bg: #0b141a; --wa-out: #005c4b; --wa-in: #202c33; --wa-text: #e9edef; --wa-meta: #8696a0;
  --wa-tick: #53bdeb; --wa-head: #202c33; --wa-sys: #182229; --wa-sys-text: #ffd279; --wa-day: #182229;
  --wa-doodle: rgb(233 237 239 / .035); --wa-input: #2a3942; --wa-line: #222d34;
}

/* liste des discussions */
.wa-list-page { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.wa-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; transition: background-color var(--t-fast) var(--ease-std); }
.wa-row + .wa-row .wa-row-main { border-top: 1px solid var(--border); }
.wa-row:hover, .wa-row.active { background: var(--surface-2); }
.wa-ava { position: relative; flex: none; display: inline-flex; }
.online-dot { position: absolute; right: 0; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--wa-green); border: 2px solid var(--surface); }
.wa-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.wa-row-top, .wa-row-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wa-row-top strong { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-row-top time { font-size: .74rem; color: var(--muted); flex: none; }
.wa-row.has-unread .wa-row-top time { color: var(--wa-teal); font-weight: 600; }
.wa-preview { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-preview .ic { width: 15px; height: 15px; }
.wa-preview em { font-style: italic; overflow: hidden; text-overflow: ellipsis; }
.wa-preview .missed { color: var(--danger); display: inline-flex; align-items: center; gap: 3px; }
.wa-row.has-unread .wa-preview { color: var(--text); font-weight: 500; }
.wa-unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--wa-teal); color: #fff; font: 700 .72rem/20px var(--font-body); text-align: center; animation: pop 300ms var(--ease-out) both; }
.wa-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; color: var(--muted); }
.wa-empty .ic { width: 34px; height: 34px; color: var(--wa-teal); }
.wa-empty strong { color: var(--text); }

/* discussions avec l'équipe FlexiJob (support, médiation) */
.team-ava { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--side-bg, #0b3a2c); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #16a34a; }
.team-ava.md { width: 42px; height: 42px; }
.team-ava img { width: 60%; height: 60%; border-radius: 6px; }
.wa-row.team .wa-row-top strong { color: var(--accent-text); }
.wa-sender { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; font-size: .78rem; font-weight: 700; color: hsl(var(--h) 55% 38%); }
:root[data-theme="dark"] .wa-sender { color: hsl(var(--h) 60% 68%); }
.wa-sender.team { color: #16794f; }
:root[data-theme="dark"] .wa-sender.team { color: #5fd3a6; }
.wa-sender .ic { width: 13px; height: 13px; }
.wa-msg.in.from-team { box-shadow: 0 1px .5px rgb(11 20 26 / .13), inset 3px 0 0 #16a34a; }
.wa-who-text strong.clip { overflow: hidden; text-overflow: ellipsis; }
.wa-compose.text-only #wa-mic { display: none; }
.wa-compose.text-only #wa-send { display: grid; }

/* accusés : ✓ envoyé, ✓✓ distribué, ✓✓ bleus lu */
.ticks { display: inline-flex; flex: none; color: var(--wa-meta); }
.ticks .tick { width: 17px; height: 11px; }
.ticks.read { color: var(--wa-tick); }
.ticks.read .tick { animation: tick-read 300ms var(--ease-out); }
@keyframes tick-read { from { transform: scale(.6); } }
.ticks.pending .tick { width: 12px; height: 12px; }

/* écran de discussion : plein écran sur mobile, à côté de la barre latérale sur ordinateur */
body.chat-mode { overflow: hidden; }
body.chat-mode .topbar, body.chat-mode .theme-fab { display: none; }
body.chat-mode #view { padding: 0; max-width: none; }
@media (max-width: 899px) { body.chat-mode .tabbar { display: none; } }
.wa { position: fixed; inset: 0; z-index: 25; display: flex; background: var(--wa-bg); color: var(--wa-text); }
@media (min-width: 900px) { .wa { left: var(--side-w); } }
.wa-side { display: none; }
@media (min-width: 1180px) {
  .wa-side { display: flex; flex-direction: column; width: 340px; flex: none; background: var(--surface); border-right: 1px solid var(--wa-line); overflow-y: auto; }
  .wa-side-head { padding: 18px 16px 12px; font-family: var(--font-display); font-size: 1.15rem; position: sticky; top: 0; background: var(--surface); z-index: 1; }
  .wa .wa-back { display: none; }
}
.wa-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.wa-head {
  display: flex; align-items: center; gap: 6px; padding: calc(var(--safe-t) + 8px) 8px 8px 6px; min-height: calc(60px + var(--safe-t));
  background: var(--wa-head); border-bottom: 1px solid var(--wa-line); z-index: 2;
}
.wa-back, .wa-head-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--wa-text); cursor: pointer; transition: background-color var(--t-fast); }
.wa-back:hover, .wa-head-btn:hover { background: rgb(0 0 0 / .06); }
.wa-head-btn .ic, .wa-back .ic { width: 22px; height: 22px; }
.wa-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 2px 4px; border-radius: 10px; }
.wa-who-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.wa-who-text strong { font-weight: 600; white-space: nowrap; }
.wa-who-text small { color: var(--wa-meta); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-who-text small.typing { color: var(--wa-teal); font-weight: 600; }

/* fond à motifs discrets (petits pictogrammes du métier), comme le papier peint de WhatsApp */
.wa-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px 4% 14px; background-color: var(--wa-bg); }
.wa-inner { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; }
/* papier peint à petits pictogrammes du métier, très pâle grâce à un voile de la couleur de fond */
.wa-body { background-image: linear-gradient(color-mix(in srgb, var(--wa-bg) 93%, transparent), color-mix(in srgb, var(--wa-bg) 93%, transparent)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='14' width='22' height='16' rx='3'/%3E%3Cpath d='M17 14v-3h8v3'/%3E%3Cpath d='m80 12 3 6 6 1-4.5 4 1 6-5.5-3-5.5 3 1-6L71 19l6-1z'/%3E%3Cpath d='M18 78a9 9 0 1 1 4 7l-5 2 1.5-4.5A9 9 0 0 1 18 78z'/%3E%3Ccircle cx='86' cy='82' r='8'/%3E%3Cpath d='M86 78v4l3 2'/%3E%3Cpath d='M52 48c0 5-6 9-6 9s-6-4-6-9a6 6 0 0 1 12 0z'/%3E%3Ccircle cx='46' cy='48' r='2'/%3E%3C/svg%3E"); background-size: auto, 120px 120px; }
.wa-loading { margin: 40px auto; display: flex; align-items: center; gap: 8px; color: var(--wa-meta); font-size: .9rem; }
.wa-more { align-self: center; margin: 6px 0 10px; padding: 5px 12px; border: 0; border-radius: 99px; background: var(--wa-day); color: var(--wa-meta); font-size: .8rem; cursor: pointer; box-shadow: 0 1px .5px rgb(11 20 26 / .13); }

.wa-day { display: flex; justify-content: center; margin: 10px 0 6px; position: sticky; top: 4px; z-index: 1; }
.wa-day span { padding: 5px 12px; border-radius: 8px; background: var(--wa-day); color: var(--wa-meta); font-size: .76rem; font-weight: 500; box-shadow: 0 1px .5px rgb(11 20 26 / .13); }
.wa-system { display: flex; justify-content: center; margin: 6px 0; }
.wa-system span { display: inline-flex; align-items: flex-start; gap: 6px; max-width: min(520px, 92%); padding: 6px 12px; border-radius: 8px; background: var(--wa-sys); color: var(--wa-sys-text); font-size: .78rem; line-height: 1.4; text-align: center; box-shadow: 0 1px .5px rgb(11 20 26 / .13); }
.wa-system .ic { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.wa-system.lock span { background: var(--wa-sys); }

/* bulles */
.wa-msg {
  position: relative; max-width: min(78%, 560px); padding: 6px 8px 8px 9px; border-radius: 8px;
  color: var(--wa-text); font-size: .93rem; line-height: 1.4; box-shadow: 0 1px .5px rgb(11 20 26 / .13);
  animation: msg-in 220ms var(--ease-out) both; overflow-wrap: anywhere;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.wa-msg.in { align-self: flex-start; background: var(--wa-in); }
.wa-msg.out { align-self: flex-end; background: var(--wa-out); }
.wa-msg.first { margin-top: 8px; }
.wa-msg.first.in { border-top-left-radius: 0; }
.wa-msg.first.out { border-top-right-radius: 0; }
/* queue de la bulle */
.wa-msg.first::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.wa-msg.first.in::before { left: -8px; background: var(--wa-in); clip-path: polygon(100% 0, 0 0, 100% 100%); }
.wa-msg.first.out::before { right: -8px; background: var(--wa-out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-text { white-space: normal; }
/* heure + accusés en bas à droite, posés dans le flux du texte */
.wa-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 8px 0 -4px 10px; color: var(--wa-meta); font-size: .68rem; line-height: 1; white-space: nowrap; position: relative; top: 4px; }
.wa-msg.kind-voice, .wa-msg.kind-call { min-width: 250px; }
.wa-voice .voice-player { background: transparent; padding: 2px 0; max-width: none; color: var(--wa-text); }
.wa-voice .voice-play { background: var(--wa-teal); width: 40px; height: 40px; }
.wa-voice .voice-wave i { background: color-mix(in srgb, var(--wa-meta) 55%, transparent); }
.wa-voice .voice-wave i.on { background: var(--wa-teal); }
.wa-msg.kind-voice .wa-meta, .wa-msg.kind-call .wa-meta { float: none; display: flex; justify-content: flex-end; margin: 2px 0 0; top: 0; }
.voice-pending { display: flex; align-items: center; gap: 10px; color: var(--wa-meta); font-size: .85rem; padding: 4px 0; }
.voice-pending-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--wa-teal) 25%, transparent); color: var(--wa-teal); animation: rec-pulse 1.2s ease-in-out infinite; }
.wa-call { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.wa-call-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--wa-teal) 16%, transparent); color: var(--wa-teal); }
.wa-call.missed .wa-call-ic { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.wa-call-ic .ic { width: 18px; height: 18px; }
.wa-call strong { font-weight: 500; font-size: .9rem; }
.wa-callback { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--wa-teal); cursor: pointer; }
.wa-callback:hover { background: color-mix(in srgb, var(--wa-teal) 12%, transparent); }
.wa-callback .ic { width: 18px; height: 18px; }

/* zone de saisie : champ arrondi, le micro devient « envoyer » dès qu'on écrit */
.wa-compose { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px calc(8px + var(--safe-b)); background: var(--wa-head); }
.wa-field { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--wa-input); border-radius: 24px; padding: 4px 14px; box-shadow: 0 1px .5px rgb(11 20 26 / .08); }
.wa-field:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--wa-teal) 45%, transparent); }
.wa-field textarea:focus-visible { outline: none; }
.wa-field textarea {
  width: 100%; min-height: 38px !important; max-height: 140px; padding: 9px 0 !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; resize: none; color: var(--wa-text); font-size: 15px; line-height: 1.35;
}
.wa-action { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: var(--wa-teal); color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.wa-action:hover { background: #008f72; }
.wa-action:active { transform: scale(.92); }
.wa-action .ic { width: 21px; height: 21px; }
#wa-send { display: none; }
.wa-compose.has-text #wa-send { display: grid; animation: pop 220ms var(--ease-out); }
.wa-compose.has-text #wa-mic { display: none; }
.wa-compose.recording .wa-field, .wa-compose.recording > .wa-action { visibility: hidden; }
.wa-recbar { position: absolute; inset: 6px 8px calc(8px + var(--safe-b)); display: flex; align-items: center; gap: 12px; padding-left: 6px; background: var(--wa-head); animation: rise 180ms var(--ease-out) both; }
.wa-rec-cancel { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--wa-meta); cursor: pointer; }
.wa-rec-cancel:hover { color: var(--danger); background: var(--danger-soft); }
.wa-rec-time { color: var(--wa-text); font-size: .95rem; }
.wa-rec-hint { flex: 1; color: var(--wa-meta); font-size: .85rem; }
.wa-recbar .wa-action { visibility: visible; margin-left: auto; }

/* =====================================================================
   Écran d'appel audio
   ===================================================================== */
.call-screen {
  position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 40px);
  background: radial-gradient(120% 80% at 50% 0%, #1f5c4b 0%, #0b3a2c 45%, #071f18 100%); color: #fff;
  opacity: 0; transform: scale(1.02); transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out);
}
.call-screen.open { opacity: 1; transform: none; }
.call-screen.ending { opacity: .0; transition-delay: .8s; }
.call-top { font-size: .8rem; color: #a9cdbf; }
.call-lock { display: inline-flex; align-items: center; gap: 6px; }
.call-lock .ic { width: 13px; height: 13px; }
.call-who { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.call-ava { position: relative; display: grid; place-items: center; margin-bottom: 14px; }
.call-ava .avatar { width: 112px; height: 112px; font-size: 2.2rem; position: relative; z-index: 1; }
.call-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(255 255 255 / .35); animation: call-ring 2s var(--ease-out) infinite; }
.call-ring.r2 { animation-delay: 1s; }
.call-screen.active .call-ring { animation: none; opacity: 0; }
@keyframes call-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.call-who strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.call-status { color: #a9cdbf; font-size: .95rem; font-variant-numeric: tabular-nums; }
.call-screen.active .call-status { color: #fff; font-family: var(--font-mono); }
.call-actions { display: flex; gap: 48px; }
.call-btn { display: grid; place-items: center; width: 66px; height: 66px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgb(255 255 255 / .14); transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.call-btn:active { transform: scale(.9); }
.call-btn .ic { width: 28px; height: 28px; }
.call-btn.accept { background: #25d366; animation: accept-bounce 1.4s ease-in-out infinite; }
.call-btn.decline { background: #ea0038; }
.call-btn.mute.on { background: #fff; color: #0b3a2c; }
@keyframes accept-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* =====================================================================
   Paiement en séquestre
   ===================================================================== */
.pay-box { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); font-size: .88rem; }
.pay-box strong { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-box .small { color: var(--text-2); font-family: var(--font-body); }
.pay-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; }
.pay-ic .ic { width: 19px; height: 19px; }
.pay-due { background: var(--warn-soft); }
.pay-due .pay-ic { background: var(--surface); color: var(--warn); }
.pay-wait { background: var(--surface-2); }
.pay-wait .pay-ic { background: var(--surface); color: var(--muted); }
.pay-held { background: var(--accent-soft); }
.pay-held .pay-ic { background: var(--accent); color: var(--on-accent); }
.pay-done { background: var(--ok-soft); }
.pay-done .pay-ic { background: #16a34a; color: #fff; }
.pay-total { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--accent-soft); }
.pay-total strong { font-size: 1.9rem; color: var(--accent-text); letter-spacing: -.02em; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); font: .9rem var(--font-mono); color: var(--muted); }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
button.kyc-banner { width: 100%; border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); text-align: left; cursor: pointer; font: inherit; }
.kyc-row.plain { width: 100%; border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }

/* ---------- pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pager-info { font-size: .84rem; color: var(--muted); }
.pager-info b { color: var(--text); font-weight: 600; }
.pager-pages { display: flex; align-items: center; gap: 4px; }
.pager-btn {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2);
  font: 600 .86rem var(--font-mono); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-std), background-color var(--t-fast) var(--ease-std), color var(--t-fast), transform var(--t-fast);
}
.pager-btn .ic { width: 16px; height: 16px; }
.pager-btn:hover:not([aria-disabled]) { border-color: var(--border-strong); color: var(--text); }
.pager-btn:active:not([aria-disabled]) { transform: scale(.94); }
.pager-btn[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pager-btn[aria-disabled] { opacity: .4; cursor: default; }
.pager-gap { padding: 0 2px; color: var(--muted); }
.wa-pager { padding: 6px 14px 12px; border-top: 1px solid var(--border); }
@media (max-width: 420px) { .pager { justify-content: center; } .pager-info { width: 100%; text-align: center; } }

/* ---------- filtres des candidatures (recruteur) ---------- */
.filter-tabs { display: flex; gap: 6px; padding: 4px; margin-bottom: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.filter-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 8px; white-space: nowrap;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: .86rem; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), box-shadow var(--t-fast);
}
.filter-tab .ic { width: 15px; height: 15px; }
.filter-tab:hover { color: var(--text); }
.filter-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.filter-tab.tab-pending[aria-selected="true"] .ic { color: var(--warn); }
.filter-tab.tab-accepted[aria-selected="true"] .ic { color: #16a34a; }
.filter-tab.tab-refused[aria-selected="true"] .ic { color: var(--danger); }
.filter-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font: 600 .72rem/20px var(--font-mono); text-align: center; }
.filter-tab.tab-pending .filter-count:not(:empty) { background: var(--warn-soft); color: var(--warn); }
.show-xs { display: none; }
@media (max-width: 520px) { .filter-tab .hide-xs { display: none; } .filter-tab .show-xs { display: inline; } }

/* =====================================================================
   Portefeuille
   ===================================================================== */
.wallet-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 24px 22px 20px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #1f6b55 0%, var(--side-bg) 55%, #072a1f 100%);
  box-shadow: var(--shadow-lg);
}
.wallet-card::before { /* trame claire, comme la bande finale de la landing */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(120deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(120deg, #000, transparent 70%);
}
.wallet-ticks { position: absolute; right: -10px; top: -50px; width: 45%; display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; opacity: .1; z-index: -1; }
.wallet-ticks i { height: 110px; border-radius: 6px; background: #fff; }
.wallet-label { color: var(--side-muted); }
.wallet-balance { font: 800 clamp(2.4rem, 9vw, 3.2rem)/1.05 var(--font-display); letter-spacing: -.04em; }
.wallet-currency { font: 500 .9rem var(--font-mono); color: var(--side-muted); margin-top: -2px; }
.wallet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; width: 100%; }
.wallet-actions .btn { flex: 1 1 140px; }
.wallet-btn-primary { background: #fff; color: #0b3a2c; }
.wallet-btn-primary:hover:not(:disabled) { background: #e5f2ec; }
.wallet-btn-ghost { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wallet-btn-ghost:hover:not(:disabled) { border-color: #fff; }
.wallet-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.wallet-stats .stat-num { font-size: 1.25rem; }
.wallet-stats .stat-label { line-height: 1.45; }
.stat-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.wallet-list { padding: 4px 16px; gap: 0; }
.wallet-entry { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.wallet-entry + .wallet-entry { border-top: 1px solid var(--border); }
.wallet-entry strong { font-weight: 600; font-size: .92rem; }
.wallet-entry-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.wallet-entry-ic .ic { width: 18px; height: 18px; }
.wallet-entry.in .wallet-entry-ic { background: var(--ok-soft); color: var(--ok); }
.wallet-entry-amount { font-weight: 600; white-space: nowrap; }
.wallet-entry.in .wallet-entry-amount { color: #16a34a; }
.wallet-entry.failed .wallet-entry-amount { color: var(--muted); text-decoration: line-through; }
.wallet-chip {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), border-color var(--t-fast);
}
.wallet-chip:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.wallet-chip .pay-ic { background: var(--accent); color: var(--on-accent); }
.wallet-chip strong { font-size: 1.1rem; }
.wallet-chip > .ic:last-child { width: 18px; height: 18px; color: var(--muted); }
.pay-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; cursor: pointer; font: inherit; color: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.pay-choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.pay-choice:disabled { opacity: .55; cursor: not-allowed; }
.pay-choice .pay-ic { background: var(--accent-soft); color: var(--accent-text); }
.pay-choice .small { color: var(--muted); }
.pay-choice > .ic:last-child { width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 420px) { .wallet-card { padding: 20px 18px 18px; } }

/* ---------- mouvement réduit : fondus courts, aucun déplacement ---------- */
@media (prefers-reduced-motion: reduce) {
  .view-enter > *, .view-enter .list-cards > *, .demo-box, .day-row.on .day-fields, .tag, .badge { animation: fade 160ms ease-out both !important; animation-delay: 0ms !important; }
  .view-enter .bar > span, .view-enter .progress > span { animation: none; }
  .card-link:hover, .notice:hover, .card-link:active, .btn:active:not(:disabled), .icon-btn:active, .chip-btn:active { transform: none; }
  .sheet, .sheet-backdrop.closing .sheet { transform: none !important; transition: opacity 160ms ease-out !important; }
  .sheet-backdrop:not(.open) .sheet { opacity: 0; }
  .sheet-backdrop.open .sheet { opacity: 1; }
  .toast, .toast.hide { transform: none; }
  .star-input label.pop .star { animation: none; }
  .sk::after { animation: none; }
  .list-item:hover > .ic:last-child { transform: none; }
  .countdown .ic, .deadline .ic, .countdown.urgent, .badge::after, [data-review].btn-primary::before,
  .card.highlight .avatar, .section-title .ic, .view-enter .page-head .w > span, .stat-alert .stat-ic::after,
  .user-pop, .user-pop.closing, .tab.active::after, .id-badge.is-ok::before, .rec-dot, .wa-msg, .call-ring, .call-btn.accept, .voice-pending-ic { animation: none !important; }
  .stat:hover, .user-btn:hover .avatar, .user-btn:active { transform: none; }
}

/* =====================================================================
   Guidage : « À faire », complétion du profil, déroulé des missions
   ===================================================================== */
.todo { display: flex; flex-direction: column; gap: 10px; }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  --tone: var(--accent-text); --tone-soft: var(--accent-soft);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--tone);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  animation: rise var(--t-enter) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.todo-item.warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.todo-item.danger { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.todo-item strong { font-size: .92rem; line-height: 1.3; }
.todo-item .small { color: var(--muted); margin-top: 2px; line-height: 1.35; }
.todo-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tone-soft); color: var(--tone); }
.todo-ic .ic { width: 18px; height: 18px; }
.todo-cta { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: .84rem; font-weight: 600; color: var(--tone); }
.todo-cta .ic { width: 16px; height: 16px; }
@media (hover: hover) { .todo-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); } }
@media (max-width: 420px) { .todo-cta { font-size: 0; } .todo-cta .ic { width: 20px; height: 20px; } }
.todo-clear { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ok); font-weight: 500; }
.todo-clear .ic { width: 18px; height: 18px; }

.card.completion { display: flex; flex-direction: row; align-items: center; gap: 14px; text-align: left; }
.completion .ring { position: relative; flex: none; width: 56px; height: 56px; display: grid; place-items: center; }
.completion .ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.completion .ring circle { fill: none; stroke-width: 6; }
.completion .ring-bg { stroke: var(--surface-2); }
.completion .ring-fg { stroke: var(--warn); stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--c); animation: ring-fill 900ms var(--ease-out) 150ms forwards; }
.completion.full .ring-fg { stroke: var(--ok); }
.completion .ring b { font-size: .78rem; font-weight: 700; }
.completion .small { margin-top: 2px; line-height: 1.4; }
@keyframes ring-fill { to { stroke-dashoffset: var(--v); } }

.steps { list-style: none; margin: 2px 0 0; padding: 0; display: flex; counter-reset: s; }
.steps li { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; font-size: .7rem; color: var(--muted); line-height: 1.2; }
.steps li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.current::before { background: var(--accent); }
.steps i { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 600 .7rem var(--font-mono); font-style: normal; background: var(--surface); border: 2px solid var(--border-strong); color: var(--muted); }
.steps i .ic { width: 13px; height: 13px; stroke-width: 3; }
.steps li.done i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.steps li.done { color: var(--text-2); }
.steps li.current i { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps li.current { color: var(--text); font-weight: 600; }
.steps span { overflow-wrap: anywhere; }
@media (max-width: 420px) { .steps li:not(.current) span { display: none; } .steps li.current span { white-space: nowrap; } }

/* propositions : décision lisible, boutons de même largeur */
.card-foot.links { gap: 6px; }
.card-foot.links .link-quiet { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 500; }
.card-foot.links .link-quiet .ic { width: 16px; height: 16px; }
.decide { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.decide .btn { min-height: 44px; }

/* recherche de candidats : jours en pastilles + tarif */
.cand-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.day-pick { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.day-pick > .small { margin-right: 4px; }
.day-btn { min-width: 40px; height: 34px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 500 .8rem var(--font-body); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.day-btn:hover { border-color: var(--border-strong); }
.day-btn:active { transform: scale(.94); }
.day-btn.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.rate-pick { display: flex; align-items: center; gap: 8px; }
.rate-pick .input-suffix input { width: 190px; }
@media (max-width: 520px) {
  .day-pick { width: 100%; display: grid; grid-template-columns: repeat(7, 1fr); }
  .day-pick > .small { grid-column: 1 / -1; }
  .day-btn { min-width: 0; }
  .rate-pick { width: 100%; }
  .rate-pick .input-suffix { flex: 1; }
  .rate-pick .input-suffix input { width: 100%; }
}

/* annonce : estimation du coût */
.estimate { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.estimate strong { font-size: 1.25rem; color: var(--accent-text); letter-spacing: -.02em; }
.estimate .small .ic { width: 14px; height: 14px; vertical-align: -2px; }

/* fiche d'offre : récapitulatif du coût */
.detail-layout { display: flex; flex-direction: column; gap: 16px; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1199px) { .detail-side { display: contents; } } /* la barre d'action reste collée en bas sur mobile */
.sum-card { gap: 4px; }
.sum-total { font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: var(--accent-text); line-height: 1.15; }
.sum-safe { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ok); font-weight: 500; }
.sum-safe .ic { width: 16px; height: 16px; flex: none; }

/* cartes sur petit écran : le prix ne doit plus écraser le titre */
@media (max-width: 480px) {
  .job-card .row-between { flex-wrap: wrap; row-gap: 2px; }
  .job-card .row-between h3 { flex: 1 1 60%; }
  .card-head { flex-wrap: wrap; }
  .card-head > .grow { flex: 1 1 0; min-width: 0; }
  .card-head > .price { order: 3; width: 100%; padding-left: 60px; margin-top: -4px; }
}

/* =====================================================================
   Ordinateur : on profite de la largeur
   ===================================================================== */
@media (min-width: 1200px) {
  body:not(.no-nav) #view:has(.cards-2, .detail-layout) {
    max-width: 1080px;
    margin-left: max(var(--side-w), calc(var(--side-w) + (100vw - var(--side-w) - 1080px) / 2));
  }
  .list-cards.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .todo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 20px; }
  .detail-side { position: sticky; top: calc(var(--top-h) + 20px); }
}
@media (prefers-reduced-motion: reduce) {
  .todo-item { animation: none; }
  .completion .ring-fg { animation: none; stroke-dashoffset: var(--v); }
}

/* =====================================================================
   Visuel v2 : en-tête « hero », cartes teintées par domaine, finitions
   ===================================================================== */
:root { --radius: 16px; }
body {
  background:
    radial-gradient(900px 420px at 88% -140px, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%) no-repeat,
    var(--bg);
}

/* ---------- hero des écrans d'accueil ---------- */
.hero {
  --hero-muted: #b3d8c8; --hero-accent: #7ee2b8;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px;
  padding: 26px 22px 22px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(440px 280px at 100% 0%, rgb(126 226 184 / .26), transparent 70%),
    radial-gradient(380px 260px at 0% 115%, rgb(20 154 109 / .5), transparent 70%),
    linear-gradient(150deg, #0e4c39, #0b3a2c 55%, #072519);
  box-shadow: 0 22px 34px -26px rgb(7 37 25 / .7), inset 0 1px 0 rgb(255 255 255 / .08);
  animation: rise var(--t-enter) var(--ease-out) both;
}
.hero::before { /* trame façon landing */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 75% 90% at 90% 0%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 90% 0%, #000 5%, transparent 72%);
}
.hero::after { /* halo qui dérive lentement */
  content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; right: -60px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgb(126 226 184 / .35), transparent 65%); filter: blur(10px);
  animation: hero-drift 14s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes hero-drift { to { transform: translate(-70px, 50px) scale(1.15); } }
.hero .page-grid { display: none; }
.hero .page-head { padding: 0; }
.hero .page-head h1 { color: #fff; }
.hero .page-head .accent { color: var(--hero-accent); }
.hero .page-head .lead { color: var(--hero-muted); }
.hero .kicker { background: rgb(255 255 255 / .09); border-color: rgb(255 255 255 / .16); color: #e2f3eb; box-shadow: none; }
.hero .kicker .ic { color: var(--hero-accent); }
.hero .stat { background: rgb(255 255 255 / .07); border-color: rgb(255 255 255 / .13); box-shadow: none; color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero .stat-ic { background: rgb(126 226 184 / .16); color: var(--hero-accent); }
.hero .stat-label { color: var(--hero-muted); }
.hero .stat::after { background: var(--hero-accent); }
.hero .stat-alert .stat-ic { background: rgb(246 196 83 / .18); color: #f6c453; }
.hero .stat-alert .stat-ic::after { background: #ff8a7a; }
@media (hover: hover) { .hero .stat:hover { border-color: rgb(255 255 255 / .3); background: rgb(255 255 255 / .11); } }
:root[data-theme="dark"] .hero { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
@media (max-width: 520px) {
  .hero { margin-inline: -6px; padding: 22px 14px 14px; border-radius: 22px; gap: 18px; }
  .hero .page-head { padding: 0 4px; }
}
@media (min-width: 1200px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; gap: 28px; padding: 34px 32px 30px; }
  .hero .stats { align-self: end; }
}

/* ---------- cartes d'offre et de candidat ---------- */
.job-card, .cand-card {
  background: radial-gradient(280px 150px at 100% 0%, hsl(var(--dh) 85% 55% / .09), transparent 70%), var(--surface);
}
:root[data-theme="dark"] :is(.job-card, .cand-card) {
  background: radial-gradient(280px 150px at 100% 0%, hsl(var(--dh) 70% 50% / .1), transparent 70%), var(--surface);
}
:is(.job-card, .cand-card)::before { background: linear-gradient(90deg, hsl(var(--dh) 65% 42%), hsl(var(--dh) 80% 62%)); }
.job-head { display: flex; align-items: flex-start; gap: 12px; }
.job-head h3 { font-size: 1.05rem; line-height: 1.3; }
.dom-tile {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: hsl(var(--dh) 80% 94%); color: hsl(var(--dh) 65% 32%);
  box-shadow: inset 0 0 0 1px hsl(var(--dh) 60% 45% / .14);
  transition: transform var(--t-med) var(--ease-out);
}
.dom-tile .ic { width: 22px; height: 22px; }
.job-dom { display: block; margin-bottom: 2px; font: 500 .72rem var(--font-mono); letter-spacing: .02em; color: hsl(var(--dh) 55% 34%); }
:root[data-theme="dark"] .dom-tile { background: hsl(var(--dh) 35% 16%); color: hsl(var(--dh) 75% 72%); box-shadow: inset 0 0 0 1px hsl(var(--dh) 60% 60% / .16); }
:root[data-theme="dark"] .job-dom { color: hsl(var(--dh) 60% 70%); }
@media (hover: hover) { .job-card:hover .dom-tile { transform: rotate(-6deg) scale(1.07); } }
.cand-card .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px hsl(var(--dh) 60% 50% / .3); }

.price-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 2px; padding-top: 12px; border-top: 1px dashed var(--border-strong);
}
.price-foot .price { font-size: 1.12rem; }
.go { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--accent-text); }
.go .ic { transition: transform var(--t-med) var(--ease-out); }
@media (hover: hover) { .card-link:hover .go .ic { transform: translateX(4px); } }

/* ---------- puces, recherche, boutons ---------- */
.chip-btn { border-radius: 99px; padding: 7px 14px; }
.chip-btn.active, .day-btn.active {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 18px -10px var(--accent);
}
.chip-btn .ic { opacity: .85; }
.searchbar input {
  min-height: 50px; border-radius: 14px !important;
  background: var(--surface) !important; border-color: var(--border) !important; box-shadow: var(--shadow-sm);
}
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 84%, #fff), var(--accent));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 10px 20px -12px var(--accent);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--accent), var(--accent-hover)); }
.section-title { font-size: 1.05rem; }

/* ---------- barre d'onglets flottante (mobile) ---------- */
@media (max-width: 899px) {
  :root { --tab-h: 80px; }
  .tabbar {
    left: 10px; right: 10px; bottom: calc(var(--safe-b) + 10px); height: 64px;
    padding: 0 6px; border: 1px solid var(--border); border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    box-shadow: 0 2px 6px hsl(var(--sh) / .06), 0 18px 40px -14px hsl(var(--sh) / .3);
  }
  .tab-ic { height: 32px; border-radius: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero, .hero::after { animation: none; }
  .dom-tile, .go .ic { transition: none; }
}

/* fiche d'offre : en-tête teinté du domaine */
.detail-hero { background: radial-gradient(420px 220px at 100% 0%, hsl(var(--dh) 85% 55% / .12), transparent 70%), var(--surface); }
:root[data-theme="dark"] .detail-hero { background: radial-gradient(420px 220px at 100% 0%, hsl(var(--dh) 70% 50% / .12), transparent 70%), var(--surface); }
.dom-tile.lg { width: 56px; height: 56px; border-radius: 16px; }
.dom-tile.lg .ic { width: 26px; height: 26px; }
.detail-hero .job-head { align-items: center; }
.detail-hero .price-big .amount { color: var(--accent-text); }
.job-card.is-off { opacity: .78; }
.job-card.is-off .dom-tile { filter: grayscale(.7); }
@media (max-width: 480px) { .app-foot > .grow { flex-basis: 100%; } .app-foot { justify-content: flex-end; } }
