/* Page /giveaways. Ne surcharge pas marges/transform de .content-grid (gere par js/sidebar/sidebar.js). */
.gw {
  --gw-bg: #0b0d2a; --gw-card: #141739; --gw-card2: #1a1e4a; --gw-line: rgba(255,255,255,.08);
  --gw-violet: #7c3aed; --gw-violet2: #a855f7; --gw-gold: #f5c542; --gw-blue: #3b82f6; --gw-cyan: #22d3ee;
  --gw-text: #eef1ff; --gw-muted: #a3a9d6;
  color: var(--gw-text); background: var(--gw-bg); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 14px;
}
.gw *, .gwpm * { box-sizing: border-box; }

/* Banniere */
.gw-hero { position: relative; overflow: hidden; border-radius: 16px; min-height: 190px; display: flex; align-items: center; padding: 22px 26px;
  background: linear-gradient(120deg, #1b1f5e 0%, #2a1a6b 45%, #0f2a5a 100%); border: 1px solid rgba(168,85,247,.35); }
.gw-hero--winter { background: radial-gradient(ellipse at 70% 120%, rgba(34,211,238,.25), transparent 60%), linear-gradient(120deg, #141a52 0%, #2b1670 50%, #0d2d63 100%); }
.gw-hero-sky { position: absolute; inset: 0; pointer-events: none; }
.gw-aurora { position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(ellipse at 30% 40%, rgba(168,85,247,.35), transparent 55%), radial-gradient(ellipse at 75% 30%, rgba(34,211,238,.22), transparent 55%); }
.gw-hero--winter .gw-snow { position: absolute; inset: 0; opacity: .6;
  background-image: radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 30% 70%, #fff 50%, transparent), radial-gradient(2px 2px at 55% 35%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 80% 15%, #fff 50%, transparent), radial-gradient(2px 2px at 92% 60%, #fff 50%, transparent), radial-gradient(1px 1px at 45% 85%, #fff 50%, transparent);
  background-size: 300px 200px; animation: gw-snow 14s linear infinite; }
@keyframes gw-snow { to { background-position: 40px 200px; } }
.gw-hero-text { position: relative; z-index: 2; max-width: 52%; }
.gw-hero-crown { display: block; width: 52px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 0 12px rgba(245,197,66,.6)); }
.gw-hero-title { margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 900; line-height: 1; letter-spacing: .5px;
  background: linear-gradient(180deg, #fff, #d9ccff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 4px 24px rgba(168,85,247,.45); }
.gw-hero-sub { margin: 8px 0 0; color: #dfe4ff; font-weight: 700; font-size: 1.05rem; }
.gw-hero-art { position: absolute; right: 0; bottom: 0; top: 0; width: 55%; z-index: 1; pointer-events: none; }
.gw-hero-char { position: absolute; bottom: -6px; height: 88%; width: auto; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
.gw-hero-char--c { right: 30%; height: 98%; z-index: 2; }
.gw-hero-char--l { right: 54%; height: 76%; }
.gw-hero-char--r { right: 4%; height: 80%; }
.gw-hero-gift { position: absolute; bottom: 4px; width: 70px; z-index: 3; }
.gw-hero-gift--a { right: 22%; }
.gw-hero-gift--b { right: 0; width: 54px; }

/* Stats */
.gw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gw-stat { background: var(--gw-card); border: 1px solid var(--gw-line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.gw-stat-val { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.gw-stat-lbl { color: var(--gw-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.gw-stat--all { border-color: rgba(168,85,247,.45); } .gw-stat--all .gw-stat-val { color: var(--gw-violet2); }
.gw-stat--premium { border-color: rgba(245,197,66,.45); } .gw-stat--premium .gw-stat-val { color: var(--gw-gold); }
.gw-stat--public { border-color: rgba(59,130,246,.45); } .gw-stat--public .gw-stat-val { color: #60a5fa; }
.gw-stat--users { border-color: rgba(34,211,238,.35); } .gw-stat--users .gw-stat-val { color: #fff; text-shadow: 0 0 14px rgba(59,130,246,.7); }

/* Filtres */
.gw-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gw-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-tab { width: auto; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--gw-line); background: var(--gw-card); color: var(--gw-muted); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: .85rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.gw-tab:hover { color: #fff; }
.gw-tab.is-active { color: #fff; background: linear-gradient(135deg, var(--gw-violet), var(--gw-violet2)); border-color: transparent; }
.gw-tab--premium.is-active { background: linear-gradient(135deg, #b8860b, var(--gw-gold)); color: #241a00; }
.gw-tab--public.is-active { background: linear-gradient(135deg, var(--gw-blue), var(--gw-cyan)); }
.gw-tab-n { opacity: .8; }
.gw-sort { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--gw-muted); font-weight: 700; font-size: .85rem; }
.gw-sort select { appearance: none; -webkit-appearance: none; background: var(--gw-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a855f7' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center / 12px 8px;
  color: #fff; border: 1px solid rgba(168,85,247,.4); border-radius: 10px; padding: 7px 32px 7px 12px; font-weight: 700; height: auto; width: auto; }

/* Grille + cartes */
.gw-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gw-card { position: relative; display: flex; flex-direction: column; background: var(--gw-card); border-radius: 16px; overflow: hidden; border: 2px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, opacity .35s ease; }
.gw-card.is-entering { opacity: 0; transform: translateY(8px); }
.gw-card--free { border-color: rgba(59,130,246,.65); box-shadow: 0 0 0 1px rgba(34,211,238,.12) inset; }
.gw-card--premium { border-color: rgba(245,197,66,.8); box-shadow: 0 0 22px rgba(245,197,66,.18); }
.gw-card--free:hover, .gw-card--free:focus-within { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(34,211,238,.25); }
.gw-card--premium:hover, .gw-card--premium:focus-within { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(245,197,66,.35); }
.gw-card-media { position: relative; display: block; aspect-ratio: 16 / 10; background: radial-gradient(circle at 50% 60%, #2a2f72, #10133a); }
.gw-card--premium .gw-card-media { background: radial-gradient(circle at 50% 60%, #4a3a12, #15122e); }
.gw-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.gw-state { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 900; text-transform: uppercase; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(4px); }
.gw-state--live { background: rgba(34,197,94,.9); }
.gw-state--upcoming { background: rgba(59,130,246,.9); }
.gw-state--ended { background: rgba(100,116,139,.9); }
.gw-state--full { background: rgba(239,68,68,.9); }
.gw-state--entered { background: linear-gradient(135deg, var(--gw-violet), var(--gw-violet2)); }
.gw-card-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.gw-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.gw-badge svg { width: 13px; height: 13px; }
.gw-badge--free { background: rgba(59,130,246,.18); color: #93c5fd; border: 1px solid rgba(59,130,246,.45); }
.gw-badge--open { background: rgba(34,211,238,.12); color: var(--gw-cyan); border: 1px solid rgba(34,211,238,.35); }
.gw-badge--premium { background: linear-gradient(135deg, #b8860b, var(--gw-gold)); color: #241a00; }
.gw-badge--members { background: rgba(245,197,66,.12); color: var(--gw-gold); border: 1px solid rgba(245,197,66,.4); }
.gw-crown-anim { animation: gw-crown 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes gw-crown { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-8deg) translateY(-1px); } }
.gw-card-title { margin: 0; font-size: 1.05rem; font-weight: 900; line-height: 1.25; }
.gw-card-title a { color: #fff; text-decoration: none; }
.gw-card-title a:hover { color: var(--gw-cyan); }
.gw-card--premium .gw-card-title a:hover { color: var(--gw-gold); }
.gw-card-reward { margin: 0; color: var(--gw-muted); font-size: .85rem; font-weight: 600; }
.gw-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }
.gw-meta div { display: flex; flex-direction: column; }
.gw-meta dt { color: var(--gw-muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.gw-meta dd { margin: 0; font-weight: 900; }
.gw-time { margin: 0; font-size: .85rem; color: var(--gw-muted); }
.gw-time strong { color: #fff; font-variant-numeric: tabular-nums; }
.gw-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: auto; }
.gw-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border-radius: 10px; font-weight: 900; font-size: .9rem; border: 0; cursor: pointer; text-decoration: none; transition: filter .2s, transform .15s, opacity .2s; }
.gw-btn--ghost { background: transparent; border: 1px solid var(--gw-line); color: #fff; }
.gw-btn--ghost:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.gw-btn--primary { background: linear-gradient(135deg, var(--gw-blue), var(--gw-cyan)); color: #fff; }
.gw-btn--gold { background: linear-gradient(135deg, #d99a1e, var(--gw-gold)); color: #241a00; }
.gw-btn:not([disabled]):hover { filter: brightness(1.1); }
.gw-btn[disabled] { opacity: .5; cursor: not-allowed; }
.gw-btn.is-entered { background: rgba(124,58,237,.25); color: #e9d5ff; opacity: 1; }
.gw-btn.is-loading { opacity: .7; cursor: progress; }
.gw a:focus-visible, .gw button:focus-visible, .gw select:focus-visible, .gwpm a:focus-visible, .gwpm button:focus-visible { outline: 2px solid var(--gw-cyan, #22d3ee); outline-offset: 2px; }

/* Skeleton */
.gw-skel { border-color: var(--gw-line); }
.gw-skel-media { aspect-ratio: 16 / 10; }
.gw-skel-media, .gw-skel i { background: linear-gradient(90deg, #1a1e4a 0%, #262b63 50%, #1a1e4a 100%); background-size: 200% 100%; animation: gw-shimmer 1.2s linear infinite; }
.gw-skel i { display: block; height: 12px; border-radius: 6px; }
.gw-skel i.s { width: 55%; }
@keyframes gw-shimmer { to { background-position: -200% 0; } }

/* Vide + plus */
.gw-empty { text-align: center; padding: 28px 12px; background: var(--gw-card); border: 1px dashed rgba(168,85,247,.35); border-radius: 16px; }
.gw-empty h2 { margin: 10px 0 4px; font-size: 1.15rem; color: #fff; }
.gw-empty p { margin: 0; color: var(--gw-muted); }
.gw-more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.gw-more { display: inline-flex; gap: 8px; align-items: center; padding: 11px 26px; border: 0; border-radius: 999px; font-weight: 900; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--gw-violet), var(--gw-violet2)); box-shadow: 0 0 22px rgba(168,85,247,.55); transition: transform .2s, box-shadow .2s; }
.gw-more:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(168,85,247,.75); }
.gw-more span { transition: transform .2s; } .gw-more:hover span { transform: translateX(4px); }
.gw-more[hidden], .gw-empty[hidden], .gwpm[hidden] { display: none; }

/* Toasts */
.gw-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100002; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.gw-toast { pointer-events: auto; background: #141739; color: #fff; border-left: 4px solid #3b82f6; border-radius: 10px; padding: 10px 14px; font-weight: 700; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: gw-in .25s ease; transition: opacity .3s, transform .3s; max-width: 320px; }
.gw-toast--success { border-left-color: #22c55e; } .gw-toast--error { border-left-color: #ef4444; }
.gw-toast.is-out { opacity: 0; transform: translateY(6px); }
@keyframes gw-in { from { opacity: 0; transform: translateY(8px); } }

/* Popup Premium */
html.gw-modal-open { overflow: hidden; }
.gwpm { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gwpm-backdrop { position: absolute; inset: 0; background: rgba(4,6,24,.75); backdrop-filter: blur(3px); }
.gwpm-dialog { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow: auto; text-align: center; color: #eef1ff; padding: 26px 22px 20px;
  background: radial-gradient(ellipse at 50% 0, rgba(245,197,66,.16), transparent 60%), #0e1240; border: 2px solid #f5c542; border-radius: 20px; box-shadow: 0 0 40px rgba(245,197,66,.3); animation: gw-in .25s ease; }
.gwpm-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #a3a9d6; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.gwpm-crown { width: 58px; height: auto; margin: -6px auto 6px; display: block; filter: drop-shadow(0 0 14px rgba(245,197,66,.7)); }
.gwpm-illu { width: 140px; height: 110px; margin: 0 auto 10px; border-radius: 14px; background: radial-gradient(circle, #3a2f12, #15122e); border: 1px solid rgba(245,197,66,.4); }
.gwpm-illu img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.gwpm-title { margin: 0 0 4px; font-size: 1.25rem; font-weight: 900; color: #f5c542; }
.gwpm-gtitle { margin: 0 0 8px; color: #fff; font-weight: 700; font-size: .9rem; }
.gwpm-gtitle:empty { display: none; }
.gwpm-text { margin: 0 0 10px; color: #c7cbef; font-size: .92rem; }
.gwpm-price { margin: 0 0 14px; color: #a3a9d6; } .gwpm-price strong { font-size: 1.8rem; color: #fff; }
.gwpm-cta { display: block; padding: 12px; border-radius: 12px; font-weight: 900; color: #241a00; text-decoration: none; background: linear-gradient(135deg, #d99a1e, #f5c542); box-shadow: 0 0 20px rgba(245,197,66,.4); }
.gwpm-cta:hover { color: #241a00; filter: brightness(1.08); }
.gwpm-free { margin-top: 8px; width: 100%; padding: 10px; background: none; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; color: #c7cbef; font-weight: 800; cursor: pointer; }

/* Responsive */
@media (max-width: 1100px) { .gw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .gw { padding: 10px; }
  .gw-stats { grid-template-columns: repeat(2, 1fr); }
  .gw-hero { min-height: 230px; align-items: flex-start; padding: 16px; }
  .gw-hero-text { max-width: 100%; }
  .gw-hero-art { width: 100%; top: 40%; }
  .gw-hero-char--l { right: 60%; } .gw-hero-char--c { right: 32%; }
  .gw-toolbar { flex-direction: column; align-items: stretch; }
  .gw-sort select { flex: 1; }
}
@media (max-width: 560px) { .gw-cards { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .gw *, .gwpm *, .gw-toast { animation: none !important; transition: none !important; }
  .gw-card:hover, .gw-card:focus-within, .gw-more:hover { transform: none; }
}

/* Espace sous l en-tete : le theme reserve 112px alors que la grille commence deja sous la topbar. Seul padding-top est ajuste. */
.content-grid.gw-grid-wrap{padding-top:24px}
@media screen and (max-width:680px){.content-grid.gw-grid-wrap{padding-top:16px}}
