@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Palette par defaut = violet neon AchFinds (modifiable depuis l'admin > Apparence) */
  --bg: #07050b;
  --bg-glow: #200d2d;
  --ink: #f7f2ff;
  --muted: #6f607c;
  --accent: #b83cff;
  --accent-2: #d76aff;
  --gradient: linear-gradient(90deg, var(--accent), var(--accent-2));
  --surface: #12081a;
  --surface-2: #190a23;
  --line: rgba(255, 255, 255, 0.08);
  --on-accent: #fff;
  --bg-rgb: 7, 5, 11;
  --accent-rgb: 184, 60, 255;
  --accent2-rgb: 215, 106, 255;
  --radius: 14px;
  --radius-pill: 999px;
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  /* Empêche les navigateurs mobiles de regonfler les textes (rotation, zoom parasite). */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  /* Aucun débordement horizontal : c'est ce qui fait « dézoomer » la page sur téléphone. */
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

/* Fond en calque fixe : « background-attachment: fixed » est ignoré ou saccadé sur iOS/Android. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, var(--bg-glow) 0%, transparent 45%),
    radial-gradient(circle at 100% 20%, rgba(var(--accent2-rgb), 0.12) 0%, transparent 40%);
}

a { color: var(--accent); }

/* Supprime le délai et le zoom au double-tap sur les éléments interactifs. */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

header.site-head {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  position: sticky;
  top: 0;
  background: rgba(var(--bg-rgb), 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 40;
}

header.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tagline {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 2px;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
nav.site-nav a:hover { color: var(--ink); }

section { padding: 64px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
section:last-of-type { border-bottom: none; }

h2.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.15;
}

#hero h2.section-title { font-size: 2.6rem; }

.section-intro {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 28px;
  font-size: 1.02rem;
}

/* --- Badges pilule (façon "marque") --- */
.tag {
  display: inline-block;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: #C9A6FF;
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 2px 6px 2px 0;
}


/* --- Boutons sous forme de lien --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-sk {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* --- Navigation --- */
nav.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 0;
}
nav.site-nav a.nav-shop {
  color: var(--on-accent);
  background: var(--gradient);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.35);
}
nav.site-nav a.nav-shop:hover { color: var(--on-accent); }

/* --- Boutons d'accueil --- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

/* --- Formulaire commande --- */
form.order-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 20px 60px rgba(var(--accent-rgb), 0.08);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.field-hint { margin: -10px 0 8px; font-size: 12.5px; color: var(--muted); }
.field-hint code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

.field select, .field textarea, .field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.field select:focus, .field textarea:focus, .field input:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { min-height: 80px; resize: vertical; }

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
  margin-top: 6px;
}
.price-row .amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
}

button, .btn {
  background: var(--gradient);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(var(--accent2-rgb), 0.4); }
button.secondary {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}
button.danger { background: linear-gradient(90deg, #A3402F, #D9534F); box-shadow: none; }

/* --- Liens --- */
.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.links-list li { display: contents; }
.links-list li a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.links-list li a:hover { transform: translateY(-1px); }
.links-list li a.link-generic:hover { background: var(--gradient); border-color: transparent; box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35); }
.links-list li a .link-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Bouton Telegram, distinct et reconnaissable */
.links-list li a.link-telegram {
  background: linear-gradient(90deg, #2AABEE, #229ED9);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(42, 171, 238, 0.35);
}
.links-list li a.link-telegram:hover { box-shadow: 0 10px 30px rgba(42, 171, 238, 0.5); }

/* --- Bot SK --- */
#sk-chat {
  --u: 1;   /* échelle de SK : 1 = 150 px de large (bureau), moins sur téléphone */
  position: fixed;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  right: calc(22px + env(safe-area-inset-right, 0px));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* La mascotte reste presque immobile : les émotions passent surtout par les yeux et les effets. */
#sk-mascot-wrap {
  position: absolute;
  left: -132px;
  bottom: 0;
  width: calc(var(--u) * 150px);
  height: calc(var(--u) * 224px);
  pointer-events: none;
  display: none;
  overflow: visible;
  animation: sk-float 4s ease-in-out infinite;
}
#sk-chat.open #sk-mascot-wrap { display: block; }

#sk-mascot {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(var(--accent-rgb), 0.45));
}

/* Les yeux restent ceux de la posture normale (aucune forme noire ajoutée).
   La tristesse se lit dans un assombrissement doux du visage, sans démarcation nette. */
