/* PIAM360 — installation de l'application, guide, bannière cookies */

/* ---- Bannière cookies ---- */
.cc-banner {
  position: fixed; z-index: 300; left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 18px 18px 16px; animation: cc-in .28s var(--ease);
}
@keyframes cc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cc-title { display: block; font-size: 1rem; margin-bottom: 6px; }
.cc-text { margin: 0 0 14px; font-size: .86rem; line-height: 1.55; color: var(--ink-2); }
.cc-text a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-actions .btn { flex: 1 1 auto; justify-content: center; }
.cc-details { display: grid; gap: 8px; margin-bottom: 14px; }
.cc-details[hidden] { display: none; }
.cc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); cursor: pointer; }
.cc-row b { display: block; font-size: .9rem; }
.cc-row small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.45; margin-top: 2px; }
.cc-row input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--accent); }
@media (max-width: 900px) {
  body:has(.bottom-nav) .cc-banner, body:has(.bottom-nav) .pw-banner { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .cc-banner { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); }
}

/* ---- Invitation à installer ---- */
.pw-banner {
  position: fixed; z-index: 290; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px));
  display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; align-items: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 14px; animation: cc-in .28s var(--ease);
}
.pw-banner img { width: 44px; height: 44px; border-radius: 11px; }
.pw-banner-txt strong { display: block; font-size: .95rem; }
.pw-banner-txt span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.pw-banner-act { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 520px) {
  .pw-banner { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); }
}

/* ---- Guide pas à pas (fenêtre) ---- */
.pw-modal-back { position: fixed; inset: 0; z-index: 400; background: rgba(8, 15, 28, .62); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.pw-modal { position: relative; width: min(440px, 100%); background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px 24px 22px; max-height: 92vh; overflow-y: auto; }
.pw-modal h2 { font-size: 1.25rem; margin: 10px 0 4px; }
.pw-modal-icon { width: 64px; height: 64px; border-radius: 16px; display: block; }
.pw-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 10px; }
.pw-x:hover { background: var(--surface-2); color: var(--ink); }
.pw-muted { color: var(--muted); margin: 0 0 14px; font-size: .9rem; }
.pw-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.pw-steps { list-style: none; counter-reset: pw; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.pw-steps li { counter-increment: pw; display: flex; gap: 12px; align-items: flex-start; }
.pw-steps li::before {
  content: counter(pw); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .85rem;
}
.pw-steps li > span { padding-top: 3px; line-height: 1.55; color: var(--ink-2); }
.pw-steps svg { vertical-align: -3px; color: var(--accent); }

/* ---- Page /installer ---- */
.pw-hero {
  max-width: 760px; margin: 0 auto 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.pw-hero-icon { width: 84px; height: 84px; border-radius: 20px; flex: none; }
.pw-hero-txt { flex: 1 1 220px; display: grid; gap: 2px; }
.pw-hero-txt strong { font-size: 1.05rem; }
.pw-hero-txt span { color: var(--muted); font-size: .9rem; }
.pw-tabs { max-width: 760px; margin: 0 auto 18px; display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.pw-tab { flex: 1; border: 0; background: transparent; padding: 10px 8px; border-radius: 10px; font: inherit; font-weight: 650; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.pw-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.pw-panels { max-width: 760px; margin: 0 auto; }
.pw-panel { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.pw-panel[hidden] { display: none; }
.pw-panel h2 { font-size: 1.15rem; margin: 0 0 8px; }
.pw-panel .muted { margin: 8px 0 0; font-size: .88rem; }
.pw-glyph { display: inline-flex; vertical-align: middle; color: var(--accent); }
.pw-why { margin-top: 40px; }

@media (prefers-reduced-motion: reduce) { .cc-banner, .pw-banner { animation: none; } }
