/* ═══════════════════════════════════════════════════════════
   PUBDAY — Design system
   Brand: orange-amber chaud + ink dark + Inter + Fraunces
   Mobile-first, 375px de référence
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand: #f26e22;
  --brand-dark: #d75c14;
  --brand-soft: #fef1e6;
  --brand-glow: rgba(242, 110, 34, 0.18);

  --ink: #0c0d10;
  --ink-2: #1f2128;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e8eaed;
  --line-2: #f1f3f5;
  --bg: #fbfaf7;
  --bg-card: #ffffff;
  --success: #16a34a;
  --warn: #f59e0b;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(12, 13, 16, 0.04);
  --shadow: 0 4px 16px rgba(12, 13, 16, 0.06);
  --shadow-lg: 0 12px 36px rgba(12, 13, 16, 0.08);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Inter', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ═══════ Screens & navigation ═══════ */

.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
}
.screen.active {
  display: block;
}

#app {
  display: none;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 76px;
}
.in-app #app {
  display: block;
}

/* On masque toutes les sections de l'app sauf l'active */
#app .screen {
  display: none;
}
#app .screen.active {
  display: block;
}

/* ═══════ LOGIN ═══════ */

.screen--login.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(242, 110, 34, 0.22), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(242, 110, 34, 0.12), transparent 50%),
    var(--bg);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.brand__logo {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  display: grid;
  place-items: center;
}
.brand__dot {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  bottom: 9px;
  right: 8px;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
}
.brand__tagline {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.brand__tagline strong {
  color: var(--ink);
}
.brand__tagline em {
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 600;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.field input {
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.divider {
  position: relative;
  text-align: center;
  margin: 22px 0 14px;
}
.divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}
.divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ═══════ ONBOARDING ═══════ */

.screen--onboarding.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 0% 0%, rgba(242, 110, 34, 0.10), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(242, 110, 34, 0.06), transparent 40%),
    var(--bg);
  padding: 0;
}

.onboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand--small {
  margin-bottom: 0;
  gap: 8px;
}
.brand--small .brand__logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  font-size: 19px;
}
.brand--small .brand__logo .brand__dot {
  width: 5px; height: 5px;
  bottom: 6px; right: 6px;
}
.brand--small .brand__name {
  font-size: 20px;
}

.onboard__progress {
  display: flex;
  gap: 8px;
  align-items: center;
}
.onboard__step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--line-2);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.onboard__step--active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.onboard__step--done {
  background: var(--success);
  color: #fff;
}
.onboard__step--done::before {
  content: '✓';
}
.onboard__step--done {
  font-size: 0;
}
.onboard__step--done::before {
  font-size: 14px;
  font-weight: 700;
}

.onboard__body {
  flex: 1;
  padding: 32px 20px 40px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.onboard__eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 8px;
}

.onboard__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.onboard__title em {
  font-style: italic;
  color: var(--brand);
}

.onboard__sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 28px;
}
.onboard__sub strong {
  color: var(--ink);
}

.onboard__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.onboard__form .field {
  gap: 8px;
}
.field__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.field__hint {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

/* Vibes grid */
.vibes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.vibe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
}
.vibe-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.vibe-card__emoji {
  font-size: 26px;
}
.vibe-card strong {
  font-size: 15px;
  font-weight: 700;
}
.vibe-card small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.vibe-card:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.vibe-card:has(input:checked) strong {
  color: var(--brand-dark);
}

/* Checks grid */
.checks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  cursor: pointer;
}
.check:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* Colors row */
.colors-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.color-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.color-pick input[type="color"] {
  width: 64px;
  height: 64px;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: none;
  padding: 0;
}
.color-pick span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.preset {
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card);
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
}
.preset:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Examples block */
.onboard__examples {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 4px;
}
.onboard__examples p {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 6px;
}
.onboard__examples ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.onboard__examples li {
  font-size: 13px;
  color: var(--ink-2);
  padding: 4px 0;
  font-style: italic;
}
.onboard__examples li::before {
  content: '→ ';
  color: var(--brand);
  font-weight: 700;
  font-style: normal;
}

/* Actions row */
.onboard__actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  align-items: stretch;
}

/* ═══════ Buttons ═══════ */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}
.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 4px 14px var(--brand-glow);
}
.btn--secondary {
  --btn-bg: var(--bg-card);
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--full {
  width: 100%;
}
.btn--xl {
  height: 64px;
  font-size: 16px;
  border-radius: 16px;
  flex-direction: column;
  gap: 4px;
}
.btn--xl .emoji {
  font-size: 22px;
}
.btn--grow {
  flex: 1;
}

/* ═══════ Topbar ═══════ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__hello {
  font-size: 13px;
  color: var(--muted);
}
.topbar__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--line-2);
  font-size: 20px;
  display: grid;
  place-items: center;
}
.counter {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--line-2);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ═══════ Avatar ═══════ */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.avatar--lg {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

/* ═══════ Screen body & cards ═══════ */

.screen__body {
  padding: 16px 20px 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card--hero {
  background: linear-gradient(140deg, #1f2128 0%, #0c0d10 100%);
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.card--hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 90% 0%, rgba(242, 110, 34, 0.4), transparent 60%);
  pointer-events: none;
}
.card--hero > * {
  position: relative;
  z-index: 1;
}
.card__badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card__sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0 14px;
}
.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 320px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #000;
}
.card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__media-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.play-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  padding-left: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

/* ═══════ Stats ═══════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat__value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat__value span {
  color: var(--muted-2);
  font-size: 16px;
}
.stat__label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ═══════ Section title & timeline ═══════ */

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 18px 0 10px;
}
.section-title small {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-left: 6px;
}

