/* MonPain.ci — interface claire, responsive et adaptée au HTML fourni
   Utilisation : remplacer le contenu de la balise <style> par ce fichier
   ou ajouter <link rel="stylesheet" href="monpain.css"> après les icônes Bootstrap.
*/

:root {
  color-scheme: light;
  --mp-bg: #faf8ff;
  --mp-surface: #fff;
  --mp-surface-soft: #f8f5ff;
  --mp-text: #211a2b;
  --mp-muted: #777080;
  --mp-subtle: #a19aaa;
  --mp-line: rgba(74, 48, 98, .085);
  --mp-accent: #901bff;
  --mp-accent-strong: #7510d6;
  --mp-accent-soft: #f3e7ff;
  --mp-green: #12a879;
  --mp-green-soft: #e2fff3;
  --mp-gold: #9b6d1d;
  --mp-gold-soft: #fff6df;
  --mp-red: #c84e5b;
  --mp-red-soft: #fff0ef;
  --mp-blue: #4a76aa;
  --mp-blue-soft: #edf4fc;
  --mp-shadow-1: 0 5px 18px rgba(55, 34, 79, .055);
  --mp-shadow-2: 0 16px 42px rgba(55, 34, 79, .12);
  --mp-shadow-3: 0 28px 80px rgba(39, 19, 63, .2);
  --mp-radius-sm: 13px;
  --mp-radius: 19px;
  --mp-radius-lg: 25px;
  --mp-radius-xl: 32px;
  --mp-ease: cubic-bezier(.2, .75, .25, 1);
  --mp-fast: 160ms;
  --mp-medium: 300ms;
  --mp-nav-height: 68px;
  --mp-safe-top: env(safe-area-inset-top, 0px);
  --mp-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--mp-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -28%, rgba(215, 183, 255, .22), transparent 55%),
    var(--mp-bg);
  color: var(--mp-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

body,
button,
input,
textarea {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button,
input,
textarea {
  font-size: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
textarea {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(144, 27, 255, .22);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .56;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(144, 27, 255, .16);
  color: var(--mp-text);
}

#app {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

/* Navigation entre les vues pilotée par data-pos dans le JavaScript. */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(3.5%, 0, 0) scale(.99);
  transition: transform 420ms var(--mp-ease), opacity 300ms ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.view[data-pos="center"] {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.view[data-pos="left"] {
  opacity: 0;
  transform: translate3d(-3.5%, 0, 0) scale(.99);
}

.view[data-pos="right"] {
  opacity: 0;
  transform: translate3d(3.5%, 0, 0) scale(.99);
}

.view[data-pos="fade"] {
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(.985);
}

.view.no-anim,
.steps-track.no-anim,
.deck-card.no-anim {
  transition: none !important;
}

/* Zone de chargement */
#v-load {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.load {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 30px;
  color: var(--mp-muted);
}

.load p {
  margin: 0;
  font-size: 14px;
}

.load-logo,
.app-icon,
.rules-ico {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 26px;
  background: linear-gradient(145deg, #fff, #f4eaff);
  box-shadow: var(--mp-shadow-2), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.logo {
  display: block;
  width: 43px;
  height: 43px;
  overflow: visible;
}

.load-logo .logo {
  width: 46px;
  height: 46px;
  animation: mp-breathe 1.8s ease-in-out infinite;
}

/* Défilement : chaque écran possède son propre viewport afin d'éviter
   les scrolls de body et les sauts lors de l'ouverture du clavier. */
.scroll {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(119, 112, 128, .22) transparent;
  scroll-padding-block: 24px calc(28px + var(--mp-safe-bottom));
  padding: 20px 22px calc(28px + var(--mp-safe-bottom));
}

.scroll::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar,
.step::-webkit-scrollbar {
  width: 6px;
}

.scroll::-webkit-scrollbar-thumb,
.sheet-body::-webkit-scrollbar-thumb,
.step::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(119, 112, 128, .18);
}

.page {
  width: min(100%, 520px);
  min-height: 100%;
  margin-inline: auto;
  padding: 14px 0 30px;
}

.title,
.page h1,
.w-panel h1 {
  margin: 0;
  color: var(--mp-text);
  font-size: clamp(25px, 6vw, 32px);
  font-weight: 720;
  letter-spacing: -.045em;
  line-height: 1.16;
  text-wrap: balance;
}

.subtitle {
  margin: 10px 0 27px;
  color: var(--mp-muted);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}

.grad-text {
  color: var(--mp-accent);
  background: linear-gradient(100deg, #a34aff, #7415db 72%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* En-têtes des écrans de connexion et d'inscription */
.navbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--mp-nav-height) + var(--mp-safe-top));
  padding: calc(var(--mp-safe-top) + 8px) 22px 8px;
}

.nav-back,
.sheet-close {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(89, 64, 111, .07);
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 4px 14px rgba(54, 32, 76, .045);
  color: var(--mp-text);
  cursor: pointer;
  transition: transform var(--mp-fast) var(--mp-ease), background var(--mp-fast), box-shadow var(--mp-fast);
}

.nav-back .bi,
.sheet-close .bi {
  font-size: 17px;
}

.nav-back:hover,
.sheet-close:hover {
  background: #fff;
  box-shadow: var(--mp-shadow-1);
}

.nav-back:active,
.sheet-close:active {
  transform: scale(.94);
}

.nav-spacer {
  width: 44px;
  height: 44px;
}

#v-signup .navbar {
  display: grid;
  grid-template-columns: 44px minmax(80px, 1fr) 44px;
  gap: 14px;
}

.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: min(100%, 176px);
  margin-inline: auto;
}

.progress i {
  display: block;
  flex: 1 1 0;
  height: 5px;
  border-radius: 999px;
  background: rgba(130, 113, 148, .15);
  transition: background 250ms ease, transform 250ms var(--mp-ease);
}

.progress i.on {
  background: linear-gradient(90deg, #a245ff, var(--mp-accent));
  transform: scaleY(1.18);
}

.step-count {
  justify-self: end;
  color: var(--mp-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Accueil : identité, démonstration de profils et call-to-action */
.w-scroll {
  padding-top: calc(16px + var(--mp-safe-top));
}

.w-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 5px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mp-text);
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -.045em;
}

.brand .logo {
  width: 30px;
  height: 30px;
}

.brand i {
  color: var(--mp-accent);
  font-style: normal;
}

.w-hero {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 12px 0 26px;
}

.deck-wrap {
  position: relative;
  width: min(68vw, 260px);
  aspect-ratio: .83;
  margin: 0 auto;
  isolation: isolate;
}

.deck {
  position: absolute;
  inset: 0;
  perspective: 1000px;
}

.deck-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  background: var(--g, linear-gradient(145deg, #f6c6e7, #8153da));
  box-shadow: 0 23px 60px rgba(75, 35, 117, .22), 0 5px 14px rgba(63, 33, 91, .12);
  transform-origin: 50% 90%;
  transition: transform 500ms var(--mp-ease), opacity 420ms ease, filter 420ms ease;
  will-change: transform, opacity;
}

.deck-card[data-slot="0"] {
  z-index: 3;
  transform: translate3d(0, 0, 0) rotate(0);
}

.deck-card[data-slot="1"] {
  z-index: 2;
  transform: translate3d(8px, 8px, -20px) rotate(5deg) scale(.96);
  filter: saturate(.88);
}

.deck-card[data-slot="2"] {
  z-index: 1;
  transform: translate3d(-8px, 15px, -40px) rotate(-5deg) scale(.91);
  filter: saturate(.76);
}

.deck-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.deck-card::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: var(--g, linear-gradient(145deg, #f6c6e7, #8153da));
  content: "";
}

.deck-card img,
.deck-card .dc-shade,
.deck-card .dc-info,
.deck-card .stamp {
  position: absolute;
  z-index: 1;
}

.dc-shade {
  inset: 25% 0 0;
  background: linear-gradient(180deg, transparent 10%, rgba(19, 10, 30, .08) 38%, rgba(16, 9, 26, .78) 100%);
}

.dc-info {
  right: 19px;
  bottom: 18px;
  left: 19px;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .22);
}

.dc-info > b {
  display: block;
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -.035em;
}

.dc-ville {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
}

.dc-ville .bi {
  font-size: 12px;
}

.stamp {
  top: 24px;
  padding: 7px 11px;
  border: 2px solid currentColor;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: 0;
  transform: rotate(-12deg) scale(.8);
}

.stamp.like {
  left: 18px;
  color: #41edb0;
}

.stamp.nope {
  right: 18px;
  color: #ff6a77;
  transform: rotate(12deg) scale(.8);
}

.deck-card.out-right {
  opacity: 0;
  transform: translate3d(115%, 8%, 0) rotate(19deg) scale(.94);
}

.deck-card.out-left {
  opacity: 0;
  transform: translate3d(-115%, 8%, 0) rotate(-19deg) scale(.94);
}

.deck-card.out-right .stamp.like,
.deck-card.out-left .stamp.nope {
  opacity: 1;
  transform: rotate(-12deg) scale(1);
}

.deck-card.out-left .stamp.nope {
  transform: rotate(12deg) scale(1);
}

.float-chip {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 210px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 17px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 30px rgba(48, 26, 73, .13);
  color: var(--mp-text);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  animation: mp-float 4s ease-in-out infinite;
}

.fc-1 {
  top: 22%;
  right: -54px;
}

.fc-2 {
  bottom: 23%;
  left: -58px;
  animation-delay: -1.8s;
}

.dot-on,
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #21c88a;
  box-shadow: 0 0 0 4px rgba(33, 200, 138, .12);
}

.w-panel {
  width: min(100%, 490px);
  margin: 0 auto;
  padding: 6px 0 4px;
  text-align: center;
}

.w-panel h1 {
  font-size: clamp(28px, 7vw, 38px);
}

.w-panel .lead,
.sheet-body .lead {
  margin: 12px auto 22px;
  color: var(--mp-muted);
  font-size: 15px;
  line-height: 1.65;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 23px 0 17px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.features li {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 13px 11px;
  border: 1px solid rgba(94, 66, 121, .055);
  border-radius: 17px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 5px 16px rgba(57, 34, 79, .035);
}

.features li > .bi {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  border-radius: 11px;
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
  font-size: 14px;
}

.features li:nth-child(2) > .bi {
  background: #fff0f3;
  color: #e34d78;
}

.features li:nth-child(3) > .bi {
  background: var(--mp-green-soft);
  color: var(--mp-green);
}

.features b {
  font-size: 12px;
  font-weight: 700;
}

.features li > span {
  color: var(--mp-muted);
  font-size: 10px;
  line-height: 1.35;
}

.members {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 21px;
  color: var(--mp-muted);
  font-size: 12px;
}

.avatars {
  display: flex;
  padding-left: 4px;
}

.avatars span {
  width: 25px;
  height: 25px;
  margin-left: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #f6b4c9, #a077d8);
}

.avatars span:nth-child(2) { background: linear-gradient(145deg, #ffd18b, #e87868); }
.avatars span:nth-child(3) { background: linear-gradient(145deg, #a6e5cf, #4d9ca6); }
.avatars span:nth-child(4) { background: linear-gradient(145deg, #f3c7e7, #9267bd); }

/* Boutons : formes pleines et douces, sans contour marqué. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 13px 20px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 17px;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: transform var(--mp-fast) var(--mp-ease), box-shadow var(--mp-fast) ease, background var(--mp-fast) ease, filter var(--mp-fast) ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn .bi {
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #a13cff, #8515ed 72%, #7611d7);
  box-shadow: 0 10px 22px rgba(126, 24, 221, .2), inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 13px 28px rgba(126, 24, 221, .27), inset 0 1px 0 rgba(255, 255, 255, .25);
  filter: saturate(1.05);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  box-shadow: 0 5px 12px rgba(126, 24, 221, .2);
  transform: translateY(1px) scale(.99);
}

.btn-secondary {
  border: 1px solid rgba(95, 66, 121, .07);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 5px 15px rgba(50, 31, 73, .045);
  color: var(--mp-text);
}

.btn-secondary:hover:not(:disabled) {
  background: #fff;
  box-shadow: var(--mp-shadow-1);
  transform: translateY(-1px);
}

.btn-secondary:active:not(:disabled) {
  transform: scale(.99);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--mp-accent-strong);
  font-size: 14px;
  font-weight: 620;
  text-align: center;
  cursor: pointer;
  transition: color var(--mp-fast), background var(--mp-fast), transform var(--mp-fast) var(--mp-ease);
}

.btn-text:hover {
  background: rgba(144, 27, 255, .065);
}

.btn-text:active {
  transform: scale(.97);
}

.btn-text.danger {
  color: var(--mp-red);
}

.btn.is-loading {
  cursor: progress;
  pointer-events: none;
}

.btn.is-loading > * {
  visibility: hidden;
}

.btn.is-loading::after {
  position: absolute;
  width: 21px;
  height: 21px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: currentColor;
  border-radius: 50%;
  color: #fff;
  content: "";
  animation: mp-spin .75s linear infinite;
}

.btn-secondary.is-loading::after {
  border-color: rgba(117, 16, 214, .2);
  border-top-color: var(--mp-accent);
  color: var(--mp-accent);
}

.w-actions,
.actions,
#form-login,
#form-otp,
.sheet-cta {
  display: grid;
  gap: 12px;
}

.w-actions {
  margin-top: 8px;
}

#install-soft {
  margin-top: 7px;
}

/* Champs, labels et boutons de sélection */
.group {
  display: grid;
  gap: 11px;
  width: 100%;
  margin: 20px 0;
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 68px;
  padding: 12px 15px;
  border: 1px solid rgba(91, 66, 115, .075);
  border-radius: 17px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 5px 17px rgba(49, 31, 71, .035);
  color: var(--mp-text);
  text-align: left;
  transition: box-shadow var(--mp-fast) ease, background var(--mp-fast) ease, transform var(--mp-fast) var(--mp-ease), border var(--mp-fast) ease;
}

label.cell {
  cursor: text;
}

button.cell {
  cursor: pointer;
}

.cell:focus-within,
.cell:has(input:focus-visible) {
  border: 1px solid rgba(144, 27, 255, .22);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(144, 27, 255, .075), 0 8px 22px rgba(49, 31, 71, .06);
}

.cell-label {
  position: absolute;
  top: 9px;
  left: 15px;
  color: var(--mp-subtle);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .025em;
  line-height: 1.2;
  pointer-events: none;
}

.cell input,
.cell textarea,
.cell select {
  width: 100%;
  min-width: 0;
  min-height: 25px;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--mp-text);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.4;
  appearance: none;
}

.cell input::placeholder,
.cell textarea::placeholder,
#s-desc::placeholder,
#otp-code::placeholder {
  color: #b0a9b8;
  font-weight: 400;
  opacity: 1;
}

.cell input:focus,
.cell textarea:focus,
.cell select:focus {
  outline: 0;
}

.cell .eye {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 12px -5px 0 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--mp-muted);
  cursor: pointer;
  transition: color var(--mp-fast), background var(--mp-fast), transform var(--mp-fast);
}

.cell .eye:hover {
  background: var(--mp-surface-soft);
  color: var(--mp-accent);
}

.cell .eye:active {
  transform: scale(.92);
}

.cell-value {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 13px;
  color: var(--mp-text);
  font-size: 15px;
  font-weight: 550;
}

.cell-value > .bi {
  margin-left: auto;
  color: var(--mp-subtle);
  font-size: 14px;
}

.flag {
  line-height: 1;
}

.dial,
.dial-plus {
  flex: 0 0 auto;
  margin-top: 13px;
  color: var(--mp-text);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.indic-input {
  padding-left: 0 !important;
}

.group-title {
  margin: 25px 0 10px;
  color: var(--mp-muted);
  font-size: 13px;
  font-weight: 650;
}

/* Choix segmenté, description et suggestions */
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 52px;
  padding: 4px;
  border: 1px solid rgba(91, 66, 115, .065);
  border-radius: 16px;
  background: rgba(236, 230, 243, .7);
  isolation: isolate;
}

.seg-thumb {
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(46, 29, 68, .09);
  transition: transform 250ms var(--mp-ease);
}

.segmented[data-val="Femme"] .seg-thumb {
  transform: translateX(calc(100% + 4px));
}

.segmented button {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--mp-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--mp-fast), transform var(--mp-fast);
}

.segmented button[aria-checked="true"] {
  color: var(--mp-accent-strong);
}

.segmented button:active {
  transform: scale(.97);
}

.textarea-card {
  padding: 15px 16px 11px;
  border: 1px solid rgba(91, 66, 115, .075);
  border-radius: 18px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 5px 17px rgba(49, 31, 71, .035);
  transition: box-shadow var(--mp-fast), border var(--mp-fast);
}

.textarea-card:focus-within {
  border: 1px solid rgba(144, 27, 255, .22);
  box-shadow: 0 0 0 4px rgba(144, 27, 255, .07), 0 8px 22px rgba(49, 31, 71, .06);
}

.textarea-card textarea {
  display: block;
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--mp-text);
  font-size: 15px;
  line-height: 1.6;
}

.textarea-card textarea:focus {
  outline: 0;
}

.count {
  padding-top: 8px;
  color: var(--mp-subtle);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(102, 75, 126, .07);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--mp-muted);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: transform var(--mp-fast) var(--mp-ease), background var(--mp-fast), color var(--mp-fast), box-shadow var(--mp-fast);
}

.chip:hover {
  background: var(--mp-accent-soft);
  color: var(--mp-accent-strong);
}

.chip:active {
  transform: scale(.96);
}

.force {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 10px 2px 0;
  color: var(--mp-muted);
  font-size: 12px;
}

.force .bars {
  display: flex;
  flex: 0 0 78px;
  gap: 4px;
}

.force .bars i {
  display: block;
  height: 5px;
  flex: 1 1 0;
  border-radius: 99px;
  background: rgba(119, 112, 128, .16);
  transition: background 180ms ease;
}

.force[data-score="1"] .bars i:nth-child(-n+1) { background: #e87568; }
.force[data-score="2"] .bars i:nth-child(-n+2) { background: #efa34d; }
.force[data-score="3"] .bars i:nth-child(-n+3) { background: #83bb55; }
.force[data-score="4"] .bars i { background: #17b982; }

/* Formulaire d'inscription : piste horizontale et pied toujours accessible. */
.signup-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.steps-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.steps-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  transition: transform 420ms var(--mp-ease);
  will-change: transform;
}

.step {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 20px 24px 26px;
  scroll-padding-block: 22px 24px;
}

.step > .title,
.step > .subtitle,
.step > .group,
.step > .group-title,
.step > .segmented,
.step > .textarea-card,
.step > .chips,
.step > .force,
.step > .legal {
  width: min(100%, 520px);
  margin-right: auto;
  margin-left: auto;
}

.step > .subtitle {
  margin-top: 9px;
  margin-bottom: 22px;
}

#form-signup .step .group {
  margin-top: 18px;
  margin-bottom: 18px;
}

#form-signup #g-identite {
  grid-template-columns: minmax(0, 1fr) minmax(100px, .55fr);
}

.foot-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: min(100%, 568px);
  margin: 0 auto;
  padding: 12px 24px calc(12px + var(--mp-safe-bottom));
  background: linear-gradient(180deg, rgba(250, 248, 255, .86), var(--mp-bg) 20%);
}

.switch {
  margin: 14px 0 3px;
  color: var(--mp-muted);
  font-size: 13px;
  text-align: center;
}

.switch button {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--mp-accent-strong);
  font: inherit;
  font-weight: 680;
  cursor: pointer;
}

.switch button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Connexion, code SMS et mentions légales */
#form-login .group {
  margin-top: 25px;
}

#form-login > .btn {
  margin-top: 4px;
}

