:root {
  /* Chrome produit : orange EVC. Pastilles carte = --accent. Surface éditoriale zinc. */
  --brand: #ff6b21;
  --brand-mid: #ff823f;
  --brand-text: #9a3412;
  --brand-ink: #18181b;
  --brand-soft: rgba(255, 107, 33, 0.12);
  --auth-banner: #065f46;
  --surface: #f7f7f5;
  --surface-elevated: #ffffff;
  --ink: #18181b;
  --ink-muted: #52525b;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --accent: #0a6b45;
  --accent-soft: rgba(10, 107, 69, 0.12);
  --accent-mid: #0e8556;
  /* Texte / icônes posés sur un fond --accent (boutons actifs, pastilles). */
  --on-accent: #ffffff;
  --info-warm: #fff1e8;
  --ambient-a: rgba(255, 107, 33, 0.08);
  --ambient-b: rgba(10, 107, 69, 0.06);
  --radius-panel: 1rem;
  --radius-control: 0.5rem;
  --shadow-panel: 0 1px 2px rgba(24, 24, 27, 0.04), 0 12px 32px rgba(24, 24, 27, 0.06);
  --shadow-control: 0 1px 2px rgba(24, 24, 27, 0.04);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

html.dark {
  --brand: #ff6b21;
  --brand-mid: #ff823f;
  --brand-text: #ffb088;
  --brand-ink: #fafafa;
  --brand-soft: rgba(255, 107, 33, 0.22);
  --auth-banner: #065f46;
  --surface: #09090b;
  --surface-elevated: #121215;
  --ink: #fafafa;
  --ink-muted: #a1a1aa;
  --line: #27272a;
  --line-strong: #3f3f46;
  /* Pastille forêt : même teinte carte (#0a6b45), pas de menthe séparée. */
  --accent: #0a6b45;
  --accent-soft: rgba(10, 107, 69, 0.22);
  --accent-mid: #0e8556;
  --on-accent: #ffffff;
  --info-warm: rgba(255, 107, 33, 0.12);
  --ambient-a: rgba(255, 107, 33, 0.1);
  --ambient-b: rgba(10, 107, 69, 0.1);
  --shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-control: 0 1px 2px rgba(0, 0, 0, 0.35);
}

html[data-card-theme='obsidian'] {
  --accent: #22262e;
  --accent-soft: rgba(34, 38, 46, 0.14);
  --accent-mid: #3a4150;
  --ambient-a: rgba(34, 38, 46, 0.08);
  --ambient-b: rgba(91, 97, 108, 0.08);
}

html[data-card-theme='forest'] {
  --accent: #0a6b45;
  --accent-soft: rgba(10, 107, 69, 0.16);
  --accent-mid: #0e8556;
  --ambient-a: rgba(10, 107, 69, 0.12);
  --ambient-b: rgba(14, 133, 86, 0.1);
}

html[data-card-theme='cobalt'] {
  --accent: #1f6fbf;
  --accent-soft: rgba(31, 111, 191, 0.16);
  --accent-mid: #2f86db;
  --ambient-a: rgba(31, 111, 191, 0.12);
  --ambient-b: rgba(47, 134, 219, 0.1);
}

html[data-card-theme='bronze'] {
  --accent: #bc581e;
  --accent-soft: rgba(196, 92, 31, 0.16);
  --accent-mid: #e07028;
  --ambient-a: rgba(196, 92, 31, 0.12);
  --ambient-b: rgba(224, 112, 40, 0.1);
}

html[data-card-theme='bordeaux'] {
  --accent: #a11f35;
  --accent-soft: rgba(161, 31, 53, 0.16);
  --accent-mid: #c42845;
  --ambient-a: rgba(161, 31, 53, 0.12);
  --ambient-b: rgba(196, 40, 69, 0.1);
}

html[data-card-theme='teal'] {
  --accent: #0d846e;
  --accent-soft: rgba(14, 143, 120, 0.16);
  --accent-mid: #14b094;
  --ambient-a: rgba(14, 143, 120, 0.12);
  --ambient-b: rgba(20, 176, 148, 0.1);
}

html[data-card-theme='gold'] {
  --accent: #c2912a;
  --on-accent: #18181b;
  --accent-soft: rgba(194, 145, 42, 0.16);
  --accent-mid: #dbab3a;
  --ambient-a: rgba(194, 145, 42, 0.12);
  --ambient-b: rgba(219, 171, 58, 0.1);
}

html[data-card-theme='navy'] {
  --accent: #1a4f96;
  --accent-soft: rgba(26, 79, 150, 0.16);
  --accent-mid: #2766bd;
  --ambient-a: rgba(26, 79, 150, 0.12);
  --ambient-b: rgba(39, 102, 189, 0.1);
}

html[data-card-theme='plum'] {
  --accent: #9a2f5c;
  --accent-soft: rgba(154, 47, 92, 0.16);
  --accent-mid: #b83d72;
  --ambient-a: rgba(154, 47, 92, 0.12);
  --ambient-b: rgba(184, 61, 114, 0.1);
}

html[data-card-theme='indigo'] {
  --accent: #4a4fb0;
  --accent-soft: rgba(74, 79, 176, 0.16);
  --accent-mid: #5f65c9;
  --ambient-a: rgba(74, 79, 176, 0.12);
  --ambient-b: rgba(95, 101, 201, 0.1);
}

html[data-card-theme='olive'] {
  --accent: #66732e;
  --accent-soft: rgba(102, 115, 46, 0.16);
  --accent-mid: #7d8c3a;
  --ambient-a: rgba(102, 115, 46, 0.12);
  --ambient-b: rgba(125, 140, 58, 0.1);
}

html[data-card-theme='lagon'] {
  --accent: #0f6e86;
  --accent-soft: rgba(15, 110, 134, 0.16);
  --accent-mid: #1787a3;
  --ambient-a: rgba(15, 110, 134, 0.12);
  --ambient-b: rgba(23, 135, 163, 0.1);
}

html[data-card-theme='cacao'] {
  --accent: #7a4e32;
  --accent-soft: rgba(122, 78, 50, 0.16);
  --accent-mid: #96644a;
  --ambient-a: rgba(122, 78, 50, 0.12);
  --ambient-b: rgba(150, 100, 74, 0.1);
}

html[data-card-theme='corail'] {
  --accent: #c74e37;
  --accent-soft: rgba(212, 83, 58, 0.16);
  --accent-mid: #e46b54;
  --ambient-a: rgba(212, 83, 58, 0.12);
  --ambient-b: rgba(228, 107, 84, 0.1);
}

html[data-card-theme='ardoise'] {
  --accent: #5b6770;
  --accent-soft: rgba(91, 103, 112, 0.16);
  --accent-mid: #73808a;
  --ambient-a: rgba(91, 103, 112, 0.12);
  --ambient-b: rgba(115, 128, 138, 0.1);
}

html[data-card-theme='rose'] {
  --accent: #c4476a;
  --accent-soft: rgba(196, 71, 106, 0.16);
  --accent-mid: #d65d80;
  --ambient-a: rgba(196, 71, 106, 0.12);
  --ambient-b: rgba(214, 93, 128, 0.1);
}

html[data-card-theme='amethyste'] {
  --accent: #6b21a8;
  --accent-soft: rgba(107, 33, 168, 0.16);
  --accent-mid: #7e22ce;
  --ambient-a: rgba(107, 33, 168, 0.12);
  --ambient-b: rgba(126, 34, 206, 0.1);
}

html[data-card-theme='ambre'] {
  --accent: #d97706;
  --accent-soft: rgba(217, 119, 6, 0.16);
  --accent-mid: #b45309;
  --ambient-a: rgba(217, 119, 6, 0.12);
  --ambient-b: rgba(180, 83, 9, 0.1);
}

html[data-card-theme='menthe'] {
  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, 0.16);
  --accent-mid: #10b981;
  --ambient-a: rgba(5, 150, 105, 0.12);
  --ambient-b: rgba(16, 185, 129, 0.1);
}

html[data-card-theme='azur'] {
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.16);
  --accent-mid: #0369a1;
  --ambient-a: rgba(2, 132, 199, 0.12);
  --ambient-b: rgba(3, 105, 161, 0.1);
}

html[data-card-theme='anthracite'] {
  --accent: #374151;
  --accent-soft: rgba(55, 65, 81, 0.16);
  --accent-mid: #4b5563;
  --ambient-a: rgba(55, 65, 81, 0.12);
  --ambient-b: rgba(75, 85, 99, 0.1);
}

html.dark[data-card-theme='obsidian'] {
  --accent: #f2f4f7;
  --accent-soft: rgba(242, 244, 247, 0.12);
  --accent-mid: #d5dae3;
  --on-accent: #18181b;
  --ambient-a: rgba(242, 244, 247, 0.06);
  --ambient-b: rgba(154, 161, 173, 0.08);
}

html.dark[data-card-theme='forest'] {
  --accent: #0a6b45;
  --accent-soft: rgba(10, 107, 69, 0.28);
  --accent-mid: #0e8556;
  --on-accent: #ffffff;
  --ambient-a: rgba(10, 107, 69, 0.2);
  --ambient-b: rgba(14, 133, 86, 0.14);
}