.timeline {
  list-style: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 8px 16px;
  box-shadow: var(--shadow-sm);
}
.timeline__item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  align-items: flex-start;
}
.timeline__item:last-child {
  border-bottom: 0;
}
.timeline__item .dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-2);
  margin-top: 7px;
}
.timeline__item .dot--success {
  background: var(--success);
}
.timeline__item div {
  font-size: 14px;
}
.timeline__item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

/* ═══════ Upload ═══════ */

.info-bubble,
.warning-bubble {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 12px;
}
.info-bubble {
  background: var(--brand-soft);
  color: var(--ink);
  border-left: 4px solid var(--brand);
}
.warning-bubble {
  background: #fff7ed;
  color: #92400e;
  border-left: 4px solid var(--warn);
  margin-bottom: 22px;
}

.upload-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-tile {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-sm);
  background: var(--line-2);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--muted-2);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-tile__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.photo-tile__delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}
.photo-tile--placeholder {
  background: var(--line-2);
  flex-direction: column;
  font-size: 22px;
}
.photo-tile--placeholder small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.photo-tile--empty {
  background: transparent;
  border: 2px dashed var(--line);
  font-weight: 300;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.photo-tile--empty:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ═══════ Validation ═══════ */

.video-frame {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 8px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vibes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.vibe {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.vibe__emoji {
  font-size: 18px;
}
.vibe--active {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  background: var(--bg-card);
  font-family: inherit;
}
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}
.chip button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(215, 92, 20, 0.15);
  color: var(--brand-dark);
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-left: 2px;
}
.chip--add {
  background: transparent;
  border: 1.5px dashed var(--line);
  color: var(--muted);
}

.networks {
  display: grid;
  gap: 8px;
}
.network {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  cursor: pointer;
}
.network input {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}

.expert {
  margin-top: 18px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  overflow: hidden;
}
.expert summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.expert summary::-webkit-details-marker {
  display: none;
}
.expert[open] summary {
  border-bottom: 1px solid var(--line);
}
.expert__body {
  padding: 14px 16px;
}
.expert__body p {
  margin-bottom: 10px;
  color: var(--muted);
}
.expert__prompt {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 13px;
}

/* ═══════ Sticky bottom buttons (validation) ═══════ */

.screen__body--bottom-buttons {
  padding-bottom: 100px;
}
.sticky-actions {
  position: fixed;
  bottom: 76px;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  z-index: 4;
}
#screen-validation:not(.active) ~ .bottom-nav ~ .sticky-actions,
.screen:not(.active) .sticky-actions {
  display: none;
}

/* ═══════ Bottom nav ═══════ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 76px;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.navbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s;
}
.navbtn__icon {
  font-size: 22px;
  filter: grayscale(0.5);
  transition: filter 0.15s, transform 0.15s;
}
.navbtn--active {
  color: var(--brand);
}
.navbtn--active .navbtn__icon {
  filter: none;
  transform: scale(1.08);
}

/* ═══════ Account ═══════ */

.account-header {
  text-align: center;
  margin-bottom: 24px;
}
.account-header .avatar {
  margin: 0 auto 12px;
}
.account-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
}
.account-header .muted {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.card--plan {
  text-align: center;
  background: linear-gradient(140deg, var(--brand-soft), #fff);
  border: 1.5px solid var(--brand-glow);
}
.card--plan h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 8px 0;
}
.card--plan .price {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.card--plan .price small {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}
.plan-features {
  list-style: none;
  text-align: left;
  margin-bottom: 16px;
}
.plan-features li {
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line-2);
}
.plan-features li:last-child {
  border-bottom: 0;
}

.settings-list {
  list-style: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.settings-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
}
.settings-list li:last-child a {
  border-bottom: 0;
}
.settings-list a span {
  color: var(--muted-2);
  font-size: 18px;
}

/* ═══════ Badges ═══════ */

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge--warn {
  background: #fff7ed;
  color: #92400e;
}
.badge--success {
  background: #dcfce7;
  color: var(--success);
}
.muted {
  color: var(--muted);
}

/* ═══════ Pricing ═══════ */

.pricing-intro {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.55;
}
.pricing-intro strong {
  color: var(--ink);
}

/* Comparatif visuel téléchargement vs diffusion auto */
.pricing-key-diff {
  background: linear-gradient(135deg, var(--brand-soft), #fff);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  border: 1.5px solid var(--brand-glow);
}
.key-diff {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 8px;
}
.key-diff__icon {
  font-size: 28px;
  flex-shrink: 0;
}
.key-diff strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 2px;
}
.key-diff small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}
.key-diff--auto strong {
  color: var(--brand-dark);
}
.key-diff--auto small strong {
  color: var(--brand-dark);
  display: inline;
  font-weight: 700;
}
.key-diff__vs {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0;
  position: relative;
}
.key-diff__vs::before,
.key-diff__vs::after {
  content: '';
  display: inline-block;
  width: 30%;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 10px;
}

