/* Lundi Matin design tokens (tokens.json, 2026-10-28) as CSS variables, then the demo page. Mobile first. */

@font-face {
  font-family: 'Outfit';
  src: url('fonts/Outfit-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Base colours */
  --deep-blue: #000e36;
  --primary-70: #3d4962;
  --primary-50: #777e92;
  --primary-30: #a6aab6;
  --primary-10: #e1e2e8;
  --blue-medium-grey: #96a1c1;
  --blue-light-grey: #dde4f5;
  --white: #ffffff;
  --x-light-grey: #f2f5fc;
  --xx-light-grey: #f9fafc;
  --m-light-grey: #e2e5ec;
  --lm-orange: #ff9d6c;
  --lm-red: #fe3a7c;
  --lm-pink: #ee5be0;
  --lm-light-orange: #ffefe9;
  --lm-light-pink: #ffebe8;
  --lm-green: #00ac94;
  --lm-green-light: #effbf9;
  --lm-yellow-light: #fffaed;
  --signal-red: #f40000;
  --signal-red-light: #ffecec;

  /* Semantic tokens */
  --focus-ring: var(--deep-blue);
  --text-primary: var(--deep-blue);
  --text-secondary: var(--primary-70);
  --text-muted: var(--primary-50);
  --text-disabled: var(--primary-30);
  --text-link: var(--deep-blue);
  --text-on-dark: var(--white);
  --text-on-dark-secondary: var(--blue-medium-grey);
  --text-error: var(--signal-red);
  --surface-page: var(--white);
  --surface-alt: var(--x-light-grey);
  --surface-subtle: var(--xx-light-grey);
  --surface-card: var(--white);
  --surface-highlight: var(--blue-light-grey);
  --surface-warm: var(--lm-light-orange);
  --surface-rose: var(--lm-light-pink);
  --surface-dark: var(--deep-blue);
  --surface-header: rgba(255, 255, 255, 0.92);
  --surface-input: var(--white);
  --border-default: var(--m-light-grey);
  --border-subtle: var(--primary-10);
  --border-strong: var(--deep-blue);
  --border-focus: var(--focus-ring);
  /* Form fields need 3:1 against white (WCAG 1.4.11): border-default (1.3:1) is not enough in a bright hall. */
  --border-field: var(--primary-50);
  --action-primary: var(--lm-red);
  --action-primary-start: var(--lm-orange);
  --action-secondary: var(--deep-blue);
  --action-secondary-text-hover: var(--white);
  --action-disabled: var(--primary-30);

  /* Gradients, shadows, radii, spacing, motion */
  --gradient-orange-red: linear-gradient(90deg, #ff9d6c 0%, #fe3a7c 100%);
  --gradient-pink-orange-red: linear-gradient(90deg, #ee5ae2 0%, #ff9d6c 50%, #fe3a7c 100%);
  --gradient-peach-pink: linear-gradient(180deg, #ffe8e1 0%, #ffdde5 100%);
  --shadow-subtle: 0 0 20px rgba(0, 14, 54, 0.2);
  --shadow-subtle-small: 0 0 10px rgba(0, 14, 54, 0.2);
  --shadow-subtle-pink: 0 0 10px rgba(255, 89, 117, 0.3);
  --radius-form: 4px;
  --radius-icon: 8px;
  --radius-tooltip: 20px;
  --radius-normal: 35px;
  --radius-pill: 9999px;
  --spacing-20: 0.44rem;
  --spacing-30: 0.67rem;
  --spacing-40: 1rem;
  --spacing-50: 1.5rem;
  --spacing-60: 2.25rem;
  --font-sans: Outfit, Arial, sans-serif;
  --gutter: 16px;
  --duree: 200ms;

  color-scheme: light;
}

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

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- App shell: header, scrolling thread, composer. Height follows the visual viewport (keyboard). */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  height: var(--app-h, 100dvh);
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-page);
  position: relative;
}

.haut {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px var(--gutter) 8px;
  background: var(--surface-header);
  box-shadow: var(--shadow-subtle-small);
  border-radius: 0 0 20px 20px;
  z-index: 2;
}

.haut::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient-pink-orange-red);
}

.haut__logo {
  display: block;
  height: 29px;
  width: auto;
}

