/* Ensemble — thème bleu nuit, cyan et violet, cartes flottantes et boutons en relief. */
:root {
  --night-0: #050a1f;
  --night-1: #0a1233;
  --night-2: #111c47;
  --night-3: #1a2760;
  --line: rgba(148, 178, 255, 0.18);
  --line-strong: rgba(148, 178, 255, 0.32);
  --text: #eef3ff;
  --text-2: #b8c4e6;
  --text-3: #8592bb;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --violet: #8b5cf6;
  --violet-deep: #5b21b6;
  --pink: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --glow-violet: 0 0 24px rgba(139, 92, 246, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --speed: 160ms;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--night-0);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(34, 211, 238, 0.16), transparent 60%),
    linear-gradient(180deg, var(--night-1), var(--night-0) 70%);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }
.ico { align-items: center; justify-content: center; flex: none; }
.ico svg { width: 20px; height: 20px; }
.list-item > .ico svg { width: 22px; height: 22px; color: var(--cyan); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mise en page ---------- */
.shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; padding: 0 16px 110px; max-width: 760px; margin: 0 auto; width: 100%; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 0 10px; background: linear-gradient(180deg, rgba(5, 10, 31, 0.85) 60%, transparent); backdrop-filter: blur(6px);
}
.topbar .spacer { flex: 1; }
.topbar { flex-wrap: nowrap; }
.home-btn { white-space: nowrap; }
.page-title { font-size: 1.9rem; font-weight: 800; margin: 8px 0 2px; letter-spacing: -0.02em; }
.page-sub { color: var(--text-2); margin: 0 0 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); background: none; border: 0; padding: 6px 0; cursor: pointer; font-size: 0.95rem; }

/* Barre d'onglets (téléphone) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(8, 14, 40, 0.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; text-decoration: none;
  color: var(--text-3); font-size: 0.72rem; font-weight: 600; border-radius: 12px; position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--cyan); text-shadow: var(--glow-cyan); }
.tab.active::after { content: ""; position: absolute; bottom: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--cyan); box-shadow: var(--glow-cyan); }
.tab .dot { position: absolute; top: 2px; right: calc(50% - 18px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--violet); color: #fff; font-size: 0.65rem; display: grid; place-items: center; padding: 0 4px; }

/* Rail latéral (ordinateur) */
.tabbar .rail-logo { display: none; }
@media (min-width: 960px) {
  .tabbar { position: sticky; top: 0; height: 100vh; width: 220px; grid-template-columns: 1fr; grid-auto-rows: min-content; gap: 6px; border-top: 0; border-right: 1px solid var(--line); padding: 24px 12px; align-content: start; }
  .tabbar .rail-logo { display: inline-flex; margin-bottom: 18px; justify-self: start; }
  .tab { flex-direction: row; gap: 12px; font-size: 1rem; padding: 12px 14px; }
  .tab.active { background: rgba(34, 211, 238, 0.08); }
  .tab.active::after { left: 0; top: 10px; bottom: 10px; width: 3px; height: auto; }
  .tab .dot { position: static; }
  .main { padding-bottom: 40px; }
  .topbar .logo-btn { display: none; }
}