/* "dim" pour les features non incluses dans un plan */
.plan__features li.dim {
  color: var(--muted-2);
  font-style: italic;
}

.plans {
  display: grid;
  gap: 16px;
}

.plan {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1.5px solid var(--line);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.plan header {
  margin-bottom: 16px;
}
.plan h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.plan__price {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 6px;
}
.plan__price small {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}
.plan__sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.plan__features {
  list-style: none;
  margin-bottom: 18px;
}
.plan__features li {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line-2);
  line-height: 1.5;
}
.plan__features li:last-child {
  border-bottom: 0;
}
.plan__features strong {
  color: var(--brand-dark);
}

.plan--free {
  background: linear-gradient(180deg, var(--line-2), var(--bg-card));
}
.plan--featured {
  background: linear-gradient(165deg, #1f2128 0%, #0c0d10 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 16px 40px rgba(12, 13, 16, 0.18), 0 0 0 4px var(--brand-glow);
  transform: scale(1.02);
}
.plan--featured .plan__price {
  color: #fff;
}
.plan--featured .plan__price small,
.plan--featured .plan__sub {
  color: rgba(255, 255, 255, 0.65);
}
.plan--featured .plan__features li {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.plan--featured .plan__features strong {
  color: var(--brand);
}
.plan__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.pricing-faq {
  margin-top: 28px;
}
.pricing-faq h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 12px;
}
.pricing-faq details {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  overflow: hidden;
}
.pricing-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
  position: relative;
  padding-right: 36px;
}
.pricing-faq summary::-webkit-details-marker {
  display: none;
}
.pricing-faq summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.15s;
}
.pricing-faq details[open] summary::after {
  content: '−';
}
.pricing-faq details[open] summary {
  border-bottom: 1px solid var(--line-2);
}
.pricing-faq details > p {
  padding: 12px 16px 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.pricing-trust {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.6;
}

/* ═══════ Responsive : tablette/desktop ═══════ */

/* ═══════ Petits téléphones (≤ 360px) — polish PWA ═══════ */
@media (max-width: 360px) {
  /* Tout le screen body un poil plus serré */
  .screen__body { padding: 14px 16px 20px; }

  /* Login plus compact */
  .login-card { padding: 28px 20px; }
  .brand__name { font-size: 28px; }
  .brand__tagline { font-size: 14px; margin-bottom: 22px; }

  /* Topbar plus compacte */
  .topbar { padding: 14px 16px 12px; }
  .topbar__title { font-size: 19px; }

  /* Hero card */
  .card { padding: 16px; }
  .card__title { font-size: 19px; }

  /* Stats grid plus petit */
  .stat__value { font-size: 22px; }
  .stat__label { font-size: 10px; }

  /* Vibes : laisse 2 colonnes mais resserre */
  .vibes-grid { gap: 8px; }
  .vibe-card { padding: 12px 10px; }
  .vibe-card strong { font-size: 14px; }
  .vibe-card small { font-size: 10px; line-height: 1.3; }

  /* Color pickers : réduits */
  .color-pick input[type="color"] { width: 56px; height: 56px; }
  .colors-row { gap: 12px; }

  /* Onboarding plus compact */
  .onboard__body { padding: 24px 16px 32px; }
  .onboard__title { font-size: 30px; }
  .onboard__sub { font-size: 14px; }

  /* Pricing plans plus serrés */
  .plan { padding: 18px 16px; }
  .plan__price { font-size: 32px; }

  /* Bottom nav un poil plus petite */
  .bottom-nav { height: 70px; }
  .navbtn__icon { font-size: 20px; }
  .navbtn__label { font-size: 10px; }

  /* Sticky actions sur validation */
  .sticky-actions { padding: 10px 16px; gap: 8px; }
  .sticky-actions .btn { font-size: 14px; height: 44px; }
}

@media (min-width: 768px) {
  body {
    background: linear-gradient(180deg, var(--bg) 0%, #f3efe8 100%);
  }
  #app {
    max-width: 440px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.06);
    min-height: 100vh;
  }
  .bottom-nav,
  .sticky-actions {
    max-width: 440px;
    left: 50%;
    transform: translateX(-50%);
  }
}