.compteur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.compteur b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.compteur--clair {
  background: var(--surface-highlight);
  color: var(--text-primary);
}

.reseau {
  flex: none;
  margin: 0;
  padding: 10px var(--gutter);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.35;
}

.fil {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--gutter) var(--gutter) 24px;
  scroll-padding: 12px;
}

/* ---------- Home */

.accueil__intro {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 0 var(--radius-normal) var(--radius-normal) var(--radius-normal);
  background: var(--gradient-peach-pink);
}

.surtitre {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.accueil__titre {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* The keyword stays deep blue (readable in a bright hall, on the peach background too); the brand gradient
   underlines it. The gradient text of the charter is kept for white backgrounds only. */
.degrade {
  color: var(--text-primary);
  background-image: var(--gradient-pink-orange-red);
  background-repeat: no-repeat;
  background-size: 100% 0.14em;
  background-position: 0 100%;
  padding-bottom: 0.04em;
}

.accueil__intro p {
  margin: 0 0 8px;
  font-size: 16.5px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-primary);
}

.accueil__intro p:last-child {
  margin-bottom: 0;
}

.accueil__suggestions {
  margin-top: 18px;
}

.titre-bloc {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.offre {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
}

.suggestions {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px 12px 18px;
  border: 0;
  border-radius: var(--radius-tooltip);
  background: var(--surface-card);
  box-shadow: var(--shadow-subtle-small);
  color: var(--text-primary);
  font: 500 16.5px/1.3 var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: transform var(--duree), background-color var(--duree);
  touch-action: manipulation;
}

.suggestion:active {
  transform: scale(0.98);
  background: var(--surface-highlight);
}

.suggestion[disabled] {
  opacity: 0.55;
  cursor: default;
}

.icone {
  flex: none;
  display: inline-flex;
}

.suggestion svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.suggestion--action {
  background: var(--surface-warm);
  box-shadow: none;
}

.relances {
  margin: 18px 0 0;
}

.relances .titre-bloc {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Conversation */

.tour {
  margin-top: 22px;
}

.question {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px 40px;
}

.question p {
  margin: 0;
  padding: 12px 16px;
  border-radius: 20px 20px 4px 20px;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.reponse {
  position: relative;
}

.reponse__qui {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.reponse__qui::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--gradient-orange-red);
}

.statut {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 10px 14px;
  border-radius: var(--radius-tooltip);
  background: var(--surface-alt);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.35;
}

.statut__points {
  flex: none;
  display: inline-flex;
  gap: 4px;
  padding-top: 7px;
}

.statut__points i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lm-red);
  animation: points 1.2s infinite ease-in-out both;
}

.statut__points i:nth-child(2) {
  animation-delay: 0.15s;
  background: #fd6b74;
}

.statut__points i:nth-child(3) {
  animation-delay: 0.3s;
  background: var(--lm-orange);
}

@keyframes points {
  0%,
  80%,
  100% {
    transform: scale(0.5);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.statut__texte b {
  font-weight: 600;
}

.statut__lent {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
}

.consulte {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Answer text rendered from Markdown */
.md {
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.md > :first-child {
  margin-top: 0;
}

.md > :last-child {
  margin-bottom: 0;
}

.md p,
.md ul,
.md ol,
.md blockquote,
.md pre,
.md .table-wrap {
  margin: 0 0 12px;
}

.md ul,
.md ol {
  padding-left: 1.3em;
}

.md li {
  margin: 3px 0;
}

.md li > ul,
.md li > ol {
  margin: 4px 0;
}

.md strong {
  font-weight: 600;
}

.md h3,
.md h4,
.md h5 {
  margin: 18px 0 8px;
  line-height: 1.2;
  font-weight: 700;
}

.md h3 {
  font-size: 20px;
}

.md h4 {
  font-size: 18px;
}

.md h5 {
  font-size: 16.5px;
}

.md hr {
  margin: 16px 0;
  border: 0;
  border-top: 1px solid var(--border-subtle);
}

.md blockquote {
  padding: 8px 14px;
  border-left: 4px solid var(--lm-orange);
  background: var(--surface-subtle);
}

.md code {
  padding: 1px 5px;
  border-radius: var(--radius-form);
  background: var(--surface-alt);
  font-size: 0.92em;
}

.md pre {
  overflow-x: auto;
  padding: 10px 12px;
  border-radius: var(--radius-icon);
  background: var(--surface-alt);
}

.md pre code {
  padding: 0;
  background: none;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-icon);
  /* The charter's border for tables (border-default), not a card's grey frame. */
  box-shadow: 0 0 0 1px var(--border-default);
  /* Edge shadows hint that a wide table scrolls sideways. */
  background:
    linear-gradient(90deg, var(--white) 30%, rgba(255, 255, 255, 0)) left / 24px 100% no-repeat local,
    linear-gradient(270deg, var(--white) 30%, rgba(255, 255, 255, 0)) right / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 14, 54, 0.18), transparent) left / 10px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 14, 54, 0.18), transparent) right / 10px 100% no-repeat scroll;
}

