/* ═══════════════════════════════════════════════════════════
   POSTMLM — Design system
   Brand: orange-amber chaud + ink dark + Inter + Fraunces
   Mobile-first, 375px de référence
   ═══════════════════════════════════════════════════════════ */

:root {
  /* 🆕 2026-05-28 — Thème BEIGE & doré (champagne) + luisances sur les bordures */
  --brand: #b8956a;
  --brand-dark: #8f6f47;
  --brand-soft: #f3ead8;
  --brand-glow: rgba(176, 141, 87, 0.22);

  --ink: #3a2f25;
  --ink-2: #4a3f33;
  --muted: #6b6760;
  --muted-2: #b5b0a8;
  --line: #e6dcc9;
  --line-2: #f6f1e8;
  --bg: #efe5d6;
  --bg-card: #fbf8f3;
  --success: #16a34a;
  --warn: #f59e0b;
  /* couleur de la luisance (sheen) qui balaie les bordures — or clair Chogan */
  --sheen: rgba(212, 184, 148, 0.95);

  --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;
}

/* 🆕 2026-05-28 — Luisance (sheen) dorée qui balaie les bordures, façon boutique premium */
@keyframes fp-sheen { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.card, .btn--primary { position: relative; }
.card::after, .btn--primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(110deg, transparent 38%, var(--sheen) 50%, transparent 62%);
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: fp-sheen 5s linear infinite;
  pointer-events: none; z-index: 3;
}
@media (prefers-reduced-motion: reduce) { .card::after, .btn--primary::after { animation: none; } }

* {
  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(184, 149, 106, 0.22), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(184, 149, 106, 0.12), transparent 50%),
    var(--bg);
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
}

.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(184, 149, 106, 0.10), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(184, 149, 106, 0.06), transparent 40%),
    var(--bg);
  padding: 0;
}

.onboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 18px;
  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: calc(18px + env(safe-area-inset-top, 0px)) 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(184, 149, 106, 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 ═══════ */

/* ═══════ Module "Texte permanent" sur la vidéo ═══════ */

.text-input {
  width: 100%;
  height: 50px;
  padding: 0 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;
}
.text-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.field-help {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 16px;
  line-height: 1.5;
}

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.font-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}

.font-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
}
.font-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.font-option__sample {
  display: block;
  font-size: 17px;
  color: var(--ink);
  padding: 6px 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
}
.font-option strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.font-option small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.font-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.font-option:has(input:checked) strong {
  color: var(--brand-dark);
}
.font-option:has(input:checked)::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ═══════ 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%);
  }
}

/* ═══════════ Input file caché (utilisé via label) ═══════════ */
.visually-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