#v-login .switch {
  margin-top: 25px;
}

.otp-ico {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 5px 0 20px;
  border-radius: 19px;
  background: linear-gradient(145deg, #f3e7ff, #fff);
  box-shadow: var(--mp-shadow-1);
  color: var(--mp-accent);
  font-size: 23px;
}

.otp-input {
  display: block;
  width: 100%;
  min-height: 68px;
  margin: 22px 0 15px;
  padding: 12px 16px;
  border: 1px solid rgba(91, 66, 115, .075);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--mp-shadow-1);
  color: var(--mp-accent-strong);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .34em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: box-shadow var(--mp-fast), border var(--mp-fast);
}

.otp-input:focus {
  border: 1px solid rgba(144, 27, 255, .22);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(144, 27, 255, .075), var(--mp-shadow-1);
}

#v-otp #btn-otp-resend {
  margin-top: 12px;
}

#v-otp #btn-otp-logout {
  display: flex;
  margin: 8px auto 0;
}

.debug-banner {
  margin: 15px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--mp-gold-soft);
  color: var(--mp-gold);
  font-size: 13px;
}

.legal {
  margin: 18px auto 2px;
  color: var(--mp-subtle);
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

.legal.left {
  margin-top: 20px;
  text-align: left;
}

.legal a {
  color: var(--mp-muted);
  text-decoration: underline;
  text-decoration-color: rgba(119, 112, 128, .32);
  text-underline-offset: 2px;
}

.legal a:hover {
  color: var(--mp-accent-strong);
}

/* Écran de session et cartes récapitulatives */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 24px;
  text-align: center;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(18, 168, 121, .09);
  border-radius: 999px;
  background: var(--mp-green-soft);
  color: #137c5d;
  font-size: 12px;
  font-weight: 650;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 21px 0 13px;
  border: 4px solid #fff;
  border-radius: 32px;
  background: linear-gradient(145deg, #d8b9ff, #8d37e5);
  box-shadow: 0 12px 30px rgba(104, 39, 164, .2);
  color: #fff;
  font-size: 34px;
  font-weight: 750;
}

.avatar .verif {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1cbd83;
  color: white;
  font-size: 13px;
}

.profile-hero h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 720;
  letter-spacing: -.04em;
}

