/* ===========================================================================
   Launcher OnBouge v2 — écran type téléphone, crème premium + vert OnBouge.
   Règle : léger, zéro framework, zéro image obligatoire (emoji de repli).
   =========================================================================== */
:root {
  --green: #0d9668; --green-dark: #065f46; --bleu: #13315c;
  --creme: #faf6ee; --papier: #f3ecdd; --line: #e5dcc8;
  --ink: #1f2937; --muted: #6b7280;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--creme); color: var(--ink);
  min-height: 100dvh; padding-bottom: 76px;
}

/* ——— Header ——— */
.v2-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; }
.v2-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--bleu); font-size: 17px; }
.v2-brand img { border-radius: 8px; }
.v2-compte { border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; }

/* ——— Carrousel « à la une » ——— */
#v2-carrousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 4px; scrollbar-width: none; }
#v2-carrousel::-webkit-scrollbar { display: none; }
.v2-feat {
  flex: 0 0 78%; max-width: 320px; scroll-snap-align: start;
  background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff;
  border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  border: 0; text-align: left; cursor: pointer; font-family: inherit;
}
.v2-feat .fi { font-size: 30px; flex: none; width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.v2-feat .fi img { width: 100%; height: 100%; object-fit: contain; }
.v2-feat b { display: block; font-size: 15.5px; }
.v2-feat small { display: block; font-size: 12px; opacity: .92; line-height: 1.35; margin-top: 2px; }

/* ——— Pages d'icônes (balayage horizontal, comme un téléphone) ——— */
#v2-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
#v2-pages::-webkit-scrollbar { display: none; }
.v2-page { flex: 0 0 100%; scroll-snap-align: start; padding: 14px 14px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; align-content: start; min-height: 264px; }
.v2-app { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.v2-app .ic {
  width: 58px; height: 58px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(19,49,92,.08);
  display: flex; align-items: center; justify-content: center; font-size: 27px; overflow: hidden;
}
.v2-app .ic img { width: 100%; height: 100%; object-fit: contain; }
.v2-app small { font-size: 11px; color: var(--ink); font-weight: 600; line-height: 1.15; text-align: center; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-app .lock { position: absolute; top: -4px; right: 6px; font-size: 13px; background: #fff; border-radius: 999px; padding: 1px 3px; border: 1px solid var(--line); line-height: 1; }
.v2-app.is-add .ic { background: var(--papier); border-style: dashed; color: var(--green-dark); }

#v2-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 4px; }
#v2-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line); }
#v2-dots i.on { background: var(--green); }

/* ——— Dock ——— */
.v2-dock {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.v2-dock button { flex: 1; border: 0; background: none; font-family: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); }
.v2-dock button span { font-size: 20px; }
.v2-dock button small { font-size: 10.5px; font-weight: 600; }
.v2-dock button.on { color: var(--green-dark); }

/* ——— Bottom sheet (store / compte / recherche / disclaimer) ——— */
.v2-sheet { position: fixed; inset: 0; z-index: 50; }
.v2-sheet-bg { position: absolute; inset: 0; background: rgba(19,49,92,.45); }
.v2-sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 82dvh; overflow-y: auto;
  background: var(--creme); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.v2-sheet-x { position: sticky; top: 0; float: right; border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 30px; height: 30px; cursor: pointer; }
.v2-h { font-size: 17px; font-weight: 800; color: var(--bleu); margin: 4px 0 2px; }
.v2-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.4; }
.v2-cat { font-size: 12px; font-weight: 800; color: var(--green-dark); letter-spacing: .03em; margin: 14px 0 6px; text-transform: uppercase; }
.v2-row { display: flex; align-items: center; gap: 11px; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px; margin-bottom: 8px; }
.v2-row .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--papier); display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; }
.v2-row .ic img { width: 100%; height: 100%; object-fit: contain; }
.v2-row .tx { min-width: 0; flex: 1; }
.v2-row .tx b { display: block; font-size: 14px; color: var(--bleu); }
.v2-row .tx small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.v2-row .act { flex: none; border-radius: 999px; border: 1.5px solid var(--green); background: none; color: var(--green-dark); font-weight: 700; font-size: 12px; padding: 6px 12px; cursor: pointer; font-family: inherit; }
.v2-row .act.on { background: var(--green); color: #fff; }
.v2-row .act[disabled] { opacity: .45; cursor: default; }

/* ——— Formulaires (compte) + divers ——— */
.v2-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.v2-form input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff; }
.v2-btn { background: var(--green); color: #fff; border: 0; border-radius: 999px; padding: 11px 16px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; }
.v2-btn.ghost { background: none; border: 1.5px solid var(--green); color: var(--green-dark); }
.v2-out { font-size: 12.5px; font-weight: 600; color: #b45309; min-height: 16px; }
.v2-legal { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 14px; }
.v2-legal a { color: var(--green-dark); }
.v2-disc { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #7c2d12; line-height: 1.5; margin: 8px 0 12px; }

.v2-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; background: var(--bleu); color: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; z-index: 60; max-width: 88vw; text-align: center; }

@media (min-width: 480px) { .v2-page { grid-template-columns: repeat(5, 1fr); } }

.v2-pwwrap { position: relative; }
.v2-pwwrap input { width: 100%; padding-right: 44px; }
.v2-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 17px; cursor: pointer; padding: 6px; line-height: 1; }

/* 🎬 Ouverture video Palmi */
#ob-intro { position: fixed; inset: 0; z-index: 999; background: #0d2137; display: flex; align-items: center; justify-content: center; transition: opacity .45s; }
#ob-intro.out { opacity: 0; pointer-events: none; }
#ob-intro video { width: 100%; height: 100%; object-fit: contain; }
#ob-intro-skip { position: absolute; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); color: #13315c; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); }

/* 📷 FAB caméra intelligente */
#v2-fab-cam { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 45; width: 58px; height: 58px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #0d9668, #065f46); color: #fff; font-size: 26px; cursor: pointer; box-shadow: 0 8px 22px rgba(6, 95, 70, .45); }
#v2-fab-cam:active { transform: scale(.94); }