.sk-sad-shade,
.sk-sad-lines,
.sk-happy-stars {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

/* Ombre très estompée (dégradé radial flouté) posée sur le visage : pas de bord franc. */
.sk-sad-shade {
  background: radial-gradient(ellipse 62% 66% at 50% 46%,
    rgba(8, 6, 18, 0.5) 0%,
    rgba(8, 6, 18, 0.34) 30%,
    rgba(8, 6, 18, 0.16) 52%,
    rgba(8, 6, 18, 0) 74%);
  filter: blur(7px);
  mix-blend-mode: multiply;
  transition: opacity 260ms ease;
}

/* Traits bleus qui coulent doucement le long du visage quand SK est déçu (légèrement accentués). */
.sk-sad-lines {
  transition: opacity 220ms ease;
}
.sk-sad-lines i {
  position: absolute;
  top: 39%;
  width: calc(var(--u) * 2.6px);
  height: calc(var(--u) * 25px);
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(90, 195, 255, 0), rgba(90, 195, 255, 1), rgba(90, 195, 255, 0));
  box-shadow: 0 0 6px rgba(90, 195, 255, 0.75), 0 0 12px rgba(90, 195, 255, 0.4);
  opacity: 0.95;
  animation: sk-sad-drip 1.45s ease-in infinite;
}
.sk-sad-lines i:nth-child(1) { left: 34%; height: calc(var(--u) * 25px); animation-delay: -0.25s; }
.sk-sad-lines i:nth-child(2) { left: 43%; height: calc(var(--u) * 33px); animation-delay: -0.8s; }
.sk-sad-lines i:nth-child(3) { left: 63%; height: calc(var(--u) * 29px); animation-delay: -0.55s; }
.sk-sad-lines i:nth-child(4) { left: 70%; height: calc(var(--u) * 21px); animation-delay: -1.05s; }

/* Petites étoiles : position, taille et timing volontairement irréguliers autour de la tête. */
.sk-happy-stars span {
  position: absolute;
  top: var(--top);
  left: var(--left);
  font-size: calc(var(--u) * var(--size));
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.8), 0 0 14px rgba(255, 105, 210, 0.75);
  opacity: 0;
  animation: sk-star-rise var(--duration) ease-out infinite;
  animation-delay: var(--delay);
}
.sk-happy-stars span:nth-child(1) { --top: 18%; --left: 9%;  --size: 13px; --duration: 1.35s; --delay: -0.20s; }
.sk-happy-stars span:nth-child(2) { --top: 11%; --left: 30%; --size: 8px;  --duration: 1.65s; --delay: -0.75s; }
.sk-happy-stars span:nth-child(3) { --top: 24%; --left: 55%; --size: 15px; --duration: 1.50s; --delay: -1.10s; }
.sk-happy-stars span:nth-child(4) { --top: 13%; --left: 76%; --size: 10px; --duration: 1.80s; --delay: -0.40s; }
.sk-happy-stars span:nth-child(5) { --top: 30%; --left: 82%; --size: 7px;  --duration: 1.25s; --delay: -0.95s; }
.sk-happy-stars span:nth-child(6) { --top: 32%; --left: 18%; --size: 9px;  --duration: 1.55s; --delay: -1.30s; }
.sk-happy-stars span:nth-child(7) { --top: 7%;  --left: 62%; --size: 6px;  --duration: 1.95s; --delay: -1.55s; }

#sk-mascot-wrap.mood-happy .sk-happy-stars { opacity: 1; }
#sk-mascot-wrap.mood-disappointed .sk-sad-shade,
#sk-mascot-wrap.mood-disappointed .sk-sad-lines { opacity: 1; }

@keyframes sk-star-rise {
  0% { transform: translate(0, calc(var(--u) * 8px)) scale(0.35) rotate(-12deg); opacity: 0; }
  18% { opacity: 1; }
  58% { opacity: 0.95; }
  100% { transform: translate(calc(var(--u) * 3px), calc(var(--u) * -28px)) scale(1.05) rotate(18deg); opacity: 0; }
}

@keyframes sk-sad-drip {
  0% { transform: translateY(calc(var(--u) * -2px)); opacity: 0; }
  20% { opacity: 0.9; }
  100% { transform: translateY(calc(var(--u) * 27px)); opacity: 0; }
}

@keyframes sk-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#chat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 20px 8px 8px;
  max-width: calc(100vw - 32px);
  text-align: left;
  line-height: 1.2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.55);
  animation: sk-pulse 2.6s ease-in-out infinite;
}
#chat-toggle img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  padding: 3px;
}

@keyframes sk-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.55); }
  50% { box-shadow: 0 10px 38px rgba(var(--accent2-rgb), 0.75); }
}

#chat-panel {
  width: min(340px, calc(100vw - 44px));
  height: 430px;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: none;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
#sk-chat.open #chat-panel { display: flex; }