.lieu {
  margin: 5px 0 0;
  color: var(--mp-muted);
  font-size: 14px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 26px;
}

.tile {
  display: grid;
  justify-items: start;
  min-height: 135px;
  padding: 17px;
  border: 1px solid rgba(90, 63, 117, .055);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--mp-shadow-1);
}

.tile .ico {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin-bottom: 7px;
  border-radius: 12px;
  background: #fff0f3;
  color: #e3547c;
}

.tile#t-vip .ico {
  background: var(--mp-gold-soft);
  color: var(--mp-gold);
}

.tile .big {
  color: var(--mp-text);
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -.03em;
}

.tile small {
  color: var(--mp-muted);
  font-size: 11px;
}

.tile.vip {
  background: linear-gradient(145deg, #fffdf7, #fff5df);
}

.infos {
  gap: 0;
  margin-top: 11px;
  overflow: hidden;
  border: 1px solid rgba(90, 63, 117, .055);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--mp-shadow-1);
}

.infos .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 51px;
  padding: 11px 15px;
}

.infos .row + .row {
  border-top: 1px solid rgba(90, 63, 117, .065);
}

.infos .row > span {
  color: var(--mp-muted);
  font-size: 13px;
}

.infos .row > b {
  max-width: 60%;
  overflow-wrap: anywhere;
  color: var(--mp-text);
  font-size: 13px;
  font-weight: 620;
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}

