/* COLOR by novatechweb — page de connexion : à gauche un flux de couleurs WebGL,
   à droite le formulaire. L'accent (--accent) suit la palette de l'ambiance (login.js). */

:root {
  --bg: #161618;
  --panel: #1d1d20;
  --field: #232327;
  --line: #34343a;
  --text: #ececf1;
  --muted: #9a9aa6;
  --accent: #6d5dfc;
  --accent-on: #fff;
  --danger: #ff7a8a;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
h1, p { margin: 0; }
button, input { font: inherit; color: inherit; }

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

/* ================= Colonne WebGL ================= */

.auth-art {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  height: 100vh;
  height: 100dvh;
  padding: 28px 32px 32px;
  overflow: hidden;
  isolation: isolate;
  background: #08080a;
  color: #fff;
  container: art / inline-size;
}
/* Mur de palettes : colonnes qui défilent en boucle, sens alternés. */
.auth-wall {
  position: absolute;
  inset: -40px -20px;
  z-index: -1;
  display: flex;
  gap: 12px;
  padding: 0 12px;
  opacity: .92;
  -webkit-mask: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}
.wall-col { flex: 1 1 0; min-width: 170px; overflow: hidden; }
.wall-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: wall-up var(--d, 40s) linear var(--o, 0s) infinite;
  will-change: transform;
}
.wall-col.is-down .wall-track { animation-name: wall-down; }
.wall-col:hover .wall-track { animation-play-state: paused; }
@keyframes wall-up { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 6px)); } }
@keyframes wall-down { from { transform: translateY(calc(-50% - 6px)); } to { transform: translateY(0); } }
.wall-card {
  display: flex;
  flex: none;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(21, 28, 40, .06);
  transition: transform .25s, box-shadow .25s;
}
.wall-card:hover { transform: scale(1.04); box-shadow: 0 14px 30px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .7); }
.wall-card i, .auth-feature-card i { flex: 1 1 0; background: var(--c); }

/* Grande palette au premier plan : centrée dans l'espace libre, elle rétrécit avant de toucher l'accroche. */
.auth-feature-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 1 auto;
  width: min(560px, 100%);
  height: clamp(150px, 30vh, 280px);
  min-height: 120px;
  margin: auto 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 6px #08080a, 0 0 0 7px rgba(255, 255, 255, .14);
}
.auth-feature-card i {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 12px;
  color: var(--on);
  font-style: normal;
  transform-origin: bottom;
}
.auth-feature-card b { font-size: clamp(13px, 1.3vw, 18px); font-weight: 800; letter-spacing: .03em; }
.auth-feature-card small { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.is-features .auth-feature-card { display: none; }

/* Panneaux opaques : logo et textes restent lisibles quelles que soient les palettes dessous. */
.auth-glass {
  border: 1px solid #26262c;
  background: #0d0d10;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

.auth-brand {
  display: flex;
  flex: none;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 16px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 600;
}
.auth-brand img { display: block; width: auto; height: 28px; }
.auth-brand span { padding-top: 6px; }

.auth-art-foot {
  display: flex;
  flex: none;
  flex-direction: column;
  align-self: flex-start;
  align-items: flex-start;
  gap: 14px;
  max-width: min(640px, 100%);
  padding: 26px 28px;
  border-radius: 24px;
  color: #fff;
}
.auth-claim {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
}
.auth-sub { max-width: 46ch; color: rgba(255, 255, 255, .72); font-size: 15px; }

.auth-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 66px)); gap: 6px; width: 100%; margin-top: 6px; }
.auth-chip {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 64px;
  overflow: hidden;
  white-space: nowrap;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--c);
  color: var(--on);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 20px rgba(0, 0, 0, .35);
}
.auth-chip small { display: block; font-size: 10px; font-weight: 600; opacity: .8; }