#chat-head {
  background: var(--gradient);
  color: var(--on-accent);
  padding: 12px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
#chat-head .chat-avatar {
  width: 34px;
  height: 34px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  padding: 2px;
  flex-shrink: 0;
}
#chat-head-text { flex: 1; }
#chat-close {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--on-accent);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
#chat-close:hover { transform: none; box-shadow: none; opacity: 0.75; }

#chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  font-size: 0.88rem;
}
.msg { margin-bottom: 10px; display: flex; gap: 8px; align-items: flex-end; }
.msg.bot .bubble { background: var(--surface-2); color: var(--ink); }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--gradient); color: var(--on-accent); }
.msg .msg-avatar {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--surface-2);
  flex-shrink: 0;
}
.bubble { display: inline-block; padding: 9px 12px; border-radius: 12px; max-width: 80%; text-align: left; overflow-wrap: anywhere; }
.bubble a { color: inherit; text-decoration: underline; word-break: break-word; }
.msg.bot .bubble a { color: var(--accent, #9b4dff); }

#chat-form { display: flex; border-top: 1px solid var(--line); }
#chat-form input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--ink);
}
#chat-form input:focus { outline: none; }
#chat-form button { border-radius: 0; box-shadow: none; }

/* --- Pop-up d'accueil (style bandeau cookies) --- */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(var(--bg-rgb), 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#intro-overlay[hidden] { display: none; }

#intro-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(var(--accent-rgb), 0.25);
}
#intro-box .intro-avatar {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 8px;
}
#intro-box h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  margin: 0 0 10px;
}
#intro-box p {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.95rem;
}
#intro-box button { width: 100%; }

/* --- Ecran de maintenance --- */
#maintenance-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#maintenance-screen[hidden] { display: none; }
#maintenance-box {
  text-align: center;
  max-width: 420px;
}
#maintenance-box .intro-avatar { width: 72px; height: 72px; object-fit: contain; margin-bottom: 8px; }
#maintenance-box h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin: 0 0 10px; }
#maintenance-box p { color: var(--muted); margin: 0; }

/* --- Pack Alertes badge --- */
.pack-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--gradient);
  color: var(--on-accent);
  margin-bottom: 10px;
}

footer {
  text-align: center;
  padding: 34px 0;
  color: var(--muted);
  font-size: 0.82rem;
}
footer a { color: var(--muted); }
footer .admin-link {
  display: inline-block;
  text-decoration: none;
  font-size: 0.78rem;
  opacity: 0.45;
  letter-spacing: 0.02em;
  transition: opacity 0.15s ease;
}
footer .admin-link:hover { opacity: 0.85; }

.empty-state {
  color: var(--muted);
  font-style: italic;
  padding: 14px 0;
}

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}
.confirm-box h3 { font-family: var(--font-display); font-weight: 800; margin-top: 0; }