.pill.yes {
  background: var(--mp-green-soft);
  color: #137c5d;
}

.pill.no {
  background: var(--mp-red-soft);
  color: #a7444b;
}

#v-session .actions {
  margin-top: 24px;
}

#btn-logout {
  display: flex;
  margin: 11px auto 0;
}

#debug-wrap {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--mp-muted);
  font-size: 13px;
}

#debug-wrap pre {
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Feuilles modales : drawer mobile, dialogue flottant sur écran large. */
.sheet-root {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 320ms step-end;
}

.sheet-root.open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0ms step-start;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 19, 37, .3);
  opacity: 0;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: opacity 320ms ease, backdrop-filter 320ms ease, -webkit-backdrop-filter 320ms ease;
}

.sheet-root.open .sheet-backdrop {
  opacity: 1;
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  backdrop-filter: blur(8px) saturate(115%);
}

.sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 610px);
  max-height: min(88vh, 780px);
  max-height: min(88dvh, 780px);
  padding-bottom: var(--mp-safe-bottom);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 28px 28px 0 0;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--mp-shadow-3);
  transform: translate3d(0, 35px, 0) scale(.99);
  transition: transform 360ms var(--mp-ease);
  will-change: transform;
}

.sheet-root.open .sheet {
  transform: translate3d(0, 0, 0) scale(1);
}