/* Fonctionnalités (inscription) : tableau sobre et opaque par-dessus le mur. */
.auth-features {
  overflow-anchor: none;
  position: absolute;
  top: 98px;
  left: 32px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100% - 64px));
  max-height: calc(100% - 98px - 32px);
  overflow-y: auto;
  border: 1px solid #26262c;
  border-radius: 14px;
  background: #0d0d10;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  scrollbar-width: thin;
}
.af-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid #222228; }
.af-title { flex: 1; }
.af-kicker { color: #9a9aa6; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.af-title h2 { margin: 4px 0 0; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.af-price { display: flex; flex-direction: column; align-items: flex-end; }
.af-price b { font-size: 26px; font-weight: 800; line-height: 1.05; }
.af-price span { color: #9a9aa6; font-size: 12px; }
.auth-features-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #2c2c33;
  border-radius: 7px;
  background: none;
  color: #b4b4be;
  font-size: 11px;
  cursor: pointer;
}
.auth-features-close:hover { border-color: #46464f; color: #fff; }
.af-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; color: #8e8e99; font-size: 12.5px; }
.af-cta {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #0d0d10;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.af-cta:hover { background: #e4e4ea; }
.af-discover {
  display: inline-flex;
  align-items: center;
  height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid #2c2c33;
  border-radius: 8px;
  color: #e4e4ea;
  font-weight: 600;
  text-decoration: none;
}
.af-discover:hover { border-color: #50505a; color: #fff; }
.af-foot { justify-content: flex-end; }
.af-more { margin-right: auto; color: #8e8e99; font-size: 12.5px; }

/* Lien vers la visite guidée, sous le formulaire. */
.auth-discover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.auth-discover:hover { border-color: #4a4a52; background: #202024; }
.auth-discover b { display: block; font-size: 14px; }
.auth-discover small { display: block; color: var(--muted); font-size: 12px; }
/* Pendant l'inscription, la carte des fonctionnalités prend la place de l'accroche. */
.is-features .auth-art-foot { display: none; }

/* ================= Colonne formulaire ================= */

.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px clamp(24px, 5vw, 72px) 24px;
  background: var(--panel);
  border-left: 1px solid #0e0e10;
}

.auth-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-head h1 { font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.auth-head p { margin-top: 8px; color: var(--muted); font-size: 15px; }

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #18181b;
}
.auth-tabs button {
  position: relative;
  z-index: 1;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: color .2s;
}
.auth-tabs button[aria-selected="true"] { color: var(--text); }
.auth-tabs-ink {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 8px;
  background: #2f2f35;
  box-shadow: inset 0 0 0 1px #3d3d44, 0 4px 12px rgba(0, 0, 0, .25);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-hint { margin: -6px 0 0; color: #9a9aa4; font-size: 12.5px; line-height: 1.5; }
.auth-code { font: 700 22px/1 ui-monospace, "SF Mono", Consolas, monospace !important; letter-spacing: .25em; text-align: center; }
/* Ventes fermées : connexion seule. */
.no-signup .auth-tabs, .no-signup .auth-features { display: none !important; }

.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field > span:first-child { color: #c9c9d2; font-size: 13px; font-weight: 600; }
.auth-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-field input::placeholder { color: #6c6c76; }
.auth-field input:hover { border-color: #46464e; }
.auth-field input:focus {
  border-color: var(--accent);
  outline: none;
  background: #26262b;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 26%, transparent);
}
.auth-field input[aria-invalid="true"] { border-color: var(--danger); }

.auth-pass { position: relative; display: block; }
.auth-pass input { padding-right: 48px; }
.auth-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}
.auth-eye:hover { background: #2e2e34; color: var(--text); }
.auth-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.auth-check { display: inline-flex; align-items: center; gap: 9px; color: #c9c9d2; cursor: pointer; user-select: none; }
.auth-check input {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid #55555e;
  border-radius: 5px;
  background: var(--field);
  cursor: pointer;
  appearance: none;
  transition: background .15s, border-color .15s;
}
.auth-check input:checked { border-color: var(--accent); background: var(--accent); }
.auth-check input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-bottom: 2px solid var(--accent-on);
  border-left: 2px solid var(--accent-on);
  transform: rotate(-45deg);
}

.auth-link {
  padding: 0;
  border: 0;
  background: none;
  color: color-mix(in oklab, var(--accent) 55%, white);
  font-weight: 600;
  cursor: pointer;
}
.auth-link:hover { text-decoration: underline; }

.auth-error { min-height: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.auth-error:empty { display: none; }

.auth-submit {
  position: relative;
  display: grid;
  place-items: center;
  height: 48px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-on);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.auth-submit:hover { filter: brightness(1.07); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[aria-busy="true"] { cursor: progress; }
.auth-submit[aria-busy="true"] span { opacity: 0; }
.auth-submit[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-strength { display: flex; align-items: center; gap: 10px; margin-top: -6px; color: var(--muted); font-size: 12px; }
.auth-bars { display: grid; flex: none; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 112px; }
.auth-bars i { height: 5px; border-radius: 99px; background: #34343a; transition: background .25s; }
.auth-strength[data-score="1"] .auth-bars i:nth-child(-n+1) { background: #ff7a6b; }
.auth-strength[data-score="2"] .auth-bars i:nth-child(-n+2) { background: #f5b84a; }
.auth-strength[data-score="3"] .auth-bars i:nth-child(-n+3) { background: #9bd65a; }
.auth-strength[data-score="4"] .auth-bars i:nth-child(-n+4) { background: #43d18a; }

.auth-forgot { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #19191c; color: #c9c9d2; }
.auth-forgot strong { color: var(--text); }
.auth-danger {
  height: 38px;
  padding: 0 14px;
  border: 1px solid color-mix(in oklab, var(--danger) 55%, transparent);
  border-radius: 9px;
  background: color-mix(in oklab, var(--danger) 12%, transparent);
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
}
.auth-danger:hover { background: color-mix(in oklab, var(--danger) 20%, transparent); }

.auth-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.auth-note svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; color: #6f6f79; font-size: 12px; }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--text); text-decoration: underline; }
.auth-foot b { color: color-mix(in oklab, var(--accent) 55%, white); }

/* ----- Abonnement ----- */

.auth-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #19191c;
}
.auth-plan-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.auth-plan-text b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.auth-plan-text > span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.auth-plan-price { display: flex; flex: none; flex-direction: column; align-items: flex-end; }
.auth-plan-price b { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.auth-plan-price span { color: var(--muted); font-size: 12px; }
.auth-plan-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-on);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
}

.auth-pay { display: flex; flex-direction: column; gap: 16px; }
.auth-order { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #19191c; }
.auth-order-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.auth-order dl { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; }
.auth-order dl div { display: flex; justify-content: space-between; gap: 16px; }
.auth-order dt { color: var(--muted); }
.auth-order dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.auth-order-total { padding-top: 12px; border-top: 1px dashed var(--line); }
.auth-order-total dt { color: var(--text); font-weight: 700; }
.auth-order-total dd { font-size: 20px; font-weight: 800; }
.auth-demo {
  padding: 12px 14px;
  border: 1px solid #5c4a1f;
  border-radius: 10px;
  background: #2a2312;
  color: #e9d29a;
  font-size: 12.5px;
}
.auth-demo b { color: #ffd77a; }
.auth-demo code { padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .3); font-size: 12px; }
.auth-secure { color: var(--muted); font-size: 12px; }

/* ================= Petits écrans ================= */

/* Portables peu hauts : la grande palette s'efface d'abord, puis le texte et les pastilles. */
@media (max-height: 640px) {
  .auth-feature-card { display: none; }
}
@media (max-height: 540px) {
  .auth-sub, .auth-chips { display: none; }
  .auth-art { padding-block: 20px; }
}

/* Colonne étroite (tablette, petit portable) : la liste des fonctionnalités se resserre. */
@container art (max-width: 700px) {
  .sv-items { gap: 8px; padding: 12px 12px 2px; }
  .sv-visual { height: 84px; padding: 8px; }
  .sv-text { padding: 8px 9px 10px; }
  .sv-text b { font-size: 12.5px; }
  .sv-text span { font-size: 11.5px; }
  .af-head { padding: 14px 16px 12px; }
  .af-title h2 { font-size: 19px; }
  .af-price b { font-size: 22px; }
  .af-foot { flex-wrap: wrap; padding: 12px 14px; }
  .af-more { flex: 1 0 100%; }
  .af-discover { margin-left: 0; }
}

/* Téléphones et tablettes : un bandeau compact (logo + accroche) au-dessus du formulaire. */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { position: relative; height: auto; padding: 16px; gap: clamp(28px, 9svh, 88px); }
  .auth-brand { padding: 8px 14px 8px 10px; border-radius: 14px; }
  .auth-brand img { height: 24px; }
  .auth-art-foot { max-width: 100%; padding: 14px 18px; gap: 8px; border-radius: 18px; }
  .auth-claim { font-size: clamp(26px, 7.2vw, 40px); }
  .auth-sub, .auth-chips, .auth-features, .auth-feature-card { display: none; }
  .is-features .auth-art-foot { display: flex; }
  .auth-panel { min-height: 0; padding: 28px 20px 20px; border-left: 0; }
  .auth-card { gap: 18px; }
  .auth-head h1 { font-size: 26px; }
  .auth-head p { font-size: 14.5px; }
  /* 16 px : iOS n'agrandit plus la page quand on touche un champ. */
  .auth-field input { font-size: 16px; }
  .auth-foot { padding-top: 20px; }
}
/* Écran peu haut (téléphone à l'horizontale, petit téléphone) : le logo seul, le formulaire tout de suite visible. */
@media (max-width: 900px) and (max-height: 600px) {
  .auth-art-foot, .is-features .auth-art-foot { display: none; }
  .auth-panel { padding-top: 20px; }
  .auth-card { gap: 14px; }
  .auth-head h1 { font-size: 22px; }
  .auth-head p { margin-top: 4px; }
}
/* Très petits écrans : l'offre passe sur deux lignes. */
@media (max-width: 400px) {
  .auth-panel { padding-inline: 16px; }
  .auth-plan { flex-wrap: wrap; }
  .auth-plan-price { flex-direction: row; align-items: baseline; gap: 6px; }
  .auth-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}
/* Écrans tactiles : zones de toucher d'au moins 44 px. */
@media (pointer: coarse) {
  .auth-check, .auth-link { min-height: 44px; }
  .auth-eye { right: 4px; width: 40px; height: 40px; }
  .auth-color { width: 36px; height: 36px; }
  .auth-colors { gap: 10px; }
}
/* Nuancier sur un écran peu haut. */
@media (max-height: 540px) {
  .auth-picker { gap: 10px; padding: 14px; }
  .auth-picker .auth-sv { height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .wall-track { animation: none; }
  *, *::before, *::after { transition: none !important; animation-duration: 1ms !important; }
}

/* Mode serveur : le mot de passe oublié passe par un e-mail. */
.is-remote .forgot-local { display: none; }
.auth-error.is-ok { color: #6be3a5; }
.auth-error a { color: inherit; }

/* Tant que le script n'est pas prêt, le formulaire reste masqué. */
.is-booting .auth-card { visibility: hidden; }

/* Inscription : couleur préférée et logo. */
.auth-field em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 500; }
.auth-hint { color: var(--muted); font-size: 12px; }
.auth-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-color {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  cursor: pointer;
}
.auth-color[aria-checked="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #fff; }
.auth-color-custom { display: grid; place-items: center; background: conic-gradient(#fd6d61, #fece3d, #3ddebe, #3aa2fd, #733efc, #fd6d61); }
.auth-color-custom span { width: 14px; height: 14px; border-radius: 4px; background: var(--c, #fff); box-shadow: 0 0 0 2px #fff; }
.auth-color-custom:not(.is-set) span { background: #fff; }

/* Nuancier sur mesure. */
/* Fenêtre modale du nuancier : opaque, sans flou. */
.picker-dialog {
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
}
.picker-dialog::backdrop { background: rgba(6, 6, 8, .72); }
.auth-picker { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid #2c2c33; border-radius: 16px; background: #19191c; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.picker-head { display: flex; align-items: center; justify-content: space-between; }
.picker-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.picker-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #2c2c33; border-radius: 8px; background: none; color: #b4b4be; font-size: 12px; cursor: pointer; }
.picker-close:hover { border-color: #4a4a52; color: #fff; }
.auth-picker .auth-sv { height: 200px; }
.picker-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.picker-cancel { height: 38px; padding: 0 16px; border: 1px solid #2c2c33; border-radius: 9px; background: none; color: #e4e4ea; font-weight: 600; cursor: pointer; }
.picker-cancel:hover { border-color: #4a4a52; color: #fff; }
.picker-foot .auth-picker-ok { height: 38px; }
.auth-sv {
  position: relative;
  height: 150px;
  border-radius: 8px;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--hue, red));
  cursor: crosshair;
  touch-action: none;
}
.auth-sv-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.auth-hue {
  position: relative;
  height: 14px;
  border-radius: 99px;
  background: linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%);
  cursor: pointer;
  touch-action: none;
}
.auth-hue-thumb {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--hue);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.auth-sv:focus-visible, .auth-hue:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.auth-picker-row { display: flex; align-items: center; gap: 10px; }
.auth-picker-chip { flex: none; width: 40px; height: 40px; border-radius: 9px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.auth-picker-id { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.auth-picker-hex {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font: 700 14px ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.auth-picker-hex:focus { border-color: #fff; outline: none; }
.auth-picker-hex[aria-invalid="true"] { border-color: var(--danger); }
.auth-picker-name { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.auth-picker-ok { flex: none; height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: #fff; color: #0d0d10; font-weight: 700; cursor: pointer; }
.auth-picker-ok:hover { background: #e4e4ea; }

/* ================= Vitrine : cartes illustrées ================= */

.sv-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 18px 4px; }
.sv-item { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: #fff; color: #15151b; }
.sv-visual { position: relative; display: grid; place-items: center; height: clamp(96px, 11vh, 124px); padding: 12px; overflow: hidden; background: #f3f3f6; }
.sv-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.sv-text b { font-size: 13.5px; font-weight: 800; line-height: 1.25; }
.sv-text span { color: #5c5c68; font-size: 12px; line-height: 1.35; }

/* Éléments communs des aperçus. */
.sv-strip { display: flex; overflow: hidden; border-radius: 6px; }
.sv-strip i { flex: 1 1 0; background: var(--c); }
.sv-l1, .sv-l2, .sv-l3 { display: block; height: 6px; border-radius: 3px; background: #d6d6de; }
.sv-l1 { width: 70%; height: 8px; background: #15151b; }
.sv-l2 { width: 55%; }
.sv-l3 { width: 40%; }

/* Harmonies : colonnes de la palette. */
.sv-cols { display: flex; width: 100%; height: 100%; overflow: hidden; border-radius: 8px; }
.sv-cols i { display: flex; flex: 1 1 0; align-items: flex-end; justify-content: center; padding-bottom: 6px; background: var(--c); color: var(--on); font-style: normal; }
.sv-cols b { font: 700 9px ui-monospace, Consolas, monospace; letter-spacing: .02em; }

/* Logo → couleurs. */
.sv-logo { display: flex; align-items: center; gap: 10px; }
.sv-logo img { width: 92px; height: auto; }
.sv-arrow { color: #9a9aa6; font-size: 18px; font-weight: 700; }
.sv-dots { display: grid; grid-template-columns: repeat(3, 20px); gap: 5px; }
.sv-dots i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; }

/* Explorateur : grille de palettes. */
.sv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.sv-grid .sv-strip { height: 30px; }

/* Contraste : cases « Aa ». */
.sv-contrast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.sv-contrast i { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 8px; border-radius: 7px; background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); font: 800 15px/1 inherit; font-style: normal; }
.sv-contrast small { padding: 2px 4px; border-radius: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 8.5px; font-weight: 700; }

/* Variations et dégradé. */
.sv-vars { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.sv-vars .sv-strip { height: 16px; }
.sv-gradient { height: 18px; border-radius: 6px; }

/* Aperçu d'interface : mini site. */
.sv-site { display: flex; flex-direction: column; gap: 5px; width: 100%; height: 100%; padding: 6px 8px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px #e2e2e8; }
.sv-site-bar { display: flex; gap: 3px; }
.sv-site-bar i { width: 5px; height: 5px; border-radius: 50%; background: #d6d6de; }
.sv-site-nav { display: flex; align-items: center; gap: 5px; }
.sv-site-nav b { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.sv-site-nav span { width: 18px; height: 4px; border-radius: 2px; background: #d6d6de; }
.sv-site-nav em { width: 22px; height: 8px; margin-left: auto; border-radius: 3px; background: var(--c); }
.sv-site-hero { display: flex; flex-direction: column; gap: 4px; }
.sv-site-hero em { width: 34px; height: 10px; border-radius: 3px; background: var(--c); }
.sv-site-cards { display: grid; flex: 1; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.sv-site-cards i { border-radius: 4px; background: var(--c); }

/* Exports : logos et code. */
.sv-exports { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.sv-logos { display: flex; justify-content: space-between; }
.sv-logos img { width: 22px; height: 22px; object-fit: contain; }
.sv-logos img[src$="pdf.svg"] { padding: 1px; border-radius: 4px; background: #ececf0; }
.sv-exports code { display: flex; flex-direction: column; gap: 3px; padding: 7px 9px; border-radius: 7px; background: #15151b; color: #d6d6de; font: 600 9.5px ui-monospace, Consolas, monospace; }
.sv-exports code span { display: flex; align-items: center; gap: 5px; }
.sv-exports code i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }

/* Charte PDF : deux pages. */
.sv-pdf { display: flex; gap: 10px; height: 100%; }
.sv-page { display: flex; flex-direction: column; gap: 5px; width: 72px; height: 100%; padding: 7px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px #e2e2e8, 0 4px 10px rgba(0, 0, 0, .06); }
.sv-page img { width: 36px; height: auto; }
.sv-page-cover { flex: 1; border-radius: 3px; }
.sv-page-grid { display: grid; flex: 1; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.sv-page-grid i { border-radius: 2px; background: var(--c); }
.sv-page .sv-l1 { height: 5px; }
.sv-page .sv-l2, .sv-page .sv-l3 { height: 4px; }

/* Bibliothèque : cartes enregistrées. */
.sv-library { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: 100%; }
.sv-card { display: flex; flex-direction: column; gap: 5px; padding: 5px; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px #e2e2e8; }
.sv-card .sv-strip { height: 34px; }
.sv-card em { align-self: flex-start; padding: 1px 5px; border-radius: 4px; background: var(--c); color: #15151b; font-size: 8.5px; font-style: normal; font-weight: 700; }

/* Écrans peu hauts (portables) : la vitrine se resserre pour tenir sans défilement. */
@media (max-height: 880px) {
  .auth-features { top: 84px; max-height: calc(100% - 84px - 18px); }
  .af-head { padding: 12px 18px 10px; }
  .af-title h2 { font-size: 19px; }
  .sv-items { gap: 10px; padding: 12px 14px 2px; }
  .sv-visual { height: 78px; padding: 8px; }
  .sv-text { padding: 8px 10px 10px; }
  .sv-text b { font-size: 13px; }
  .af-foot { padding: 10px 16px; }
}
.af-discover, .af-cta { flex: none; white-space: nowrap; }
.af-more { min-width: 0; }

/* Pas de recalage automatique du défilement quand le nuancier s'ouvre ou se ferme. */
html { overflow-anchor: none; }
.auth-colors button { scroll-margin: 0; }
