/* =====================================================================
   Day / night mode. Loaded last on every page.
   <html data-theme="dark"> is set in <head> before the page paints
   (saved choice, else the phone/PC setting), so there is no white flash.
   The light look stays in style.css / future.css; this file only holds
   the toggle button and the dark overrides.
   ===================================================================== */

/* ---------- toggle button (sun in dark mode, moon in light mode) ---------- */
.theme-btn { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; opacity: .9; transition: opacity .15s, transform .3s; }
.theme-btn:hover { opacity: 1; }
.theme-btn:active { transform: rotate(-25deg) scale(.94); }
.theme-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun, [data-theme="dark"] .theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
/* phone header: logo + mode + language + Book must fit without squeezing "EN" */
.nav .lang-pick, .nav .btn { flex: none; }
@media (max-width: 820px) { .nav { gap: 8px; } .site-header .logo { min-width: 0; flex-shrink: 1; } }
@media (max-width: 380px) { .nav .theme-btn { width: 30px; height: 30px; } .site-header .brand { font-size: .82rem; } }
/* dashboard: a labelled row under "me" (icon only in the phone top bar) */
.admin .side .theme-btn { display: flex; justify-content: flex-start; gap: 10px; width: 100%; height: auto; padding: 9px 14px; border-radius: 12px;
  border-color: var(--line); color: var(--muted); font-weight: 600; font-size: .88rem; }
