/*
 * Befriend — composants et écrans. Toutes les valeurs viennent de tokens.css.
 * Référence : design/befriend-handoff (preview-html, HANDOFF.md § 6 et § 9).
 */

/* ——— Base ——— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--color-background); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); }
a:hover { color: var(--color-link-hover); }
h1, h2, h3, p, ol, ul, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.theme-ink :focus-visible, .header-gradient :focus-visible, .welcome__hero :focus-visible { outline-color: #FFFFFF; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: var(--radius-field);
  background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-bold); box-shadow: var(--shadow-control);
}
.skip-link:focus { top: 8px; }

.demo-banner {
  margin: 0; padding: 4px 16px; text-align: center; font-size: var(--font-size-tab); font-weight: var(--weight-bold);
  background: var(--color-tint); color: var(--color-accent-text);
}

/* Colonne d'écran : 390 px de référence, étirée jusqu'à 560 px, centrée au-delà. */
.screen {
  width: 100%; max-width: var(--size-content-max); margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.demo-banner + .screen { min-height: calc(100dvh - 26px); }
.page { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--color-background); }
.page__main { flex: 1; display: flex; flex-direction: column; padding: 20px var(--screen-padding-x) 0; min-height: 0; }
.page__main--center { justify-content: center; align-items: center; text-align: center; padding-bottom: 24px; }
.page__main--tight { padding-left: var(--screen-padding-x-tight); padding-right: var(--screen-padding-x-tight); }
.page__footer { padding: 16px var(--screen-padding-x) 24px; display: flex; flex-direction: column; }
.page__footer--sticky { position: sticky; bottom: 0; background: var(--color-background); }