/* --- Admin --- */
.admin-shell { max-width: 960px; }
.admin-login {
  max-width: 340px;
  margin: 90px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(var(--accent-rgb), 0.12);
}
.admin-tabs { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-tabs button {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 600;
}
.admin-tabs button.active { background: var(--gradient); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.row-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}
.row-card .row-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.row-actions { display: flex; gap: 8px; margin-top: 12px; }
.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.status-pill.paye { background: rgba(45, 200, 130, 0.15); color: #4ADE93; border-color: rgba(74, 222, 147, 0.35); }
.status-pill.expire { background: rgba(220, 90, 60, 0.15); color: #E3735A; border-color: rgba(227, 115, 90, 0.35); }
.status-pill.attente { background: rgba(230, 180, 60, 0.15); color: #E6C13C; border-color: rgba(230, 193, 60, 0.35); }
.inline-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 20px; }
.inline-form textarea, .inline-form input { grid-column: 1 / -1; }
.color-field { display: flex; align-items: center; gap: 12px; }
.color-field input[type=color] { width: 46px; height: 36px; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }

/* --- Stats & filtres (admin) --- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-card .stat-num { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; display: block; }
.stat-card .stat-label { color: var(--muted); font-size: 0.78rem; }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.filter-bar select, .filter-bar input {
  width: auto;
  flex: 1 1 160px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.row-actions button.secondary { }
.row-actions .btn-small { font-size: 0.8rem; padding: 8px 14px; }

/* =====================================================================
   Apparence : bouton du pied de page, fenêtre de choix, préréglages
   ===================================================================== */
[hidden] { display: none !important; }

footer .footer-links { display: flex; align-items: center; justify-content: center; gap: 8px; }
footer .footer-sep { opacity: 0.35; font-size: 0.78rem; }
/* Le bouton « apparence » ressemble au lien « admin » (pas au style des gros boutons). */
footer .skin-open {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
}
footer .skin-open:hover { transform: none; box-shadow: none; opacity: 0.85; }

/* Pastilles de couleurs (préréglages) */
.skin-swatches { display: inline-flex; flex-shrink: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.skin-swatches i { display: block; width: 18px; height: 22px; }
.skin-swatches-argent i:nth-child(1) { background: #050509; }
.skin-swatches-argent i:nth-child(2) { background: #F7F6FB; }
.skin-swatches-argent i:nth-child(3) { background: linear-gradient(135deg, #9EA8B8, #FFFFFF); }
.skin-swatches-argent i:nth-child(4) { background: linear-gradient(135deg, #FFFFFF, #B2BBC9); }
.preset-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.preset-save-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.preset-save-row input {
  flex: 1 1 220px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

/* Fenêtre « Apparence du site » */
#skin-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(var(--bg-rgb), 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
#skin-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  box-shadow: 0 30px 90px rgba(var(--accent-rgb), 0.25);
}
#skin-box h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; margin: 0 0 10px; }
#skin-box .skin-intro { color: var(--muted); font-size: 0.92rem; margin: 0 0 16px; }
#skin-box button[type=submit], #skin-box #skin-apply { width: 100%; }
#skin-box .skin-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  padding: 4px 8px;
}
#skin-box .skin-close:hover { transform: none; box-shadow: none; color: var(--ink); }
.skin-error { color: #E3735A; font-size: 0.85rem; margin: 0 0 12px; min-height: 1.2em; }
.skin-msg { color: var(--muted); font-size: 0.85rem; margin: 12px 0; min-height: 1.2em; }
.skin-msg.skin-error { color: #E3735A; }

.skin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.skin-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.85rem;
}
.skin-tile:hover { transform: none; box-shadow: none; border-color: rgba(var(--accent-rgb), 0.55); }
.skin-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.35); }
.skin-tile-argent { margin-top: 2px; }
.skin-tile .skin-name em { font-style: normal; font-size: 0.7rem; opacity: 0.7; margin-left: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.skin-tile .skin-status { font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.skin-duree { margin: 12px 0 0; }

/* =====================================================================
   Version argentée (payante) : html[data-skin="argent"]

   Direction : noir obsidienne, platine poli, reflets nacrés.
   Les couleurs de base viennent de appliquerTheme() ; les surfaces, le texte
   atténué et tout le style métallique sont définis ici.

   Le violet d'origine n'est qu'un souffle : halo très lointain dans un coin du
   fond, éclat sur l'arête de certaines bordures, lueur sous SK, sélection de
   texte. Aucun bouton, aucun aplat violet.
   ===================================================================== */
html[data-skin="argent"] {
  color-scheme: dark;
  scrollbar-color: rgba(200, 208, 221, 0.35) transparent;
  scrollbar-width: thin;

  --surface:   #0C0C15;
  --surface-2: #141421;
  --bg-glow:   #151522;
  --muted:     #B0B6C6;
  --line:      rgba(226, 232, 248, 0.13);

  /* Platine poli : bandes claires et sombres alternées, comme un métal qui reflète la lumière. */
  --platine: linear-gradient(112deg, #A3ADBD 0%, #F4F6FA 17%, #FFFFFF 28%, #C9D1DD 50%, #F1F4F9 72%, #B2BBC9 100%);
  --gradient: var(--platine);
  /* Texte chromé : la première et la dernière couleur sont identiques (animation sans à-coup). */
  --chrome-text: linear-gradient(100deg, #B4BDCB 0%, #FFFFFF 22%, #DCE2EC 42%, #FFFFFF 62%, #C4CCD9 82%, #B4BDCB 100%);
  /* Titres fixes : lumineux en haut, plus doux en bas (métal gravé). */
  --nacre: linear-gradient(180deg, #FFFFFF 0%, #E6EBF3 50%, #BAC4D3 100%);
  /* Arête lumineuse des cartes : la seule touche de violet est le petit éclat vers 82 %. */
  --rim: linear-gradient(145deg, rgba(255,255,255,0.70) 0%, rgba(255,255,255,0.12) 22%, rgba(255,255,255,0.04) 55%, rgba(158,128,255,0.34) 82%, rgba(255,255,255,0.46) 100%);
  /* Reflet de verre sur les surfaces sombres. */
  --glass: linear-gradient(165deg, rgba(255,255,255,0.085) 0%, rgba(255,255,255,0.02) 32%, rgba(255,255,255,0) 58%, rgba(255,255,255,0.035) 100%);
}

html[data-skin="argent"] ::selection { background: rgba(170, 140, 255, 0.35); color: #fff; }

/* --- Fond : projecteur en haut, un souffle violet lointain en bas à gauche --- */
html[data-skin="argent"] body::before {
  background:
    radial-gradient(ellipse 72% 44% at 50% -6%, rgba(236, 241, 255, 0.22) 0%, rgba(232, 238, 255, 0.07) 46%, transparent 76%),
    radial-gradient(ellipse 48% 38% at 92% 24%, rgba(255, 255, 255, 0.075) 0%, transparent 72%),
    radial-gradient(ellipse 62% 46% at -10% 108%, rgba(140, 100, 255, 0.12) 0%, transparent 70%);
}

/* --- Scintillements : deux calques de minuscules points de lumière --- */
html[data-skin="argent"] body::after,
html[data-skin="argent"]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
}
html[data-skin="argent"] body::after {
  background-size: 640px 640px;
  background-image:
    radial-gradient(circle 2.6px at 70px 96px,   rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.3) 45%, transparent 100%),
    radial-gradient(circle 1.6px at 250px 40px,  rgba(255,255,255,0.85) 0%, transparent 100%),
    radial-gradient(circle 2px   at 430px 210px, rgba(235,240,255,0.9)  0%, transparent 100%),
    radial-gradient(circle 1.4px at 560px 90px,  rgba(255,255,255,0.8)  0%, transparent 100%),
    radial-gradient(circle 2.4px at 150px 380px, rgba(255,255,255,0.9)  0%, rgba(255,255,255,0.25) 45%, transparent 100%),
    radial-gradient(circle 1.5px at 340px 470px, rgba(255,255,255,0.8)  0%, transparent 100%),
    radial-gradient(circle 2px   at 590px 420px, rgba(235,240,255,0.9)  0%, transparent 100%),
    radial-gradient(circle 1.4px at 40px 590px,  rgba(255,255,255,0.8)  0%, transparent 100%);
  opacity: 0.7;
}
html[data-skin="argent"]::after {
  background-size: 880px 880px;
  background-position: 310px 180px;
  background-image:
    radial-gradient(circle 2.2px at 120px 150px, rgba(255,255,255,0.9)  0%, rgba(255,255,255,0.25) 45%, transparent 100%),
    radial-gradient(circle 1.5px at 470px 90px,  rgba(255,255,255,0.8)  0%, transparent 100%),
    radial-gradient(circle 2.6px at 720px 300px, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.3) 45%, transparent 100%),
    radial-gradient(circle 1.6px at 260px 520px, rgba(235,240,255,0.9)  0%, transparent 100%),
    radial-gradient(circle 2px   at 620px 640px, rgba(255,255,255,0.85) 0%, transparent 100%),
    radial-gradient(circle 1.4px at 90px 780px,  rgba(255,255,255,0.8)  0%, transparent 100%);
  opacity: 0.55;
}
@media (prefers-reduced-motion: no-preference) {
  html[data-skin="argent"] body::after { animation: skin-twinkle 6.5s ease-in-out infinite; }
  html[data-skin="argent"]::after { animation: skin-twinkle 9s ease-in-out -3.5s infinite; }
}
@keyframes skin-twinkle {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.85; }
}

/* --- En-tête : verre noir et filet de platine --- */
html[data-skin="argent"] header.site-head {
  background: linear-gradient(180deg, rgba(16, 16, 27, 0.95), rgba(5, 5, 9, 0.9));
  border-bottom: 0;
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.95);
}
html[data-skin="argent"] header.site-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 26%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0.5) 72%, rgba(170,140,255,0.5) 88%, transparent 100%);
}
html[data-skin="argent"] nav.site-nav a { color: var(--muted); }
html[data-skin="argent"] nav.site-nav a:hover { color: #fff; }
html[data-skin="argent"] nav.site-nav a.nav-shop,
html[data-skin="argent"] nav.site-nav a.nav-shop:hover { color: var(--on-accent); }

/* --- Séparations de sections : un filet lumineux qui s'estompe sur les bords --- */
html[data-skin="argent"] section { position: relative; border-bottom: 0; }
html[data-skin="argent"] section::after {
  content: "";
  position: absolute;
  left: 8%; right: 8%; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3) 50%, transparent);
}
html[data-skin="argent"] section:last-of-type::after { display: none; }

/* --- Titres chromés --- */
html[data-skin="argent"] .brand,
html[data-skin="argent"] h2.section-title,
html[data-skin="argent"] .price-row .amount {
  background: var(--nacre);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* Nom du site et grand titre d'accueil : chrome avec un reflet qui glisse lentement. */
html[data-skin="argent"] .brand,
html[data-skin="argent"] #hero h2.section-title {
  background: var(--chrome-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(214, 224, 255, 0.2));
}
@media (prefers-reduced-motion: no-preference) {
  html[data-skin="argent"] .brand,
  html[data-skin="argent"] #hero h2.section-title { animation: skin-sheen 8s linear infinite; }
}
@keyframes skin-sheen {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* --- Cartes : verre sombre, arête de platine, reflet en haut --- */
html[data-skin="argent"] form.order-form,
html[data-skin="argent"] .confirm-box,
html[data-skin="argent"] #intro-box,
html[data-skin="argent"] #skin-box,
html[data-skin="argent"] #chat-panel {
  border: 1px solid transparent;
  background-color: var(--surface);
  background-image:
    var(--glass),
    linear-gradient(var(--surface), var(--surface)),
    var(--rim);
  background-origin: border-box;
  background-clip: padding-box, padding-box, border-box;
  box-shadow:
    0 34px 80px -34px rgba(0, 0, 0, 0.95),
    0 20px 60px -24px rgba(214, 224, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* --- Champs : creux sombre, focus lumineux --- */
html[data-skin="argent"] .field select,
html[data-skin="argent"] .field textarea,
html[data-skin="argent"] .field input,
html[data-skin="argent"] .filter-bar select,
html[data-skin="argent"] .filter-bar input {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.02)), var(--surface-2);
  border: 1px solid rgba(226, 232, 248, 0.15);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.5);
}
html[data-skin="argent"] .field select:focus,
html[data-skin="argent"] .field textarea:focus,
html[data-skin="argent"] .field input:focus {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(214, 222, 255, 0.14), 0 0 24px rgba(160, 130, 255, 0.14);
}
html[data-skin="argent"] :focus-visible { outline-color: rgba(255, 255, 255, 0.85); }
html[data-skin="argent"] .price-row { border-top-color: rgba(226, 232, 248, 0.16); }

/* --- Boutons : platine poli --- */
html[data-skin="argent"] button,
html[data-skin="argent"] .btn {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -12px 18px -12px rgba(66, 76, 98, 0.5),
    0 10px 26px -10px rgba(214, 224, 255, 0.32),
    0 2px 5px rgba(0, 0, 0, 0.55);
}
html[data-skin="argent"] button:hover,
html[data-skin="argent"] .btn:hover {
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -12px 18px -12px rgba(66, 76, 98, 0.5),
    0 14px 34px -10px rgba(230, 236, 255, 0.45),
    0 2px 5px rgba(0, 0, 0, 0.55);
}
/* Boutons secondaires : verre sombre, arête claire, texte clair. */
html[data-skin="argent"] button.secondary,
html[data-skin="argent"] .btn.secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)), var(--surface-2);
  border: 1px solid rgba(226, 232, 248, 0.24);
  color: var(--ink);
  text-shadow: none;
  filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 22px -12px rgba(0, 0, 0, 0.9);
}
html[data-skin="argent"] button.secondary:hover,
html[data-skin="argent"] .btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 26px -12px rgba(214, 224, 255, 0.35);
}
html[data-skin="argent"] .skin-tile,
html[data-skin="argent"] footer .skin-open,
html[data-skin="argent"] #chat-close,
html[data-skin="argent"] #skin-box .skin-close {
  text-shadow: none;
  filter: none;
  box-shadow: none;
}
html[data-skin="argent"] .skin-tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)), var(--surface-2);
}
html[data-skin="argent"] .skin-tile:hover { border-color: rgba(255, 255, 255, 0.5); }
html[data-skin="argent"] .skin-tile.selected {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(214, 222, 255, 0.22);
}
html[data-skin="argent"] #chat-form button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -10px 14px -10px rgba(66, 76, 98, 0.5);
}