.md table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.md th,
.md td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle);
}

/* Labels keep a readable width and stay in view: a wide table scrolls its figures sideways under the names. */
.md th:first-child,
.md td:first-child {
  min-width: 8.5em;
  max-width: 12em;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--white);
  box-shadow: 1px 0 0 var(--border-subtle);
}

.md th:first-child {
  background: var(--surface-alt);
}

/* A first column of ranks (#, 1, 2…) stays narrow; the names, second, get the width and stay in view. */
.md table.col-rang th:first-child,
.md table.col-rang td:first-child {
  width: 2.75em;
  min-width: 2.75em;
  max-width: 2.75em;
  padding-right: 4px;
  box-shadow: none;
}

.md table.col-rang th:nth-child(2),
.md table.col-rang td:nth-child(2) {
  min-width: 8.5em;
  max-width: 12em;
  position: sticky;
  left: 2.75em;
  z-index: 1;
  background: var(--white);
  box-shadow: 1px 0 0 var(--border-subtle);
}

.md table.col-rang th:nth-child(2) {
  background: var(--surface-alt);
}

.md th {
  background: var(--surface-alt);
  font-weight: 600;
  white-space: nowrap;
}

.md td.num,
.md td.al-r,
.md th.al-r {
  text-align: right;
  white-space: nowrap;
}

.md td.al-c,
.md th.al-c {
  text-align: center;
}

.md tbody tr:last-child td {
  border-bottom: 0;
}

/* Read-only confirmation card */
.carte {
  position: relative;
  margin: 12px 0;
  padding: 18px 16px 14px;
  border-radius: var(--radius-tooltip);
  background: var(--surface-card);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.carte__tag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px 16px;
  border-radius: 0 0 0 var(--radius-tooltip);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-size: 13.5px;
  font-weight: 400;
}

.carte__titre {
  margin: 0 90px 4px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.carte__resume {
  margin: 0 0 10px;
  font-weight: 400;
  color: var(--text-secondary);
}

.carte__lignes {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 400;
}

.carte__lignes li {
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle);
}

.carte__lignes strong {
  font-weight: 600;
}

.carte__detail {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
}

.carte__changement {
  display: block;
  margin-top: 2px;
  font-size: 14.5px;
}

.carte__apres {
  font-weight: 600;
}