html.dark[data-card-theme='cobalt'] {
  --accent: #5eb0ff;
  --accent-soft: rgba(94, 176, 255, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(94, 176, 255, 0.14);
  --ambient-b: rgba(31, 111, 191, 0.12);
}

html.dark[data-card-theme='bronze'] {
  --accent: #ff8f4a;
  --accent-soft: rgba(255, 143, 74, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(255, 143, 74, 0.14);
  --ambient-b: rgba(196, 92, 31, 0.12);
}

html.dark[data-card-theme='bordeaux'] {
  --accent: #ff6b84;
  --accent-soft: rgba(255, 107, 132, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(255, 107, 132, 0.14);
  --ambient-b: rgba(161, 31, 53, 0.12);
}

html.dark[data-card-theme='teal'] {
  --accent: #2fd4b5;
  --accent-soft: rgba(47, 212, 181, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(47, 212, 181, 0.14);
  --ambient-b: rgba(14, 143, 120, 0.12);
}

html.dark[data-card-theme='gold'] {
  --accent: #f0c14d;
  --accent-soft: rgba(240, 193, 77, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(240, 193, 77, 0.14);
  --ambient-b: rgba(194, 145, 42, 0.12);
}

html.dark[data-card-theme='navy'] {
  --accent: #6ea2ff;
  --accent-soft: rgba(110, 162, 255, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(110, 162, 255, 0.14);
  --ambient-b: rgba(26, 79, 150, 0.12);
}

html.dark[data-card-theme='plum'] {
  --accent: #ef6aa0;
  --accent-soft: rgba(239, 106, 160, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(239, 106, 160, 0.14);
  --ambient-b: rgba(154, 47, 92, 0.12);
}

html.dark[data-card-theme='indigo'] {
  --accent: #8f94ff;
  --accent-soft: rgba(143, 148, 255, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(143, 148, 255, 0.14);
  --ambient-b: rgba(74, 79, 176, 0.12);
}

html.dark[data-card-theme='olive'] {
  --accent: #d4e07a;
  --accent-soft: rgba(212, 224, 122, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(212, 224, 122, 0.14);
  --ambient-b: rgba(102, 115, 46, 0.12);
}

html.dark[data-card-theme='lagon'] {
  --accent: #5ec8e0;
  --accent-soft: rgba(94, 200, 224, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(94, 200, 224, 0.14);
  --ambient-b: rgba(15, 110, 134, 0.12);
}

html.dark[data-card-theme='cacao'] {
  --accent: #e0b08a;
  --accent-soft: rgba(224, 176, 138, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(224, 176, 138, 0.14);
  --ambient-b: rgba(122, 78, 50, 0.12);
}

html.dark[data-card-theme='corail'] {
  --accent: #ff9a86;
  --accent-soft: rgba(255, 154, 134, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(255, 154, 134, 0.14);
  --ambient-b: rgba(212, 83, 58, 0.12);
}

html.dark[data-card-theme='ardoise'] {
  --accent: #d5dde3;
  --accent-soft: rgba(213, 221, 227, 0.18);
  --on-accent: #18181b;
  --ambient-a: rgba(213, 221, 227, 0.1);
  --ambient-b: rgba(91, 103, 112, 0.12);
}

html.dark[data-card-theme='rose'] {
  --accent: #ff8aaf;
  --accent-soft: rgba(255, 138, 175, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(255, 138, 175, 0.14);
  --ambient-b: rgba(196, 71, 106, 0.12);
}

html.dark[data-card-theme='amethyste'] {
  --accent: #c084fc;
  --accent-soft: rgba(192, 132, 252, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(192, 132, 252, 0.14);
  --ambient-b: rgba(107, 33, 168, 0.12);
}

html.dark[data-card-theme='ambre'] {
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(251, 191, 36, 0.14);
  --ambient-b: rgba(217, 119, 6, 0.12);
}

html.dark[data-card-theme='menthe'] {
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(52, 211, 153, 0.14);
  --ambient-b: rgba(5, 150, 105, 0.12);
}

html.dark[data-card-theme='azur'] {
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(56, 189, 248, 0.14);
  --ambient-b: rgba(2, 132, 199, 0.12);
}

html.dark[data-card-theme='anthracite'] {
  --accent: #9ca3af;
  --accent-soft: rgba(156, 163, 175, 0.22);
  --on-accent: #18181b;
  --ambient-a: rgba(156, 163, 175, 0.14);
  --ambient-b: rgba(55, 65, 81, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: 0;
  z-index: 80;
  transform: translateY(-100%);
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--surface);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  transform: none;
  outline: 2px solid var(--surface);
  outline-offset: 2px;
}

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

html.is-scan #editorHeader,
html.is-scan #editorView {
  display: none;
}

html {
  max-width: 100vw;
  overflow-x: clip;
}

body.app-shell {
  margin: 0;
  max-width: 100vw;
  overflow-x: clip;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--surface);
  background-image: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Atelier — même tension visuelle que la vitrine */
body.studio-shell {
  background-image: none;
}

body.studio-shell .studio-header {
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.studio-shell .studio-header.is-scrolled,
body.studio-shell.studio-scrolled .studio-header {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--surface-elevated) 90%, transparent);
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.06);
}

.studio-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0 0.15rem;
}

.studio-intro .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  font-size: 0.8125rem;
}

.studio-intro .eyebrow::before {
  content: '';
  display: block;
  width: 1.25rem;
  height: 1px;
  flex-shrink: 0;
  background: var(--brand-text, var(--brand));
  transform-origin: left center;
  animation: studio-rail-draw 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.studio-intro__brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.studio-intro__headline {
  margin: 0.4rem 0 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.studio-intro .hero-lead {
  margin: 0.35rem 0 0;
  max-width: 44ch;
  font-size: clamp(0.9375rem, 1.8vw, 1rem);
  line-height: 1.45;
}

@keyframes studio-rail-draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Empile le contenu au-dessus du fond ambient, sans casser
   les overlays viewport (toast, dialogue impression, profil). */
body.app-shell > *:not(#toastContainer):not(.print-preview-dialog):not(#confirmDialog):not(#copyLinkDialog):not(#accountPanel):not(#accountPanelBackdrop):not(#supportChat):not(#cookieBanner):not(#authFlyDeck):not(#editorFlyDeck):not(.skip-link):not(#vitrineNav) {
  position: relative;
  z-index: 1;
}

#toastContainer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-inline: 1rem;
  pointer-events: none;
}

.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

.studio-header {
  background: color-mix(in srgb, var(--surface-elevated) 86%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #141414;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, #1a1a1a);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

html.dark[data-card-theme='obsidian'] .brand-mark {
  border-color: color-mix(in srgb, var(--brand) 28%, #2a2a2a);
}

.beta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-elevated));
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.panel {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.editor-strip {
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.easy-steps {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-control);
}

@media (min-width: 576px) {
  .easy-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.45rem;
  }
}

.easy-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transform: scale(0.98);
  transform-origin: center center;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}

.easy-steps li:hover {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
  transform: scale(1.01);
}

.easy-steps li:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.easy-steps__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.easy-steps__copy strong {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
}

.easy-steps__copy em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 450;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.easy-steps li > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  min-width: 1.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.easy-steps li.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-elevated));
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  transform: scale(1.035);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 35%, transparent) inset,
    0 14px 28px color-mix(in srgb, var(--brand) 14%, transparent);
  z-index: 1;
}

.easy-steps li.is-active > span:first-child {
  color: #18181b;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}

html.dark[data-card-theme='obsidian'] .easy-steps li.is-active > span:first-child {
  color: #18181b;
}

.easy-steps li.is-done {
  color: var(--ink);
}

.easy-steps li.is-done > span:first-child {
  color: var(--brand-text);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-elevated));
}

.flow-hint {
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.flow-hint[hidden] {
  display: none;
}

.share-lock-notice {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, var(--surface-elevated));
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink);
}

.share-lock-notice[hidden] {
  display: none;
}

.easy-banner {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--info-warm);
  color: var(--ink);
  box-shadow: var(--shadow-control);
}

.easy-banner--auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-color: color-mix(in srgb, var(--auth-banner) 55%, transparent);
  background: var(--auth-banner);
  color: #fff;
  box-shadow: none;
}

.easy-banner--auth a.easy-banner__cta {
  color: var(--auth-banner);
  background: #fff;
  border: 1px solid #fff;
  text-decoration: none;
  box-shadow: none;
}

.easy-banner--auth a.easy-banner__cta:hover {
  background: #fff7f0;
  color: var(--auth-banner);
}

.easy-banner--auth.hidden,
.easy-banner--cards.hidden {
  display: none;
}

.easy-banner--cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
}

.editor-strip .easy-banner {
  margin: 0;
}

.account-cards-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #fff 35%, transparent);
  background: color-mix(in srgb, #fff 18%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.account-cards__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.account-cards__quota {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.account-cards__list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.account-cards__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  min-width: 0;
}

.account-cards__item.is-current {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--surface) 86%, var(--brand) 14%);
}

.account-cards__meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 10rem;
}

.account-cards__name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-cards__slug {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-cards__current {
  display: inline-flex;
  margin-top: 0.2rem;
  width: fit-content;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line));
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--brand-text);
}

.account-cards__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.account-cards__empty {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

@media (max-width: 359.98px) {
  .easy-banner--cards {
    padding: 0.75rem;
  }

  .account-cards__actions {
    width: 100%;
  }

  .account-cards__actions .btn {
    flex: 1 1 auto;
  }
}

.easy-advanced {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: transparent;
  padding: 0.15rem 0.9rem 0.15rem;
}

.easy-advanced > summary {
  list-style: none;
  cursor: pointer;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.easy-advanced > summary::-webkit-details-marker {
  display: none;
}

.easy-advanced > summary::after {
  content: '+';
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.easy-advanced[open] > summary::after {
  content: '−';
}

.easy-advanced-body {
  padding: 0 0 0.95rem;
}

.panel-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.form-compact .form-fields {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 0.85rem;
  row-gap: 1.15rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .form-compact .form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1.25rem;
  }
}

.is-kind-off {
  display: none;
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.form-compact > .form-block + .form-block,
.form-compact > .easy-advanced {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.form-block__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

#portfolioField,
#companyLinkSlot {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .form-compact.is-company #mottoWrap {
    grid-column: 1 / -1;
  }
}

.form-compact .form-fields > div {
  min-width: 0;
}

.form-compact .form-fields label.block {
  margin-bottom: 0.45rem;
}

.form-compact .field-hint {
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.form-compact .inset-block {
  margin: 0;
  padding: 0 0 0.75rem;
  border-top: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin: 0;
}

.panel-intro .hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
}

.panel-intro .hero-mark {
  display: inline;
  padding: 0.05em 0.22em;
  margin: 0;
  border: 0;
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  color: var(--brand-text);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.panel-intro .hero-lead {
  margin: 0;
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.section-label .idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-text);
  letter-spacing: 0.04em;
}

.section-label h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ink);
}

/* .panel coupe son contenu (overflow: hidden) : sans cette exception,
   la barre collante n'a aucun ancetre defilant a suivre. */
.form-panel {
  overflow: visible;
}

.editor-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background-color: color-mix(in srgb, var(--surface-muted) 75%, var(--line));
}

.editor-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.editor-tab:hover {
  color: var(--ink);
  background-color: color-mix(in srgb, var(--surface) 50%, transparent);
}

.editor-tab.is-active {
  color: var(--ink);
  background-color: var(--surface);
  border-color: var(--line);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.editor-tab__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9999px;
  background-color: color-mix(in srgb, var(--ink) 9%, transparent);
  color: var(--ink-muted);
  transition: all 0.15s ease;
}

.editor-tab.is-active .editor-tab__num {
  background-color: var(--accent);
  color: #ffffff;
}

.editor-pane {
  display: none;
}

.editor-pane.is-active {
  display: block;
  animation: editorPaneFade 0.18s ease-out;
}

@keyframes editorPaneFade {
  from {
    opacity: 0.7;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pane-navigation {
  margin-top: 1rem;
}

.editor-pane .share-band {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.editor-pane .share-band .panel {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.editor-pane .share-band-stage {
  gap: 1.25rem;
}

.form-save-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface-elevated);
}

.studio-main .theme-mode__btn {
  min-height: 2.75rem;
}

.preview-panel {
  padding: 0;
}

.studio-preview-col {
  position: relative;
}

@media (min-width: 1024px) {
  .studio-preview {
    position: static;
    top: auto;
  }

  .studio-preview:has(#previewCardContainer:not(.hidden)) {
    position: static;
    overflow: visible;
    height: auto;
  }

  .studio-preview:has(#previewCardContainer:not(.hidden)) .preview-card-body {
    height: auto;
  }

  /* Onglet Page : le panneau s'aligne a la hauteur du formulaire d'a cote. Aucun creux. */
  .studio-preview:has(#previewCardContainer.hidden) {
    position: static;
    top: auto;
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

.studio-preview {
  overflow: hidden;
  perspective: 1100px;
  perspective-origin: 50% 38%;
  border-color: color-mix(in srgb, var(--brand) 16%, var(--line));
  box-shadow:
    var(--shadow-panel),
    0 0 0 1px color-mix(in srgb, var(--brand) 6%, transparent),
    0 28px 60px rgba(24, 24, 27, 0.1);
}

/* Telephone aux proportions naturelles et video ancree en bas sans creux. */
@media (min-width: 1024px) {
  .studio-preview:has(#previewCardContainer.hidden) .phone-shell:not(.hidden) {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    max-width: min(100%, 22rem);
    width: 100%;
    min-height: min(34rem, 52vh);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .studio-preview:has(#previewCardContainer.hidden) .phone-chassis {
    flex: 1 1 auto;
    min-height: 0;
  }

  .studio-preview:has(#previewCardContainer.hidden) .phone-screen {
    flex: 1 1 auto;
    height: min(36.5rem, 57vh);
    min-height: min(32.5rem, 51vh);
    max-height: none;
    overflow-y: auto;
  }

  .studio-preview:has(#previewCardContainer.hidden) #mockupProfileMount {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .studio-preview:has(#previewCardContainer.hidden) .phone-screen .profile-card {
    flex: 1 1 auto;
    min-height: 100%;
  }

  .studio-preview:has(#previewCardContainer.hidden) .preview-tutorial {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }

  .studio-preview:has(#previewCardContainer.hidden) .preview-tutorial video {
    height: min(22rem, 42vh);
    max-height: min(26rem, 48vh);
    object-fit: contain;
  }
}

.studio-preview::before {
  content: '';
  position: absolute;
  inset: -30% 20% auto;
  height: 55%;
  pointer-events: none;
  background: none;
  opacity: 0;
  animation: none;
  z-index: 0;
}

.studio-preview > * {
  position: relative;
  z-index: 1;
}

@keyframes studio-preview-glow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.06);
  }
}

.preview-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 45%, var(--surface-elevated));
}

.preview-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.preview-live::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.preview-panel .phone-shell {
  margin: 0.85rem auto 0.75rem;
  max-width: min(100%, 17.5rem);
  width: 100%;
  animation: none;
}

.studio-preview .phone-shell {
  max-width: min(100%, 17.5rem);
  transform-origin: center top;
}

.studio-preview.reveal,
.studio-preview.reveal-delay-2,
.preview-panel.reveal {
  animation: none !important;
  transform: none !important;
}

.studio-preview .phone-shell:not(.hidden),
.preview-panel .phone-shell,
.phone-chassis {
  animation: none !important;
  transform: none !important;
}

.preview-panel .phone-screen {
  border-radius: 1.15rem;
  /* Plafond de hauteur : laisse la video visible sous le telephone. */
  max-height: min(26rem, 42vh);
}

.mobile-preview-jumps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  width: 100%;
}