/* Reflet qui balaie les boutons d'appel à l'action (un passage toutes les quelques secondes). */
html[data-skin="argent"] :is(.nav-shop, .hero-actions .btn:not(.secondary), .price-row button, #chat-toggle) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
html[data-skin="argent"] :is(.nav-shop, .hero-actions .btn:not(.secondary), .price-row button, #chat-toggle)::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 55%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 78%, transparent 100%);
  transform: translateX(-170%) skewX(-20deg);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  html[data-skin="argent"] .nav-shop::after { animation: skin-glint 6s ease-in-out 1s infinite; }
  html[data-skin="argent"] .hero-actions .btn:not(.secondary)::after { animation: skin-glint 7s ease-in-out 2.4s infinite; }
  html[data-skin="argent"] .price-row button::after { animation: skin-glint 8s ease-in-out 3.2s infinite; }
  html[data-skin="argent"] #chat-toggle::after { animation: skin-glint 6.5s ease-in-out 4.5s infinite; }
  html[data-skin="argent"] #chat-toggle { animation-name: skin-pulse; }
}
@keyframes skin-glint {
  0%, 58% { transform: translateX(-170%) skewX(-20deg); }
  100%    { transform: translateX(340%) skewX(-20deg); }
}
@keyframes skin-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -12px 18px -12px rgba(66,76,98,0.5), 0 10px 30px -8px rgba(214,224,255,0.30), 0 2px 5px rgba(0,0,0,0.55); }
  50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -12px 18px -12px rgba(66,76,98,0.5), 0 12px 42px -6px rgba(232,238,255,0.5),  0 2px 5px rgba(0,0,0,0.55); }
}
html[data-skin="argent"] #chat-toggle {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -12px 18px -12px rgba(66,76,98,0.5), 0 10px 30px -8px rgba(214,224,255,0.3), 0 2px 5px rgba(0,0,0,0.55);
}
html[data-skin="argent"] #chat-toggle img { background: rgba(5, 5, 9, 0.82); }