.carte__notes {
  margin: 0 0 10px;
  padding-left: 1.1em;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.carte__pied {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px -16px -14px;
  padding: 12px 16px;
  background: var(--surface-warm);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.carte__pied svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.carte__pied strong {
  display: block;
  font-weight: 700;
}

/* Errors and notices inside the thread */
.alerte {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: var(--radius-icon);
  background: var(--signal-red-light);
  font-weight: 400;
  line-height: 1.4;
}

.alerte--info {
  background: var(--surface-highlight);
}

.alerte__icone {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--signal-red);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

.alerte--info .alerte__icone {
  background: var(--surface-dark);
}

.alerte__corps {
  flex: 1;
}

.alerte__corps p {
  margin: 0 0 8px;
}

.alerte__corps p:last-child {
  margin-bottom: 0;
}

/* ---------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 26px;
  border: 2px solid var(--action-secondary);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--action-secondary);
  font: 600 17px/1.2 var(--font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--duree), color var(--duree), transform var(--duree), box-shadow var(--duree);
}

.btn:active {
  transform: scale(0.98);
}

/* Primary: brand gradient. Label in deep-blue (9.4:1 on the orange end, 5.6:1 on the red end) per the
   charter's rule for new text on orange: white would drop to 2:1 under the hall lights. */
.btn--primaire {
  border: 0;
  background-color: var(--action-primary);
  background-image: var(--gradient-orange-red);
  color: var(--deep-blue);
}

.btn--primaire:hover {
  box-shadow: var(--shadow-subtle-pink);
}

.btn--sombre {
  border-color: var(--surface-dark);
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.btn--petit {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 16px;
}

.btn--large {
  width: 100%;
}

.btn[disabled] {
  border-color: var(--action-disabled);
  background: var(--surface-alt);
  background-image: none;
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
}

/* ---------- Composer */

.bas {
  flex: none;
  padding: 10px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--surface-page);
  box-shadow: 0 -4px 14px rgba(0, 14, 54, 0.08);
  border-radius: 20px 20px 0 0;
  z-index: 2;
}

.saisie {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.saisie__champ {
  flex: 1;
  min-width: 0;
  display: block;
  min-height: 48px;
  max-height: 132px;
  margin: 0;
  padding: 12px 16px;
  border: 2px solid var(--border-field);
  border-radius: 24px;
  background: var(--surface-input);
  color: var(--text-primary);
  /* 16px or more, or iOS zooms on focus. */
  font: 400 17px/1.35 var(--font-sans);
  resize: none;
  overflow-y: auto;
}

.saisie__champ::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.saisie__champ:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
  border-color: var(--border-strong);
}

.saisie__envoyer {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-dark);
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
}

.saisie__envoyer svg {
  width: 22px;
  height: 22px;
}

.saisie__envoyer[disabled] {
  background: var(--primary-30);
  cursor: not-allowed;
}

.avertissement {
  margin: 6px 4px 0;
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--text-secondary);
}

.longueur {
  margin: 4px 4px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: right;
}

.barre {
  display: grid;
  gap: 6px;
}

.barre__note {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- Lead form */

.lead {
  margin: 24px 0 8px;
  padding: 22px 18px 20px;
  border-radius: var(--radius-normal) 0 var(--radius-normal) var(--radius-normal);
  background: var(--surface-subtle);
  /* No grey frame (charter): a diffuse, centred shadow. */
  box-shadow: var(--shadow-subtle-small);
  scroll-margin-top: 12px;
}

.lead__titre {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
}

.lead__titre:focus {
  outline: none;
}

.lead__titre:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 4px;
}

.lead__intro {
  margin: 0 0 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.champ {
  margin: 0 0 14px;
}

.champ label,
.champ legend {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.3;
}

.champ .facultatif {
  font-weight: 400;
  color: var(--text-secondary);
}

.champ input[type='text'],
.champ input[type='email'],
.champ input[type='tel'] {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-field);
  border-radius: var(--radius-form);
  background: var(--surface-input);
  color: var(--text-primary);
  font: 400 17px/1.3 var(--font-sans);
}

.champ input:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
  border-color: var(--border-strong);
}

.champ input[aria-invalid='true'] {
  border-color: var(--signal-red);
  border-width: 2px;
}

.champs-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

fieldset.champ {
  border: 0;
  padding: 0;
  min-width: 0;
}

.choix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choix label {
  position: relative;
  margin: 0;
  font-weight: 400;
}

.choix input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choix span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1.5px solid var(--border-field);
  border-radius: var(--radius-pill);
  background: var(--surface-input);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
}

/* Short choices on one row on a phone (a second row only below about 340 px). */
.choix--ligne {
  gap: 6px;
}

.choix--ligne label {
  flex: 1 1 auto;
}

.choix--ligne span {
  justify-content: center;
  width: 100%;
  padding: 8px 4px;
  font-size: 15px;
  white-space: nowrap;
}

.choix input:checked + span {
  border-color: var(--surface-dark);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-weight: 500;
}

.choix input:focus-visible + span {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

fieldset[aria-invalid='true'] .choix span {
  border-color: var(--signal-red);
}

.case {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 14px;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.4;
}

.champ label.case {
  display: flex;
  margin: 0;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.4;
}

.case input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--deep-blue);
}

.case input[aria-invalid='true'] {
  outline: 2px solid var(--signal-red);
  outline-offset: 2px;
}

