/* =====================================================================
   Page de présentation (js/welcome.js) : visible seulement sans session.
   ===================================================================== */
.wl { position: relative; min-height: 100vh; overflow-x: clip; }

/* Halos qui dérivent lentement derrière la page */
.wl-halos { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.wl-halos span {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(80px); opacity: 0.55; animation: wl-drift 22s ease-in-out infinite alternate;
}
.wl-halos span:nth-child(1) { background: #19A671; top: -18vmax; left: -12vmax; }
.wl-halos span:nth-child(2) { background: #0F7B53; bottom: -20vmax; right: -14vmax; animation-delay: -8s; }
.wl-halos span:nth-child(3) { background: #8BBB92; width: 26vmax; height: 26vmax; top: 40%; left: 55%; opacity: 0.22; animation-delay: -15s; }
@keyframes wl-drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* Barre du haut : logo, onglets, connexion */
.wl-top {
  position: sticky; top: 12px; z-index: 30;
  width: min(1180px, calc(100% - 24px)); margin: 12px auto 0; padding: 8px 8px 8px 16px; border-radius: 22px;
  display: flex; align-items: center; gap: 16px;
}
.wl-brand {
  display: flex; align-items: center; gap: 10px; font: inherit; font-weight: 750; font-size: 20px;
  color: var(--text); background: none; border: 0; padding: 0; cursor: pointer;
}
.wl-tabs {
  position: relative; flex: 1; display: flex; gap: 2px; justify-content: center;
  overflow-x: auto; scrollbar-width: none;
}
.wl-tabs::-webkit-scrollbar { display: none; }
.wl-tab {
  position: relative; z-index: 1; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
  color: var(--text-2); background: none; border: 0; border-radius: 999px; padding: 9px 14px;
  transition: color 0.3s;
}
.wl-tab:hover { color: var(--text); }
.wl-tab[aria-current="page"] { color: var(--bg); }
/* Pastille qui glisse sous l'onglet actif (position posée par welcome.js) */
.wl-tab-ind {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), var(--teal));
  box-shadow: 0 6px 18px rgba(21, 216, 179, 0.3);
  transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1), width 0.45s cubic-bezier(0.3, 1.3, 0.5, 1);
}

/* Changement d'onglet : le panneau arrive en fondu */
.wl-panel-in { animation: wl-panel 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wl-panel-in .wl-hero *, .wl-panel-in .wl-preview { animation-delay: 0.05s !important; }
@keyframes wl-panel { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.wl-logo { width: 30px; height: auto; display: block; }

/* Héros */
.wl-hero {
  width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 72px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
}
.wl-kicker { color: var(--teal); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }
.wl-hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; margin: 14px 0 20px; }
.wl-hero h1 span { display: inline-block; animation: wl-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wl-hero h1 span:nth-child(1) { animation-delay: 0.75s; }
.wl-hero h1 span:nth-child(2) { animation-delay: 0.87s; }
.wl-hero h1 span:nth-child(3) { animation-delay: 0.99s; }
.wl-grad {
  background: linear-gradient(100deg, #fff 0%, var(--teal) 45%, var(--mint) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wl-lead, .wl-cta { animation: wl-up 0.8s 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wl-lead { color: var(--text-2); font-size: 18px; max-width: 34em; }
.wl-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.wl-cta .btn { min-height: 50px; padding: 12px 26px; font-size: 16px; }
@keyframes wl-up { from { opacity: 0; transform: translateY(28px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Fiche d'équipement d'exemple qui flotte */
.wl-preview {
  border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 18px;
  animation: wl-in 1s 1s cubic-bezier(0.2, 0.8, 0.2, 1) both, wl-float 7s 2s ease-in-out infinite;
}
@keyframes wl-in { from { opacity: 0; transform: perspective(900px) rotateY(-18deg) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes wl-float { 50% { transform: translateY(-10px); } }
.wl-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wl-preview-title { font-weight: 750; font-size: 18px; }
.wl-preview-sub { color: var(--text-3); font-size: 13px; }
.wl-pill { background: rgba(21, 216, 179, 0.16); color: var(--mint); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.wl-preview-body { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; }
.wl-qr { background: #fff; border-radius: 16px; padding: 8px; aspect-ratio: 1; }
.wl-qr svg { width: 100%; height: 100%; display: block; }
.wl-preview dl { margin: 0; display: grid; gap: 2px; font-size: 14px; }
.wl-preview dt { color: var(--text-3); font-size: 12px; }
.wl-preview dd { margin: 0 0 8px; font-weight: 600; }

/* Sections */
.wl-section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0; }
.wl-section h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.025em; margin-bottom: 28px; }
.wl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wl-grid-3 { grid-template-columns: repeat(3, 1fr); }
.wl-center { text-align: center; margin-top: 28px; }
.wl-more {
  font: inherit; font-weight: 650; color: var(--mint); background: none; border: 0; padding: 0;
  margin-top: 14px; cursor: pointer;
}
.wl-more:hover { text-decoration: underline; }
.wl-center .wl-more { font-size: 17px; }

/* En-tête d'une page détaillée */
.wl-detail-hero {
  width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.wl-detail-hero > * { animation: wl-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wl-detail-hero > :nth-child(2) { animation-delay: 0.06s; }
.wl-detail-hero > :nth-child(3) { animation-delay: 0.12s; }
.wl-detail-hero > :nth-child(4) { animation-delay: 0.18s; }
.wl-detail-hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -0.035em; margin: 12px 0 18px; }
.wl-icon-big { width: 64px; height: 64px; border-radius: 20px; font-size: 28px; margin-bottom: 18px; box-shadow: 0 12px 30px rgba(21, 216, 179, 0.3); }
.wl-group dl { margin: 18px 0 0; display: grid; gap: 4px; }
.wl-group dt { font-weight: 700; margin-top: 10px; }
.wl-group dd { margin: 0; color: var(--text-2); }
.wl-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wl-card { border-radius: 22px; padding: 24px; transition: transform 0.3s, border-color 0.3s; }
.wl-card:hover { transform: translateY(-4px); border-color: rgba(139, 187, 146, 0.5); }
.wl-card h3 { font-size: 18px; margin: 14px 0 8px; }
.wl-duo .wl-card h3 { margin-top: 0; }
.wl-card p { color: var(--text-2); }
.wl-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: var(--bg);
  background: linear-gradient(135deg, var(--mint), var(--teal));
}
.wl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wl-steps li { display: flex; gap: 14px; align-items: baseline; font-size: 17px; color: var(--text-2); }
.wl-steps strong { color: var(--text); }
.wl-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--teal); color: var(--teal); font-weight: 750;
}

.wl-final {
  width: min(760px, calc(100% - 32px)); margin: 56px auto 40px; border-radius: 30px; padding: 48px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.wl-final h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 0; }
.wl-final p { color: var(--text-2); margin-bottom: 8px; }
.wl-logo-big { width: 56px; }
.wl-foot { text-align: center; color: var(--text-3); font-size: 13px; padding: 24px 16px 40px; }

/* Apparition au défilement (classe .in posée par welcome.js) */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* Démarrage façon X : le logo recule, puis grossit très vite ; la page apparaît à travers lui. */
.wl-intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none;
  background: var(--bg); animation: wl-intro-bg 1.1s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
.wl-intro-logo { width: 96px; height: auto; animation: wl-intro-logo 1.1s forwards; }
@keyframes wl-intro-logo {
  0% { transform: scale(1); animation-timing-function: ease-out; }
  35% { transform: scale(0.82); animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0); }
  100% { transform: scale(40); opacity: 0; }
}
@keyframes wl-intro-bg { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 1000px) {
  /* Onglets sur une seconde ligne, défilables du doigt */
  .wl-top { flex-wrap: wrap; row-gap: 8px; }
  .wl-top > .btn { margin-left: auto; }
  .wl-tabs { order: 3; flex-basis: 100%; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .wl-hero { grid-template-columns: 1fr; padding-top: 24px; gap: 36px; }
  .wl-grid, .wl-grid-3 { grid-template-columns: 1fr 1fr; }
  .wl-detail-hero { padding-top: 40px; }
}
@media (max-width: 600px) {
  .wl-grid, .wl-grid-3, .wl-duo, .wl-steps { grid-template-columns: 1fr; }
  .wl-preview-body { grid-template-columns: 96px 1fr; }
  .wl-cta .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-intro { display: none; }
  .wl-halos span, .wl-hero h1 span, .wl-lead, .wl-cta, .wl-preview, .wl-detail-hero > *, .wl-panel-in { animation: none; }
  .wl-tab-ind { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wl-card { transition: none; }
}