.sheet.dragging {
  transition: none !important;
  touch-action: none;
}

.sheet-head {
  flex: 0 0 auto;
  padding: 10px 20px 6px;
  touch-action: pan-y;
  user-select: none;
}

.grabber {
  width: 38px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: rgba(70, 54, 85, .18);
}

.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sheet-title h3 {
  margin: 0;
  color: var(--mp-text);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.03em;
  line-height: 1.3;
}

.sheet-close {
  width: 38px;
  height: 38px;
  border: 0;
  background: rgba(238, 233, 243, .76);
  box-shadow: none;
}

.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 15px 22px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.sheet-body .group {
  margin: 4px 0 0;
}

.sheet-cta {
  flex: 0 0 auto;
  padding: 12px 22px calc(14px + var(--mp-safe-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), #fff 28%);
}

.sheet-cta .btn-text {
  width: 100%;
}

.sheet .lead {
  margin-top: 0;
}

.pays-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--mp-text);
  text-align: left;
  cursor: pointer;
  transition: background var(--mp-fast), transform var(--mp-fast), color var(--mp-fast);
}

.pays-item:hover {
  background: var(--mp-surface-soft);
}

.pays-item:active {
  transform: scale(.99);
}

.pays-item[aria-selected="true"] {
  background: var(--mp-accent-soft);
  color: var(--mp-accent-strong);
}