.erreur {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

.erreur::before {
  content: '!';
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--signal-red);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.erreur:empty {
  display: none;
}

/* Honeypot: off-screen, never focusable. */
.piege {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mention {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-secondary);
}

.mention a {
  color: var(--text-secondary);
}

.lead__ok {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-tooltip);
  background: var(--lm-green-light);
  font-weight: 400;
}

.lead__ok strong {
  font-weight: 700;
}

/* ---------- Fallback mode (static) */

.secours__intro {
  padding: 22px 20px 20px;
  border-radius: 0 var(--radius-normal) var(--radius-normal) var(--radius-normal);
  background: var(--gradient-peach-pink);
}

.secours__intro h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.secours__intro p {
  margin: 0;
  font-weight: 400;
}

.atouts {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.atouts li {
  padding: 14px 16px;
  border-radius: var(--radius-tooltip);
  background: var(--surface-card);
  box-shadow: var(--shadow-subtle-small);
  font-weight: 400;
}

.atouts strong {
  display: block;
  font-weight: 700;
  font-size: 17px;
}

.exemple {
  margin: 22px 0 0;
}

.exemple__q {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px 40px;
}

.exemple__q p {
  margin: 0;
  padding: 12px 16px;
  border-radius: 20px 20px 4px 20px;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
}

/* ---------- End screen (full screen, shown on the stand) */

.fin {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--surface-page);
  -webkit-overflow-scrolling: touch;
}

.fin__contenu {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
}

.fin__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 12px;
}

.fin__badge {
  padding: 26px 22px 24px;
  border-radius: var(--radius-normal) 0 var(--radius-normal) var(--radius-normal);
  background: var(--gradient-orange-red);
  color: var(--deep-blue);
}

.fin__badge:focus {
  outline: none;
}

.fin__montrez {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-size: 15px;
  font-weight: 500;
}

.fin__prenom {
  margin: 0;
  font-size: 52px;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.fin__societe {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.fin__texte {
  margin: 14px 0 0;
  font-size: 17px;
  font-weight: 500;
}

.fin__avantage {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  /* Deep blue on the gradient: readable on its red end too. */
  color: var(--text-primary);
}

.fin__cta {
  margin: 22px 0 0;
  padding: 22px 20px;
  border-radius: var(--radius-normal);
  background: var(--surface-card);
  box-shadow: var(--shadow-subtle);
}

.fin__cta h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
}

.fin__cta p {
  margin: 0 0 16px;
  font-weight: 400;
  color: var(--text-secondary);
}

.fin__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.fin__merci {
  margin: 18px 0 0;
  font-weight: 400;
  text-align: center;
  color: var(--text-secondary);
}

/* ---------- Privacy page */

.page-texte {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
}

.page-texte h1 {
  margin: 24px 0 16px;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
}

.page-texte h2 {
  margin: 22px 0 6px;
  font-size: 19px;
  font-weight: 700;
}

.page-texte p {
  margin: 0 0 10px;
  font-weight: 400;
}

body.texte {
  overflow: auto;
  height: auto;
  background: var(--surface-page);
}

html.texte {
  overflow: auto;
  height: auto;
}

/* ---------- Motion and larger screens */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 640px) {
  body {
    background: var(--surface-alt);
  }

  .app {
    box-shadow: var(--shadow-subtle-small);
  }
}

/* Short screens (small phones, landscape): the first suggestions must stay above the fold. */
@media (max-height: 700px) {
  .accueil__intro {
    padding: 14px 16px 12px;
  }

  /* The offer stays: the visitor learns before the first question that the form follows it. */
  .accueil__intro .surtitre {
    display: none;
  }

  .accueil__titre {
    font-size: 27px;
    margin-bottom: 6px;
  }

  .accueil__intro p {
    font-size: 15px;
    line-height: 1.4;
  }

  .accueil__suggestions {
    margin-top: 14px;
  }

  .titre-bloc {
    margin-bottom: 8px;
  }

  .suggestion {
    min-height: 50px;
    padding: 10px 14px 10px 16px;
    font-size: 15.5px;
  }
}

@media (max-width: 340px) {
  .accueil__titre {
    font-size: 30px;
  }

  .compteur {
    font-size: 14px;
    padding: 4px 10px;
  }

  .champs-duo {
    grid-template-columns: 1fr;
  }
}