.mobile-preview-jumps .btn {
  flex: 1 1 auto;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.625rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface-card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease-in-out;
}

.mobile-preview-jumps .btn:hover {
  background: var(--surface-sunken);
  border-color: var(--brand);
  color: var(--brand);
}

.mobile-preview-jumps .btn:active {
  transform: scale(0.985);
}

.mobile-preview-jumps .btn i {
  color: var(--brand);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (min-width: 360px) {
  .mobile-preview-jumps {
    flex-direction: row;
  }

  .mobile-preview-jumps .btn {
    flex: 1 1 50%;
  }
}

.preview-tutorial {
  width: 100%;
  max-width: min(100%, 19.5rem);
  margin: 0 auto 0.75rem;
  padding: 0 0.5rem;
  min-width: 0;
  scroll-margin-top: 5rem;
}

.preview-tutorial figcaption {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-align: center;
}

.preview-coach {
  margin: 0.25rem 0 0;
  max-width: 28rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-muted);
  text-align: center;
}

.preview-tutorial video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(16rem, 36vh);
  background: #18181b;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  object-fit: contain;
}

.preview-tutorial--auth video {
  max-height: min(12rem, 26vh);
}

/* Reduction de la taille visuelle des videos pour un affichage compact */
.preview-panel .preview-tutorial {
  max-width: min(100%, 16.5rem) !important;
  margin: 0.35rem auto 0.5rem !important;
  padding: 0 0.25rem !important;
}

.preview-panel .preview-tutorial video {
  height: auto !important;
  max-height: min(9.5rem, 19vh) !important;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.preview-panel .preview-tutorial--auth,
.preview-panel .preview-tutorial--register {
  margin-top: 0.35rem !important;
}

.preview-panel .preview-tutorial--auth video,
.preview-panel .preview-tutorial--register video {
  max-height: min(8.5rem, 17vh) !important;
}

.preview-panel .preview-tutorial figcaption {
  font-size: 0.75rem !important;
  margin-top: 0.2rem !important;
}

.preview-panel .preview-coach {
  font-size: 0.75rem !important;
  margin-top: 0.15rem !important;
  line-height: 1.3 !important;
}

/* display:block ci-dessus a la meme specificite que Tailwind .hidden : meme
   piege que .preview-card-body. */
.preview-tutorial.hidden {
  display: none;
}

.studio-shell .form-panel {
  border-color: color-mix(in srgb, var(--brand) 10%, var(--line));
  box-shadow:
    var(--shadow-panel),
    0 18px 40px rgba(24, 24, 27, 0.05);
}

.studio-shell .form-panel-head {
  position: relative;
}

.studio-shell .form-panel-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3.5rem;
  height: 2px;
  background: var(--brand);
}

.preview-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.9rem 1rem 1.1rem;
  min-width: 0;
}

/* display:flex ci-dessus a la meme specificite que Tailwind .hidden
   et est charge apres : l'onglet Page laissait l'impression sous le telephone. */
.preview-card-body.hidden {
  display: none;
}

.preview-card-body__label {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.preview-card-body__models {
  min-width: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.preview-card-body__faces {
  min-width: 0;
}

.preview-card-body__controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding-top: 0.15rem;
  min-width: 0;
}

.preview-card-body__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}

.preview-card-body__actions .btn {
  flex: 1 1 10rem;
  min-height: 2.75rem;
}

.print-faces {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 576px) {
  .print-faces {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .preview-card-body__controls {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

/* Dans la colonne Impression, une carte par ligne : à 100 % le gabarit reste lisible. */
.preview-card-body__faces.print-faces {
  grid-template-columns: 1fr;
}

.preview-card-body__faces .print-card-preview {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .preview-card-body {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 1rem 1.15rem 1.2rem;
  }
}

.print-faces__cut-hint {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: var(--radius-control, 0.5rem);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-muted);
  background: color-mix(in srgb, var(--surface) 88%, #fff);
}

.print-face {
  margin: 0;
  min-width: 0;
}

.print-face figcaption {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.print-card-preview {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow-control);
}

.print-card-preview canvas {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

.print-preview-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}

@media (min-width: 768px) {
  .print-preview-dialog {
    align-items: center;
    padding: 1.25rem;
  }
}

.print-preview-dialog.hidden,
.print-preview-dialog[hidden] {
  display: none;
}

.print-preview-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 24, 0.48);
}

.print-preview-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 52rem);
  max-height: min(92vh, 48rem);
  overflow: auto;
  padding: 1rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow-panel);
}

@media (min-width: 768px) {
  .print-preview-dialog__panel {
    padding: 1.25rem 1.35rem 1.4rem;
  }
}

.print-preview-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.print-layout {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface) 55%, var(--surface-elevated));
  min-width: 0;
}

.print-layout legend {
  padding: 0;
  margin: 0 0 0.45rem;
  float: left;
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-muted);
}

.print-layout__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  clear: both;
}

.print-layout__option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface-elevated);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.print-layout__option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.print-layout__option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.print-layout__option input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.print-layout__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.print-layout__text strong {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.print-layout__text span {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.print-preview-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .print-preview-dialog__actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

body.print-preview-open {
  overflow: hidden;
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}

@media (min-width: 640px) {
  .confirm-dialog {
    align-items: center;
    padding: 1.25rem;
  }
}

.confirm-dialog.hidden,
.confirm-dialog[hidden] {
  display: none;
}

.confirm-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 24, 0.52);
}

.confirm-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  padding: 1.15rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: var(--shadow-panel);
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.confirm-dialog__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.confirm-dialog__message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.confirm-dialog__detail {
  margin: 0.15rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-elevated));
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink);
  word-break: break-all;
}

.confirm-dialog__input {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.confirm-dialog__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

@media (min-width: 640px) {
  .confirm-dialog__actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

.btn-danger {
  background: var(--ink);
  color: var(--surface-elevated);
  border-color: color-mix(in srgb, var(--ink) 82%, #000);
  box-shadow: none;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--ink) 88%, var(--brand));
  color: var(--surface-elevated);
  border-color: color-mix(in srgb, var(--ink) 70%, var(--brand));
}

html.dark .btn-danger {
  background: #fafafa;
  color: #18181b;
  border-color: #e4e4e7;
}

html.dark .btn-danger:hover {
  background: #e4e4e7;
  color: #18181b;
}

body.confirm-dialog-open {
  overflow: hidden;
}

.share-band {
  margin-top: 1.25rem;
}

@media (min-width: 1024px) {
  .share-band {
    margin-top: 1.5rem;
  }
}

.share-band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.share-band-link {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.qr-mode-spotlight {
  margin-bottom: 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface-elevated);
}

.qr-mode-spotlight__head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.qr-mode-spotlight__kicker {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.qr-mode-spotlight__lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
}

.qr-mode-spotlight__lead strong {
  font-weight: 650;
}

.qr-mode-switch {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.qr-mode-switch__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.qr-mode-switch__label {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.qr-mode-switch__hint {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mode-toggle--featured {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.28rem;
  border: 1.5px solid color-mix(in srgb, var(--ink) 28%, var(--line));
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--ink) 5%, var(--surface));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
}

.mode-toggle--featured button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2.85rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink-muted);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mode-toggle--featured button:hover,
.mode-toggle--featured button:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.mode-toggle.mode-toggle--featured button.is-active {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 70%, #000),
    0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.mode-toggle.mode-toggle--featured button.is-active:hover,
.mode-toggle.mode-toggle--featured button.is-active:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
}

.mode-toggle__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke-width: 2.25;
}

.mode-toggle__text {
  line-height: 1.2;
}

.mode-toggle__tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-toggle.mode-toggle--featured button.is-active .mode-toggle__tag {
  border-color: color-mix(in srgb, var(--on-accent) 45%, transparent);
  background: color-mix(in srgb, var(--on-accent) 18%, transparent);
  color: var(--on-accent);
}

.mode-toggle.mode-toggle--featured button:not(.is-active) {
  opacity: 0.92;
}

html.dark .mode-toggle--featured {
  background: color-mix(in srgb, var(--surface) 80%, #000);
  border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
  box-shadow: none;
}

html.dark .mode-toggle.mode-toggle--featured button.is-active {
  background: var(--accent);
  color: var(--on-accent);
}

html.dark .mode-toggle.mode-toggle--featured button.is-active .mode-toggle__tag {
  border-color: color-mix(in srgb, var(--on-accent) 45%, transparent);
  background: color-mix(in srgb, var(--on-accent) 18%, transparent);
  color: var(--on-accent);
}

.offline-teaser,
.offline-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  color: var(--ink);
}

.offline-teaser {
  flex-wrap: wrap;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.offline-teaser[hidden],
.offline-notice[hidden] {
  display: none;
}

.offline-teaser__icon,
.offline-notice__icon {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--accent);
}

.offline-teaser__title,
.offline-notice__title {
  margin: 0;
  font-family: var(--font-display, var(--font-body));
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.offline-teaser__text,
.offline-notice__text {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.offline-teaser__cta {
  margin-left: auto;
  min-height: 2.75rem;
  white-space: nowrap;
}

.offline-notice {
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

html.dark .offline-notice {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.offline-notice__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  min-width: 3.25rem;
}

.offline-notice__std {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.offline-notice__points {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.offline-notice__points li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink);
}

.offline-notice__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
}

@media (min-width: 768px) {
  .qr-mode-spotlight {
    padding: 1.15rem 1.25rem;
  }

  .qr-mode-spotlight__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
  }

  .qr-mode-switch {
    width: auto;
    min-width: 19rem;
    max-width: 24rem;
    flex-shrink: 0;
  }

  .mode-toggle--featured {
    width: 100%;
    min-width: 0;
  }

  .offline-teaser {
    flex-wrap: nowrap;
    align-items: center;
  }

  .offline-notice__points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 1rem;
  }
}

@media (min-width: 1024px) {
  .qr-mode-spotlight__lead {
    font-size: 1.0625rem;
  }
}

/* Fond atelier / editeur : cartes en ombre, leger mouvement, hors interaction. */
.auth-fly-deck,
.editor-fly-deck {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1400px;
}

html.is-scan #editorFlyDeck {
  display: none;
}

.auth-fly-card {
  position: absolute;
  width: min(15.5rem, 46vw);
  aspect-ratio: 1100 / 660;
  border-radius: 0.85rem;
  opacity: 0;
  transform-origin: center center;
  transform-style: preserve-3d;
  /* Transform anime ici ; le flou reste sur le canvas pour le compositor GPU. */
  box-shadow: 0 28px 60px color-mix(in srgb, #09090b 12%, transparent);
  will-change: transform, opacity;
  transition: opacity 0.7s ease;
  backface-visibility: hidden;
}

.auth-fly-card.is-ready {
  opacity: 0.14;
}

.auth-fly-card canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--surface-elevated) 88%, var(--brand) 12%);
  filter: blur(10px) saturate(0.55) brightness(1.05);
}

.auth-fly-card[data-fly='0'] {
  top: 8%;
  left: -6%;
  transform: rotate(-16deg) rotateY(18deg) translate3d(0, 0, 0);
  animation: auth-fly-a 11s ease-in-out infinite alternate;
}

.auth-fly-card[data-fly='1'] {
  top: 14%;
  right: -8%;
  transform: rotate(12deg) rotateY(-14deg) translate3d(0, 0, 0);
  animation: auth-fly-b 13s ease-in-out infinite alternate;
}

.auth-fly-card[data-fly='2'] {
  bottom: 18%;
  left: -4%;
  transform: rotate(8deg) rotateY(10deg) translate3d(0, 0, 0);
  animation: auth-fly-c 10s ease-in-out infinite alternate;
}

.auth-fly-card[data-fly='3'] {
  bottom: 8%;
  right: -5%;
  transform: rotate(-10deg) rotateY(-16deg) translate3d(0, 0, 0);
  animation: auth-fly-d 12s ease-in-out infinite alternate;
}

.auth-fly-card[data-fly='4'] {
  top: 42%;
  left: 38%;
  width: min(13.5rem, 38vw);
  opacity: 0;
  transform: rotate(4deg) rotateY(8deg) translate3d(0, 0, 0);
  animation: auth-fly-e 14s ease-in-out infinite alternate;
}

.auth-fly-card[data-fly='4'].is-ready {
  opacity: 0.08;
}

