/* Ajouts communs des pages V2 : fenêtre « Soutiens Vantage RP » (sondages), bandeau cookies,
   tutoriel d'installation de l'appli. Chargé après v2.css (jetons :root). Règles : DESIGN.md. */

@keyframes x-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes x-up { from { transform: translateY(100%); } to { transform: none; } }

/* ── Fenêtre « Soutiens Vantage RP » : une action (sondage, tâche) débloque la journée ── */
.sg-v2 { position: fixed; inset: 0; z-index: 99990; align-items: center; justify-content: center; padding: 1rem; font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; }
.sg-v2 .sg-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sg-v2 .sg-card { position: relative; width: min(26rem, 100%); background: var(--tile); border-radius: var(--r-tile); padding: 1.75rem 1.5rem 1.5rem; text-align: center; animation: x-in 240ms var(--ease-out); }
.sg-v2 .sg-ico { width: 3rem; height: 3rem; margin: 0 auto .875rem; display: grid; place-items: center; border-radius: 50%; background: rgba(139,92,246,.14); color: var(--violet-hi); }
.sg-v2 .sg-ico svg { width: 1.5rem; height: 1.5rem; }
.sg-v2 h2 { font-size: 1.375rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; margin: 0 0 .5rem; }
.sg-v2 p { color: var(--text-2); font-size: .9375rem; line-height: 1.47; letter-spacing: -.01em; margin: 0 0 1.25rem; }
.sg-v2 p b { color: var(--text); font-weight: 600; }
.sg-v2 .sg-link { display: block; margin-top: .875rem; color: var(--violet-hi); font-size: .9375rem; }
.sg-v2 .sg-status { min-height: 1.25rem; margin: .875rem 0 0; font-size: .875rem; }
/* « Continuer sans soutenir » (21/10/2026) : sortie discrète, active après 10 s */
.sg-v2 .sg-skip { display: block; width: 100%; min-height: 2.75rem; margin-top: .25rem; padding: .5rem; background: none; border: 0; color: var(--text-2); font: inherit; font-size: .875rem; cursor: pointer; }
.sg-v2 .sg-skip:disabled { color: var(--muted); cursor: default; }
.sg-v2 .sg-note { margin-top: 1rem; padding: .875rem 1rem; border-radius: var(--r-card); background: rgba(245,165,36,.10); text-align: left; display: grid; gap: .375rem; font-size: .8125rem; line-height: 1.45; color: var(--text-2); }
.sg-v2 .sg-note b { color: var(--amber); font-weight: 600; }
.sg-v2 .sg-note .btn { justify-self: start; margin-top: .25rem; }
.sg-wall { position: fixed; inset: 0; z-index: 99995; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font); }
.sg-wall-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; padding-top: calc(.75rem + env(safe-area-inset-top, 0px)); background: var(--tile); font-weight: 600; font-size: .9375rem; }
.sg-wall-body { flex: 1; overflow: auto; padding: .75rem; padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }
.sg-wall-body #twWallFrame, .sg-wall-body #fullscreen { max-width: 60rem; margin: 0 auto; }
.sg-wall-body .sg-status { text-align: center; color: var(--violet-hi); font-size: .875rem; margin-top: .875rem; }