/* ═══════════ Password eye toggle ═══════════ */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input {
  width: 100%;
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.password-toggle:hover { background: rgba(0,0,0,0.04); color: var(--brand, #B8956A); }
.password-toggle:active { transform: translateY(-50%) scale(0.92); }

/* ═══════════ CTA clignotant (attire l'œil) ═══════════ */
.cta-blink {
  display: inline-block;
  font-weight: 800;
  color: var(--brand, #B8956A) !important;
  text-decoration: none !important;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(184, 149, 106, 0.12);
  animation: cta-pulse 1.6s ease-in-out infinite;
  position: relative;
}
.cta-blink:hover {
  background: rgba(184, 149, 106, 0.25);
  animation: none;
}
@keyframes cta-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(184, 149, 106, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(184, 149, 106, 0);
    transform: scale(1.04);
  }
}

/* ═══════════ Bannière installation PWA — MODALE CENTRÉE ═══════════ */
/* 🆕 Affichée au MILIEU de l'écran avec overlay sombre — impossible à louper */
.install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  /* Overlay sombre derrière */
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: installBannerFadeIn 0.3s ease-out;
}
@keyframes installBannerFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.install-banner[hidden] { display: none !important; }
.install-banner__icon {
  font-size: 56px;
  line-height: 1;
  background: #fff;
  border-radius: 50%;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(184, 149, 106, 0.35);
  animation: installBannerPop 0.4s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes installBannerPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.install-banner__content {
  background: #fff;
  border-radius: 18px;
  padding: 24px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  animation: installBannerPop 0.4s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.install-banner__content strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 8px;
}
.install-banner__content small {
  display: block;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
.install-banner .btn--small {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  width: 100%;
  max-width: 340px;
  animation: installBannerPop 0.4s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.install-banner__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(255,255,255,0.92);
  font-size: 24px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
}
.install-banner__close:hover { background: #fff; color: #1a1a1a; transform: scale(1.05); }

.ios-install-help {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 420px;
  width: calc(100% - 32px);
  background: #fff;
  border: 1px solid #f4a35c;
  border-radius: 16px;
  padding: 16px 18px 14px;
  box-shadow: 0 12px 32px rgba(184, 149, 106, 0.18);
  z-index: 100;
  position: relative;
}
.ios-install-help[hidden] { display: none !important; }
.ios-install-help strong { display: block; font-size: 14px; margin-bottom: 8px; }
.ios-install-help ol { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.55; color: #444; }
.ios-install-help ol strong { display: inline; font-size: 13px; }
.ios-install-help__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: #888;
  cursor: pointer;
  border-radius: 50%;
}

/* ═══════════ Bannière abonnement (expiré/inactif) ═══════════ */
.sub-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f6f1e8 0%, #efe5d6 100%);
  border: 1px solid #f4a35c;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(184, 149, 106, 0.12);
}
.sub-banner[hidden] { display: none !important; }
.sub-banner--danger {
  background: linear-gradient(135deg, #ffe5e5 0%, #ffcfcf 100%);
  border-color: #e85a5a;
  box-shadow: 0 6px 16px rgba(232, 90, 90, 0.18);
}
.sub-banner__icon { font-size: 26px; line-height: 1; }
.sub-banner__content { flex: 1; min-width: 0; }
.sub-banner__content strong { display: block; font-size: 14px; color: #1a1a1a; margin-bottom: 2px; }
.sub-banner__content p { margin: 0; font-size: 12px; color: #555; line-height: 1.35; }
.sub-banner__cta { padding: 8px 14px; font-size: 13px; flex-shrink: 0; }

/* ═══════════ Module "Mes réseaux" (Pro/Business) ═══════════ */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.social-card {
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.social-card--connected {
  border-color: #16a34a;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}
.social-card__icon { font-size: 28px; line-height: 1; }
.social-card__name { font-weight: 700; font-size: 13px; color: #1a1a1a; }
.social-card__status { font-size: 11px; color: #666; min-height: 14px; }
.social-card .btn--small {
  padding: 6px 12px;
  font-size: 12px;
  margin-top: 4px;
  width: 100%;
}

/* Verrou visuel sur les fonctionnalités payantes */
.locked-paid {
  position: relative;
  pointer-events: none;
  opacity: 0.55;
  filter: grayscale(0.4);
}
.locked-paid::after {
  content: "🔒 Abonnement requis";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   🆕 2026-05-14 — PATCH iPhone (David)
   Corrections ciblées pour que tout marche bien sur iOS Safari + PWA installée.
   Append en fin de fichier pour ne rien casser de l'existant.
   ═══════════════════════════════════════════════════════════════ */

/* Fix 1 — Hauteur correcte sur iOS Safari (barre d'URL dynamique)
   100vh = inclut la barre d'URL, donc le contenu est coupé en bas.
   100dvh = "dynamic viewport height" qui s'adapte. Fallback 100vh pour navigateurs old. */
.screen {
  min-height: 100dvh;
}
html, body {
  min-height: 100dvh;
}

/* Fix 2 — Empêcher le zoom auto iOS sur focus d'un input
   iOS Safari zoome dès qu'un input a font-size < 16px. On force 16px minimum
   sur tous les inputs/textareas/selects en mobile. Sur desktop, on garde 15px. */
@media (hover: none) and (pointer: coarse) {
  input, textarea, select,
  .field input, .field textarea, .field select,
  .textarea {
    font-size: 16px !important;
  }
}

/* Fix 3 — Tap polish (interactions natives propres) */
* { -webkit-tap-highlight-color: rgba(184, 149, 106, 0.15); }
button, .btn, a, [role="button"], label, .vibe-card, .check, .gallery-thumb {
  touch-action: manipulation; /* désactive double-tap zoom sur boutons */
  -webkit-tap-highlight-color: transparent; /* pas de flash gris iOS */
}

/* Fix 4 — Pas de bounce sur le body iOS (révèle parfois du blanc sous le bg) */
html, body {
  overscroll-behavior-y: none;
}

/* Fix 5 — Safe-area pour la PWA installée iOS (encoche + home indicator) */
body {
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Fix 6 — Désactiver la sélection accidentelle sur les éléments d'interface
   (on garde la sélection sur les contenus éditables : textarea, [contenteditable], .caption…) */
.btn, .iconbtn, .navbtn, .topbar, .dash-head, .vibe-card, .gallery-thumb,
.floating-back-btn, .install-banner, .install-top-banner {
  -webkit-user-select: none;
  user-select: none;
}

/* Fix 7 — Iframes preview : empêcher tap qui pourrait scroller à l'intérieur de l'iframe */
.dash-preview iframe, .image-frame iframe, .gallery-thumb iframe {
  -webkit-overflow-scrolling: auto;
  pointer-events: none; /* l'utilisateur clique sur le wrapper, pas l'iframe */
}

/* Fix 8 — Smooth scroll iOS pour les zones scrollables (galerie miniatures, etc.) */
.gallery-scroll, .photos-grid, .chips {
  -webkit-overflow-scrolling: touch;
}

/* Fix 9 — Inputs autocomplete iOS : empêcher le bandeau "AutoFill" jaune sur les champs sensibles */
/* ⚠️ Bug fix 2026-05-14 : -webkit-text-security: disc masque les caractères derrière des points.
   C'est OK pour un password, mais SURTOUT PAS pour un email (sinon on tape à l'aveugle) ! */
input[type="password"] {
  -webkit-text-security: disc;
}
input[type="email"] {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink); /* iOS Safari autofill peut forcer du blanc → on contraint */
}

/* Fix 10 — Bouton retour orange : s'adapter à l'encoche iPhone */
.floating-back-btn {
  top: max(14px, env(safe-area-inset-top, 14px));
}
