/* ==========================================================================
   Flex Timer · landing — fenêtre « QR code » (assets/share.js)
   Pour montrer le code à quelqu'un dans la rue : grand, contrasté, centré.
   Encre claire forcée à l'intérieur (comme la fenêtre d'installation) : la
   scène derrière peut être jaune (encre noire), la fenêtre reste sombre.
   ========================================================================== */
.fts {
  --ink: #FFFFFF;
  --ink-2: rgba(255,255,255,.86);
  --ink-3: rgba(255,255,255,.68);
  --ink-muted: rgba(255,255,255,.5);
  --line: rgba(255,255,255,.12);
  --glass: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.18);
  --cta-bg: #FFFFFF;
  --cta-ink: #0A0A0A;

  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}
.fts[hidden] { display: none; }
.fts__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  opacity: 0;
  transition: opacity .35s ease;
}
.fts[data-state="open"] .fts__scrim { opacity: 1; }

.fts__dialog {
  position: relative;
  width: min(100%, 420px);
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 22px 22px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(30,30,36,.97) 0%, rgba(10,10,13,.99) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px -20px rgba(0,0,0,.9);
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transition: opacity .35s ease, transform .5s var(--ease-forward, cubic-bezier(.22,1.3,.36,1));
  outline: none;
}
.fts[data-state="open"] .fts__dialog { opacity: 1; transform: none; }

.fts__close { position: absolute; top: 12px; right: 12px; }
.fts__eyebrow { margin: 0; }
.fts__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: .01em;
  text-wrap: balance;
}

/* Le code : noir sur blanc pur, avec sa marge blanche (4 modules) : c'est ce
   qui le rend lisible par tous les téléphones, même en plein soleil. */
.fts__qr {
  width: min(78vw, 46vh, 330px);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 18px 50px -16px rgba(0,0,0,.8);
}
.fts__qr svg { display: block; width: 100%; height: 100%; border-radius: 10px; }

.fts__url {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.fts__hint { margin: 0; max-width: 32ch; font-size: .92rem; line-height: 1.45; color: var(--ink-3); }
.fts__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.fts__actions .ft-btn { flex: 1 1 150px; }

@media (max-height: 640px) {
  .fts__dialog { gap: 10px; padding-top: 22px; }
  .fts__hint { display: none; }
}
html.fts-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .fts__scrim, .fts__dialog { transition: none; }
}

/* Barre du haut sur petit écran : le bouton QR s'ajoute à la barre, on retire
   les pastilles de modes (accessibles par les tuiles) et on garde le logo sur
   une seule ligne. */
@media (max-width: 520px) {
  .ft-logo__word { white-space: nowrap; }
  .ft-nav__modes { display: none; }
  .ft-nav__bar { flex-wrap: nowrap; gap: 8px; }
}