/* ── Bandeau cookies (CMP de l'ancien panel) aux couleurs de la V2 ── */
#imp-cmp, #imp-cmp *, #imp-cmp-modal, #imp-cmp-modal * { font-family: var(--font) !important; }
#imp-cmp .imp-cmp-card, #imp-cmp-modal .imp-cmp-modal-card { background: var(--tile) !important; border: 0 !important; border-radius: var(--r-card) !important; color: var(--text) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 16px 48px rgba(0,0,0,.55) !important; }
#imp-cmp .imp-cmp-title, #imp-cmp-modal .imp-cmp-category-name { color: var(--text) !important; font-weight: 600 !important; letter-spacing: -.01em; }
#imp-cmp .imp-cmp-text, #imp-cmp-modal .imp-cmp-category-desc { color: var(--text-2) !important; }
#imp-cmp .imp-cmp-link, #imp-cmp-modal .imp-cmp-link { color: var(--violet-hi) !important; }
#imp-cmp .imp-cmp-btn, #imp-cmp-modal .imp-cmp-btn { border: 0 !important; border-radius: var(--pill) !important; font-weight: 500 !important; min-height: 2.75rem; transition: transform 160ms var(--ease-out) !important; }
#imp-cmp .imp-cmp-btn:active, #imp-cmp-modal .imp-cmp-btn:active { transform: scale(.97); }
#imp-cmp .imp-cmp-btn-accept, #imp-cmp-modal .imp-cmp-btn-accept { background: var(--violet) !important; color: #fff !important; }
#imp-cmp .imp-cmp-btn-deny, #imp-cmp .imp-cmp-btn-ghost, #imp-cmp-modal .imp-cmp-btn-deny, #imp-cmp-modal .imp-cmp-btn-ghost { background: var(--tile-2) !important; color: var(--text) !important; }
#imp-cmp-modal .imp-cmp-modal-backdrop { background: rgba(0,0,0,.55) !important; -webkit-backdrop-filter: blur(4px) !important; backdrop-filter: blur(4px) !important; }

/* ── Tutoriel d'installation de l'appli (vidéo) ── */
/* Au-dessus du bandeau cookies (z-index max - 1) : il réapparaît à la fermeture du tuto */
.pwa-tuto { position: fixed; inset: 0; z-index: 2147483647; display: flex; align-items: center; justify-content: center; padding: 1rem; font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; }
.pwa-tuto[hidden] { display: none; }
.pwa-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pwa-card { position: relative; width: min(24rem, 100%); max-height: calc(100svh - 2rem); overflow: auto; overscroll-behavior: contain; background: var(--tile); border-radius: var(--r-tile); animation: x-in 280ms var(--ease-out); }
.pwa-tuto.pc .pwa-card { width: min(42rem, 100%); }
.pwa-video { position: relative; background: #000; display: flex; justify-content: center; height: min(58svh, calc(min(24rem, 100vw - 2rem) * 16 / 9)); }
.pwa-tuto.pc .pwa-video { height: auto; aspect-ratio: 16 / 9; }
.pwa-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pwa-body { padding: 1.25rem 1.5rem 1.5rem; display: grid; gap: .625rem; text-align: center; }
.pwa-kicker { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--violet-hi); }
.pwa-body h2 { margin: 0; font-size: 1.375rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.pwa-text { margin: 0 0 .375rem; color: var(--text-2); font-size: .9375rem; line-height: 1.47; letter-spacing: -.01em; }
.pwa-note { padding: .875rem 1rem; border-radius: var(--r-card); background: rgba(245,165,36,.10); text-align: left; display: grid; gap: .5rem; font-size: .8125rem; line-height: 1.45; color: var(--text-2); }
.pwa-note[hidden] { display: none; }
.pwa-note b { color: var(--amber); font-weight: 600; }
.pwa-note .btn { justify-self: start; }
.pwa-x { position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; transition: transform 160ms var(--ease-out); }
.pwa-x::before, .pwa-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: .875rem; height: 1.5px; background: currentColor; border-radius: 1px; transform: translate(-50%, -50%) rotate(45deg); }
.pwa-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.pwa-x:active { transform: scale(.94); }
.pwa-replay { position: absolute; left: 50%; bottom: .75rem; transform: translateX(-50%); }
.pwa-replay[hidden] { display: none; }
@media (max-width: 734px) {
  .pwa-tuto:not(.pc) { align-items: flex-end; padding: 0; }
  .pwa-tuto:not(.pc) .pwa-card { width: 100%; border-radius: var(--r-tile) var(--r-tile) 0 0; max-height: 96svh; animation: x-up 320ms var(--ease-drawer); }
  .pwa-tuto:not(.pc) .pwa-body { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
  .pwa-tuto:not(.pc) .pwa-video { height: min(58svh, calc(100vw * 16 / 9)); }
}
@media (pointer: coarse) { .pwa-x { width: 2.75rem; height: 2.75rem; } }
@media (prefers-reduced-motion: reduce) {
  .sg-v2 .sg-card, .pwa-card, .pwa-tuto:not(.pc) .pwa-card { animation: none; }
}