/* --- Liens --- */
html[data-skin="argent"] .links-list li a.link-generic {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)), var(--surface-2);
  border-color: rgba(226, 232, 248, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
html[data-skin="argent"] .links-list li a.link-generic:hover {
  background: var(--platine);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 #fff, 0 12px 30px -10px rgba(230, 236, 255, 0.45);
}
html[data-skin="argent"] .links-list li a.link-telegram { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px -6px rgba(42, 171, 238, 0.4); }

/* --- Bot SK --- */
html[data-skin="argent"] #chat-head { border-bottom: 1px solid rgba(255, 255, 255, 0.5); }
html[data-skin="argent"] #chat-head-text { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
html[data-skin="argent"] #chat-head .chat-avatar { background: rgba(5, 5, 9, 0.82); }
html[data-skin="argent"] .msg.bot .bubble {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)), var(--surface-2);
  border: 1px solid rgba(226, 232, 248, 0.12);
}
html[data-skin="argent"] .msg.user .bubble {
  background: var(--platine);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 16px -8px rgba(214, 224, 255, 0.4);
}
html[data-skin="argent"] .msg.bot .bubble a { color: #fff; }
html[data-skin="argent"] .msg .msg-avatar { background: #05050A; }
html[data-skin="argent"] #chat-form { border-top-color: rgba(226, 232, 248, 0.16); }
html[data-skin="argent"] #chat-form input { background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.02)), var(--surface-2); }
/* SK garde ses couleurs : sa lueur est le seul violet un peu visible, et très douce. */
html[data-skin="argent"] #sk-mascot {
  filter: drop-shadow(0 14px 30px rgba(130, 95, 255, 0.3)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

/* --- Badge du Pack Alertes --- */
html[data-skin="argent"] .pack-badge {
  color: var(--on-accent);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px -8px rgba(214, 224, 255, 0.5);
}

html[data-skin="argent"] .tag { background: rgba(226, 232, 248, 0.1); border-color: rgba(226, 232, 248, 0.3); color: #E6EAF4; }

/* =====================================================================
   RESPONSIVE : téléphone, tablette, paysage.
   Le site reste dans le même ordre et garde tous ses éléments (y compris SK et le
   libellé du bouton du bot) sur chaque appareil.
   ===================================================================== */

/* Aucun champ ne doit passer sous 16 px sur écran tactile : en dessous, iOS zoome
   automatiquement dans la page dès qu'on touche le champ (c'était le cas dans le chat de SK). */
@media (max-width: 1099px), (pointer: coarse) {
  input, select, textarea,
  .field input, .field select, .field textarea,
  #chat-form input,
  .filter-bar input, .filter-bar select,
  .preset-save-row input { font-size: 16px !important; }
}

/* ---------- Tablette et téléphone : le bot s'ouvre en volet plein largeur ---------- */
@media (max-width: 1099px) {
  #sk-chat {
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  /* Ouvert : le volet occupe la zone réellement visible (clavier exclu).
     --vvh / --vvt sont tenues à jour par main.js (visualViewport). */
  #sk-chat.open {
    --u: 0.72;
    --panel-w: min(560px, 100%);
    --peek: calc(var(--u) * 224px * 0.62);        /* partie de SK qui dépasse au-dessus du volet */
    --panel-h: max(220px, min(560px, calc(var(--vvh, 100dvh) * 0.82), calc(var(--vvh, 100dvh) - var(--peek) - 12px)));
    left: 0;
    right: 0;
    bottom: auto;
    top: var(--vvt, 0px);
    height: var(--vvh, 100dvh);
    align-items: stretch;
    justify-content: flex-end;
    gap: 0;
    background: rgba(var(--bg-rgb), 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
  #sk-chat.open #chat-toggle { display: none; }

  #sk-chat.open #chat-panel {
    position: relative;
    z-index: 1;
    width: var(--panel-w);
    height: var(--panel-h);
    max-height: none;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    border-bottom-width: 0;
  }

  /* SK est assis sur le bord du volet, à gauche : on voit la tête, la casquette, les yeux,
     et les effets (étoiles de joie, larmes) fonctionnent comme sur ordinateur. */
  #sk-chat.open #sk-mascot-wrap {
    display: block;
    z-index: 0;
    left: calc((100% - var(--panel-w)) / 2 + 18px);
    bottom: calc(var(--panel-h) - var(--u) * 224px * 0.38);
  }

  #chat-head { padding: 14px 16px; }
  #chat-head-text { min-width: 0; }
  #chat-close { padding: 6px 10px; font-size: 1.9rem; }
  #chat-log { padding: 16px; font-size: 0.97rem; }
  .bubble { max-width: 86%; }
  #chat-form { padding-bottom: env(safe-area-inset-bottom, 0px); }
  #chat-form input { padding: 15px 16px; }
  #chat-form button { width: 68px; font-size: 1.35rem; padding: 0; }

  /* Défilement de la page bloqué derrière le volet. */
  html.chat-lock, html.chat-lock body { overflow: hidden; overscroll-behavior: none; }

  footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}

/* Écrans peu hauts (téléphone en paysage, clavier ouvert) : SK plus petit, en-tête non collant. */
@media (max-width: 1099px) and (max-height: 640px) {
  #sk-chat.open { --u: 0.58; }
  header.site-head { position: static; }
  section { scroll-margin-top: 16px; }
}

/* ---------- Téléphone et petite tablette ---------- */
@media (max-width: 700px) {
  .wrap { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }

  header.site-head { padding: 12px 0; }
  header.site-head .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
  .brand { font-size: 1.2rem; }
  .tagline { font-size: 0.8rem; margin-top: 0; }
  nav.site-nav { gap: 4px 4px; width: 100%; }
  nav.site-nav a { margin: 0; padding: 8px 10px 8px 0; }
  nav.site-nav a.nav-shop { margin-left: auto; padding: 8px 16px; font-size: 0.86rem; }

  section { padding: 44px 0; scroll-margin-top: 130px; }
  h2.section-title { font-size: 1.6rem; }
  #hero h2.section-title { font-size: 2.1rem; }
  .section-intro { font-size: 0.97rem; margin-bottom: 22px; }

  form.order-form { padding: 20px 16px; }
  .price-row { flex-wrap: wrap; gap: 14px; }
  .price-row button { width: 100%; padding: 15px 22px; }
  .confirm-box { padding: 20px 16px; overflow-wrap: anywhere; }

  .hero-actions .btn { width: 100%; justify-content: center; padding: 15px 22px; }
  .links-list li a { padding: 14px 22px; }

  #intro-overlay, #skin-overlay, #maintenance-screen { padding: 16px; }
  #intro-box { padding: 24px 20px; margin: auto; }
  #skin-box { padding: 24px 18px 20px; margin: auto; }

  .inline-form { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .skin-grid { grid-template-columns: 1fr; }
  .links-list li a { width: 100%; justify-content: center; }
  .links-list { gap: 10px; }
  #chat-toggle { font-size: 0.86rem; padding-right: 16px; }
}

/* Très petits écrans (320 px) */
@media (max-width: 359px) {
  nav.site-nav a.nav-shop { margin-left: 0; }
  #hero h2.section-title { font-size: 1.85rem; }
  #chat-toggle { font-size: 0.8rem; }
}

/* ---------- Administration : mêmes garanties sur mobile ---------- */
@media (max-width: 700px) {
  .admin-login { width: calc(100% - 32px); margin: 40px auto; padding: 24px 18px; }
  .admin-tabs { gap: 6px; margin-bottom: 20px; }
  .admin-tabs button { padding: 10px 14px; font-size: 0.85rem; }
  .row-card { padding: 14px; overflow-wrap: anywhere; }
  .row-card .row-top { flex-direction: column; gap: 10px; }
  .row-actions { flex-wrap: wrap; }
  .row-actions button { flex: 1 1 auto; }
  .filter-bar select, .filter-bar input, .filter-bar button { flex: 1 1 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .color-field label { min-width: 0 !important; flex: 1; }
  .preset-save-row button { width: 100%; }
  #admin-screen .field[style*="inline-block"] { display: block !important; max-width: none !important; margin-right: 0 !important; }
}