/* ---------- Logo ---------- */
.logo-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(180deg, #1c2a6b, #0e1745); border: 1px solid rgba(139, 92, 246, 0.6);
  box-shadow: 0 4px 0 #070c26, 0 0 18px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; white-space: nowrap;
}
.logo-btn svg { width: 36px; height: 36px; flex: none; }
.logo-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 28px 0 18px; text-align: center; }
.logo-hero .logo-tile {
  width: 132px; height: 132px; border-radius: 34px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, #1b2a7a, #0a1036 75%);
  border: 2px solid rgba(139, 92, 246, 0.7);
  box-shadow: 0 10px 0 #060a24, 0 0 40px rgba(99, 102, 241, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.15);
}
.logo-hero .logo-tile svg { width: 96px; height: 96px; }
.logo-official { width: 170px; height: auto; border-radius: 38px; filter: drop-shadow(0 12px 28px rgba(99, 102, 241, 0.45)); }
.logo-hero .wordmark { margin: 4px 0 0; font-size: 2.2rem; font-weight: 900; letter-spacing: 0.01em; text-shadow: 0 2px 0 #050a1f, var(--glow-violet); }

/* ---------- Cartes ---------- */
.card {
  background: linear-gradient(180deg, rgba(30, 44, 105, 0.72), rgba(15, 24, 64, 0.78));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.card.glow { border-color: rgba(34, 211, 238, 0.4); box-shadow: var(--shadow), var(--glow-cyan); }
.card h2, .card h3 { margin: 0 0 8px; }
.card h2 { font-size: 1.2rem; }
.card h3 { font-size: 1.05rem; }
.card .muted, .muted { color: var(--text-2); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.75rem; color: var(--text-3); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid-auto { grid-template-columns: repeat(3, 1fr); } }
.divider { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Boutons 3D ---------- */
.btn {
  --b1: #2a3a85; --b2: #1a2660; --edge: #0b1238; --glow: rgba(99, 102, 241, 0.25);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, var(--b1), var(--b2));
  box-shadow: 0 5px 0 var(--edge), 0 10px 22px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 700; cursor: pointer; text-decoration: none; color: #fff; user-select: none;
  transition: transform var(--speed), box-shadow var(--speed), filter var(--speed);
  position: relative; top: 0;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge), 0 4px 10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { --b1: #2fe0f5; --b2: #7c5cf6; --edge: #3b2a8f; --glow: rgba(34, 211, 238, 0.35); background: linear-gradient(100deg, #22d3ee, #6d7cf7 55%, #8b5cf6); color: #061031; text-shadow: 0 1px 0 rgba(255,255,255,0.35); }
.btn.primary { color: #fff; text-shadow: 0 1px 2px rgba(5, 10, 40, 0.5); }
.btn.cyan { --b1: #5ee7f8; --b2: #0ea5c4; --edge: #075e73; --glow: rgba(34, 211, 238, 0.35); color: #04202a; text-shadow: none; }
.btn.violet { --b1: #a78bfa; --b2: #6d28d9; --edge: #3b1580; --glow: rgba(139, 92, 246, 0.35); }
.btn.ok { --b1: #6ee7b7; --b2: #059669; --edge: #064e3b; --glow: rgba(52, 211, 153, 0.3); color: #022c1e; }
.btn.danger { --b1: #fda4af; --b2: #e11d48; --edge: #7f1d1d; --glow: rgba(251, 113, 133, 0.3); }
.btn.ghost { --b1: rgba(40, 56, 120, 0.6); --b2: rgba(20, 30, 74, 0.6); --edge: rgba(5, 10, 35, 0.9); --glow: transparent; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 0.88rem; border-radius: 11px; box-shadow: 0 3px 0 var(--edge), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn.small:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); transform: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-row > .btn { flex: 1 1 auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; cursor: pointer; color: var(--text);
  background: linear-gradient(180deg, #24337a, #141f58); border: 1px solid var(--line-strong);
  box-shadow: 0 4px 0 #070c26, inset 0 1px 0 rgba(255,255,255,0.18); position: relative; text-decoration: none;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #070c26; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--violet); font-size: 0.7rem; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }

/* Tuiles (catégories, services) */
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 92px; padding: 12px 8px; border-radius: 16px; cursor: pointer; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(38, 54, 125, 0.8), rgba(18, 28, 72, 0.9));
  border: 1px solid var(--line-strong); box-shadow: 0 5px 0 #070c26, inset 0 1px 0 rgba(255,255,255,0.12);
  font-weight: 600; font-size: 0.9rem; position: relative; transition: transform var(--speed);
}
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 #070c26; }
.tile svg { width: 30px; height: 30px; color: var(--cyan); filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.45)); }
.tile.selected { border-color: var(--cyan); box-shadow: 0 5px 0 #075e73, var(--glow-cyan), inset 0 1px 0 rgba(255,255,255,0.15); background: linear-gradient(180deg, rgba(34, 211, 238, 0.22), rgba(18, 28, 72, 0.9)); }
.tile.big { min-height: 132px; font-size: 1rem; }
.tile.big svg { width: 44px; height: 44px; }
.tile .badge { position: absolute; top: 8px; right: 8px; }
.tile.violet svg { color: #b79cff; filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.55)); }
.tile.pink svg { color: var(--pink); filter: drop-shadow(0 0 8px rgba(244, 114, 182, 0.5)); }

/* ---------- Formulaires ---------- */
label.field { display: block; margin: 0 0 12px; }
label.field > span { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-2); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(6, 12, 40, 0.65); color: var(--text); outline: none; box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: inset 0 2px 6px rgba(0,0,0,0.35), 0 0 0 3px rgba(34, 211, 238, 0.2); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--cyan); flex: none; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(6, 12, 40, 0.4); }
.switch input { appearance: none; width: 52px; height: 30px; border-radius: 15px; background: #334155; position: relative; flex: none; cursor: pointer; transition: background var(--speed); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left var(--speed); box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.switch input:checked { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.switch input:checked::after { left: 25px; }
.switch input:disabled { opacity: 0.4; cursor: not-allowed; }
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(6, 12, 40, 0.55); border: 1px solid var(--line); overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.seg a, .seg button { flex: 1 0 auto; text-align: center; padding: 9px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.9rem; border: 0; background: none; cursor: pointer; white-space: nowrap; }
.seg .on { background: linear-gradient(180deg, #2c3d8f, #1b2764); color: #fff; box-shadow: 0 3px 0 #070c26, inset 0 1px 0 rgba(255,255,255,0.18); }
.error-msg { color: var(--danger); font-size: 0.9rem; margin: 6px 0; min-height: 1em; }
.searchbar { position: relative; margin-bottom: 14px; }
.searchbar svg { position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; color: var(--text-3); }
.searchbar input { padding-left: 42px; }

/* ---------- Bandeaux ---------- */
.banner { border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; border: 1px solid; }
.banner svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.banner.sim { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.45); color: #fde68a; }
.banner.info { background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.35); color: #a5f3fc; }
.banner.danger { background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.45); color: #fecdd3; }
.banner.ok { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.4); color: #a7f3d0; }
.banner.warn { background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.45); color: #ddd6fe; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: rgba(139, 92, 246, 0.25); color: #ddd6fe; border: 1px solid rgba(139, 92, 246, 0.5); white-space: nowrap; }
.badge.cyan { background: rgba(34, 211, 238, 0.15); color: #a5f3fc; border-color: rgba(34, 211, 238, 0.45); }
.badge.ok { background: rgba(52, 211, 153, 0.15); color: #a7f3d0; border-color: rgba(52, 211, 153, 0.45); }
.badge.warn { background: rgba(251, 191, 36, 0.15); color: #fde68a; border-color: rgba(251, 191, 36, 0.45); }
.badge.danger { background: rgba(251, 113, 133, 0.15); color: #fecdd3; border-color: rgba(251, 113, 133, 0.45); }
.badge.gray { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.4); }

/* ---------- Personnes ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #071033; overflow: hidden; border: 2px solid rgba(255,255,255,0.25); box-shadow: 0 3px 10px rgba(0,0,0,0.4); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.8rem; }
.avatar.sm { width: 32px; height: 32px; font-size: 0.8rem; }
.person { display: flex; align-items: center; gap: 12px; }
.person .name { font-weight: 700; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars svg { width: 16px; height: 16px; }
.stars .on { color: #fbbf24; }
.stars .off { color: #475569; }
.rating { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.review-btn { border: 1px solid var(--line-strong); background: rgba(6, 12, 40, 0.5); color: var(--text-2); border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; cursor: pointer; font-weight: 600; }
.star-input { display: flex; gap: 6px; }
.star-input button { background: none; border: 0; cursor: pointer; padding: 2px; }
.star-input svg { width: 36px; height: 36px; }

/* ---------- Messages ---------- */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; color: var(--text); background: rgba(20, 30, 80, 0.55); border: 1px solid var(--line); margin-bottom: 10px; box-shadow: 0 4px 0 rgba(4, 8, 30, 0.8); cursor: pointer; }
.list-item:active { transform: translateY(2px); }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 90px; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 18px; background: rgba(40, 54, 120, 0.85); border: 1px solid var(--line); align-self: flex-start; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: linear-gradient(120deg, #1d6fe0, #6d4de6); border-color: transparent; }
.bubble.sys { align-self: center; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.4); color: #fde68a; font-size: 0.85rem; max-width: 95%; text-align: center; }
.bubble .time { font-size: 0.7rem; opacity: 0.7; margin-top: 4px; text-align: right; }
.bubble audio { width: 220px; max-width: 100%; height: 36px; }
.composer { position: fixed; left: 0; right: 0; bottom: 64px; padding: 10px 16px; background: rgba(8, 14, 40, 0.95); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; z-index: 25; }
.composer input { flex: 1; }
@media (min-width: 960px) { .composer { left: 220px; bottom: 0; } }
.card-msg { border-radius: 16px; padding: 16px; text-align: center; background: linear-gradient(135deg, #f9a8d4, #a78bfa); color: #1e1040; font-weight: 600; }
.call-screen { text-align: center; padding: 30px 10px; }
.call-screen .avatar.lg { width: 140px; height: 140px; margin: 20px auto; font-size: 3rem; box-shadow: 0 0 0 10px rgba(34, 211, 238, 0.15), 0 0 0 22px rgba(139, 92, 246, 0.1), var(--glow-cyan); }
.call-screen video { width: 100%; max-width: 420px; margin: 12px auto; border-radius: 18px; background: #000; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- Divers ---------- */
.empty { text-align: center; padding: 30px 16px; color: var(--text-2); }
.empty svg { width: 54px; height: 54px; color: var(--text-3); margin: 0 auto 10px; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.95rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }
.amount { font-size: 2.4rem; font-weight: 900; text-align: center; margin: 8px 0; }
.total-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.total-line.strong { font-weight: 800; border-bottom: 0; font-size: 1.1rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin: 8px 0; }
.photos img, .photos video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.media-full img, .media-full video { width: 100%; border-radius: 14px; margin-top: 10px; max-height: 420px; object-fit: cover; }
.qr-box { background: #fff; padding: 16px; border-radius: 18px; width: max-content; margin: 10px auto; box-shadow: var(--glow-cyan); }
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 0 6px 18px; border-left: 2px solid var(--line-strong); position: relative; font-size: 0.88rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }
.section-title { font-size: 1.1rem; font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-weight: 700; font-size: 0.9rem; }
.cat-chip svg { width: 20px; height: 20px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 0.88rem; margin: 6px 0; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 16px; height: 16px; }

/* Fenêtres de confirmation */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(2, 5, 20, 0.7); backdrop-filter: blur(4px); display: grid; place-items: end center; padding: 16px; animation: fade var(--speed); }
@media (min-width: 640px) { .overlay { place-items: center; } }
.dialog { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; background: linear-gradient(180deg, #1b2867, #0e1745); border: 1px solid var(--line-strong); border-radius: 22px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.6), var(--glow-violet); animation: rise 220ms ease-out; }
.dialog h2 { margin: 0 0 10px; font-size: 1.25rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.toast-zone { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast { padding: 12px 16px; border-radius: 14px; background: #13205a; border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: rise 200ms ease-out; font-weight: 600; }
.toast.ok { border-color: rgba(52, 211, 153, 0.6); }
.toast.err { border-color: rgba(251, 113, 133, 0.7); }
.toast.sim { border-color: rgba(251, 191, 36, 0.6); }
.loading { text-align: center; padding: 40px; color: var(--text-3); }
.steps { display: flex; gap: 6px; margin: 6px 0 18px; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: rgba(148, 178, 255, 0.18); }
.steps i.on { background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: var(--glow-cyan); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 0 16px 60px; }
.demo-accounts button { text-align: left; }
.fake-doc { border: 2px dashed rgba(251, 191, 36, 0.6); border-radius: 16px; padding: 18px; text-align: center; color: #fde68a; background: rgba(251, 191, 36, 0.06); }
.fake-doc svg { width: 48px; height: 48px; margin: 0 auto 8px; display: block; }

/* Réduction des animations : préférence système ou réglage dans Moi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---------- Rubriques « Je cherche » ---------- */
.figure { display: inline-flex; flex: none; filter: drop-shadow(0 0 6px rgba(124, 243, 255, 0.35)); }
.figure svg { width: 100%; height: 100%; }
.fig-tile { width: 68px; height: 68px; }
.fig-hero { width: 72px; height: 72px; padding: 6px; border-radius: 20px; background: linear-gradient(180deg, rgba(38, 54, 125, 0.8), rgba(18, 28, 72, 0.9)); border: 1px solid var(--line-strong); }
.fig-row { width: 40px; height: 40px; }
.fig-sm { width: 40px; height: 40px; }
.fig-chip { width: 22px; height: 22px; margin-right: 4px; }
.cat-tile { min-height: 118px; gap: 4px; }
.cat-tile .tiny { font-weight: 500; }
.je-cherche h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.je-cherche input[type=search] { flex: 1; min-width: 0; font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(20, 30, 80, 0.6); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.rubrique-row { text-decoration: none; color: var(--text); margin-bottom: 8px; padding: 10px 14px; }
.list { display: flex; flex-direction: column; }
.how { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 14px; }
.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-step p { margin: 4px 0 0; }
.how-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #050a1f; background: linear-gradient(135deg, var(--cyan), var(--violet)); }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan); text-decoration: underline; cursor: pointer; font: inherit; }
.post .name { color: var(--text); text-decoration: none; font-weight: 700; }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.small svg { width: 17px; height: 17px; }
.visitor-bar { display: flex; align-items: center; gap: 8px; }
.visitor .topbar .logo-btn { display: inline-flex; }
@media (max-width: 380px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
.visitor .logo-btn img { flex: none; }
.visitor-bar .btn { white-space: nowrap; }
@media (max-width: 420px) { .visitor .topbar .logo-btn span { display: none; } }
.avatar.xs { width: 22px; height: 22px; font-size: 0.7rem; }
.members-strip .chip { gap: 6px; }
.event .event-date { font-size: 1.02rem; }
.event-inside { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.event-inside input { min-height: 40px; }

/* Fenêtre « particulier ou professionnel » : voile léger, on devine les rubriques derrière */
.profile-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); background: rgba(4, 8, 30, 0.42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade-in 0.25s ease; }
.profile-card { width: 100%; max-width: 420px; display: grid; gap: 12px; padding: 22px 18px 16px; border-radius: 22px; background: rgba(16, 24, 72, 0.82); border: 1px solid rgba(139, 92, 246, 0.45); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(34, 211, 238, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12); text-align: center; }
.profile-card h2 { margin: 0; }
.profile-card p { margin: 0; }
.profile-choice { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 14px; border-radius: 16px; cursor: pointer; color: var(--text); font: inherit; background: linear-gradient(180deg, #24357f, #18225c); border: 1px solid rgba(34, 211, 238, 0.35); box-shadow: 0 4px 0 #070c26, inset 0 1px 0 rgba(255, 255, 255, 0.16); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.profile-choice:hover, .profile-choice:focus-visible { border-color: var(--cyan); }
.profile-choice:active { transform: translateY(3px); box-shadow: 0 1px 0 #070c26, inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.profile-choice strong { display: block; font-size: 1.02rem; margin-bottom: 2px; }
.profile-choice .small { display: block; }
.profile-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--cyan), #8b5cf6); color: #fff; }
.profile-ic svg { width: 24px; height: 24px; }
.profile-card .linkish { justify-self: center; margin-top: 2px; }
.profile-line { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 4px 0 14px; color: var(--text-2); }
.profile-line svg { width: 16px; height: 16px; }
.pro-card h2 { display: flex; align-items: center; gap: 6px; margin-top: 0; }
.badge.pro { background: rgba(251, 191, 36, 0.16); color: #fde68a; border-color: rgba(251, 191, 36, 0.5); padding: 1px 8px; font-size: 0.7rem; vertical-align: middle; }
.badge.pro svg { width: 12px; height: 12px; }
.reduce-motion .profile-gate { animation: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
/* Inscription : particulier ou professionnel */
.profile-pick { border: 0; padding: 0; margin: 6px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-pick legend { font-weight: 600; font-size: 0.9rem; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.profile-opt { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; cursor: pointer; background: rgba(6, 12, 40, 0.55); border: 1px solid var(--line); min-width: 0; }
.profile-opt input { position: absolute; opacity: 0; pointer-events: none; }
.profile-opt svg { width: 22px; height: 22px; color: var(--cyan); }
.profile-opt strong { display: block; }
.profile-opt:has(input:checked) { border-color: var(--cyan); background: linear-gradient(180deg, #24357f, #18225c); box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35); }
.profile-opt:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Cases des rubriques en relief, dans le style du bouton-logo Ensemble :
   carré arrondi bleu profond, liseré lumineux cyan → violet → rose, reflet brillant et ombre portée. */
/* Cases des rubriques façon maquette « Services » : carré de verre sombre, fin contour lumineux cyan → violet,
   grand personnage en haut, nom en bas à gauche et rond avec chevron en bas à droite. */
.tile.cat-tile {
  align-items: stretch; justify-content: space-between; gap: 4px; text-align: left; min-height: 0; aspect-ratio: 1 / 1.02;
  padding: 10px 12px 12px; border: 3.5px solid transparent; border-radius: 24px; overflow: hidden; isolation: isolate;
  /* Contour lumineux en relief, comme le grand logo Ensemble : néon cyan → bleu → violet → rose, liseré sombre, lueur */
  background:
    radial-gradient(90% 70% at 50% 35%, rgba(99, 102, 241, 0.28), transparent 70%) padding-box,
    linear-gradient(165deg, rgba(30, 42, 122, 0.92), rgba(10, 16, 54, 0.96)) padding-box,
    linear-gradient(135deg, #67f3ff 0%, #38bdf8 22%, #6366f1 50%, #a855f7 75%, #f0abfc 100%) border-box;
  box-shadow: 0 0 0 2px #0a0f3a, 0 6px 0 2px #060a24, 0 0 18px rgba(99, 102, 241, 0.6), 0 0 34px rgba(168, 85, 247, 0.25),
    inset 0 0 0 1.5px rgba(8, 12, 46, 0.9), inset 0 2px 1px rgba(255, 255, 255, 0.35), inset 0 0 16px rgba(139, 92, 246, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform var(--speed), box-shadow var(--speed);
}
.tile.cat-tile::before {
  content: ""; position: absolute; inset: 0 0 55% 0; z-index: -1; border-radius: 20px 20px 50% 50% / 20px 20px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)); pointer-events: none;
}
.tile.cat-tile:hover { box-shadow: 0 0 0 2px #0a0f3a, 0 6px 0 2px #060a24, 0 0 26px rgba(34, 211, 238, 0.6), 0 0 40px rgba(168, 85, 247, 0.35), inset 0 0 0 1.5px rgba(8, 12, 46, 0.9), inset 0 2px 1px rgba(255, 255, 255, 0.4), inset 0 0 20px rgba(139, 92, 246, 0.55); }
.tile.cat-tile:active { transform: translateY(4px); }
.tile.cat-tile .fig-tile { width: 100%; height: auto; flex: 1 1 auto; min-height: 0; align-self: center; max-width: 112px; }
.tile.cat-tile .fig-tile svg { width: 100%; height: 100%; }
.cat-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.cat-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.cat-name.fitting { overflow: hidden; }
.cat-name { font-weight: 700; font-size: 0.95rem; line-height: 1.2; color: #fff; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.tile.cat-tile .tiny { color: #c7d2fe; }
.cat-go { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(99, 102, 241, 0.28); border: 1px solid rgba(165, 180, 252, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.cat-go::after { content: ""; width: 7px; height: 7px; border-top: 2px solid #e0e7ff; border-right: 2px solid #e0e7ff; transform: translateX(-1px) rotate(45deg); }
.grid3:has(> .cat-tile) { grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 600px) { .grid3:has(> .cat-tile) { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1000px) { .grid3:has(> .cat-tile) { grid-template-columns: repeat(4, 1fr); } }
.reduce-motion .tile.cat-tile { transition: none; }

/* ---------- Effets futuristes (2026-10-13) : aurore, lignes lumineuses, reflets, ondulations ---------- */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
/* Aurore qui ondule lentement derrière tout */
body::before {
  background:
    radial-gradient(60% 40% at 20% 30%, rgba(34, 211, 238, 0.13), transparent 70%),
    radial-gradient(50% 35% at 80% 60%, rgba(139, 92, 246, 0.16), transparent 70%),
    radial-gradient(45% 30% at 40% 90%, rgba(244, 114, 182, 0.10), transparent 70%);
  filter: blur(10px);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(-4%, -2%, 0) scale(1); }
  50% { transform: translate3d(3%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 5%, 0) scale(1.03); }
}
/* Fines lignes de couleur qui filent en diagonale derrière les textes */
body::after {
  background:
    linear-gradient(115deg, transparent 46%, rgba(34, 211, 238, 0.55) 49.6%, rgba(34, 211, 238, 0) 50.4%, transparent 54%) 0 0 / 220% 220% no-repeat,
    linear-gradient(115deg, transparent 47%, rgba(139, 92, 246, 0.5) 49.7%, rgba(139, 92, 246, 0) 50.3%, transparent 53%) 0 0 / 260% 260% no-repeat,
    linear-gradient(115deg, transparent 48%, rgba(244, 114, 182, 0.4) 49.8%, rgba(244, 114, 182, 0) 50.2%, transparent 52%) 0 0 / 300% 300% no-repeat;
  opacity: 0.55;
  animation: streaks 11s linear infinite;
}
@keyframes streaks {
  0% { background-position: 110% 0, 120% 0, 130% 0; }
  100% { background-position: -10% 100%, -20% 100%, -30% 100%; }
}
/* Personnages animés dans les cases (SMIL dans figures.js) ; le logo Ensemble reste fixe */
.logo-btn, .logo-btn * { animation: none !important; }
/* Reflet lumineux qui balaie les cases et les boutons principaux, en arrière-plan (derrière icônes et textes) */
.tile.cat-tile::after, .btn.primary::after {
  content: ""; position: absolute; z-index: -1; top: -20%; bottom: -20%; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22) 45%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.22) 55%, transparent);
  transform: skewX(-18deg);
  animation: shine 6s ease-in-out infinite;
}
.btn.primary { position: relative; overflow: hidden; isolation: isolate; }
.tile.cat-tile:nth-child(3n+2)::after { animation-delay: 0.6s; }
.tile.cat-tile:nth-child(3n)::after { animation-delay: 1.2s; }
.tile.cat-tile:nth-child(n+4)::after { animation-delay: 1.8s; }
.btn.primary::after { animation-duration: 5s; animation-delay: 2.5s; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
/* Titre de page : ligne de lumière qui passe derrière le texte */
.page-title { position: relative; display: inline-block; }
.page-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #22d3ee, #8b5cf6, #f472b6, transparent) 0 0 / 200% 100%;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.7);
  animation: title-line 3.5s linear infinite;
}
@keyframes title-line { from { background-position: 200% 0; } to { background-position: 0 0; } }
/* Ondulation au toucher */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); z-index: 2;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), rgba(34, 211, 238, 0.25) 40%, rgba(139, 92, 246, 0) 70%);
  animation: ripple 650ms ease-out forwards; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* Compteur « en ligne en ce moment » */
.live-counter { display: inline-flex; align-items: center; gap: 8px; margin: 6px auto 0; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; color: #d1fae5;
  background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); text-align: left; max-width: 100%; }
.live-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); } 100% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } }
.join-why { color: #c7d2fe; margin: 8px 0 0; }
.join-why svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--cyan); }
/* Bouton musique : allumé = cyan lumineux */
.music-btn.on { color: #050a1f; background: linear-gradient(180deg, #7cf3ff, #22a8ee); box-shadow: 0 4px 0 #0b5d86, 0 0 14px rgba(34, 211, 238, 0.6); }
.visitor .topbar .music-btn { margin-right: 8px; }
.near-toggle { margin: 0 0 10px; align-items: center; font-size: .9rem; }
.near-toggle span { display: inline-flex; align-items: center; gap: 4px; }
.members-strip .near-toggle { margin: 0; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin-right: 8px; background: rgba(255,255,255,.04); }
.lang-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 700; padding: 5px 8px; border-radius: 999px; cursor: pointer; min-width: 32px; }
.lang-switch button.on { background: var(--cyan); color: #04122b; }
@media (max-width: 420px) { .lang-switch button { padding: 5px 6px; min-width: 28px; } .visitor-bar .btn { padding-left: 10px; padding-right: 10px; } }
.faq summary { cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--cyan); font-weight: 700; }
.faq[open] summary::after { content: '−'; }
.faq-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .9rem; }
.faq-step { background: rgba(34, 211, 238, .12); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }
.foot-links { text-align: center; margin: 22px 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.foot-links a { display: inline-flex; align-items: center; gap: 4px; }
.rules h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 8px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.45; }
.checklist li:first-child { border-top: 0; }
.checklist li > svg { flex: none; color: var(--cyan, #22d3ee); margin-top: 3px; }
.pledges { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.pledges legend { font-weight: 600; padding: 0 6px; }
.pledges .check { margin: 6px 0; }
.lang-bar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 16px 0; max-width: 760px; margin: 0 auto; }
.lang-bar .spacer { flex: 1; }
.visitor-counts ul { list-style: none; margin: 0 0 8px; padding: 0; }
.visitor-counts li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-weight: 600; }
.visitor-counts li > svg { flex: none; color: var(--cyan, #22d3ee); }
.visitor-counts li.live > svg { color: #34d399; }
.pro-counts li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.pro-counts li:first-child { border-top: 0; }
.pro-counts ul { list-style: none; margin: 0; padding: 0; }
@media (max-width: 480px) { .lang-switch { margin-right: 0; } }
.health-big { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.health-list { list-style: none; margin: 0; padding: 0; }
.health-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.health-row:first-child { border-top: 0; }
.health-row .tiny { flex-basis: 100%; padding-left: 22px; }
.health-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: #34d399; box-shadow: 0 0 8px currentColor; color: #34d399; }
.health-dot.orange { background: #f59e0b; color: #f59e0b; }
.health-dot.red { background: #ef4444; color: #ef4444; }
.health-dot.big { width: 22px; height: 22px; }
/* Rubrique proposée par un membre, en attente de l'accord d'un administrateur */
.tile.cat-tile .pending-tag { position: absolute; top: 10px; right: 10px; z-index: 2; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(251, 191, 36, 0.18); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.5); }
.pending-card { border-color: rgba(251, 191, 36, 0.55); }
/* Bouton vert pour passer de l'espace particulier à l'espace professionnel, et inversement */
.space-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid #4ade80;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.2)); color: #dcfce7; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.35); }
.space-switch svg { width: 16px; height: 16px; }
.space-switch:hover, .space-switch:focus-visible { background: linear-gradient(135deg, rgba(34, 197, 94, 0.55), rgba(22, 163, 74, 0.35)); }
.space-switch-go { font-size: 15px; line-height: 1; opacity: 0.9; }
.profile-line { flex-wrap: wrap; }

/* Territoire consulté (province ou département) et onglet Activités */
.territory-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 12px; padding: 8px 12px; border-radius: 999px; background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.35); font-size: 0.9rem; width: fit-content; max-width: 100%; }
.territory-chip select { width: auto; max-width: 100%; padding: 4px 8px; }
.territory-chip a { margin-left: 4px; }
.chip.beyond { opacity: 0.75; border-style: dashed; }
.activities-card { display: block; text-decoration: none; color: inherit; }
.event-card.external { border-color: rgba(34, 211, 238, 0.45); }
.terr-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 320px; overflow: auto; }
.grid2 > * { min-width: 0; }
.field input[type="date"], .field input[type="time"] { width: 100%; min-width: 0; box-sizing: border-box; }
.flip { transform: scaleX(-1); }

/* Bouton Accueil : le logo Ensemble en haut à gauche de chaque page (demande de Denis, 18 octobre 2026) */
.home-logo { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: #fff; font-weight: 800; font-size: 0.85rem; align-self: flex-start; }
.home-logo img { width: 54px; height: auto; border-radius: 13px; filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5)); }
.home-logo span { display: inline-flex; align-items: center; gap: 4px; }
.home-logo span svg { width: 14px; height: 14px; }
body[data-page="accueil"] .home-logo { visibility: hidden; }
.topbar .logo-btn { display: none; }

/* Langue : petit bouton déroulant */
.topbar .lang-pick, .lang-bar .lang-pick, .lang-pick { width: auto; min-width: 0; flex: none; margin: 0; height: auto; appearance: none; -webkit-appearance: none; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23cbd5ff' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center; color: #fff; font: inherit; font-size: .85rem; font-weight: 800; padding: 7px 26px 7px 12px; cursor: pointer; }
.lang-pick option { color: #000; }
.topbar .visitor-bar .btn.small { padding: 7px 12px; }
@media (max-width: 420px) { .home-logo img { width: 46px; } .topbar { gap: 8px; } .visitor-bar { gap: 6px; } .logo-hero .logo-official { width: 104px; } .logo-hero .wordmark { font-size: 1.7rem; } .logo-hero { margin: 8px 0 10px; } }
/* Choix du dessin d'une rubrique (administrateurs) */
.add-preview { display: grid; place-items: center; width: 132px; height: 132px; margin: 8px auto 4px; }
.add-preview .figure { width: 116px; height: 116px; }
.figure-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; max-height: 46vh; overflow-y: auto; padding: 4px; }
.figure-pick .tile { min-height: 56px; padding: 4px; }
/* Bonhomme du membre en haut à droite : ouvre « Moi » */
.me-btn { display: inline-flex; margin-left: 6px; border-radius: 50%; }
.me-btn .avatar { width: 36px; height: 36px; font-size: 0.95rem; box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55); }
/* Mes activités : clochette des nouveautés */
.chip.has-news { border-color: var(--cyan); }
.news-bell { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: linear-gradient(180deg, #ffe08a, #f5b70a); color: #3a2600; box-shadow: 0 0 10px rgba(250, 204, 21, 0.7); font-size: 0.75rem; font-weight: 700; }
.news-bell svg { width: 12px; height: 12px; }
/* Clochette dorée qui vibre quand il y a une notification non lue (Denis, 18 octobre 2026) */
.icon-btn.bell-on { border-color: #facc15; box-shadow: 0 0 14px rgba(250, 204, 21, 0.75), inset 0 0 8px rgba(250, 204, 21, 0.25); }
.icon-btn.bell-on svg { color: #facc15; filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.9)); transform-origin: 50% 10%; animation: bell-ring 2.4s ease-in-out infinite; }
.icon-btn.bell-on .dot { background: #f5b70a; color: #3a2600; }
.news-bell svg { transform-origin: 50% 10%; animation: bell-ring 2.4s ease-in-out infinite; }
@keyframes bell-ring { 0%, 55%, 100% { transform: rotate(0); } 60% { transform: rotate(16deg); } 66% { transform: rotate(-14deg); } 72% { transform: rotate(11deg); } 78% { transform: rotate(-8deg); } 84% { transform: rotate(4deg); } 90% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.bell-on svg, .news-bell svg { animation: none; } }
/* Mes activités : une ligne par activité, cloche grise immobile ou dorée qui vibre */
.activity-list { display: grid; gap: 6px; }
.activity-row { align-items: center; gap: 10px; }
.activity-row.has-news { border-color: #facc15; box-shadow: 0 0 12px rgba(250, 204, 21, 0.35); }
.quiet-bell { display: inline-flex; color: #8a93ad; opacity: 0.7; }
.quiet-bell svg { width: 18px; height: 18px; }
.news-bell svg { width: 14px; height: 14px; }
.post-new { border-color: #facc15; box-shadow: 0 0 14px rgba(250, 204, 21, 0.35); }
.new-badge { margin-left: 6px; background: linear-gradient(180deg, #ffe08a, #f5b70a); color: #3a2600; }
/* Bientôt payant : avertissement à 90 % du seuil */
.soon-card { border-color: #facc15; box-shadow: 0 0 16px rgba(250, 204, 21, 0.35); }
.soon-card h3 svg { color: #facc15; }
/* Bouton d'urgence : un appui ouvre, la tirette appelle le 112 */
.urgence-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 12px 0; padding: 14px 18px; border-radius: 18px; border: 2px solid #fca5a5; background: linear-gradient(180deg, #ef4444, #b91c1c); color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: 0.02em; box-shadow: 0 5px 0 #7f1d1d, 0 0 22px rgba(239, 68, 68, 0.55); cursor: pointer; }
.urgence-btn svg { width: 26px; height: 26px; }
.urgence-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #7f1d1d, 0 0 14px rgba(239, 68, 68, 0.5); }
.urgence-panel h2 svg { color: #ef4444; }
.urgence-track { position: relative; height: 64px; border-radius: 32px; background: linear-gradient(90deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.6)); border: 2px solid #ef4444; margin: 16px 0; overflow: hidden; }
.urgence-track-label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 50px; color: #fff; font-weight: 700; pointer-events: none; transition: opacity 0.1s; }
.urgence-slider { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; cursor: grab; }
.urgence-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 56px; height: 56px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") center / 28px no-repeat; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.urgence-slider::-moz-range-thumb { width: 56px; height: 56px; border: none; border-radius: 50%; background: #fff; }
/* Administrateurs du site en ligne : cases « + » pour ajouter une rubrique */
.tile.cat-tile.add-tile { border-style: dashed; background: rgba(99, 102, 241, 0.08); align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: #c7d2fe; font: inherit; }
.add-plus { font-size: 2.6rem; line-height: 1; font-weight: 300; color: #7cf3ff; }
.shared-admin { border-color: rgba(251, 191, 36, 0.45); }
.demande-row.signalement { border-color: rgba(244, 114, 182, 0.5); }
.admin-requests { display: flex; align-items: center; gap: 10px; }

/* ---------- Mur : histoires, personnes à découvrir, vidéos courtes, après la sortie ---------- */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 12px; margin-bottom: 6px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: 0 0 auto; display: grid; justify-items: center; gap: 6px; background: none; border: 0; color: var(--text); cursor: pointer; padding: 0; width: 72px; }
.story-ring { position: relative; display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: rgba(120, 140, 220, 0.35); }
.story-ring.on { background: conic-gradient(from 200deg, #22d3ee, #8b5cf6, #ec4899, #22d3ee); box-shadow: 0 0 14px rgba(139, 92, 246, 0.45); }
.story-ring .avatar { width: 58px; height: 58px; border: 3px solid #0b1030; }
.story-plus { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: #22d3ee; color: #061031; font-weight: 800; display: grid; place-items: center; border: 2px solid #0b1030; }
.story-name { font-size: 0.78rem; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-viewer { position: fixed; inset: 0; z-index: 1000; background: #05081c; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 12px 16px; color: #fff; }
.story-bars { display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.story-bars span.done { background: #fff; }
.story-bars span.now { background: linear-gradient(90deg, #fff 50%, rgba(255,255,255,0.3) 50%); background-size: 200% 100%; background-position: 100% 0; animation: storybar 5s linear forwards; }
@keyframes storybar { to { background-position: 0 0; } }
.story-head { display: flex; align-items: center; gap: 10px; margin: 10px 0; position: relative; z-index: 3; }
.story-close { margin-left: auto; }
.story-body { flex: 1; display: grid; place-items: center; align-content: center; gap: 12px; min-height: 0; }
.story-media, .story-media img, .story-media video { max-width: 100%; max-height: 72vh; border-radius: 16px; }
.story-media.demo-media { width: min(92vw, 420px); aspect-ratio: 9 / 14; }
.story-text { font-size: 1.1rem; text-align: center; margin: 0; }
.story-tap { position: absolute; top: 70px; bottom: 0; width: 50%; background: none; border: 0; z-index: 2; cursor: pointer; }
.story-tap.left { left: 0; } .story-tap.right { right: 0; }
.demo-media { position: relative; display: grid; place-items: center; border-radius: 16px; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, #2b3a9a, #141a45 60%, #0b1030); min-height: 180px; }
.demo-media .fig-demo { width: 62%; max-width: 240px; aspect-ratio: 1; }
.demo-media .fig-demo svg { width: 100%; height: 100%; }
.demo-tag { position: absolute; left: 10px; bottom: 10px; font-size: 0.72rem; padding: 3px 8px; border-radius: 999px; background: rgba(5, 8, 28, 0.7); color: #cfd8ff; }
.media-full.demo-media { aspect-ratio: 4 / 3; margin-top: 8px; }
.suggest-row { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px; }
.suggest-card { flex: 0 0 160px; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 14px 10px; border-radius: 16px; background: rgba(20, 30, 80, 0.6); border: 1px solid var(--line-strong); }
.reels { height: calc(100dvh - 340px); min-height: 380px; overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 18px; background: #05081c; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; }
.reel-media, .reel-media video, .reel-media img { width: 100%; height: 100%; object-fit: cover; }
.reel-media.demo-media { border-radius: 0; }
.reel-media.demo-media .fig-demo { width: 78%; max-width: 360px; }
.reel-info { position: absolute; left: 14px; right: 70px; bottom: 16px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.reel-info p { margin: 6px 0 0; }
.reel-side { position: absolute; right: 10px; bottom: 24px; display: grid; gap: 14px; }
.reel-btn { display: grid; justify-items: center; gap: 2px; background: rgba(5, 8, 28, 0.55); color: #fff; border: 0; border-radius: 999px; padding: 10px; font-size: 0.8rem; text-decoration: none; cursor: pointer; }
.reel-btn svg { width: 26px; height: 26px; }
.reel-btn.on { color: #f472b6; }
.after-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 12px; }
.after-item { display: grid; gap: 4px; text-decoration: none; color: var(--text); }
.after-media, .after-media img, .after-media video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; min-height: 0; }
.after-media .fig-demo { width: 80%; }
.after-media .demo-tag { display: none; }
.feed-end { display: grid; justify-items: center; text-align: center; gap: 4px; }
.reel-end { color: #fff; text-align: center; padding: 24px; }
.reel-end svg { width: 34px; height: 34px; }
.promise ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.promise summary { cursor: pointer; font-weight: 700; }
.reel-media .demo-tag { top: 12px; bottom: auto; left: 12px; }
.no-save { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.present-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.present-pick .btn { min-height: 32px; }
.dl-asks { margin-top: 10px; display: grid; gap: 8px; }
.badge.gold { background: rgba(245, 197, 66, .16); color: #f5c542; border-color: rgba(245, 197, 66, .4); }
.deco-canvas { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 12px; touch-action: none; background: #000; }
.sticker-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sticker { font-size: 26px; line-height: 1; padding: 6px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.15)); background: transparent; cursor: pointer; }
.arrived { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(34, 211, 238, .1); }
.group-av { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #22d3ee, #8b5cf6); color: #fff; flex: none; }
.group-head { width: 100%; gap: 10px; background: transparent; border: 0; color: inherit; text-align: left; cursor: pointer; padding: 4px 0; }
.bubble .who { color: #67e8f9; font-weight: 700; margin-bottom: 2px; }
.free-card .free-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.free-card .free-row:first-of-type { border-top: 0; }
.first-time { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(139, 92, 246, .12); }
.rev-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 10px; }
.rev-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22d3ee, #8b5cf6); transition: width .8s linear; }
.revision-chat { margin-top: 12px; padding-bottom: 90px; }
.bubble.prof { border-color: rgba(34, 211, 238, .4); }
.link-btn { background: none; border: 0; padding: 0; color: #67e8f9; text-decoration: underline; cursor: pointer; font: inherit; }
.courses-card { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; border-color: rgba(34, 211, 238, .35); }
.courses-card > svg { width: 28px; height: 28px; color: #67e8f9; flex: none; }

/* Mini-jeux */
.cat-badge { position: absolute; top: 8px; right: 8px; }
.game-status { text-align: center; font-weight: 700; min-height: 1.4em; margin: 6px 0 10px; }
.gboard { display: grid; gap: 4px; margin: 0 auto; max-width: 380px; }
.gboard.g3 { grid-template-columns: repeat(3, 1fr); max-width: 300px; }
.gboard.g4 { grid-template-columns: repeat(7, 1fr); background: #1d4ed8; padding: 6px; border-radius: 14px; gap: 5px; }
.gboard.g44 { grid-template-columns: repeat(4, 1fr); max-width: 320px; }
.gboard.g9 { grid-template-columns: repeat(9, 1fr); gap: 0; border: 2px solid #c4b5fd; border-radius: 8px; overflow: hidden; }
.gboard.g10 { grid-template-columns: repeat(10, 1fr); gap: 0; border: 3px solid #7c3aed; border-radius: 6px; overflow: hidden; }
.gboard.g8 { grid-template-columns: repeat(8, 1fr); gap: 0; border: 3px solid #7c3aed; border-radius: 6px; overflow: hidden; }
.gcell { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(196, 181, 253, .35); border-radius: 10px; background: rgba(30, 27, 75, .7); color: #e6ecff; font-size: 2rem; font-weight: 800; padding: 0; cursor: pointer; }
.gcell.pX { color: #7cf3ff; } .gcell.pO { color: #f472b6; }
.gcell.hole { border-radius: 50%; background: #0b1030; border: none; }
.gcell.hole.c1 { background: #facc15; } .gcell.hole.c2 { background: #ef4444; }
.gcell.memo { font-size: 1.8rem; background: linear-gradient(135deg, #7c3aed, #22a8ee); }
.gcell.memo.open { background: #e6ecff; }
.gcell.sudo { border-radius: 0; font-size: 1.05rem; font-weight: 600; border: 1px solid rgba(196, 181, 253, .25); color: #7cf3ff; }
.gcell.sudo.fixed { color: #fff; background: rgba(124, 58, 237, .25); }
.gcell.sudo.sel { background: rgba(34, 168, 238, .45); }
.gcell.sudo.wrong { color: #f472b6; }
.gcell.sudo.br { border-right: 2px solid #c4b5fd; } .gcell.sudo.bb { border-bottom: 2px solid #c4b5fd; }
.numpad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px auto 0; max-width: 380px; }
.gcell.sq { border-radius: 0; border: none; }
.gcell.sq.light { background: #e9e3ff; } .gcell.sq.dark { background: #5b3fb8; }
.gcell.sq.sel { box-shadow: inset 0 0 0 3px #7cf3ff; }
.gcell.sq.target { box-shadow: inset 0 0 0 3px #facc15; }
.pion { width: 78%; height: 78%; border-radius: 50%; display: block; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.pion.b { background: #fff; border: 2px solid #c4b5fd; } .pion.n { background: #111827; border: 2px solid #f472b6; }
.pion.king::after { content: '♛'; display: grid; place-items: center; height: 100%; font-size: .9rem; color: #facc15; }
.piece { font-size: clamp(1.4rem, 7vw, 2.2rem); line-height: 1; }
.piece { font-family: "Segoe UI Symbol", "DejaVu Sans", serif; font-variant-emoji: text; }
.piece.w { color: #fff; filter: drop-shadow(0 0 1px #1e1b4b) drop-shadow(0 1px 1px #1e1b4b); } .piece.k { color: #111827; filter: drop-shadow(0 0 1px #f9a8d4); }
.game-pick .tile { min-height: 0; }