.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-22 { gap: 22px; } .gap-24 { gap: 24px; }
.stack-2, .stack-4, .stack-6, .stack-8, .stack-10, .stack-12, .stack-16, .stack-20 { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; } .stack-4 { gap: 4px; } .stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-10 { gap: 10px; }
.stack-12 { gap: 12px; } .stack-16 { gap: 16px; } .stack-20 { gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ——— Typographie ——— */
.title-xl { font-size: var(--font-size-title-xl); font-weight: var(--weight-extra-bold); line-height: var(--line-height-title); letter-spacing: var(--letter-spacing-title); }
.title-xl--29 { font-size: 1.8125rem; line-height: 1.14; }
.title { font-size: var(--font-size-title); font-weight: var(--weight-extra-bold); line-height: var(--line-height-title); letter-spacing: var(--letter-spacing-title); }
.title-l { font-size: 1.625rem; font-weight: var(--weight-extra-bold); line-height: 1.2; letter-spacing: -0.01em; }
.title-s { font-size: var(--font-size-title-small); font-weight: var(--weight-extra-bold); line-height: 1.25; }
.section-title { font-size: var(--font-size-body-large); font-weight: var(--weight-extra-bold); line-height: 1.3; }
.muted, .lead { color: var(--color-text-muted); }
.meta { font-size: var(--font-size-meta); color: var(--color-text-muted); }
.small { font-size: var(--font-size-meta); }
.accent { color: var(--color-primary); }
.strong { font-weight: var(--weight-bold); }
.center { text-align: center; }
.prose p { line-height: 1.6; }
.pre-line { white-space: pre-line; }

/* ——— Icônes ——— */
.ic { flex-shrink: 0; display: block; }
.ic-stroke { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill-tab { fill: none; }
.ic-solid-white { fill: #FFFFFF; }
.ic-seal { fill: #FFFFFF; }
.ic-seal-check { fill: none; stroke: var(--color-primary-deep); stroke-linecap: round; stroke-linejoin: round; }
.ic-seal--primary .ic-seal { fill: var(--color-primary); }
.ic-seal--primary .ic-seal-check { stroke: #FFFFFF; }
.ic-box-on { fill: var(--color-primary); }
.ic-box-check { fill: none; stroke: #FFFFFF; stroke-linecap: round; stroke-linejoin: round; }
.ic-box-off { fill: none; stroke: var(--color-field-border); }
.ic-primary { color: var(--color-primary); }
.ic-muted { color: var(--color-field-border); }

/* ——— Boutons ——— */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  font-weight: var(--weight-extra-bold); text-decoration: none; text-align: center;
  transition: background-color var(--duration-press) var(--ease-standard), opacity 240ms var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { min-height: var(--size-button-primary); padding: 8px 24px; background: var(--color-primary); color: var(--color-on-primary); font-size: var(--font-size-body-large); }
.btn-primary:hover { color: var(--color-on-primary); }
.btn-primary:active { background: #4338CA; }
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.btn-secondary { min-height: var(--size-button-secondary); padding: 8px 20px; background: var(--color-tint); color: var(--color-accent-text); font-size: var(--font-size-body-small); }
.btn-secondary:hover { color: var(--color-accent-text); }
.btn-secondary:active { background: var(--color-tint-pressed); }
.btn-outline { min-height: var(--size-button-secondary); padding: 8px 20px; background: transparent; color: var(--color-text); border: 1.5px solid var(--color-ink); font-size: var(--font-size-body-small); }
.btn-outline:hover { color: var(--color-text); }
.btn-text { min-height: var(--size-button-text); padding: 4px 12px; background: none; color: var(--color-primary); font-size: var(--font-size-body-small); }
.btn-text:hover { color: var(--color-link-hover); }
.btn-dark { min-height: var(--size-button-primary); padding: 8px 24px; background: #14162B; color: #FFFFFF; font-size: var(--font-size-body-large); }
.btn-dark:hover { color: #FFFFFF; }
.btn-dark:active { background: var(--color-ink-pressed); }
:root[data-theme="dark"] .btn-dark { background: #F2F3FA; color: #14162B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-dark { background: #F2F3FA; color: #14162B; } }
.btn-danger-text { color: var(--color-danger); }
.btn-inline { width: auto; }
.btn--small { min-height: 44px; font-size: var(--font-size-meta); padding: 4px 16px; }

.btn-round {
  flex-shrink: 0; width: var(--size-round-button); height: var(--size-round-button);
  display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 0;
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-control); cursor: pointer;
}
.btn-round:hover { color: var(--color-text); }
.btn-round--glass { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; box-shadow: none; }
.btn-round--glass:hover { color: #FFFFFF; }

.pill-outline {
  min-height: var(--size-touch-target-min); display: flex; align-items: center; padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.75); border-radius: 22px; color: #FFFFFF;
  font-size: var(--font-size-meta); font-weight: var(--weight-bold); text-decoration: none;
}
.pill-outline:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.1); }
.space-chip { padding: 6px 14px; border-radius: 18px; background: var(--color-primary); color: #FFFFFF; font-size: var(--font-size-meta); font-weight: var(--weight-extra-bold); }

.link-inline { align-self: flex-start; min-height: var(--size-touch-target-min); display: inline-flex; align-items: center; font-size: var(--font-size-body-small); font-weight: var(--weight-bold); }

/* ——— Barres hautes ——— */
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px var(--screen-padding-x) 4px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.topbar--split { justify-content: space-between; padding-right: 20px; }
.topbar--title { gap: 12px; }
.topbar__title { font-size: var(--font-size-title-small); font-weight: var(--weight-extra-bold); line-height: 1.25; }
.topbar__label { font-size: var(--font-size-meta); color: var(--color-text-muted); }

/* Repères de découverte (3 traits) */
.discover-marks { display: flex; gap: 6px; }
.discover-mark { width: 28px; height: 6px; border-radius: 3px; background: var(--color-track); position: relative; overflow: hidden; }
.discover-mark.is-done { background: var(--color-primary); }
.discover-mark.is-current::after { content: ""; position: absolute; inset: 0; background: var(--color-primary); transform-origin: left; animation: fill-x 640ms var(--ease-standard) 280ms both; }

/* Progression d'inscription */
.step-progress { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.step-progress__label { font-size: var(--font-size-meta); color: var(--color-text-muted); }
.progress { height: 6px; border-radius: 3px; background: var(--color-track); overflow: hidden; }
.progress__fill { height: 6px; border-radius: 3px; background: var(--color-primary); width: var(--to); animation: progress-fill 640ms var(--ease-standard) 280ms both; }
.progress__fill--1 { --to: 17%; } .progress__fill--2 { --to: 33%; } .progress__fill--3 { --to: 50%; }
.progress__fill--4 { --to: 67%; } .progress__fill--5 { --to: 83%; } .progress__fill--6 { --to: 100%; }
.progress__fill.from-0 { --from: 0%; } .progress__fill.from-1 { --from: 17%; } .progress__fill.from-2 { --from: 33%; }
.progress__fill.from-3 { --from: 50%; } .progress__fill.from-4 { --from: 67%; } .progress__fill.from-5 { --from: 83%; }
.progress--half .progress__fill { width: 50%; animation: none; }
.progress--full .progress__fill { width: 100%; animation: none; }

/* ——— Champs ——— */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field__label { font-weight: var(--weight-bold); }
.field__hint { font-size: var(--font-size-meta); color: var(--color-text-muted); }
.field__error { font-size: var(--font-size-meta); color: var(--color-danger); font-weight: var(--weight-bold); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: var(--size-field); padding: 0 18px;
  border: 1.5px solid var(--color-field-border); border-radius: var(--radius-field);
  background: var(--color-surface); color: var(--color-text); font-size: var(--font-size-body);
  transition: border-color 160ms var(--ease-standard), box-shadow 160ms var(--ease-standard);
}
.field textarea { padding: 14px 18px; min-height: 96px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px var(--color-focus-ring);
}
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-muted); opacity: 1; }
.field input[aria-invalid="true"] { border-color: var(--color-danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-ink .field input { border-color: #FFFFFF; background: #FFFFFF; color: #14162B; }

/* Case à cocher en ligne : la ligne entière est cliquable. Cocher ne déplace rien (HANDOFF § 6). */
.choice {
  position: relative; min-height: var(--size-choice-row); display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border: 1.5px solid var(--color-field-border); border-radius: var(--radius-field);
  background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-medium); line-height: 1.3;
  cursor: pointer; transition: background-color var(--duration-state-change) var(--ease-standard), border-color var(--duration-state-change) var(--ease-standard);
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .mark-on { display: none; }
.choice:has(input:checked) { border-color: var(--color-primary); box-shadow: inset 0 0 0 0.5px var(--color-primary); background: var(--color-tint); }
.choice:has(input:checked) .mark-on { display: block; animation: settle 260ms var(--ease-settle); }
.choice:has(input:checked) .mark-off { display: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.choice__text { display: flex; flex-direction: column; gap: 2px; }
.choice__text strong { font-weight: var(--weight-extra-bold); }
.choice__price { font-weight: var(--weight-extra-bold); }
.choice__price span { font-weight: var(--weight-medium); color: var(--color-text-muted); font-size: var(--font-size-meta); }
.choice--plan { align-items: flex-start; padding: 16px; }

/* Puces de sélection */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; min-height: var(--size-chip); display: inline-flex; align-items: center; gap: 6px; padding: 0 16px;
  border: 1.5px solid var(--color-field-border); border-radius: 24px; background: var(--color-surface); color: var(--color-text);
  font-size: var(--font-size-body-small); font-weight: var(--weight-medium); cursor: pointer;
  transition: background-color var(--duration-state-change) var(--ease-standard), color var(--duration-state-change) var(--ease-standard);
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip .ic-check { display: none; }
.chip:has(input:checked) { background: var(--color-primary); border-color: var(--color-primary); color: #FFFFFF; font-weight: var(--weight-bold); padding-left: 12px; }
.chip:has(input:checked) .ic-check { display: block; }
.chip:has(input:focus-visible) { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.segmented .chip { min-height: 56px; border-radius: var(--radius-field); justify-content: center; padding: 0 8px; line-height: 1.2; text-align: center; gap: 4px; }
.segmented .chip:has(input:checked) { padding-left: 8px; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: var(--weight-bold); }

/* Interrupteur (Settings, RespondentReport) */
.switch-row { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px;
  border-radius: var(--radius-field); background: var(--color-surface); border: 0; text-align: left; cursor: pointer; font-weight: var(--weight-bold); line-height: 1.35; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex-shrink: 0; width: 52px; height: 32px; border-radius: 16px; background: var(--color-track); position: relative; transition: background-color var(--duration-state-change); }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; color: transparent; box-shadow: var(--shadow-control); transition: transform var(--duration-state-change) var(--ease-standard); }
.switch-row:has(input:checked) .switch { background: var(--color-primary); }
.switch-row:has(input:checked) .switch__knob { transform: translateX(20px); color: var(--color-primary); }
.switch-row:has(input:focus-visible) { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* ——— Bandeaux ——— */
.flash, .form-error, .banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-field);
  font-size: var(--font-size-meta); font-weight: var(--weight-bold); line-height: 1.4;
}
.flash { background: var(--color-tint); color: var(--color-accent-text); }
.form-error, .banner--danger { background: var(--color-danger-surface); color: var(--color-danger); }
.banner--warning { background: var(--color-tint); color: var(--color-accent-text); }
.banner--info { background: var(--color-tint); color: var(--color-text); font-weight: var(--weight-medium); }
.info-box { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 20px; font-size: var(--font-size-meta); line-height: 1.45; background: var(--color-tint); }
.info-box .ic { color: var(--color-primary); margin-top: 1px; }
.info-box--glass { background: rgba(255, 255, 255, 0.1); }
.theme-ink .info-box--glass .ic { color: var(--color-on-ink-muted); }

/* ——— Surfaces ——— */
.card { background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 18px 20px; }
.card--flat { box-shadow: none; }
.card--tint { background: var(--color-tint); box-shadow: none; }
.list-card { background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.list-row { min-height: 60px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--color-text); text-decoration: none; font-weight: var(--weight-bold); border-top: 1px solid var(--color-divider); background: none; width: 100%; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
.list-row:first-child { border-top: 0; }
.list-row:hover { color: var(--color-text); background: var(--color-background); }
.list-row > .ic-chevron-right { margin-left: auto; color: var(--color-field-border); }
.list-row .ic:first-child { color: var(--color-primary); }
.list-row__value { margin-left: auto; color: var(--color-text-muted); font-weight: var(--weight-medium); }
.numbered { display: flex; flex-direction: column; gap: 14px; }
.numbered li { display: flex; gap: 14px; align-items: flex-start; }
.num { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--color-tint); color: var(--color-accent-text); font-weight: var(--weight-extra-bold); font-size: var(--font-size-body-small); }
.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .ic { color: var(--color-primary); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 14px; border-radius: 16px; background: var(--color-tint); color: var(--color-accent-text); font-size: var(--font-size-meta); font-weight: var(--weight-bold); }

/* Avatars à initiale (décoratifs) */
.avatar { flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: var(--weight-extra-bold); background: var(--color-tint); color: var(--color-primary-deep); }
:root[data-theme="dark"] .avatar { color: var(--color-accent-text); }
.avatar--small { width: 38px; height: 38px; font-size: var(--font-size-body); }
.avatar--44 { width: 44px; height: 44px; font-size: 1.125rem; }
.avatar--header { width: var(--size-avatar-header); height: var(--size-avatar-header); font-size: 1.5rem; background: #FFFFFF; color: #4338CA; }
.avatar--profile { width: var(--size-avatar-profile); height: var(--size-avatar-profile); font-size: 2.25rem; background: #FFFFFF; color: #4338CA; box-shadow: var(--shadow-avatar-on-gradient); }
.avatar--profile-tint { width: var(--size-avatar-profile); height: var(--size-avatar-profile); font-size: 2.25rem; }

.seal { display: inline-flex; align-items: center; gap: 5px; font-size: var(--font-size-meta); font-weight: var(--weight-medium); }

.empty-mark { width: 88px; height: 88px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--color-tint); color: var(--color-primary); }

/* ——— Espace d'encre (connexion répondant, administration) ——— */
.theme-ink { background: #14162B; color: #FFFFFF; }
.theme-ink .lead, .theme-ink .muted { color: var(--color-on-ink-muted); }
.theme-ink a:not(.btn) { color: #C9CCF5; }
.theme-ink a:not(.btn):hover { color: #FFFFFF; }
.theme-ink .btn-primary { background: #5B4BF5; }
.theme-ink .btn-text { color: #C9CCF5; text-decoration: underline; }
.theme-ink .flash { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }

/* ——— Accueil ——— */
.space-public .screen-Welcome { background: var(--gradient-hero); }
.welcome { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--gradient-hero); }
.welcome__hero { position: relative; flex: 1; min-height: 360px; padding: 14px 20px 0 24px; padding-top: max(14px, env(safe-area-inset-top)); color: #FFFFFF; overflow: hidden; }
.welcome__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.welcome__brand { font-size: var(--font-size-body); font-weight: var(--weight-extra-bold); }
.welcome__card { position: absolute; left: 24px; top: 92px; width: min(290px, calc(100% - 48px)); display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-card-large); background: #FFFFFF; color: #14162B; box-shadow: var(--shadow-floating); animation: welcome-card 720ms var(--ease-entrance) 500ms both; }
.welcome__card .avatar { color: #4338CA; background: #E7E7FD; }
.welcome__card-head { display: flex; align-items: center; gap: 10px; }
.welcome__bubble { position: absolute; right: 24px; top: 286px; width: min(240px, calc(100% - 72px)); padding: 16px 18px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 24px 24px 6px 24px; background: var(--color-hero-bubble); color: #FFFFFF; box-shadow: 0 20px 44px rgba(20, 22, 43, 0.28); animation: rise-28 720ms var(--ease-entrance) 1500ms both; }
.welcome__pill { position: absolute; left: 24px; top: 406px; display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 22px; background: #FFFFFF; color: #14162B; font-size: var(--font-size-meta); font-weight: var(--weight-extra-bold); box-shadow: var(--shadow-avatar-on-gradient); animation: welcome-pill 720ms var(--ease-entrance) 2500ms both; }
.welcome__pill .ic { color: #4F46E5; }
.welcome__sheet { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; padding: 30px 24px 20px; border-radius: var(--radius-hero-sheet-top); background: var(--color-surface); animation: rise-sheet 640ms var(--ease-entrance) 100ms both; }
.welcome__title { font-size: var(--font-size-title-large); font-weight: var(--weight-extra-bold); line-height: var(--line-height-title-large); letter-spacing: var(--letter-spacing-title); }
.welcome__title span { display: block; }
.welcome__actions { margin-top: 10px; }
@media (max-height: 760px) { .welcome__pill { display: none; } .welcome__hero { min-height: 300px; } }

/* ——— Illustrations de découverte ——— */
.illustration { display: flex; flex-direction: column; gap: 16px; padding: 24px 22px; border-radius: 30px; background: var(--color-tint); }
.illustration--slots { padding: 22px 18px; }
.illustration__bubble { align-self: flex-start; max-width: 260px; padding: 14px 18px; border-radius: var(--radius-bubble-received); background: var(--color-surface); box-shadow: 0 4px 16px rgba(20, 22, 43, 0.08); animation: pop 560ms var(--ease-entrance) 520ms both; }
.illustration__dictation { display: flex; align-items: center; gap: 14px; animation: rise-28 520ms var(--ease-entrance) 900ms both; }
.soundbars { display: flex; align-items: center; gap: 5px; }
.soundbar { width: 4px; border-radius: 2px; background: var(--color-primary); }
.soundbar--8 { height: 8px; } .soundbar--10 { height: 10px; } .soundbar--12 { height: 12px; } .soundbar--14 { height: 14px; }
.soundbar--16 { height: 16px; } .soundbar--18 { height: 18px; } .soundbar--22 { height: 22px; } .soundbar--24 { height: 24px; }
.soundbar--26 { height: 26px; } .soundbar--28 { height: 28px; } .soundbar--30 { height: 30px; } .soundbar--34 { height: 34px; } .soundbar--38 { height: 38px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: var(--font-size-meta); font-weight: var(--weight-bold); color: var(--color-accent-text); }
.week__day { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop 420ms var(--ease-entrance) both; }
.week__day:nth-child(1) { animation-delay: 420ms; } .week__day:nth-child(2) { animation-delay: 500ms; } .week__day:nth-child(3) { animation-delay: 580ms; }
.week__day:nth-child(4) { animation-delay: 660ms; } .week__day:nth-child(5) { animation-delay: 740ms; } .week__day:nth-child(6) { animation-delay: 820ms; } .week__day:nth-child(7) { animation-delay: 900ms; }
.week__dot { width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); }
.week__dot.is-today { border: 3px solid var(--color-surface); box-shadow: 0 0 0 3px var(--color-primary); }
.week__dot.is-off { background: none; border: 2px dashed var(--color-field-border); }
.next-reply--card { animation: rise-28 520ms var(--ease-entrance) 1100ms both; }

/* ——— Animations (coupées si l'appareil demande moins d'animations) ——— */
@keyframes fill-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes progress-fill { from { width: var(--from, 0%); } to { width: var(--to); } }
@keyframes settle { from { transform: scale(0.4); } to { transform: scale(1); } }
@keyframes rise-28 { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rise-16 { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rise-sheet { from { opacity: 0; transform: translateY(140px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcome-card { from { opacity: 0; transform: translateY(-56px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes welcome-pill { from { opacity: 0; transform: translateY(18px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes screen-forward { from { opacity: 0; transform: translateX(84px); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes screen-back { from { opacity: 0; transform: translateX(-84px); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }

.space-signup .page, .space-public .page { animation: screen-forward var(--duration-screen) var(--ease-standard) both; }
.nav-back .page { animation-name: screen-back; }
.space-public .screen-Welcome .page, .space-public .screen-Error .page { animation: fade var(--duration-fade) var(--ease-standard) both; }
.reveal { animation: rise-28 var(--duration-reveal) var(--ease-entrance) both; animation-delay: 140ms; }
.reveal:nth-child(2) { animation-delay: 230ms; } .reveal:nth-child(3) { animation-delay: 320ms; } .reveal:nth-child(4) { animation-delay: 410ms; }
.reveal:nth-child(5) { animation-delay: 500ms; } .reveal:nth-child(6) { animation-delay: 590ms; } .reveal:nth-child(n+7) { animation-delay: 680ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ——— Écrans plus larges que le cadre de 390 px ——— */
@media (min-width: 600px) {
  body { background: var(--color-background); }
  .screen { box-shadow: 0 0 0 1px var(--color-divider); }
}