.admin .side .theme-btn:hover { color: var(--text); background: var(--bg-2); }
.admin .side .theme-btn::after { content: 'Mode sombre'; }
[data-theme="dark"] .admin .side .theme-btn::after { content: 'Mode clair'; }
@media (max-width: 860px) {
  .admin .side .theme-btn { order: 3; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
  .admin .side .theme-btn::after { display: none; }
}

/* ---------- dark colors ---------- */
[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-2: #151517;
  --card: rgba(24, 24, 27, .78);
  --line: rgba(255, 255, 255, .12);
  --text: #f1f1f1;
  --muted: #a1a1a6;
  --accent: #f1f1f1;
  --accent-hover: #d4d4d4;
  --on-accent: #0b0b0c;
  --ok: #34d399;
  --busy: #fbbf24;
  --danger: #f87171;
  --glow: 0 6px 24px rgba(0, 0, 0, .55);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .75), 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
[data-theme="dark"] ::selection { background: #fff; color: #000; }

/* background grid + mouse shade */
[data-theme="dark"] body:not(.admin)::before { background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px); }
[data-theme="dark"] body:not(.admin)::after { background: radial-gradient(700px circle at var(--sx, 70%) var(--sy, 20%), rgba(255, 255, 255, .05), transparent 45%),
  radial-gradient(900px circle at 50% -10%, rgba(255, 255, 255, .04), transparent 60%); }

/* header + footer glass */
[data-theme="dark"] .site-header, [data-theme="dark"] .has-hero .site-header.light { background: rgba(11, 11, 12, .82); border-bottom-color: var(--line); }
[data-theme="dark"] .site-footer { background: rgba(11, 11, 12, .7); }
[data-theme="dark"] .lang-pick option { color: #f1f1f1; background: #151517; }

/* buttons, fields, badges */
[data-theme="dark"] .btn:not(.ghost):not(.danger)::after { background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .14), transparent); }
[data-theme="dark"] .btn.ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .22); }
[data-theme="dark"] .btn.ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
[data-theme="dark"] .btn.danger { border-color: rgba(248, 113, 113, .4); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: rgba(255, 255, 255, .05); }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .1); }
[data-theme="dark"] .badge { background: rgba(255, 255, 255, .07); }
[data-theme="dark"] .badge.ok { background: rgba(52, 211, 153, .12); }
[data-theme="dark"] .badge.busy { background: rgba(251, 191, 36, .12); }
[data-theme="dark"] .chip { background: rgba(255, 255, 255, .06); color: #d4d4d4; }

/* HUD corners, avatars, empty photos */
[data-theme="dark"] .panel::before, [data-theme="dark"] .ticket::before { --c: rgba(255, 255, 255, .7); }
[data-theme="dark"] .avatar { color: #f1f1f1; background: radial-gradient(circle at 30% 25%, #3a3a3d, #1b1b1d 75%); border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .03), 0 8px 20px rgba(0, 0, 0, .4); }
[data-theme="dark"] .hero-team .avatar { border-color: #070707; }
[data-theme="dark"] .ph-empty { background: repeating-linear-gradient(135deg, #18181a 0 12px, #121214 12px 24px); }
[data-theme="dark"] .hero-photo { background: #151517; }
[data-theme="dark"] .hero h1 .soft { -webkit-text-stroke-color: rgba(255, 255, 255, .75); }
[data-theme="dark"] .live-pill { background: rgba(20, 20, 22, .88); }

/* booking steps: dates, times, chosen items */
[data-theme="dark"] .pick { background: rgba(255, 255, 255, .03); }
[data-theme="dark"] .pick:hover { border-color: rgba(255, 255, 255, .45); }
[data-theme="dark"] .pick.sel { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
[data-theme="dark"] .dates .pick.sel, [data-theme="dark"] .slots .pick.sel, [data-theme="dark"] .name-picks .pick.sel { background: #f1f1f1; color: #0b0b0c; }
[data-theme="dark"] .dates .pick.sel small { color: #555; }
[data-theme="dark"] .slots .pick.taken { background: #18181a; border-color: #26262a; color: #77777c; }
[data-theme="dark"] .steps span { background: rgba(255, 255, 255, .12); }
[data-theme="dark"] .steps span.on { background: #f1f1f1; }
[data-theme="dark"] .pick-hint { border-color: rgba(255, 255, 255, .3); }

/* team row */
[data-theme="dark"] .team-photo { background: linear-gradient(145deg, #3a3a3d, #141416); box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08); }
[data-theme="dark"] .team-initials { background: radial-gradient(circle at 30% 25%, #3a3a3d, #1b1b1d 75%); }
[data-theme="dark"] .team-photo::after { border-color: rgba(255, 255, 255, .55); }
[data-theme="dark"] .team-member:hover .team-photo, [data-theme="dark"] .team-member:focus-visible .team-photo,
[data-theme="dark"] .team-member:has(.team-pick:focus-visible) .team-photo { box-shadow: 0 0 0 2px #fff, 0 20px 40px rgba(0, 0, 0, .5); }
[data-theme="dark"] .team-member.sel .team-photo { box-shadow: 0 0 0 3px #fff, 0 18px 36px rgba(0, 0, 0, .5); }
[data-theme="dark"] .team-check { background: #fff; color: #000; border-color: #0b0b0c; }
[data-theme="dark"] .team-dot { border-color: #0b0b0c; }
[data-theme="dark"] .team-profile:hover, [data-theme="dark"] .team-profile:focus-visible { background: rgba(255, 255, 255, .08); }

/* cuts carousel */
[data-theme="dark"] .cf-item { -webkit-box-reflect: below 6px linear-gradient(transparent 72%, rgba(255, 255, 255, .12)); }
[data-theme="dark"] .cf-item img { border-color: rgba(255, 255, 255, .08); box-shadow: 0 20px 44px rgba(0, 0, 0, .6); }
[data-theme="dark"] .cf-item.active img { box-shadow: 0 0 0 1px #fff, 0 30px 60px rgba(0, 0, 0, .7); }
[data-theme="dark"] .cf-nav { background: rgba(20, 20, 22, .85); border-color: rgba(255, 255, 255, .22); color: #fff; }
[data-theme="dark"] .cf-nav:hover { border-color: #fff; }
[data-theme="dark"] .cf-dots button { background: rgba(255, 255, 255, .22); }
[data-theme="dark"] .cf-dots button[aria-current="true"] { background: #fff; }

/* globe: dark sphere, light land */
[data-theme="dark"] #gSphere stop:nth-child(1) { stop-color: #3a3a3d; }
[data-theme="dark"] #gSphere stop:nth-child(2) { stop-color: #1c1c1f; }
[data-theme="dark"] #gSphere stop:nth-child(3) { stop-color: #0e0e10; }
[data-theme="dark"] #gLand stop:nth-child(1) { stop-color: #f1f1f1; }
[data-theme="dark"] #gLand stop:nth-child(2) { stop-color: #a8a8ad; }
[data-theme="dark"] .g-land { stroke: rgba(0, 0, 0, .5); }
[data-theme="dark"] .g-orbit { stroke: rgba(255, 255, 255, .18); }
[data-theme="dark"] .g-sphere { filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6)); }
[data-theme="dark"] .g-lat, [data-theme="dark"] .g-mer, [data-theme="dark"] .g-grat { stroke: #fff; }
[data-theme="dark"] .g-edge { stroke: rgba(255, 255, 255, .3); }
[data-theme="dark"] .g-dot { fill: #000; stroke: #fff; }
[data-theme="dark"] .g-pulse { stroke: #000; }
[data-theme="dark"] .g-ring text { fill: #e5e5e5; }

/* map, dialogs, cards */
[data-theme="dark"] .shop-map { background: #151517; box-shadow: 0 24px 60px -34px rgba(0, 0, 0, .8); }
[data-theme="dark"] .shop-map iframe { filter: invert(.9) hue-rotate(180deg) grayscale(.3); }
[data-theme="dark"] dialog:not(.lightbox) { background: #151517; }
[data-theme="dark"] dialog::backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] .barber-card::after { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .06), transparent 55%); }
[data-theme="dark"] .pending-note { background: rgba(251, 191, 36, .14); color: #fcd34d; }
[data-theme="dark"] .logo-mark { background: #fff; color: #000; }

/* ---------- dashboard ---------- */
[data-theme="dark"] body.admin { background: #0b0b0c; }
[data-theme="dark"] .admin .side, [data-theme="dark"] .admin .kpi, [data-theme="dark"] .admin .col, [data-theme="dark"] .admin .table-wrap,
[data-theme="dark"] .admin .thumb, [data-theme="dark"] .admin .barber-card { background: #151517; }
[data-theme="dark"] .admin table.data th { background: #1b1b1e; }
[data-theme="dark"] .current .muted { color: #555; }
[data-theme="dark"] .st-confirmed { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
[data-theme="dark"] .st-in_progress { background: rgba(52, 211, 153, .1); }
[data-theme="dark"] .st-noshow, [data-theme="dark"] .st-cancelled { background: rgba(248, 113, 113, .16); color: #fca5a5; }
[data-theme="dark"] .st-pending { background: rgba(251, 191, 36, .16); color: #fcd34d; }
[data-theme="dark"] .mini:not(.go):not(.yes):not(.no-solid) { background: #1f1f23; }
[data-theme="dark"] .row.bk .tnum { background: #f1f1f1; color: #0b0b0c; }
[data-theme="dark"] .row.bk .info small { color: #a1a1a6; }
[data-theme="dark"] .tone-wait { --t: #e0a000; --tb: rgba(224, 160, 0, .1); }
[data-theme="dark"] .tone-yes { --t: #34d399; --tb: rgba(52, 211, 153, .08); }
[data-theme="dark"] .tone-no { --t: #f87171; --tb: rgba(248, 113, 113, .08); }
[data-theme="dark"] .tone-end { --t: #4a4a4f; }
[data-theme="dark"] .tag { border-color: rgba(255, 255, 255, .25); }
[data-theme="dark"] .ask-banner { background: rgba(224, 160, 0, .12); color: #fcd34d; }
[data-theme="dark"] .ask-banner b { background: #e0a000; color: #000; }
[data-theme="dark"] .more-menu { background: #1b1b1e; box-shadow: 0 14px 34px rgba(0, 0, 0, .6); }
