/* HUIS CLOS — premier lancement (js/screens/welcome.js) : langue, puis statistiques d'utilisation.
   Sobre : l'icône de l'application dans un halo ambré, deux grandes options, un seul bouton plein. */
.s-welcome { isolation: isolate; }
.s-welcome .wl-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% -8%, rgba(230, 183, 124, 0.20), rgba(230, 183, 124, 0.05) 45%, transparent 70%),
    radial-gradient(90% 50% at 50% 110%, rgba(141, 207, 216, 0.06), transparent 70%); }
.s-welcome .wl-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.s-welcome .wl-step { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; max-width: 460px; margin: 0 auto;
  padding: 0 var(--gutter); }
.s-welcome .wl-main { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
/* Boutons collés au bas de l'écran : sur un petit téléphone, le texte défile au-dessus d'eux, sous un léger fondu. */
.s-welcome .wl-foot { flex: none; position: sticky; bottom: 0; z-index: 1; margin: 0 calc(-1 * var(--gutter));
  padding: 16px var(--gutter) calc(var(--safe-bottom) + 20px);
  background: linear-gradient(to bottom, rgba(9, 13, 18, 0), var(--ink) 12px); }
.s-welcome :focus { outline: none; }
.s-welcome :focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ----- Étape « langue » ----- */
.s-welcome .wl-hero { display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(28px, 6vh, 56px); }
.s-welcome .wl-icon { width: 92px; height: 92px; border-radius: 22px; display: block;
  box-shadow: 0 0 0 1px rgba(243, 238, 229, 0.14), 0 22px 60px -14px rgba(230, 183, 124, 0.55), 0 10px 24px -10px rgba(0, 0, 0, 0.8); }
.s-welcome .wl-word { margin: 18px 0 0; font-family: var(--font-serif); font-size: 15px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text); padding-left: 0.28em; }
.s-welcome .wl-word b { font-weight: 600; }

.s-welcome .wl-title { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; text-align: center; font-weight: 500; }
.s-welcome .wl-title-1, .s-welcome .wl-title-solo { font-family: var(--font-serif); font-size: calc(28px * var(--scale)); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; color: var(--text); }
.s-welcome .wl-title-2 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: calc(18px * var(--scale)); line-height: 1.3; color: var(--text-2); }

.s-welcome .wl-options { display: grid; gap: 12px; margin-top: 28px; }
.s-welcome .wl-option { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 76px; padding: 14px 18px 14px 22px; text-align: left;
  border-radius: var(--r-card); background: rgba(20, 28, 38, 0.72); border: 1.5px solid var(--line-2); color: var(--text);
  transition: border-color var(--t-press), background-color var(--t-press), box-shadow var(--t-press), transform var(--t-press) var(--ease-out); }
.s-welcome .wl-option:active { transform: scale(0.985); }
.s-welcome .wl-option[aria-checked="true"] { border-color: var(--amber); background: rgba(230, 183, 124, 0.09); box-shadow: 0 0 0 4px rgba(230, 183, 124, 0.08); }
.s-welcome .wl-opt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.s-welcome .wl-opt-name { font-family: var(--font-serif); font-size: calc(22px * var(--scale)); font-weight: 500; line-height: 1.15; }
.s-welcome .wl-opt-sub { font-size: calc(14px * var(--scale)); color: var(--text-2); }
.s-welcome .wl-opt-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-2); color: var(--amber-ink); transition: background-color var(--t-press), border-color var(--t-press); }
.s-welcome .wl-opt-mark svg { width: 15px; height: 15px; opacity: 0; transform: scale(0.6); transition: opacity var(--t-press), transform var(--t-press) var(--ease-out); }
.s-welcome .wl-option[aria-checked="true"] .wl-opt-mark { background: var(--amber); border-color: var(--amber); }
.s-welcome .wl-option[aria-checked="true"] .wl-opt-mark svg { opacity: 1; transform: none; }

/* ----- Étape « statistiques » ----- */
.s-welcome .wl-top { flex: none; display: flex; align-items: center; min-height: 56px; padding-top: 8px; margin-left: -6px; }
.s-welcome .wl-back { background: transparent; }
.s-welcome .wl-back:hover { background: rgba(243, 238, 229, 0.06); }
.s-welcome .wl-consent .wl-main { align-items: center; text-align: center; }
.s-welcome .wl-badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--amber);
  background: rgba(230, 183, 124, 0.12); box-shadow: inset 0 0 0 1px rgba(230, 183, 124, 0.28), 0 16px 40px -16px rgba(230, 183, 124, 0.5); }
.s-welcome .wl-badge svg { width: 28px; height: 28px; }
.s-welcome .wl-title-solo { margin: 22px 0 0; }
.s-welcome .wl-lead { margin: 14px 0 0; max-width: 30em; font-size: var(--fs-body); line-height: 1.5; color: var(--text); }
.s-welcome .wl-note { margin: 12px 0 0; max-width: 30em; font-size: calc(15px * var(--scale)); line-height: 1.5; color: var(--text-2); }
.s-welcome .wl-legal { margin: 10px 0 0; }
.s-welcome .wl-link { min-height: 44px; padding: 0 6px; font-size: calc(15px * var(--scale)); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; color: var(--text-2); }
.s-welcome .wl-link:hover { color: var(--text); }
/* Deux choix de même poids : même style, même largeur. */
.s-welcome .wl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s-welcome .wl-choice { min-height: 56px; padding: 0 12px; background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.s-welcome .wl-choice:hover:not([disabled]) { background: var(--surface-3); }

/* ----- Entrée et sortie des étapes ----- */
.s-welcome .wl-main > *, .s-welcome .wl-foot { animation: wl-rise var(--t-reveal) var(--ease-out) both; }
.s-welcome .wl-main > :nth-child(2) { animation-delay: 60ms; }
.s-welcome .wl-main > :nth-child(3) { animation-delay: 120ms; }
.s-welcome .wl-main > :nth-child(n+4), .s-welcome .wl-foot { animation-delay: 180ms; }
.s-welcome .wl-step.is-leaving { animation: wl-leave 220ms var(--ease-in) both; pointer-events: none; }
@keyframes wl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wl-leave { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
:root[data-motion="reduced"] .s-welcome :is(.wl-main > *, .wl-foot, .wl-step.is-leaving) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .s-welcome :is(.wl-main > *, .wl-foot, .wl-step.is-leaving) { animation: none; }
}

/* Petits écrans en hauteur : l'icône et les marges se resserrent. */
@media (max-height: 700px) {
  .s-welcome .wl-hero { margin-bottom: 22px; }
  .s-welcome .wl-icon { width: 72px; height: 72px; border-radius: 18px; }
  .s-welcome .wl-options { margin-top: 20px; }
  .s-welcome .wl-main { padding: 16px 0; }
}
@media (max-height: 640px) {
  .s-welcome .wl-top { min-height: 48px; padding-top: 4px; }
  .s-welcome .wl-main { padding: 8px 0 12px; }
  .s-welcome .wl-badge { width: 48px; height: 48px; }
  .s-welcome .wl-badge svg { width: 22px; height: 22px; }
  .s-welcome .wl-title-solo { margin-top: 14px; }
  .s-welcome .wl-lead { margin-top: 10px; line-height: 1.45; }
  .s-welcome .wl-note { margin-top: 8px; line-height: 1.45; }
  .s-welcome .wl-legal { margin-top: 4px; }
  .s-welcome .wl-foot { padding-top: 12px; }
}
/* Grand écran : le fond du pied s'arrête avec la colonne, aucune bande visible. */
@media (min-width: 520px) {
  .s-welcome .wl-foot { background: none; }
}
