/* INTRO SCREEN - First-launch presentation */

/* ── Keyframes ──────────────────────────────────── */
@keyframes introSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes introPulseGlow {
  0%, 100% { box-shadow: 0 12px 40px rgba(0,169,119,.32), 0 4px 14px rgba(0,169,119,.18); }
  50%       { box-shadow: 0 20px 60px rgba(0,169,119,.50), 0 6px 22px rgba(0,169,119,.30); }
}

/* Entrée étagée (stagger) des sections */
.intro-anim-1, .intro-anim-2, .intro-anim-3, .intro-anim-4 {
  opacity: 0;
  animation: introSlideUp 280ms cubic-bezier(.25,.46,.45,.94) forwards;
}
.intro-anim-1 { animation-delay:  60ms; }
.intro-anim-2 { animation-delay: 140ms; }
.intro-anim-3 { animation-delay: 220ms; }
.intro-anim-4 { animation-delay: 290ms; }

/* ── Root ───────────────────────────────────────── */
#intro-root {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 220ms ease;
}
#intro-root.intro-visible { opacity: 1; }

/* ── Inner container ────────────────────────────── */
.intro-inner {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
  padding: 0 24px;
  box-sizing: border-box;
  position: relative;
}

/* ── Header ─────────────────────────────────────── */
.intro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(16px, env(safe-area-inset-top));
  height: 60px;
  flex-shrink: 0;
}
.intro-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Actual app logo — image tag, no background needed */
.intro-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}
.intro-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.intro-skip-btn {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  font-family: inherit;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.intro-skip-btn:hover { color: var(--text); }

/* ── Body ───────────────────────────────────────── */
.intro-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 32px;
  gap: 28px;
}

/* App icon — même fichier que la nav (images/ft-icon-green.svg) */
.intro-app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 12px 40px rgba(0, 169, 119, 0.35),
    0 4px 14px rgba(0, 169, 119, 0.20);
  flex-shrink: 0;
}
.intro-icon-img {
  display: block;
  width: 88px;
  height: 88px;
}

/* Text block */
.intro-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
}
.intro-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin: 0;
}
.intro-subtitle {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}

/* Features */
.intro-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.intro-feature {
  display: flex;
  align-items: center;
  gap: 14px;
}
.intro-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.intro-feature-icon--mint  { background: var(--mint-bg);  color: var(--mint); }
.intro-feature-icon--blue  { background: var(--blue-bg);  color: var(--blue); }
.intro-feature-icon--amber { background: var(--amber-bg); color: var(--amber); }
.intro-feature-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* ── Footer CTA — sticky bottom + iPhone safe area ── */
.intro-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  position: sticky;
  bottom: 0;
  background: var(--bg);
}
.intro-btn-primary {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  background: #00AC7A;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.2px;
  transition: background 150ms ease, transform 100ms ease;
  -webkit-tap-highlight-color: transparent;
}
.intro-btn-primary:hover  { background: #00956a; }
.intro-btn-primary:active { transform: scale(0.98); }
.intro-btn-secondary {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  border: 1.5px solid var(--border2);
  cursor: pointer;
  font-family: inherit;
  padding: 0 20px;
  white-space: nowrap;
  transition: background 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.intro-btn-secondary:hover { background: var(--surface); }

/* ── Desktop >= 769px ───────────────────────────── */
@media (min-width: 769px) {

  #intro-root { justify-content: center; }

  .intro-inner {
    min-height: auto;
    padding: 40px 32px 40px;
  }

  .intro-footer {
    position: static;
    padding-bottom: 0;
    margin-top: 8px;
  }

  /* Icône plus grande — introSlideUp + glow animé combinés pour que l'icône
     reste visible (introPulseGlow seul écraserait l'opacity:0 de .intro-anim-1) */
  .intro-app-icon {
    width: 104px;
    height: 104px;
    border-radius: 26px;
    animation:
      introSlideUp 280ms cubic-bezier(.25,.46,.45,.94) 60ms forwards,
      introPulseGlow 3.5s ease-in-out 600ms infinite;
  }
  .intro-icon-img {
    width: 104px;
    height: 104px;
  }

  /* Titre plus impactant */
  .intro-title {
    font-size: 34px;
    letter-spacing: -0.8px;
  }

  /* Features en carte */
  .intro-features {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    gap: 16px;
  }

  /* Boutons côte à côte */
  .intro-footer {
    flex-direction: row;
    gap: 12px;
  }
  .intro-btn-primary,
  .intro-btn-secondary {
    flex: 1;
  }
}