@keyframes auth-fly-a {
  from {
    transform: rotate(-16deg) rotateY(18deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-9deg) rotateY(8deg) translate3d(2.25rem, -1.75rem, 48px);
  }
}

@keyframes auth-fly-b {
  from {
    transform: rotate(12deg) rotateY(-14deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(19deg) rotateY(-6deg) translate3d(-2rem, 2rem, 36px);
  }
}

@keyframes auth-fly-c {
  from {
    transform: rotate(8deg) rotateY(10deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(1deg) rotateY(18deg) translate3d(2.5rem, -1.25rem, 56px);
  }
}

@keyframes auth-fly-d {
  from {
    transform: rotate(-10deg) rotateY(-16deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-3deg) rotateY(-6deg) translate3d(-2.25rem, -1.75rem, 42px);
  }
}

@keyframes auth-fly-e {
  from {
    transform: rotate(4deg) rotateY(8deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-7deg) rotateY(-8deg) translate3d(1.5rem, 1.75rem, 28px);
  }
}

.auth-fly-deck.is-static .auth-fly-card,
.editor-fly-deck.is-static .auth-fly-card {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .auth-fly-card {
    animation: none !important;
  }
}

html.dark .auth-fly-card canvas {
  filter: blur(12px) saturate(0.45) brightness(0.92);
}

html.dark .auth-fly-card.is-ready {
  opacity: 0.12;
}

html.dark .auth-fly-card[data-fly='4'].is-ready {
  opacity: 0.07;
}

@media (max-width: 767.98px) {
  .auth-fly-card {
    width: min(11.5rem, 52vw);
  }

  .auth-fly-card canvas {
    filter: blur(12px) saturate(0.5) brightness(1.06);
  }

  .auth-fly-card.is-ready {
    opacity: 0.1;
  }

  .auth-fly-card[data-fly='2'],
  .auth-fly-card[data-fly='4'] {
    display: none;
  }

  .auth-fly-card[data-fly='0'] {
    top: 6%;
    left: -18%;
  }

  .auth-fly-card[data-fly='1'] {
    top: auto;
    bottom: 12%;
    right: -16%;
  }

  .auth-fly-card[data-fly='3'] {
    top: 48%;
    right: -20%;
    bottom: auto;
  }
}

@media (min-width: 992px) {
  .auth-fly-card {
    width: min(17.5rem, 22vw);
  }

  .auth-fly-card canvas {
    filter: blur(11px) saturate(0.5) brightness(1.04);
  }

  .auth-fly-card.is-ready {
    opacity: 0.16;
  }

  .auth-fly-card[data-fly='4'].is-ready {
    opacity: 0.09;
  }
}

.auth-shell {
  width: 100%;
  max-width: 36rem;
}

.session-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.session-header__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

.session-header__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  border: 1px solid transparent;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.session-header__link:hover,
.session-header__link:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border-color: var(--line);
}

.session-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.session-account {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.session-cards {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.session-password__prompt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.session-card-list {
  display: grid;
  gap: 0;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "preview" "meta" "actions";
  gap: 0.85rem;
  align-items: center;
  padding: 1.05rem 0.1rem;
  border-top: 1px solid var(--line);
}

.session-card__preview {
  grid-area: preview;
  width: min(100%, 16rem);
  aspect-ratio: 1100 / 660;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, var(--line));
}

.session-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.session-card__meta {
  grid-area: meta;
}

.session-card__actions {
  grid-area: actions;
}

.session-card__meta {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.session-card__name,
.session-card__slug {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.session-card__role,
.session-card__slug {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-card__role {
  font-size: 0.9375rem;
  color: var(--ink);
}

.session-card__slug {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.session-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.session-card__facts span {
  white-space: nowrap;
}

.session-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.session-card__actions .btn {
  flex: 1 1 8rem;
}

@media (min-width: 720px) {
  .session-card {
    grid-template-columns: 11.5rem minmax(0, 1fr) auto;
    grid-template-areas: "preview meta actions";
    gap: 0.85rem 1.25rem;
    padding: 1.1rem 0.15rem;
  }

  .session-card__preview {
    width: 11.5rem;
  }

  .session-card__actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 768px) {
  .session-password__prompt {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .session-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem 2.5rem;
    align-items: start;
  }

  .session-account > .session-password {
    border-top: 0;
    padding-top: 0;
    border-left: 1px solid var(--line);
    padding-left: 2rem;
  }
}

@media (min-width: 992px) {
  .session-grid {
    gap: 2rem;
  }

  #authSessionPanel {
    padding: 1.75rem 2rem 2rem;
  }
}

.auth-main {
  min-height: calc(100dvh - 3.5rem);
  display: flex;
  flex-direction: column;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  flex: 1 1 auto;
  align-content: start;
  width: 100%;
}

.auth-aside {
  margin-bottom: 0;
}

.auth-aside__back {
  margin-top: 0.35rem;
}

.auth-stage {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  width: 100%;
}

.auth-main .panel-intro {
  margin-bottom: 0;
}

.auth-footer {
  margin-top: auto;
}

@media (min-width: 768px) {
  .auth-shell {
    max-width: 48rem;
  }

  .auth-layout {
    gap: 1.25rem;
  }
}

@media (min-width: 992px) {
  .auth-shell {
    max-width: 72rem;
  }

  .auth-main {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(28rem, 38rem);
    gap: clamp(1.75rem, 3.5vw, 3.5rem);
    align-items: start;
    padding-top: 1.5rem;
  }

  .auth-shell:has(#authSessionPanel:not(.hidden)) {
    max-width: 96rem;
  }

  .auth-layout:has(#authSessionPanel:not(.hidden)) {
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  }

  .auth-aside {
    position: sticky;
    top: 5rem;
    padding-right: 0.5rem;
    gap: 0.65rem;
  }

  .auth-aside .hero-brand {
    font-size: clamp(2.75rem, 4.2vw, 4rem);
    max-width: 12ch;
  }

  .auth-aside .hero-lead {
    max-width: 28rem;
    font-size: 1.125rem;
    line-height: 1.55;
  }

  .auth-aside__back {
    margin-top: 1rem;
  }

  .auth-stage .editor-strip {
    margin-bottom: 1rem;
  }
}

@media (min-width: 1200px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(32rem, 42rem);
    gap: 4rem;
    padding-top: 2.25rem;
  }

  .auth-layout:has(#authSessionPanel:not(.hidden)) {
    grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  }
}

.auth-divider {
  height: 0;
  margin: 1.25rem 0 1rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.auth-provider {
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.auth-switch {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-muted);
  text-align: center;
}

.auth-switch__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-left: 0.25rem;
  padding: 0.25rem 0.15rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.auth-switch__link:hover {
  color: var(--ink);
}

@media (min-width: 768px) {
  .auth-switch {
    text-align: left;
  }
}

.auth-method {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.auth-method__legend {
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.auth-method__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 576px) {
  .auth-method__options {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-method__option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface, #fff);
  cursor: pointer;
}

.auth-method__option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.auth-method__option input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.auth-method__option span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.auth-method__option strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.auth-method__option small {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.auth-totp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0.25rem 0 0.5rem;
}

/* Tailwind .hidden (display:none) is overridden by display:flex above. */
.auth-totp.hidden {
  display: none;
}

.auth-totp__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 13.5rem);
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
}

.auth-totp__frame canvas {
  display: block;
  width: 100%;
  max-width: 12rem;
  height: auto;
}

.auth-totp__manual {
  width: 100%;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.auth-totp__manual summary {
  cursor: pointer;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  list-style: none;
}

.auth-totp__manual summary::-webkit-details-marker {
  display: none;
}

.auth-totp__secret {
  display: block;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--ink);
  background: color-mix(in srgb, var(--line) 35%, transparent);
}

.inset-block {
  padding: 1rem 0 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.form-input {
  width: 100%;
  min-height: 2.75rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-strong);
  background-color: var(--surface-elevated);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

html.dark .form-input {
  background-color: color-mix(in srgb, var(--surface-elevated) 92%, #000);
  border-color: var(--line-strong);
}

.form-input::placeholder {
  color: color-mix(in srgb, var(--ink-muted) 75%, transparent);
}

.form-input:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
}

.form-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.form-input.is-invalid {
  border-color: #a11f35;
  box-shadow: 0 0 0 1px rgba(161, 31, 53, 0.35);
}

.form-input.is-invalid:focus {
  border-color: #a11f35;
  box-shadow: 0 0 0 1px #a11f35;
}

.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #a11f35;
}

.field-error[hidden] {
  display: none;
}

.field-required {
  color: #ff6b21;
  font-weight: 700;
  margin-left: 0.2rem;
  font-size: 0.875em;
  vertical-align: baseline;
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.phone-dial {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background-color: var(--surface-elevated);
  overflow: hidden;
}

.phone-dial:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.phone-dial:has(.is-invalid) {
  border-color: #a11f35;
  box-shadow: 0 0 0 1px rgba(161, 31, 53, 0.35);
}

.phone-dial:has(.is-invalid):focus-within {
  border-color: #a11f35;
  box-shadow: 0 0 0 1px #a11f35;
}

html.dark .phone-dial {
  background-color: color-mix(in srgb, var(--surface-elevated) 92%, #000);
  border-color: var(--line-strong);
}

.phone-dial__prefix {
  position: relative;
  flex: 0 0 auto;
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-elevated));
}

.phone-dial__prefix::after {
  content: '';
  position: absolute;
  right: 0.65rem;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  z-index: 1;
}

.phone-dial__value {
  position: absolute;
  inset: 0 1.35rem 0 0;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  pointer-events: none;
  z-index: 1;
}

/* Select invisible mais cliquable : Windows ignore color:transparent. */
.phone-dial__code {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
}

.phone-dial__code option,
.phone-dial__code optgroup {
  color: CanvasText;
  -webkit-text-fill-color: CanvasText;
  background-color: Canvas;
}

.phone-dial .form-input,
.phone-dial .phone-dial__number {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.phone-dial .form-input:hover,
.phone-dial .form-input:focus,
.phone-dial .phone-dial__number:hover,
.phone-dial .phone-dial__number:focus {
  border: 0;
  box-shadow: none;
}

.lookup-combo {
  position: relative;
  width: 100%;
}

.lookup-combo .form-input {
  width: 100%;
}

.lookup-combo__list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-height: min(14rem, 50vh);
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 0.625rem;
  background: var(--surface-elevated, var(--surface));
  box-shadow: 0 0.5rem 1.25rem color-mix(in srgb, var(--ink) 12%, transparent);
}

.lookup-combo__option,
.lookup-combo__empty {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  min-height: 2.75rem;
  border-radius: 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
}

.lookup-combo__empty {
  cursor: default;
  color: var(--ink-muted);
}

.lookup-combo__option:hover,
.lookup-combo__option.is-active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.lookup-combo__create {
  margin-top: 0.15rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  font-weight: 600;
  color: var(--accent);
}

@media (min-width: 768px) {
  .lookup-combo__list {
    max-height: 16rem;
  }
}

.slug-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: var(--radius-control) 0 0 var(--radius-control);
  background: color-mix(in srgb, var(--surface) 80%, var(--surface-elevated));
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

/* .btn vient apres Tailwind et annule .hidden (display:none). */
.btn.hidden {
  display: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #18181b;
  border-color: color-mix(in srgb, var(--brand) 65%, #000);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--brand-mid);
  color: #18181b;
  filter: none;
}

.btn-ink {
  background: var(--brand);
  color: #18181b;
  border-color: color-mix(in srgb, var(--brand) 65%, #000);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-ink:hover {
  background: var(--brand-mid);
  color: #18181b;
  border-color: color-mix(in srgb, var(--brand) 65%, #000);
}

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}

html.dark .btn-secondary {
  background: var(--surface-elevated);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-elevated));
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
  min-height: 2.25rem;
  padding-inline: 0.5rem;
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.pane-navigation--try {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}

.pane-navigation--try > .demo-try {
  width: 100%;
}

.pane-navigation--try > .btn-primary {
  align-self: flex-end;
  width: auto;
  max-width: 100%;
  flex-shrink: 0;
}

.demo-try {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--brand) 48%, var(--line));
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-elevated));
}

.demo-try__lead {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.demo-try__hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.btn-demo {
  background: var(--surface-elevated);
  color: var(--ink);
  border-color: var(--brand);
  font-weight: 600;
  box-shadow: none;
}

.btn-demo:hover {
  background: color-mix(in srgb, var(--brand) 14%, var(--surface-elevated));
  border-color: var(--brand);
}

.theme-mode {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface) 65%, var(--surface-elevated));
  box-shadow: none;
}

.theme-mode.hidden,
.theme-mode[hidden] {
  display: none !important;
}

@media (max-width: 639.98px) {
  .theme-mode.hidden,
  .theme-mode.sm\:inline-flex {
    display: none !important;
  }
}

html.dark .theme-mode {
  background: var(--surface-elevated);
}

.theme-mode__btn {
  min-height: 2.35rem;
  min-width: 2.75rem;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-mode__btn.is-active {
  background: var(--ink);
  color: #fff;
}

html.dark .theme-mode__btn.is-active {
  background: #fff;
  color: #111;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  margin-inline: -0.5rem;
}

/* Zone tactile de 44 px ; la pastille visible reste plus petite. */
.theme-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.theme-swatch__dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  /* Anneau double : visible sur fond clair et sombre (pastille encre incluse). */
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff 28%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

html.dark .theme-swatch__dot {
  border-color: color-mix(in srgb, #fff 42%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #000 40%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

.theme-swatch:hover .theme-swatch__dot {
  transform: scale(1.08);
}

.theme-swatch.is-active .theme-swatch__dot {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff 28%, transparent),
    0 0 0 2px var(--surface-elevated),
    0 0 0 3.5px var(--accent);
}

html.dark .theme-swatch.is-active .theme-swatch__dot {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #000 40%, transparent),
    0 0 0 2px var(--surface-elevated),
    0 0 0 3.5px var(--accent);
}

.theme-swatch.is-active:not(:has(.theme-swatch__dot)) {
  box-shadow:
    0 0 0 2px var(--surface-elevated),
    0 0 0 3.5px var(--accent);
  border-radius: 999px;
}

.font-pair-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
}

.font-pair {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background-color: var(--surface-elevated);
  background-image: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.font-pair__glyph {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink);
}

.font-pair__name {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.font-pair[data-font='fraunces'] .font-pair__glyph {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
}

.font-pair[data-font='figtree'] .font-pair__glyph {
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 600;
}

.font-pair[data-font='cinzel'] .font-pair__glyph,
.font-pair[data-font='lora'] .font-pair__glyph {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.font-pair[data-font='bebas'] .font-pair__glyph,
.font-pair[data-font='franklin'] .font-pair__glyph {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.font-pair[data-font='syne'] .font-pair__glyph,
.font-pair[data-font='source'] .font-pair__glyph {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

.font-pair[data-font='caveat'] .font-pair__glyph,
.font-pair[data-font='plexsans'] .font-pair__glyph {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.35rem;
}

.font-pair[data-font='plex'] .font-pair__glyph {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0;
}

.font-pair[data-font='zilla'] .font-pair__glyph,
.font-pair[data-font='spectral'] .font-pair__glyph {
  font-family: 'Zilla Slab', Georgia, serif;
  font-weight: 600;
}

.font-pair[data-font='fatface'] .font-pair__glyph {
  font-family: 'Abril Fatface', Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.font-pair[data-font='fraktur'] .font-pair__glyph {
  font-family: 'UnifrakturMaguntia', Georgia, serif;
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.font-pair[data-font='orbitron'] .font-pair__glyph {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.font-pair[data-font='fredoka'] .font-pair__glyph {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
}

.font-pair[data-font='bungee'] .font-pair__glyph {
  font-family: 'Bungee', sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.font-pair[data-font='poiret'] .font-pair__glyph {
  font-family: 'Poiret One', sans-serif;
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.font-pair[data-font='pacifico'] .font-pair__glyph {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.font-pair[data-font='stencil'] .font-pair__glyph {
  font-family: 'Black Ops One', sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.font-pair[data-font='playfair'] .font-pair__glyph {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
}

.font-pair[data-font='cormorant'] .font-pair__glyph {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
}

.font-pair[data-font='montserrat'] .font-pair__glyph {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
}

.font-pair[data-font='space'] .font-pair__glyph {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
}

.font-pair[data-font='jakarta'] .font-pair__glyph {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
}

.font-pair[data-font='dmserif'] .font-pair__glyph {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
}

.font-pair[data-font='oswald'] .font-pair__glyph {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.font-pair[data-font='dancing'] .font-pair__glyph {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 1.35rem;
}

.font-scale-control {
  padding-top: 0.25rem;
}

.font-scale-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.font-scale-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.font-scale-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  min-width: 3rem;
  text-align: right;
}

.font-scale-reset {
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.font-scale-reset:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.font-scale-row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: 0.65rem;
}

.font-scale-btn {
  height: 2.5rem;
  min-height: 2.5rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.font-scale-btn:hover:not(:disabled) {
  border-color: var(--ink);
  background: color-mix(in srgb, var(--surface) 45%, var(--surface-elevated));
}

.font-scale-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.font-scale-slider {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

.font-pair:hover {
  border-color: color-mix(in srgb, var(--ink) 35%, var(--line));
  background-color: color-mix(in srgb, var(--surface) 45%, var(--surface-elevated));
}

.font-pair:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.font-pair.is-active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background-color: color-mix(in srgb, var(--accent-soft) 55%, var(--surface-elevated));
}

.font-pair.is-active .font-pair__name {
  color: var(--ink);
}

html.dark .font-pair {
  background-color: color-mix(in srgb, var(--surface-elevated) 92%, #000);
}

html.dark .font-pair.is-active {
  background-color: color-mix(in srgb, var(--accent-soft) 40%, var(--surface-elevated));
}

@media (min-width: 36rem) {
  .font-pair-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.preview-phone-colors {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 24rem;
  margin-inline: auto;
  padding: 0.5rem 0.75rem;
}

.preview-phone-colors .theme-color-picker {
  justify-content: center;
}

.card-print-colors {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface) 55%, var(--surface-elevated));
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.card-print-colors .theme-color-picker {
  max-width: 100%;
}

.card-template-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  max-height: 16.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .card-template-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 18rem;
  }
}

.card-template-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  min-height: 3.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.card-template-option:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-1px);
}

.card-template-option.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-elevated));
  box-shadow: 0 0 0 1px var(--accent);
}

.tpl-mini {
  position: relative;
  flex: 0 0 auto;
  width: 4.25rem;
  height: 2.75rem;
  border-radius: 0.28rem;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.tpl-mini i {
  position: absolute;
  display: block;
}

.card-template-meta {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.card-template-meta strong {
  display: block;
  max-width: 100%;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-template-meta span {
  display: -webkit-box;
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-muted);
  white-space: normal;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (prefers-reduced-motion: reduce) {
  .card-template-option:hover {
    transform: none;
  }
}

.qr-stage {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 640px) {
  .qr-stage {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.share-band-stage {
  align-items: start;
}

@media (min-width: 768px) {
  .share-band-stage {
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
  }

  .share-band-stage .qr-frame {
    margin-inline: 0;
  }
}

@media (min-width: 1024px) {
  .share-band-stage {
    gap: 2rem;
  }
}

.qr-frame {
  width: fit-content;
  margin-inline: auto;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.08);
  animation: qr-settle 0.45s ease-out both;
}

html.dark .qr-frame {
  background: #fff;
}

.qr-frame.is-contact {
  padding: 1.15rem;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 12px 28px rgba(24, 24, 27, 0.1);
}

.qr-frame.is-contact #qrCanvas {
  width: 11.5rem;
  height: 11.5rem;
}

@media (min-width: 768px) {
  .qr-frame.is-contact #qrCanvas {
    width: 13rem;
    height: 13rem;
  }
}

#qrScanTarget:not(:empty) {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.phone-shell {
  margin-inline: auto;
  width: 100%;
  max-width: 20rem;
  padding: 0.85rem 1.15rem 1.35rem;
  background: none;
  border: 0;
  box-shadow: none;
}

.phone-chassis {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding: 0.7rem 0.55rem 0.85rem;
  border-radius: 1.85rem;
  background:
    linear-gradient(115deg, #8b909a 0%, #3f424a 7%, #1a1c22 16%, #0c0d11 62%, #2a2d34 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.28),
    inset -3px -2px 0 rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    10px 18px 28px rgba(9, 9, 11, 0.18);
}

.phone-chassis::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: -0.42rem;
  top: 0.7rem;
  bottom: 0.85rem;
  width: 0.5rem;
  border-radius: 0.4rem 0 0 0.5rem;
  background: linear-gradient(90deg, #c4c8d0 0%, #52525b 38%, #18181b 100%);
  transform: skewY(16deg);
  transform-origin: right center;
  pointer-events: none;
}

.phone-btn {
  position: absolute;
  z-index: 2;
  border-radius: 0.12rem;
  background: linear-gradient(90deg, #52525b, #27272a 60%, #18181b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.phone-btn--silent {
  left: -0.12rem;
  top: 18%;
  width: 0.16rem;
  height: 0.7rem;
}

.phone-btn--vol-up {
  left: -0.12rem;
  top: 28%;
  width: 0.16rem;
  height: 1.7rem;
}

.phone-btn--vol-down {
  left: -0.12rem;
  top: 40%;
  width: 0.16rem;
  height: 1.7rem;
}

.phone-btn--power {
  right: -0.12rem;
  top: 30%;
  width: 0.16rem;
  height: 2.4rem;
  background: linear-gradient(270deg, #52525b, #27272a 60%, #18181b);
}

.phone-glass {
  position: absolute;
  top: 0.42rem;
  left: 1.4rem;
  right: 1.4rem;
  z-index: 4;
  height: 0.35rem;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

@media (min-width: 768px) {
  .phone-shell {
    max-width: 22rem;
    padding-inline: 1.35rem;
  }
}

@media (min-width: 1024px) {
  .phone-shell {
    max-width: 100%;
  }
}

.phone-notch {
  position: relative;
  z-index: 3;
  width: 4.75rem;
  height: 1.05rem;
  margin: 0.2rem auto 0.55rem;
  border-radius: 999px;
  background: #050505;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px #000;
}

.phone-notch::before {
  content: '';
  position: absolute;
  right: 0.32rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #475569, #0b1220 58%, #050505);
}

.phone-screen {
  position: relative;
  z-index: 1;
  border-radius: 1.2rem;
  overflow: hidden;
  background: var(--surface-elevated);
  max-height: 34rem;
  overflow-y: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Sous 1024 px le plafond 42vh écrasait le cadre : pave court, coins trop ronds. */
@media (max-width: 1023.98px) {
  .preview-panel .phone-shell,
  .studio-preview .phone-shell {
    width: 100%;
    max-width: min(100%, 22.5rem);
    margin: 0.65rem auto 0.4rem;
    padding: 0.25rem 0.85rem 0.45rem;
  }

  .phone-chassis {
    aspect-ratio: 9 / 18.6;
    border-radius: 1.35rem;
    padding: 0.5rem 0.4rem 0.58rem;
  }

  .phone-chassis::before {
    top: 15%;
    bottom: 15%;
    left: -0.28rem;
    width: 0.38rem;
    border-radius: 0.22rem 0 0 0.22rem;
    transform: none;
  }

  .preview-panel .phone-screen,
  .phone-screen {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    border-radius: 1.02rem;
  }
}

.phone-screen .wrev {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  max-width: 100%;
}

.phone-screen .wrev__word {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.phone-screen .contact-row__value .wrev,
.phone-screen .pc-link-tile__sub .wrev {
  display: inline;
  overflow: visible;
  max-width: none;
  padding-bottom: 0;
  margin-bottom: 0;
  vertical-align: baseline;
}

.phone-screen .contact-row__value .wrev__word,
.phone-screen .pc-link-tile__sub .wrev__word {
  display: inline;
  max-width: none;
}

.phone-screen .wrev__word.is-in {
  animation: phone-word-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--w, 0) * 55ms);
}

@keyframes phone-word-in {
  from {
    opacity: 0;
    transform: translateY(110%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-screen .wrev__word.is-in {
    animation: none;
  }
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, var(--surface-elevated));
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.status-chip[data-state='online'] {
  color: var(--auth-banner);
  border-color: color-mix(in srgb, var(--auth-banner) 30%, transparent);
  background: color-mix(in srgb, var(--auth-banner) 10%, var(--surface-elevated));
}

.status-chip[data-state='offline'] {
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.22);
  background: rgba(154, 52, 18, 0.08);
}

.card-kind-toggle {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.card-kind-toggle button {
  flex: 1 1 9rem;
}

@media (min-width: 768px) {
  .card-kind-toggle {
    flex-wrap: nowrap;
    max-width: 28rem;
  }
}

.mode-toggle {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1.5px solid color-mix(in srgb, var(--ink) 22%, var(--line));
  background: color-mix(in srgb, var(--ink) 5%, var(--surface));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
}

.mode-toggle button {
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mode-toggle button:hover,
.mode-toggle button:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.mode-toggle button.is-active {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 70%, #000),
    0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent);
}

.mode-toggle button.is-active:hover,
.mode-toggle button.is-active:focus-visible {
  background: var(--accent);
  color: var(--on-accent);
}

html.dark .mode-toggle {
  background: color-mix(in srgb, var(--surface) 80%, #000);
  border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
  box-shadow: none;
}

html.dark .mode-toggle button.is-active {
  background: var(--accent);
  color: var(--on-accent);
}

.reveal {
  animation: rise-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-delay-1 {
  animation-delay: 0.1s;
}

.reveal-delay-2 {
  animation-delay: 0.18s;
}

.reveal-delay-3 {
  animation-delay: 0.26s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.6rem) scale(0.985);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes qr-settle {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes preview-lift {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3,
  .qr-frame,
  .preview-panel .phone-shell,
  .studio-preview .phone-shell,
  .studio-intro .eyebrow::before,
  .studio-preview::before {
    animation: none !important;
  }

  .easy-steps li,
  .easy-steps li.is-active,
  .easy-steps li:hover {
    transform: none;
  }

  .btn:active,
  .theme-swatch:hover {
    transform: none;
  }
}

.profile-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-elevated);
  color: var(--ink);
  font-family: var(--font-body);
}

.profile-card[data-font='fraunces'] {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='figtree'] {
  --font-display: 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='cinzel'],
.profile-card[data-font='lora'] {
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='cinzel'] .profile-card__name,
.profile-card[data-font='lora'] .profile-card__name {
  letter-spacing: 0.04em;
}

.profile-card[data-font='bebas'],
.profile-card[data-font='franklin'] {
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='bebas'] .profile-card__name,
.profile-card[data-font='franklin'] .profile-card__name {
  letter-spacing: 0.03em;
  font-size: 1.25em;
}

.profile-card[data-font='syne'],
.profile-card[data-font='source'] {
  --font-display: 'Syne', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='caveat'],
.profile-card[data-font='plexsans'] {
  --font-display: 'Caveat', cursive;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='caveat'] .profile-card__name,
.profile-card[data-font='plexsans'] .profile-card__name {
  font-size: 1.3em;
  line-height: 1.1;
}

.profile-card[data-font='plex'] {
  --font-display: 'IBM Plex Mono', ui-monospace, monospace;
  --font-body: 'IBM Plex Mono', ui-monospace, monospace;
}

.profile-card[data-font='zilla'],
.profile-card[data-font='spectral'] {
  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='fatface'] {
  --font-display: 'Abril Fatface', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='fraktur'] {
  --font-display: 'UnifrakturMaguntia', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='orbitron'] {
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='fredoka'] {
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='bungee'] {
  --font-display: 'Bungee', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='poiret'] {
  --font-display: 'Poiret One', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='pacifico'] {
  --font-display: 'Pacifico', cursive;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='stencil'] {
  --font-display: 'Black Ops One', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='fatface'] .profile-card__name,
.profile-card[data-font='fraktur'] .profile-card__name,
.profile-card[data-font='bungee'] .profile-card__name,
.profile-card[data-font='poiret'] .profile-card__name,
.profile-card[data-font='pacifico'] .profile-card__name,
.profile-card[data-font='stencil'] .profile-card__name,
.profile-card[data-font='fatface'] .profile-card__motto,
.profile-card[data-font='fraktur'] .profile-card__motto,
.profile-card[data-font='bungee'] .profile-card__motto,
.profile-card[data-font='poiret'] .profile-card__motto,
.profile-card[data-font='pacifico'] .profile-card__motto,
.profile-card[data-font='stencil'] .profile-card__motto {
  font-weight: 400;
  font-style: normal;
}

.profile-card[data-font='fatface'] .profile-card__name {
  font-size: calc(1.05 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  line-height: 1.05;
}

.profile-card[data-font='fraktur'] .profile-card__name {
  font-size: calc(1.12 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  line-height: 1.15;
}

.profile-card[data-font='orbitron'] .profile-card__name {
  font-size: calc(0.92 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  letter-spacing: 0.04em;
}

.profile-card[data-font='bungee'] .profile-card__name {
  font-size: calc(0.86 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.profile-card[data-font='poiret'] .profile-card__name {
  font-size: calc(1.22 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  letter-spacing: 0.02em;
}

.profile-card[data-font='pacifico'] .profile-card__name {
  font-size: calc(1.16 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  line-height: 1.15;
}

.profile-card[data-font='stencil'] .profile-card__name {
  font-size: calc(0.96 * clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  letter-spacing: 0.03em;
}

.profile-card[data-font='playfair'] {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='cormorant'] {
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='cormorant'] .profile-card__name {
  font-size: calc(1.18em * var(--card-font-scale, 1));
}

.profile-card[data-font='montserrat'] {
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
}

.profile-card[data-font='space'] {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='jakarta'] {
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.profile-card[data-font='dmserif'] {
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='oswald'] {
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='oswald'] .profile-card__name {
  letter-spacing: 0.02em;
}

.profile-card[data-font='dancing'] {
  --font-display: 'Dancing Script', cursive;
  --font-body: 'Figtree', system-ui, sans-serif;
}

.profile-card[data-font='dancing'] .profile-card__name {
  font-size: calc(1.28em * var(--card-font-scale, 1));
  line-height: 1.1;
}

.profile-card__banner {
  position: relative;
  height: 8rem;
  overflow: hidden;
}

.profile-card__banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.profile-card__banner::after {
  content: none;
  display: none;
}

.profile-card__body {
  padding: 0 1.25rem 1.35rem;
}

.profile-card__avatar {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 1.15rem;
  padding: 0.2rem;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(24, 24, 27, 0.14);
  flex-shrink: 0;
}

.profile-card__avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0.85rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.profile-card__photo,
.profile-card__initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.profile-card__photo,
.editor-avatar-photo {
  display: block;
  object-fit: cover;
  object-position: center 18%;
  z-index: 1;
}

.profile-card__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  z-index: 0;
}

.profile-card__avatar-inner [hidden] {
  display: none !important;
}

.profile-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(clamp(1.35rem, 4vw, 1.7rem) * var(--card-font-scale, 1));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.profile-card__motto {
  margin: 0.35rem 0 0;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: calc(1.65rem * var(--card-font-scale, 1));
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.profile-card__bio {
  margin: 1rem 0 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 2px solid var(--accent);
  font-size: calc(0.875rem * var(--card-font-scale, 1));
  line-height: 1.55;
  color: var(--ink-muted);
}

.profile-card__sample {
  margin: 1rem 0 0;
  padding: 0.35rem 0 0;
  border-top: 1px solid var(--line);
}

.profile-card__sample-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.profile-card__sample-row dt {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.profile-card__sample-row dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--ink);
}

.contact-row.is-hint {
  color: var(--ink-muted);
}

.profile-card__cta {
  width: 100%;
  min-height: 2.85rem;
  margin-top: 1.25rem;
  border: 0;
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.profile-card__cta:hover {
  filter: none;
  opacity: 0.92;
}

.profile-card__cta:active {
  transform: translateY(1px);
}

.profile-card__cta-secondary {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 550;
  cursor: pointer;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--ink);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.profile-card__cta-secondary:hover {
  background: var(--line);
  border-color: color-mix(in srgb, var(--ink) 25%, transparent);
}

.profile-card__cta-secondary:active {
  transform: translateY(1px);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0 0.4rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.action-chip:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.action-chip.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.contact-list {
  margin-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  text-decoration: none;
  color: inherit;
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-row:hover .contact-row__chevron {
  color: var(--ink);
  transform: translate(1px, -1px);
}

.contact-row__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact-row__value {
  margin: 0.2rem 0 0;
  font-size: calc(0.875rem * var(--card-font-scale, 1));
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-row__value.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: calc(0.8125rem * var(--card-font-scale, 1));
}

.contact-row__chevron {
  color: var(--ink-muted);
  transition: color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

/* --- Fiches app : Studio / Rivage / Pulse --- */

.profile-card--studio,
.profile-card--rivage,
.profile-card--pulse {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #0c0c0e;
  color: #fafafa;
  --pc-accent: #c9a227;
}

.profile-card--rivage,
.profile-card--pulse {
  background: #f7f4f1;
  color: #18181b;
}

.pc-rounds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.pc-round {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 4.25rem;
  min-height: 4.25rem;
  padding: 0.5rem 0.25rem;
  border-radius: 9999px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  transition: transform 0.15s ease, background 0.15s ease;
}

.pc-round:hover {
  transform: translateY(-1px);
}

.pc-round.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pc-round__label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-align: center;
}

.profile-card--studio .pc-round {
  background: #18181b;
  color: #fafafa;
  border-color: rgba(255, 255, 255, 0.12);
  width: 3.5rem;
  min-height: 3.5rem;
  border-radius: 9999px;
}

.profile-card--studio .pc-round__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.profile-card--studio .pc-round {
  position: relative;
}

.profile-card--pulse .pc-round {
  background: transparent;
  border: 0;
  color: #fff;
  width: 3.75rem;
  min-height: 3.25rem;
}

.pc-about {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: #1a1a1d;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pc-about--light {
  background: #fff;
  border: 1px solid rgba(24, 24, 27, 0.08);
  color: #18181b;
}

.pc-about__title {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pc-about__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: inherit;
  opacity: 0.88;
}

.pc-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
  color: rgba(250, 250, 250, 0.7);
}

.pc-dock {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, #0c0c0e 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card--rivage .pc-dock,
.profile-card--pulse .pc-dock {
  background: color-mix(in srgb, #f7f4f1 94%, transparent);
  border-top-color: rgba(24, 24, 27, 0.1);
}

.pc-dock__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
}

.profile-card--rivage .pc-dock__icon,
.profile-card--pulse .pc-dock__icon {
  border-color: rgba(24, 24, 27, 0.12);
  background: #fff;
  color: #18181b;
}

.pc-dock__cta {
  flex: 1 1 auto;
  min-height: 2.75rem;
  border: 0;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0.9rem;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
  color: #fff;
}

.pc-link-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(24, 24, 27, 0.1);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pc-link-tile:hover {
  border-color: color-mix(in srgb, var(--pc-accent) 45%, transparent);
  transform: translateY(-1px);
}

.pc-link-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--pc-accent) 16%, #fff);
  color: var(--pc-accent);
  flex-shrink: 0;
}

.pc-link-tile__copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pc-link-tile__title {
  font-size: 0.875rem;
  font-weight: 650;
}

.pc-link-tile__sub {
  font-size: 0.75rem;
  color: var(--ink-muted, #71717a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-link-tile__chevron {
  color: #a1a1aa;
  flex-shrink: 0;
}

/* Studio */

.pc-studio__hero {
  position: relative;
  min-height: clamp(16rem, 52vw, 22rem);
  overflow: hidden;
  background: #111;
}

.pc-studio__photo,
.pc-studio__initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pc-studio__photo {
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.05);
}

.pc-studio__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 700;
  color: #fff;
}

.pc-studio__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.82) 100%);
  pointer-events: none;
}

.pc-studio__identity {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.25rem 1.15rem 1.1rem;
}

.pc-studio__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(clamp(1.65rem, 6.5vw, 2.15rem) * var(--card-font-scale, 1));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
}

.pc-studio__role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.45rem 0 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
}

.pc-studio__org {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.pc-studio__org::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: var(--pc-accent);
}

.pc-studio__body {
  padding: 1rem 1.1rem 1.25rem;
}

.profile-card--studio .pc-rounds {
  margin-top: -0.15rem;
}

.profile-card--studio .profile-card__cta-secondary {
  margin-top: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fafafa;
}

/* Rivage */

.profile-card--rivage {
  position: relative;
  overflow: hidden;
}

.pc-rivage__wave {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.pc-rivage__wave--a {
  width: min(28rem, 140%);
  height: min(28rem, 140%);
  right: -35%;
  top: -18%;
  background: color-mix(in srgb, var(--pc-accent) 88%, #7f1d1d);
}

.pc-rivage__wave--b {
  width: min(18rem, 90%);
  height: min(18rem, 90%);
  right: -8%;
  top: 28%;
  background: #fff;
  opacity: 0.92;
}

.pc-rivage__header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0.75rem;
  align-items: end;
  padding: 1.35rem 1.1rem 0.5rem;
  min-height: 13.5rem;
}

.pc-rivage__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(clamp(1.35rem, 5.5vw, 1.75rem) * var(--card-font-scale, 1));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #18181b;
}

.pc-rivage__job,
.pc-rivage__org {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #3f3f46;
}

.pc-rivage__org {
  font-weight: 600;
}

.pc-rivage__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: 0.85rem;
  border-radius: 9999px;
  background: #1e3a5f;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.pc-rivage__portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 0.82;
  max-height: 14rem;
  border-radius: 1.25rem 1.25rem 40% 40%;
  overflow: hidden;
  background: color-mix(in srgb, var(--pc-accent) 18%, #fff);
}

.pc-rivage__photo,
.pc-rivage__initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pc-rivage__photo {
  object-fit: cover;
  object-position: center top;
}

.pc-rivage__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.pc-rivage__body {
  position: relative;
  z-index: 1;
  padding: 1rem 1.1rem 1.15rem;
}

.pc-rivage__links {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.95rem;
}

/* Pulse */

.pc-pulse__top {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 1.15rem 1.1rem 0.85rem;
}

.pc-pulse__portrait {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.1rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--pc-accent) 20%, #fff);
  border: 1px solid rgba(24, 24, 27, 0.08);
}

.pc-pulse__photo,
.pc-pulse__initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pc-pulse__photo {
  object-fit: cover;
}

.pc-pulse__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.pc-pulse__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(clamp(1.25rem, 5vw, 1.55rem) * var(--card-font-scale, 1));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.pc-pulse__job,
.pc-pulse__org {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: #52525b;
}

.pc-pulse__org {
  font-weight: 600;
  color: #3f3f46;
}

.pc-pulse__bar {
  padding: 0.55rem 0.65rem;
  background: var(--pc-accent);
  color: #fff;
}

.pc-pulse__body {
  padding: 1rem 1.1rem 1.15rem;
}

.pc-pulse__links {
  display: grid;
  gap: 0.55rem;
}

@media (max-width: 359.98px) {
  .pc-rivage__header {
    grid-template-columns: 1fr;
  }

  .pc-rivage__portrait {
    max-width: 11rem;
    margin-inline: auto;
  }

  .pc-pulse__top {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .pc-dock {
    flex-wrap: wrap;
  }

  .pc-dock__cta {
    flex-basis: 100%;
  }
}

@media (min-width: 768px) {
  .pc-studio__hero {
    min-height: 24rem;
  }

  .pc-studio__name {
    font-size: 2.35rem;
  }

  .pc-rivage__header {
    min-height: 16rem;
    padding-inline: 1.35rem;
  }
}

@media (min-width: 1024px) {
  .profile-card--studio .pc-studio__body,
  .pc-rivage__body,
  .pc-pulse__body {
    padding-inline: 1.35rem;
  }
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: rgba(161, 161, 170, 0.45);
  border-radius: 9999px;
}

.public-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1rem 1.75rem;
}

/* Tailwind .hidden (display:none) is overridden by display:flex above. */
.public-stage.hidden,
.public-stage[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .public-stage {
    padding: 2.5rem 1.25rem;
  }
}

/* Colonne max 28rem : un flex-wrap laisse PDF et Partager en escalier. */
.public-toolbar {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.public-toolbar__bar,
.public-toolbar__end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.public-toolbar__bar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.public-toolbar__end {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.public-toolbar__bar .btn {
  white-space: nowrap;
}

.public-toolbar__exports {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.public-toolbar__exports .public-toolbar__pdf {
  grid-column: 1 / -1;
}

.public-toolbar__exports .btn {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .studio-main {
    padding-top: 1.25rem;
    /* Place pour la pastille chat en bas a droite. */
    padding-bottom: 4.5rem;
  }

  .studio-intro {
    margin-bottom: 1rem;
    padding-top: 0;
  }

  .studio-intro .eyebrow {
    margin-bottom: 0.4rem;
  }

  .studio-intro__brand {
    font-size: clamp(2.25rem, 11vw, 2.75rem);
  }

  .studio-intro__headline {
    max-width: none;
    margin-top: 0.5rem;
    font-size: clamp(1.15rem, 5vw, 1.4rem);
  }

  .studio-intro .hero-lead {
    max-width: none;
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Statut serveur et pastille bêta : l'état "Hors ligne" reste visible,
     le reste cède la place aux actions sur 360 px. */
  .studio-header .beta-chip,
  .studio-header .status-chip:not([data-state='offline']) {
    display: none;
  }

  .studio-header #btnAccountPanel {
    padding-inline: 0.625rem;
  }

  .studio-header .account-cards-badge {
    min-width: 1.75rem;
  }

  .panel-pad {
    padding: 1.15rem !important;
  }

  .action-chip span {
    font-size: 0.6875rem;
  }

  #otpCode {
    letter-spacing: 0.2em;
    font-size: 1.125rem;
  }

  .studio-header .btn span.hidden {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .studio-intro .eyebrow,
  .studio-intro__brand,
  .studio-intro .hero-lead {
    display: none;
  }

  .studio-intro {
    margin-bottom: 0.75rem;
    padding-top: 0;
  }

  .studio-intro__headline {
    margin-top: 0;
    max-width: none;
    font-size: 1.35rem;
  }
}

@media (min-width: 768px) {
  .studio-main {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .studio-grid {
    align-items: stretch;
  }

  .studio-grid > section,
  .studio-grid > aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .studio-grid > section > .panel,
  .studio-grid > aside > .panel {
    flex: 1 1 auto;
    width: 100%;
  }

  .preview-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .preview-panel .phone-shell:not(.hidden) {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    width: 100%;
    max-width: min(100%, 17.5rem);
    margin-inline: auto;
    min-height: 0;
  }

  .preview-panel .phone-screen {
    flex: 0 1 auto;
    height: min(36.5rem, 57vh);
    min-height: min(32.5rem, 51vh);
    max-height: none;
    overflow-y: auto;
  }

  .preview-panel > .preview-card-body:not(.hidden) {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
}

.is-pointed {
  box-shadow: 0 0 0 2px var(--brand) !important;
  transition: box-shadow 0.2s ease;
}

/* Page légale (confidentialité) + consentement inscription */
.legal-main {
  width: 100%;
  max-width: 48rem;
}

.legal-nav {
  margin-bottom: 1rem;
}

.legal-doc__header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.legal-doc__title {
  margin: 0.35rem 0 0.75rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.legal-doc__meta {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.legal-doc__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.legal-section {
  margin-top: 1.75rem;
}

.legal-section h2 {
  margin: 0 0 0.75rem;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.legal-section p,
.legal-section li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.legal-section ul,
.legal-section ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.legal-section li + li {
  margin-top: 0.55rem;
}

.legal-section code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.875em;
}

.legal-section a {
  overflow-wrap: anywhere;
}

.legal-section .cookie-list {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.cookie-list > li {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.cookie-name {
  margin: 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.875rem;
  line-height: 1.4;
}

.cookie-list p {
  margin: 0;
}

@media (min-width: 768px) {
  .cookie-list > li {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: 0.35rem 1.25rem;
    align-items: start;
  }
}

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.guide-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}

.guide-toc a:hover {
  border-color: var(--ink);
}

.legal-emphasis {
  margin-top: 1rem;
  font-weight: 600;
}

.auth-alert {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  animation: auth-alert-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert--error {
  color: #9f1239;
  border-color: color-mix(in srgb, #be123c 42%, var(--line));
  background: color-mix(in srgb, #fda4af 22%, var(--surface-elevated));
}

.auth-alert--success {
  color: #065f46;
  border-color: color-mix(in srgb, var(--auth-banner) 40%, var(--line));
  background: color-mix(in srgb, var(--auth-banner) 12%, var(--surface-elevated));
}

.auth-alert--info {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-elevated));
}

html.dark .auth-alert--error {
  color: #fecdd3;
  border-color: color-mix(in srgb, #fb7185 35%, var(--line));
  background: color-mix(in srgb, #9f1239 28%, var(--surface-elevated));
}

html.dark .auth-alert--success {
  color: #a7f3d0;
  border-color: color-mix(in srgb, #34d399 30%, var(--line));
  background: color-mix(in srgb, #065f46 35%, var(--surface-elevated));
}

@keyframes auth-alert-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 575.98px) {
  .auth-alert {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.9375rem;
  }
}

.pwd-meter {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pwd-meter[hidden] {
  display: none;
}

.pwd-meter__track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
}

.pwd-meter__seg {
  display: block;
  height: 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-muted) 22%, transparent);
  transform: scaleX(0.35);
  transform-origin: left center;
  opacity: 0.55;
  transition:
    background-color 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
}

.pwd-meter[data-level='1'] .pwd-meter__seg[data-seg='1'],
.pwd-meter[data-level='2'] .pwd-meter__seg[data-seg='1'],
.pwd-meter[data-level='2'] .pwd-meter__seg[data-seg='2'],
.pwd-meter[data-level='3'] .pwd-meter__seg[data-seg='1'],
.pwd-meter[data-level='3'] .pwd-meter__seg[data-seg='2'],
.pwd-meter[data-level='3'] .pwd-meter__seg[data-seg='3'],
.pwd-meter[data-level='4'] .pwd-meter__seg {
  transform: scaleX(1);
  opacity: 1;
}

.pwd-meter[data-level='1'] .pwd-meter__seg[data-seg='1'] {
  background: #b45309;
}

.pwd-meter[data-level='2'] .pwd-meter__seg[data-seg='1'],
.pwd-meter[data-level='2'] .pwd-meter__seg[data-seg='2'] {
  background: #c2410c;
}

.pwd-meter[data-level='3'] .pwd-meter__seg[data-seg='1'],
.pwd-meter[data-level='3'] .pwd-meter__seg[data-seg='2'],
.pwd-meter[data-level='3'] .pwd-meter__seg[data-seg='3'] {
  background: var(--brand);
}

.pwd-meter[data-level='4'] .pwd-meter__seg {
  background: var(--auth-banner);
}

.pwd-meter__label {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-muted);
  transition: color 160ms ease;
}

.pwd-meter[data-level='1'] .pwd-meter__label {
  color: #b45309;
}

.pwd-meter[data-level='2'] .pwd-meter__label {
  color: #c2410c;
}

.pwd-meter[data-level='3'] .pwd-meter__label {
  color: var(--brand-text);
}

.pwd-meter[data-level='4'] .pwd-meter__label {
  color: var(--auth-banner);
}

.pwd-meter__checks {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
}

@media (min-width: 576px) {
  .pwd-meter__checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
  }
}

.pwd-meter__checks li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-muted);
  transition: color 160ms ease, opacity 160ms ease;
}

.pwd-meter__checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.28rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--ink-muted) 55%, transparent);
  background: transparent;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pwd-meter__checks li.is-met {
  color: var(--ink);
}

.pwd-meter__checks li.is-met::before {
  border-color: var(--auth-banner);
  background: var(--auth-banner);
  transform: scale(1.08);
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-consent.is-invalid {
  border-color: color-mix(in srgb, #be123c 55%, var(--line));
  background: color-mix(in srgb, #fda4af 18%, var(--surface-elevated));
  box-shadow: 0 0 0 1px color-mix(in srgb, #be123c 25%, transparent);
}

.auth-consent__input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-consent__text {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink);
}

.auth-consent__text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-consent__required {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-text);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

#btnRegisterSubmit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 575.98px) {
  .legal-doc.panel-pad {
    padding: 1.25rem;
  }

  .legal-section ul,
  .legal-section ol {
    padding-left: 1.1rem;
  }

  .auth-consent {
    padding: 0.85rem;
  }
}

/* Mini profil compte (éditeur) */
.account-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: color-mix(in srgb, #09090b 42%, transparent);
}

.account-panel {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  left: auto;
  box-sizing: border-box;
  width: min(24rem, 100vw);
  max-width: 100vw;
  height: 100%;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1rem 1.5rem;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px color-mix(in srgb, #09090b 18%, transparent);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.account-panel.hidden,
.account-panel-backdrop.hidden {
  display: none;
}

.account-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.account-panel__title {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
  word-break: break-word;
}

.account-panel__email {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.account-panel__chip {
  display: inline-flex;
  margin: 0.65rem 0 0;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.account-panel__message {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.account-panel__message[data-tone='error'] {
  background: color-mix(in srgb, var(--surface) 90%, #b91c1c 10%);
}

.account-panel__message[data-tone='success'] {
  background: color-mix(in srgb, var(--surface) 88%, #166534 12%);
}

.account-panel__section {
  min-width: 0;
  width: 100%;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.account-panel__section-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.account-panel__hint {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.account-panel__notice {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 90%, #166534 10%);
}

.account-panel__footer {
  margin-top: auto;
  display: grid;
  gap: 0.65rem;
  padding-top: 0.25rem;
}

.account-totp__frame {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
}

.account-totp__manual {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.account-totp__secret {
  display: block;
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

@media (max-width: 767.98px) {
  .account-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    border-left: 0;
    border-radius: 0;
  }
}

@media (min-width: 768px) {
  .account-panel {
    top: 4.25rem;
    right: 1rem;
    left: auto;
    bottom: auto;
    width: min(22.5rem, calc(100vw - 2rem));
    height: auto;
    max-height: calc(100dvh - 5.25rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 18px 48px color-mix(in srgb, #09090b 16%, transparent);
  }
}

/* Support chatbot : coin bas droit du viewport, visible au scroll. */
body.app-shell > #supportChat.support-chat {
  position: fixed;
  z-index: 48;
  top: auto;
  left: auto;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
}

.support-chat {
  position: fixed;
  z-index: 48;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.65rem;
  width: auto;
  max-width: min(26rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.support-chat__toggle,
.support-chat__panel,
.support-chat__form,
.support-chat__close,
.support-chat__send {
  pointer-events: auto;
}

.support-chat__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 55%, #000);
  background: var(--brand);
  color: #18181b;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 28px color-mix(in srgb, #09090b 22%, transparent);
  cursor: pointer;
}

.support-chat__toggle:hover,
.support-chat__toggle:focus-visible {
  background: var(--brand-mid);
  color: #18181b;
}

.support-chat__badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.support-chat__badge[hidden] {
  display: none;
}

.support-chat.is-open {
  width: min(26rem, calc(100vw - 1.5rem));
}

.support-chat__panel {
  width: min(26rem, calc(100vw - 1.5rem));
  max-height: min(32rem, calc(100dvh - 6.5rem));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface-elevated);
  box-shadow: 0 18px 48px color-mix(in srgb, #09090b 18%, transparent);
  overflow: hidden;
}

.support-chat__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.9rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
}

.support-chat__header > div {
  min-width: 0;
  flex: 1 1 auto;
}

.support-chat__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.support-chat__title {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--ink);
}

.support-chat__lead {
  margin: 0.35rem 0 0;
  max-width: 22rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.support-chat__beta-tip {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: min(18.5rem, calc(100vw - 5.5rem));
  padding: 0.7rem 0.75rem 0.7rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  box-shadow: 0 12px 28px color-mix(in srgb, #09090b 14%, transparent);
  color: var(--ink);
}

.support-chat__beta-tip[hidden] {
  display: none !important;
}

.support-chat__beta-tip-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.support-chat__beta-tip-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-text, #9a3412);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.support-chat__beta-tip-dismiss {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  margin: -0.2rem -0.15rem 0 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.support-chat__beta-tip-dismiss:hover,
.support-chat__beta-tip-dismiss:focus-visible {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
}

.support-chat__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.support-chat__panel[hidden] {
  display: none !important;
}

.support-chat__messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(18rem, 42dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--surface);
}

.support-chat__empty {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.support-chat__bubble {
  max-width: 92%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
}

.support-chat__bubble header {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.support-chat__edited {
  font-weight: 500;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

.support-chat__edited {
  font-weight: 500;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

.support-chat__bubble p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}

.support-chat__bubble--user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface-elevated));
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.support-chat__bubble--bot,
.support-chat__bubble--admin {
  align-self: flex-start;
}

.support-chat__bubble--admin {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.support-chat__form {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface-elevated);
}

.support-chat__meta {
  display: grid;
  gap: 0.5rem;
}

.support-chat__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.support-chat__field input,
.support-chat__field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  resize: vertical;
}

.support-chat__field input:focus-visible,
.support-chat__field textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.support-chat__field--message textarea {
  min-height: 4.5rem;
}

.support-chat__status {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.support-chat__status[data-tone='error'] {
  color: #b42318;
}

.support-chat__status[data-tone='success'] {
  color: #027a48;
}

.support-chat__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--brand) 55%, #000);
  background: var(--brand);
  color: #18181b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.support-chat__send:hover,
.support-chat__send:focus-visible {
  background: var(--brand-mid);
  color: #18181b;
}

/* Verrouille le scroll page quand le chat est ouvert (classe posee en JS). */
html.evc-support-open,
html.evc-support-open body {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

html.evc-support-open .support-chat,
html.evc-support-open body.app-shell > #supportChat.support-chat {
  touch-action: auto;
}

/* Petit ecran : pastille fermee ; ouvert = feuille plein ecran, conversation d'abord. */
@media (max-width: 575.98px) {
  .support-chat,
  body.app-shell > #supportChat.support-chat {
    top: auto;
    left: auto;
    right: max(0.5rem, env(safe-area-inset-right));
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 1rem);
    gap: 0.5rem;
    align-items: flex-end;
  }

  .support-chat__toggle {
    align-self: flex-end;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    gap: 0;
    border-radius: 999px;
    box-shadow: 0 8px 20px color-mix(in srgb, #09090b 18%, transparent);
  }

  .support-chat__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .support-chat__beta-tip {
    display: none !important;
  }

  /* Feuille plein viewport : un seul scroll = la liste des messages. */
  .support-chat.is-open,
  body.app-shell > #supportChat.support-chat.is-open {
    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    padding:
      env(safe-area-inset-top, 0px)
      env(safe-area-inset-right, 0px)
      env(safe-area-inset-bottom, 0px)
      env(safe-area-inset-left, 0px);
    box-sizing: border-box;
    gap: 0;
    align-items: stretch;
    z-index: 60;
    pointer-events: auto;
    background: color-mix(in srgb, #09090b 42%, transparent);
  }

  .support-chat.is-open .support-chat__toggle {
    display: none;
  }

  .support-chat.is-open .support-chat__panel,
  .support-chat.is-open.support-chat .support-chat__panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .support-chat__lead,
  .support-chat__eyebrow {
    display: none;
  }

  .support-chat__header {
    flex-shrink: 0;
    padding: 0.7rem 0.85rem;
    align-items: center;
  }

  .support-chat__title {
    margin: 0;
    font-size: 1.05rem;
  }

  .support-chat__close {
    width: 2.75rem;
    height: 2.75rem;
  }

  .support-chat__messages {
    flex: 1 1 auto;
    min-height: 12rem;
    max-height: none;
    padding: 0.85rem 0.9rem;
    -webkit-overflow-scrolling: touch;
  }

  .support-chat__empty {
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .support-chat__bubble {
    max-width: 100%;
  }

  .support-chat__bubble p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
  }

  .support-chat__bubble--user {
    max-width: 95%;
  }

  .support-chat__form {
    flex-shrink: 0;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem 0.75rem;
  }

  .support-chat__meta {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .support-chat__field {
    font-size: 0.8125rem;
  }

  .support-chat__field input,
  .support-chat__field textarea {
    min-height: 2.75rem;
    padding: 0.5rem 0.65rem;
    font-size: 1rem;
    resize: none;
  }

  .support-chat__field--message textarea {
    min-height: 2.75rem;
    max-height: 4rem;
    resize: none;
  }

  .support-chat__send {
    min-height: 2.75rem;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .support-chat,
  body.app-shell > #supportChat.support-chat {
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .support-chat.is-open,
  .support-chat__panel {
    width: min(24rem, calc(100vw - 2.5rem));
  }

  .support-chat__meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .support-chat.is-open,
  .support-chat__panel {
    width: min(26rem, calc(100vw - 3rem));
  }
}

.cookie-banner {
  position: fixed;
  z-index: 46;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: var(--surface-elevated);
  color: var(--ink);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px color-mix(in srgb, #09090b 8%, transparent);
}

.cookie-banner__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cookie-banner__text {
  margin: 0.25rem 0 0;
  max-width: 46rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

html.cookie-banner-open body.app-shell {
  padding-bottom: var(--cookie-banner-h, 0px);
}

html.cookie-banner-open .support-chat,
html.cookie-banner-open body.app-shell > #supportChat.support-chat {
  bottom: calc(var(--cookie-banner-h, 0px) + 0.75rem);
}

@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding-inline: 1.5rem;
  }

  .cookie-banner__actions {
    flex-shrink: 0;
  }
}

/* Visite guidée, première ouverture de l'éditeur. */
html.editor-tour-open,
html.editor-tour-open body {
  overflow: hidden;
}

.editor-tour {
  position: fixed;
  inset: 0;
  z-index: 64;
  pointer-events: none;
}

.editor-tour__shield {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  background: transparent;
}

.editor-tour__spot {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  border-radius: 0.75rem;
  box-shadow: 0 0 0 100vmax color-mix(in srgb, #09090b 58%, transparent);
  outline: 2px solid var(--brand);
}

.editor-tour__card {
  position: fixed;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: auto;
  max-width: 100%;
  max-height: min(42dvh, 22rem);
  overflow: auto;
  padding: 1rem;
  pointer-events: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface-elevated);
  color: var(--ink);
  box-shadow: 0 16px 40px color-mix(in srgb, #09090b 18%, transparent);
}

.editor-tour__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.editor-tour__count {
  margin: 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.editor-tour__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.editor-tour__title:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.editor-tour__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
}

.editor-tour__meter {
  height: 2px;
  border-radius: 1px;
  background: var(--line);
}

.editor-tour__meter > span {
  display: block;
  height: 100%;
  background: var(--brand);
}

.editor-tour__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.editor-tour__actions .btn {
  flex: 1 1 8rem;
  justify-content: center;
}

@media (max-width: 575.98px) {
  .editor-tour__actions .editor-tour__next {
    flex: 1 1 100%;
    order: -1;
  }
}

@media (min-width: 768px) {
  .editor-tour__card {
    right: auto;
    bottom: auto;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(70dvh, 26rem);
  }
}

/* ==========================================================================
   Mobile & Multi-Device Responsiveness (Smartphones, Phablets, Tablets)
   ========================================================================== */

/* Touch targets and form accessibility */
@media (max-width: 639.98px) {
  /* Prevent iOS automatic zoom on form input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  select,
  textarea {
    font-size: 1rem !important;
  }

  /* Compact editor navigation tabs for small screens (320px - 480px) */
  .editor-tabs {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .editor-tab {
    padding: 0.5rem 0.25rem;
    font-size: 0.8125rem;
    min-height: 2.75rem;
  }

  .editor-tab__num {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.6875rem;
  }

  .editor-tab__title {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Action buttons at the bottom of form steps become full width for thumb tap */
  .pane-navigation {
    flex-direction: column-reverse;
    gap: 0.625rem;
  }

  .pane-navigation.pane-navigation--try {
    flex-direction: column;
  }

  .pane-navigation .btn {
    width: 100%;
    justify-content: center;
  }

  /* Safe margins on mobile container */
  .studio-main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Compact header on very small screens (<= 380px) */
  .site-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Tablet & Mobile Phone Mockup Adaptation (< 1024px) */
@media (max-width: 1023.98px) {
  /* Give the phone preview adequate width and breathing room when stacked below the form */
  .studio-preview .phone-shell {
    max-width: min(100%, 21rem);
    margin-left: auto;
    margin-right: auto;
  }

  /* Ensure card action buttons remain accessible without horizontal overflow */
  .card-modal-dialog {
    width: min(94vw, 36rem);
    max-height: 90vh;
  }

  /* Model catalogue filter pills on mobile */
  .catalog-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  .catalog-filters::-webkit-scrollbar {
    display: none;
  }
}

/* Extra small screens (iPhone SE, 320px - 360px) */
@media (max-width: 359.98px) {
  .editor-tab {
    padding: 0.375rem 0.125rem;
    font-size: 0.75rem;
  }

  .editor-tab__num {
    display: none;
  }

  .easy-banner {
    padding: 0.625rem 0.75rem;
  }
}