.pays-item .pn {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
}

.pays-item .pd {
  color: var(--mp-muted);
  font-size: 12px;
}

.pays-item > .bi {
  color: var(--mp-accent);
  opacity: 0;
}

.pays-item[aria-selected="true"] > .bi {
  opacity: 1;
}

.confirm-num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 7px;
  padding: 18px;
  border-radius: 17px;
  background: var(--mp-surface-soft);
  color: var(--mp-text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.confirm-num b {
  font-weight: 720;
}

.rules-ico {
  width: 61px;
  height: 61px;
  margin: 3px 0 16px;
  border-radius: 21px;
}

.rules-ico .logo {
  width: 35px;
  height: 35px;
}

.rule {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(90, 63, 117, .05);
  border-radius: 16px;
  background: rgba(248, 245, 255, .78);
}

.rule > .bi {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(50, 31, 73, .055);
  color: var(--mp-accent);
  font-size: 16px;
}

.rule > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rule b {
  color: var(--mp-text);
  font-size: 13px;
  font-weight: 680;
}

.rule span {
  color: var(--mp-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Notifications créées dynamiquement par toast(). */
#toasts {
  position: fixed;
  z-index: 40;
  top: calc(14px + var(--mp-safe-top));
  right: max(16px, env(safe-area-inset-right, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  display: grid;
  justify-items: center;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(100%, 430px);
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 17px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 32px rgba(38, 23, 56, .13);
  color: var(--mp-text);
  font-size: 13px;
  font-weight: 550;
  opacity: 0;
  pointer-events: auto;
  transform: translate3d(0, -10px, 0) scale(.98);
  transition: opacity 250ms ease, transform 320ms var(--mp-ease);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  cursor: pointer;
}

.toast.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.toast > .bi {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--mp-blue-soft);
  color: var(--mp-blue);
  font-size: 15px;
}

.toast--success > .bi {
  background: var(--mp-green-soft);
  color: var(--mp-green);
}

.toast--error > .bi {
  background: var(--mp-red-soft);
  color: var(--mp-red);
}

/* Panneau d'installation PWA */
.install {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding-top: 24px;
  padding-bottom: 32px;
}

.install-panel {
  width: 100%;
  padding: clamp(24px, 7vw, 38px) clamp(20px, 6vw, 32px);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 26px;
  background: rgba(255, 255, 255, .83);
  box-shadow: var(--mp-shadow-2);
  text-align: center;
  animation: mp-rise 420ms var(--mp-ease) both;
}

.install-panel .app-icon,
.install-panel .state-ico,
.install-panel .spinner {
  margin: 0 auto 23px;
}

.install-panel .title {
  font-size: clamp(26px, 7vw, 32px);
}

.install-panel .subtitle {
  margin-bottom: 24px;
}

.perks {
  display: grid;
  gap: 12px;
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.perks li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--mp-muted);
  font-size: 13px;
}

.perks li .bi {
  display: grid;
  flex: 0 0 33px;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 11px;
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
}

.install-panel > .btn {
  margin-top: 4px;
}

.install-panel > .btn-text {
  margin-top: 8px;
}

.state-ico {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 23px;
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
  font-size: 27px;
}

.state-ico.ok {
  background: var(--mp-green-soft);
  color: var(--mp-green);
}

.timer {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
  color: var(--mp-muted);
  font-size: 14px;
}

.timer b {
  color: var(--mp-accent);
  font-size: 35px;
  font-variant-numeric: tabular-nums;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(144, 27, 255, .12);
  border-top-color: var(--mp-accent);
  border-radius: 50%;
  animation: mp-spin .8s linear infinite;
}

/* Mouvement subtil lors des erreurs de validation. */
.shake {
  animation: mp-shake 420ms ease-in-out;
}

@keyframes mp-spin {
  to { transform: rotate(360deg); }
}

@keyframes mp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes mp-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@keyframes mp-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mp-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  44% { transform: translateX(5px); }
  66% { transform: translateX(-3px); }
  84% { transform: translateX(2px); }
}

/* Tablette et desktop : composition plus aérée, modales centrées. */
@media (min-width: 700px) {
  .navbar {
    width: min(100%, 720px);
    margin-inline: auto;
    padding-right: 28px;
    padding-left: 28px;
  }

  .page {
    padding-top: 24px;
  }

  .scroll {
    padding-right: 32px;
    padding-left: 32px;
  }

  .w-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    grid-template-rows: auto 1fr;
    align-items: center;
    gap: 14px 50px;
    width: min(100%, 1120px);
    margin-inline: auto;
    padding: calc(20px + var(--mp-safe-top)) 42px 34px;
    overflow-y: auto;
  }

  .w-top {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-bottom: 10px;
  }

  .w-hero {
    grid-column: 1;
    grid-row: 2;
    min-height: 470px;
    padding: 0;
  }

  .deck-wrap {
    width: min(31vw, 340px);
  }

  .w-panel {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    margin: 0;
    padding: 20px 0;
    text-align: left;
  }

  .w-panel h1 {
    max-width: 470px;
    font-size: clamp(34px, 4vw, 46px);
  }

  .w-panel .lead {
    margin-left: 0;
  }

  .features {
    gap: 11px;
  }

  .features li {
    padding: 15px 13px;
  }

  .features b {
    font-size: 13px;
  }

  .features li > span {
    font-size: 11px;
  }

  .members {
    justify-content: flex-start;
  }

  .legal {
    text-align: left;
  }

  .w-actions {
    grid-template-columns: 1fr 1fr;
  }

  .foot-actions {
    padding-right: 32px;
    padding-left: 32px;
  }

  .step {
    padding-right: 32px;
    padding-left: 32px;
  }

  .sheet-root {
    align-items: center;
    padding: 24px;
  }

  .sheet {
    width: min(100%, 560px);
    max-height: min(82vh, 760px);
    max-height: min(82dvh, 760px);
    padding-bottom: 0;
    border-radius: 28px;
    transform: translate3d(0, 12px, 0) scale(.985);
  }

  .sheet-root.open .sheet {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .sheet-head {
    padding: 18px 24px 8px;
  }

  .sheet-body {
    padding-right: 26px;
    padding-left: 26px;
  }

  .sheet-cta {
    padding: 12px 26px 24px;
  }

  .sheet-cta:has(.btn-text) {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .sheet-cta:has(.btn-text) .btn-text {
    grid-column: auto;
  }

  #sheet-regles .sheet {
    width: min(100%, 620px);
  }

  .install {
    justify-content: center;
  }

  .install-panel {
    max-width: 520px;
    margin-inline: auto;
    padding: 42px;
  }
}

@media (min-width: 1100px) {
  .w-scroll {
    grid-template-columns: minmax(0, 1.05fr) minmax(470px, .95fr);
    gap: 16px 84px;
    padding-right: 64px;
    padding-left: 64px;
  }

  .w-hero {
    min-height: 560px;
  }

  .deck-wrap {
    width: min(29vw, 370px);
  }

  .w-panel .lead {
    max-width: 440px;
  }
}

/* Petits écrans, paysage et accessibilité */
@media (max-width: 380px) {
  .scroll {
    padding-right: 17px;
    padding-left: 17px;
  }

  .navbar {
    padding-right: 17px;
    padding-left: 17px;
  }

  .step {
    padding-right: 18px;
    padding-left: 18px;
  }

  .foot-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .features {
    gap: 6px;
  }

  .features li {
    padding: 11px 8px;
  }

  .features li > span {
    font-size: 9px;
  }

  .fc-1 { right: -36px; }
  .fc-2 { left: -37px; }
}

@media (max-height: 700px) and (max-width: 699px) {
  .w-hero {
    min-height: 220px;
    padding-top: 0;
    padding-bottom: 14px;
  }

  .deck-wrap {
    width: min(54vw, 205px);
  }

  .w-top {
    padding-bottom: 8px;
  }

  .features {
    margin-top: 15px;
    margin-bottom: 12px;
  }

  .members {
    margin: 11px 0 14px;
  }

  .title,
  .page h1 {
    font-size: 25px;
  }

  .subtitle {
    margin-bottom: 20px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .w-scroll {
    padding-top: calc(8px + var(--mp-safe-top));
  }

  .w-top {
    padding-bottom: 5px;
  }

  .w-hero {
    min-height: 205px;
  }

  .deck-wrap {
    width: min(32vh, 195px);
  }

  .sheet {
    max-height: 94vh;
    max-height: 94dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .view,
  .deck-card,
  .steps-track {
    will-change: auto;
  }
}



/* =====================================================================
   MODE APPLICATION NATIVE
   Pas de zoom, pas de rebond, clavier iOS stable
   (à placer tout à la fin : ces règles surchargent les précédentes)
   ===================================================================== */

/* --- 1) Aucun zoom au toucher (pincement + double-tap) ---
   "pan-x pan-y" autorise le défilement mais interdit le zoom.
   (l'ancien "manipulation" laissait encore le pincement actif) */
*,
*::before,
*::after {
  touch-action: pan-x pan-y;
}

button,
a,
input,
textarea,
select,
summary,
label {
  touch-action: pan-x pan-y;
}

/* --- 2) Page verrouillée : plus de scroll/rebond du document --- */
html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scroll-behavior: auto; /* indispensable : le JS remet scrollTo(0,0) sans animation */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* --- 3) L'app suit exactement la zone visible (clavier iOS compris) ---
   --app-h et --app-top sont mis à jour par le JavaScript (visualViewport) */
#app {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  width: 100%;
  height: 100vh;
  height: var(--app-h, 100dvh);
  overflow: hidden;
}

/* Les éléments "fixed" deviennent relatifs à #app, sinon ils se décalent
   quand iOS déplace le viewport visuel au moment d'ouvrir le clavier */
.sheet-root,
#toasts {
  position: absolute;
}

/* Clavier ouvert : on retire la marge de la barre d'accueil iPhone */
html.kb {
  --mp-safe-bottom: 0px;
}

/* --- 4) iOS zoome automatiquement dès qu'un champ fait moins de 16px --- */
.cell input,
.cell textarea,
.cell select,
.textarea-card textarea,
.indic-input {
  font-size: 16px;
}

/* --- 5) Sélection de texte désactivée, sauf dans les champs de saisie --- */
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

img,
svg,
a {
  -webkit-user-drag: none;
  user-drag: none;
}