/* ==========================================================================
   GeForce : thème sombre sobre. Noir légèrement violet, un seul accent, surfaces plates,
   bordures fines, typographie serrée. Quelques détails à la Uiverse (champs à label flottant,
   interrupteurs, cartes à reflet, bouton d'envoi animé), sans effets inutiles.
   Responsive : mobile d'abord (téléphone, tablette, PC), barre d'onglets en bas sous 900 px,
   zones tactiles de 44 px, safe-area iOS, unités dvh/lvh avec repli.
   ========================================================================== */

@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #050816;
  --surface: #0b1226;
  --surface-2: #111b36;
  --line: rgba(160, 190, 255, .1);
  --line-2: rgba(160, 190, 255, .19);
  --text: #eef3ff;
  --muted: #9aa8c7;
  --dim: #7d8ab0;                 /* contraste AA (>= 4,5:1) sur --bg, --surface et --surface-2 */
  --accent: #3b82ff;              /* bleu du logo */
  --accent-2: #9cc2ff;
  --accent-ink: #041330;
  --fx: 91, 152, 255;             /* couleur des particules (r, g, b) */
  --red: #ff4d5e;                 /* touches de Noël */
  --green: #34d399;
  --ok: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --gold: #ffcc5c;
  --danger-bg: #cf2e3d;           /* fond des pastilles rouges : texte blanc a 5:1 (AA) */
  --bg-grad: linear-gradient(180deg, #070c22 0%, #050816 60%);
  --r: 16px;
  --r-lg: 20px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 60px;
  --gutter: clamp(16px, 4vw, 32px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; scrollbar-color: #1d2a4d transparent; background: var(--bg); }
body {
  margin: 0; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  color: var(--text); /* le fond est sur <html> : un fond sur <body> recouvrirait les particules */
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Texte réservé aux lecteurs d'écran (utilitaire global) */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
::selection { background: rgba(59, 130, 255, .35); }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { overflow-wrap: break-word; }

/* ---------- Fond : lueur discrète + particules ---------- */
.bg-glow { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(900px 480px at 50% -8%, rgba(59, 130, 255, .2), transparent 70%), radial-gradient(700px 420px at 100% 100%, rgba(59, 130, 255, .07), transparent 70%), var(--bg-grad); }
.fx { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.fx.is-ready { opacity: 1; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- Typo ---------- */
.display { font-size: clamp(2.2rem, 1.1rem + 4.6vw, 4rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 750; margin: 0 0 1.1rem; text-wrap: balance; }
.h1 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 750; margin: 0 0 .7rem; text-wrap: balance; }
.h2 { font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.9rem); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 0 0 .5rem; text-wrap: balance; }
em { font-style: normal; color: var(--accent-2); }
.lede { color: var(--muted); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); max-width: 54ch; margin: 0 0 1.6rem; }
.muted { color: var(--muted); margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem; color: var(--accent-2); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* ---------- Mise en page ---------- */
.page { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: calc(var(--nav-h) + var(--safe-t) + clamp(24px, 5vw, 56px)) var(--gutter) calc(clamp(48px, 8vw, 90px) + var(--safe-b)); }
main { display: block; min-width: 0; }
.page-head { margin-bottom: clamp(1.4rem, 4vw, 2.4rem); }
.section { margin-top: clamp(3rem, 8vw, 5.5rem); }
.section-head { margin-bottom: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.empty { padding: 2rem; text-align: center; color: var(--muted); }

/* ---------- Navigation ---------- */
.nav { position: fixed; z-index: 40; top: 0; left: 0; right: 0; padding-top: var(--safe-t); view-transition-name: nav; }
.nav-in { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); height: var(--nav-h); display: flex; align-items: center; gap: 20px; }
/* Le flou est sur un pseudo-élément : un backdrop-filter sur le parent casserait la barre d'onglets fixe du mobile. */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(5, 8, 22, .74); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.02em; font-size: 1.05rem; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(160, 190, 255, .2), 0 6px 18px -6px rgba(59, 130, 255, .6); }
.tabs { display: flex; gap: 2px; margin: 0 auto 0 12px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .93rem; transition: color .2s, background .2s; }
.tab svg { display: none; width: 22px; height: 22px; }
.tab.is-active { color: var(--text); }
.tab.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chip { display: inline-flex; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; border: 1px solid var(--line-2); color: var(--muted); }
.chip-admin { color: var(--gold); border-color: rgba(250, 204, 21, .35); }
.menu { position: relative; }
.who { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; min-height: 36px; }
.who::-webkit-details-marker { display: none; }
.who .member-avatar-nav { width: 28px; height: 28px; }
.notification-menu { position: relative; }
.notification-trigger { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; list-style: none; color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.notification-trigger::-webkit-details-marker { display: none; }
.notification-trigger:hover, .notification-menu[open] .notification-trigger { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.07); }
.notification-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-count { position: absolute; top: -5px; right: -7px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid #080b19; border-radius: 999px; background: var(--danger-bg); color: #fff; font-size: .65rem; line-height: 1; font-weight: 800; }
.notification-pop { position: absolute; z-index: 45; top: calc(100% + 10px); right: 0; width: min(390px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 14px; background: var(--surface-2); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.notification-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 11px; border-bottom: 1px solid var(--line); }
.notification-heading h2 { margin: 0; font-size: 1rem; }
.notification-mark-all, .notification-mark-read { border: 0; padding: 5px 7px; border-radius: 7px; background: transparent; color: var(--accent-2); font: inherit; font-size: .75rem; cursor: pointer; white-space: nowrap; }
.notification-mark-all:hover, .notification-mark-read:hover { background: rgba(255,255,255,.06); }
.notification-mark-all:disabled { opacity: .45; cursor: default; }
.notification-status { margin: 12px 4px; color: var(--muted); font-size: .84rem; }
.notification-list { display: grid; align-content: start; gap: 7px; min-height: 0; overflow-y: auto; padding: 8px 2px 2px; }
.notification-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); }
.notification-item.is-unread { border-color: rgba(91,152,255,.38); background: rgba(59,130,255,.07); }
.notification-link { display: grid; flex: 1; min-width: 0; gap: 3px; color: inherit; text-decoration: none; }
.notification-link strong { font-size: .84rem; }
.notification-link span { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.notification-link time { color: var(--dim); font-size: .69rem; }
.notification-item .notification-mark-read { align-self: flex-start; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: max-content; min-width: 210px; max-width: calc(100vw - 2 * var(--gutter)); padding: 8px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-line { margin: 6px 10px 8px; color: var(--muted); font-size: .85rem; }
.menu-link { display: block; width: 100%; text-align: left; padding: 10px; border-radius: 10px; background: none; border: 0; cursor: pointer; font-size: .92rem; font-weight: 600; }
.menu-link:hover { background: rgba(255, 255, 255, .06); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  font-weight: 650; font-size: .95rem; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .25s, filter .2s; }
.btn svg { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .26); }
/* Bouton principal (btn-glow / btn-primary) */
.btn-glow, .btn-primary { border-color: transparent; color: #fff; background: linear-gradient(180deg, #2a6fe0, #1a5cd0); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 8px 24px -10px rgba(59, 130, 255, .6); }
.btn-glow:hover, .btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 0 0 3px rgba(59, 130, 255, .25), 0 12px 30px -10px rgba(59, 130, 255, .8); } /* pas d'éclaircissement : le contraste passerait sous 4,5:1 */
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord svg { fill: currentColor; stroke: none; width: 19px; height: 19px; }
.btn-discord:hover { background: #4752d9; border-color: #4752d9; }
.btn-danger { color: var(--bad); border-color: rgba(248, 113, 113, .4); }
.btn-danger:hover { background: rgba(248, 113, 113, .1); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { position: relative; display: block; }
.field input, .field textarea, .field select { width: 100%; min-height: 54px; padding: 24px 15px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); outline: none; font-size: 16px; /* 16 px : évite le zoom automatique d'iOS */
  transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
.field textarea { resize: vertical; min-height: 140px; }
.field-label { position: absolute; left: 16px; top: 16px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .2s var(--ease), color .2s; max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 255, .18); }
.field input:focus + .field-label, .field input:not(:placeholder-shown) + .field-label,
.field textarea:focus + .field-label, .field textarea:not(:placeholder-shown) + .field-label { transform: translateY(-10px) scale(.78); color: var(--accent-2); }
.field.has-err input, .field.has-err textarea { border-color: var(--bad); }
.field-err { display: block; margin: 6px 4px 0; color: var(--bad); font-size: .84rem; }
.form-error { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(248, 113, 113, .09); border: 1px solid rgba(248, 113, 113, .35); color: #fca5a5; font-size: .92rem; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--dim); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Interrupteur */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--muted); user-select: none; -webkit-user-select: none; min-height: 40px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-2); transition: background .25s, border-color .25s; }
.switch-track i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track i { transform: translateX(18px); }
.switch input:checked ~ .switch-txt { color: var(--text); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Cartes ---------- */
.card-glow { --mx: 50%; --my: 0%; position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: border-color .25s, transform .3s var(--ease); }
.card-glow::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(360px circle at var(--mx) var(--my), rgba(59, 130, 255, .1), transparent 70%); }
.card-glow h3 { margin: 12px 0 6px; font-size: 1.08rem; letter-spacing: -.02em; }
.card-glow p { margin: 0; color: var(--muted); font-size: .95rem; }
/* Pastille d'icône de la page Accueil (div ou span) ; svg.ico = icône du sprite, voir « Icônes » plus bas */
.ico:where(:not(svg)) { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(59, 130, 255, .1); border: 1px solid rgba(59, 130, 255, .22); color: var(--accent-2); }
.ico:where(:not(svg)) > svg { width: 20px; height: 20px; }
@media (hover: hover) {
  .card-glow:hover { border-color: var(--line-2); transform: translateY(-3px); }
  .card-glow:hover::before { opacity: 1; }
  .tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
  .btn:hover svg { transform: translateX(2px); }
}

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 64px); align-items: center; min-height: min(64vh, 560px); }
.hero-side { display: grid; gap: 14px; }
.next { position: relative; padding: 22px 24px; }
.next-label { margin: 0 0 4px; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.next-time { margin: 0; font-size: clamp(1.5rem, 1rem + 2vw, 2.1rem); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.next-sub { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.minimap { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 16px; }
.minimap i { aspect-ratio: 1; border-radius: 7px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 650; color: var(--dim); font-variant-numeric: tabular-nums; }
.minimap i.is-past { background: rgba(59, 130, 255, .13); border-color: rgba(59, 130, 255, .3); color: var(--accent-2); }
.minimap i.is-today { background: var(--accent); border-color: var(--accent); color: #fff; animation: breathe 2.4s ease-in-out infinite; }
.minimap i.is-last { border-color: rgba(250, 204, 21, .4); color: var(--gold); }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgba(59, 130, 255, .22); } }
.stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(2rem, 6vw, 3.4rem); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stat { padding: 22px 26px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); font-weight: 750; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-n { display: block; font-size: 2.2rem; font-weight: 750; letter-spacing: -.05em; line-height: 1; color: var(--accent); opacity: .9; font-variant-numeric: tabular-nums; }
.band { position: relative; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding: clamp(22px, 4vw, 34px); margin-top: clamp(3rem, 8vw, 5.5rem); }
.band .h2 { margin-bottom: .2rem; }

/* ---------- Showcase ---------- */
.filters { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; }
.filter.is-active { background: rgba(59, 130, 255, .16); color: var(--accent-2); border-color: rgba(59, 130, 255, .55); }
@media (hover: hover) { .filter:hover { color: var(--text); border-color: var(--line-2); } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.showcase-card { padding: 0; display: flex; flex-direction: column; }
.showcase-card.is-hidden { display: none; }
.sc-media { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, rgba(59, 130, 255, .1), rgba(255, 255, 255, .02)); border-bottom: 1px solid var(--line); }
.sc-media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 750; letter-spacing: .03em; color: var(--accent-ink); background: var(--accent-2); }
.sc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.sc-cat { margin: 0 0 4px !important; font-size: .74rem !important; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2) !important; font-weight: 650; }
.sc-title { margin: 0 0 6px; font-size: 1.15rem; letter-spacing: -.02em; }
.sc-desc { margin: 0 0 16px !important; flex: 1; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-price { font-weight: 750; font-size: 1.05rem; }

/* ---------- Auth ---------- */
.auth { display: grid; place-items: center; min-height: 56vh; }
.auth-card { width: 100%; max-width: 440px; padding: clamp(22px, 5vw, 34px); }
.auth-card .h2 { margin-bottom: .3rem; }
.auth-card .muted { margin-bottom: 20px; }
.auth-switch { text-align: center; margin: 20px 0 0; color: var(--muted); font-size: .94rem; }
.auth-switch a { color: var(--accent-2); font-weight: 650; }

/* ---------- Flashs / toasts ---------- */
.flashes { position: fixed; z-index: 60; top: calc(var(--nav-h) + var(--safe-t) + 10px); left: 50%; translate: -50% 0; width: min(540px, calc(100% - 24px)); display: grid; gap: 8px; pointer-events: none; }
.flash { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .93rem; animation: pop .3s var(--ease), fadeout .5s 7s forwards; }
.flash-ok { border-color: rgba(74, 222, 128, .5); } .flash-error { border-color: rgba(248, 113, 113, .55); } .flash-warn { border-color: rgba(251, 191, 36, .55); }
@keyframes fadeout { to { opacity: 0; transform: translateY(-8px); visibility: hidden; } }
.toasts { position: fixed; z-index: 70; bottom: 22px; left: 50%; translate: -50% 0; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-size: .94rem; pointer-events: auto; animation: pop .3s var(--ease); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: all .3s; }
.sim-banner { position: relative; z-index: 80; padding: 6px 12px; text-align: center; font-size: .78rem; font-weight: 700; color: #1b1300; background: var(--warn); }

/* ---------- Pied de page ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 24px var(--gutter); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; color: var(--dim); font-size: .88rem; }
.foot p { margin: 0; } .foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; } .foot-links a:hover { color: var(--text); }

/* ---------- Calendrier ---------- */
.status { margin: 0; color: var(--text); font-weight: 600; }
.countdown { font-variant-numeric: tabular-nums; color: var(--accent-2); font-weight: 750; white-space: nowrap; }
.tools { display: flex; gap: 8px 22px; margin: 0 0 14px; flex-wrap: wrap; }
.gate { margin-bottom: 20px; padding: clamp(16px, 3vw, 22px) clamp(16px, 3vw, 24px); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gate h2 { margin: 0 0 4px; font-size: 1.08rem; letter-spacing: -.02em; }
.gate p { margin: 0; color: var(--muted); font-size: .93rem; max-width: 60ch; }
.gate.is-ok { border-color: rgba(52, 211, 153, .35); padding-block: 11px; }
.gate.is-ok h2 { font-size: .93rem; margin: 0; font-weight: 600; } .gate.is-ok p { display: none; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(88px, 15vw, 150px), 1fr)); gap: clamp(8px, 1.6vw, 14px); }
.tile { all: unset; box-sizing: border-box; position: relative; display: block; aspect-ratio: 1 / 1.04; border-radius: 16px; /* forme du contour de focus */ perspective: 900px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile-inner { position: absolute; inset: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .8s var(--ease); }
.tile.is-opened .tile-inner { transform: rotateY(180deg); }
.tile-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; text-align: center; padding: 8px; }
.tile-front { background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, background .25s, transform .3s var(--ease); }
.tile-num { font-size: clamp(1.5rem, 1rem + 2.2vw, 2.4rem); font-weight: 750; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-tag { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--dim); min-height: 1em; }
.tile-lock { position: absolute; top: 9px; right: 9px; width: 14px; height: 14px; opacity: .45; }
.tile-back { transform: rotateY(180deg); background: rgba(59, 130, 255, .1); border: 1px solid rgba(59, 130, 255, .45); }
.tile-title { font-size: .74rem; font-weight: 650; line-height: 1.25; padding: 0 4px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile.is-locked .tile-front { opacity: .6; }
.tile.is-missed .tile-front { opacity: .38; }
.tile.is-missed .tile-num { text-decoration: line-through; text-decoration-thickness: 2px; }
.tile.is-today .tile-front, .tile.is-available .tile-front { background: rgba(59, 130, 255, .12); border-color: var(--accent); }
/* Onde autour de la case du jour : anneau fixe dont seules l'échelle et l'opacité sont animées (composées par le GPU) */
.tile.is-today::before, .tile.is-available::before { content: ""; position: absolute; inset: 0; border-radius: 16px; border: 2px solid var(--tile-ring, rgba(59, 130, 255, .55)); pointer-events: none; opacity: 0; animation: ring 2.4s ease-out infinite; }
.tile.is-today .tile-tag, .tile.is-available .tile-tag { color: var(--accent-2); }
@keyframes ring { 0% { opacity: .8; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.09); } }
.tile.is-shaking { animation: shake .4s; }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.tile[data-day="24"] .tile-front { border-color: rgba(255, 204, 92, .45); }
.tile-front > .tile-num, .tile-front > .tile-tag { position: relative; z-index: 1; }
.tile[data-day="24"] .tile-num { color: var(--gold); }
/* ---------- Pied de page (logo + crédits) ---------- */
.foot-brand { display: flex; align-items: center; gap: 10px; } .foot-brand img { border-radius: 7px; }
.foot-credits { flex-basis: 100%; font-size: .75rem; color: var(--dim); line-height: 1.5; } .foot-credits a { text-decoration: underline; text-underline-offset: 2px; }
/* Page d'erreur / installation */
.err-logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 16px; }
.err-hint { margin-top: 16px; } .err-actions { margin: 18px 0 0; }

@media (hover: hover) { .tile:hover .tile-front { border-color: var(--line-2); transform: translateY(-2px); } .tile.is-today:hover .tile-front { border-color: var(--accent-2); } }
.fineprint { margin-top: 1.8rem; color: var(--dim); font-size: .85rem; text-align: center; }
.grants-wrap { margin-top: 2.6rem; }
.grants { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.grant { cursor: pointer; text-align: left; }

/* Fenêtre récompense (fiche centrée sur PC, tiroir en bas sur mobile) */
dialog.reward { border: 0; padding: 0; background: transparent; color: var(--text); width: min(440px, calc(100% - 24px)); max-height: 92vh; max-height: 92dvh; overflow: visible; margin: auto; }
dialog.reward::backdrop { background: rgba(6, 5, 10, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadein .25s; }
dialog.reward[open] .reward-card { animation: rise .45s var(--ease); }
@keyframes fadein { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.reward-card { position: relative; max-height: 92vh; max-height: 92dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 34px 26px 24px; text-align: center; border-radius: 24px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .65); }
.reward-glow { position: absolute; inset: -30% -20% auto; height: 70%; background: radial-gradient(closest-side, rgba(59, 130, 255, .28), transparent); pointer-events: none; }
.reward-card > * { position: relative; }
.reward-day { margin: 8px 0 0; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.reward-title { margin: 6px 0 10px; font-size: 1.5rem; letter-spacing: -.03em; line-height: 1.15; }
.reward-desc { margin: 0 0 18px; color: var(--muted); white-space: pre-line; }
.coupon { display: grid; gap: 10px; justify-items: center; padding: 16px; margin-bottom: 16px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px dashed rgba(59, 130, 255, .5); }
.coupon-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.coupon-code { font: 800 1.5rem/1.15 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .05em; word-break: break-all; color: var(--accent-2); user-select: all; -webkit-user-select: all; }
.reward-pending { margin: 0 0 16px; padding: 12px; border-radius: 12px; background: rgba(251, 191, 36, .1); color: var(--warn); font-size: .92rem; }
.reward-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.adm { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.adm-side { position: sticky; top: calc(var(--nav-h) + var(--safe-t) + 18px); padding: 10px; display: grid; gap: 2px; }
.adm-link { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--muted); transition: all .2s; white-space: nowrap; }
.adm-link:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.adm-link.is-active { color: var(--accent-ink); background: var(--accent-2); }
.adm-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center; background: var(--danger-bg); color: #fff; font-size: .72rem; font-weight: 800; }
.adm-main { min-width: 0; display: grid; gap: 18px; }
.adm-title { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.8rem); letter-spacing: -.03em; }
.members-admin-list { display: grid; gap: 14px; }
.members-admin-card { display: grid; gap: 16px; min-width: 0; }
.members-admin-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.members-admin-heading > div { min-width: 0; flex: 1; }
.members-admin-heading .h2 { margin: 0 0 5px; overflow-wrap: anywhere; }
.members-admin-heading p { margin: 0 0 8px; overflow-wrap: anywhere; }
.members-admin-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; align-items: end; }
.members-admin-edit .check-row, .members-admin-edit button { align-self: end; }
.forum-admin-topic { display: grid; gap: 14px; }
.forum-admin-topic > header { justify-content: space-between; align-items: start; }
.forum-admin-topic h2 { overflow-wrap: anywhere; }
.forum-admin-posts { display: grid; gap: 10px; }
.forum-admin-post { display: flex; justify-content: space-between; align-items: start; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.forum-admin-post > div { min-width: 0; }
.forum-admin-post p { margin: 8px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.forum-admin-post form { flex: none; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.adm-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.kpi { padding: 16px 18px; } .kpi strong { display: block; font-size: 1.9rem; font-weight: 750; letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; } .kpi span { color: var(--muted); font-size: .84rem; }
.kpi.is-warn strong { color: var(--warn); } .kpi.is-bad strong { color: var(--bad); } .kpi.is-good strong { color: var(--ok); }
.panel { padding: clamp(16px, 3vw, 22px); }
.panel h2 { margin: 0 0 12px; font-size: 1.05rem; letter-spacing: -.02em; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
.live-dot.is-off { background: var(--bad); animation: none; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: .9rem; }
.feed li.is-new { animation: flashin 1.6s ease-out; }
@keyframes flashin { from { background: rgba(59, 130, 255, .22); transform: translateX(-8px); } }
.feed .t { color: var(--dim); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .025); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
@media (hover: hover) { .tbl tr:hover td { background: rgba(255, 255, 255, .02); } }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .73rem; font-weight: 700; background: rgba(255, 255, 255, .07); color: var(--muted); }
.tag.ok { background: rgba(74, 222, 128, .13); color: var(--ok); } .tag.bad { background: rgba(248, 113, 113, .13); color: var(--bad); } .tag.warn { background: rgba(251, 191, 36, .13); color: var(--warn); } .tag.discord { background: rgba(88, 101, 242, .2); color: #a3acff; }
.inline { display: inline; } .inline-form { display: inline-flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.reward-edit { display: grid; gap: 12px; }
.reward-edit summary { cursor: pointer; list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 2px 0; font-weight: 650; }
.reward-edit summary::-webkit-details-marker { display: none; }
.reward-edit summary .tile-no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-2); color: var(--accent-ink); font-weight: 800; flex: none; }
.reward-edit[open] summary { margin-bottom: 8px; }
.afields { display: grid; gap: 12px; min-width: 0; }
.afields .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.afields .grid3 { display: grid; grid-template-columns: minmax(190px, .9fr) 1fr 1fr; gap: 12px; }
.afields label.lbl { display: grid; gap: 5px; font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; min-width: 0; }
.afields input, .afields select, .afields textarea { padding: 10px 12px; min-height: 42px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); outline: none; color: var(--text); width: 100%; font-size: 16px; }
.afields input:focus, .afields select:focus, .afields textarea:focus { border-color: var(--accent); }
.afields select option, .search-input option { background: #111b36; }
.afields textarea { min-height: 76px; resize: vertical; }
.opt-row { display: grid; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.hint { color: var(--dim); font-size: .82rem; margin: 0; }
.qr { word-break: break-all; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; letter-spacing: .08em; user-select: all; -webkit-user-select: all; }
.code-in { text-align: center; letter-spacing: .4em; font-size: 1.5rem !important; font-weight: 800; }
.warn-box { padding: 14px 18px; border-radius: 12px; background: rgba(251, 191, 36, .09); border: 1px solid rgba(251, 191, 36, .35); color: #fde68a; font-size: .92rem; }
.steps-list { padding-left: 1.2rem; margin: 0 0 16px; display: grid; gap: 6px; }
.hint-gap { margin: 8px 0 18px; }
.sep { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 4px 0; }
.search-input { padding: 0 14px; min-height: 42px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); outline: none; color: var(--text); min-width: 0; font-size: 16px; max-width: 100%; }
.search-input:focus { border-color: var(--accent); }
.pop-actions { display: grid; gap: 10px; margin-top: 10px; padding: 12px; width: min(320px, 78vw); border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.card-pop { margin-top: 8px; }
details > summary.btn { list-style: none; cursor: pointer; display: inline-flex; }
details > summary.btn::-webkit-details-marker { display: none; }
.adm-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.msg-body { margin: 0 0 14px; white-space: pre-wrap; word-break: break-word; }
.is-unread { border-color: rgba(251, 191, 36, .45); }
code { font: 600 .85em ui-monospace, Menlo, Consolas, monospace; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--accent-2); word-break: break-all; }
.panel .inline-form form { display: inline; }

/* ---------- Apparition au scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .card-glow.reveal.is-in { transition: opacity .6s var(--ease), transform .3s var(--ease), border-color .25s; transition-delay: var(--d, 0ms), 0ms, 0ms; }
/* Secours : sans ui.js au bout de 3 s (fichier manquant, erreur JS), les blocs apparaissent quand même. */
.js:not(.ui-ready) .reveal { animation: reveal-fallback .5s var(--ease) 3s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

/* ---------- Transition entre pages (Chrome, Edge, Safari récents ; ignorée ailleurs) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .2s ease both vt-out; }
::view-transition-new(root) { animation: .35s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablette et téléphone : les onglets restent EN HAUT, sur une deuxième rangée sous le logo */
@media (max-width: 900px) {
  :root { --nav-h: 108px; }
  .nav { view-transition-name: none; }
  .nav-in { flex-wrap: wrap; height: auto; column-gap: 12px; row-gap: 0; }
  .brand, .nav-end { height: 56px; }
  .tabs { order: 3; flex: 1 1 100%; margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - 6px); height: 52px; align-items: stretch; justify-content: space-between; gap: 2px;
    border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 1; justify-content: center; padding: 0 8px; border-radius: 0; font-size: .88rem; white-space: nowrap; }
  .tab svg { display: block; width: 17px; height: 17px; }
  .tab.is-active { color: var(--text); }
  .tab.is-active::after { left: 18%; right: 18%; bottom: 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; grid-auto-flow: column; justify-content: start; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .adm-side::-webkit-scrollbar { display: none; }
}
@media (max-width: 440px) { .tab svg { display: none; } .tab { font-size: .84rem; padding: 0 4px; } }

@media (max-width: 760px) {
  .grid-3, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .row-2, .afields .grid2 { grid-template-columns: 1fr; }
  .afields .grid3 { grid-template-columns: 1fr 1fr; } .afields .grid3 > :first-child { grid-column: 1 / -1; }
  .brand span { display: none; }
  .who-name { display: none; } .who { padding: 3px; }
  .nav-end .nav-login { display: none; }
  .tile-title { display: none; } .tile-tag { font-size: .58rem; }
  .tile-face { border-radius: 14px; }
  .minimap { gap: 5px; padding: 12px; }
  .reward-actions .btn { flex: 1; }
  .gate .cta-row, .gate .cta-row .btn { width: 100%; }
  /* Fiche récompense : tiroir collé en bas de l'écran */
  dialog.reward { width: 100%; max-width: none; margin: auto 0 0; }
  .reward-card { border-radius: 24px 24px 0 0; padding-bottom: calc(24px + var(--safe-b)); }
  dialog.reward[open] .reward-card { animation: slideup .4s var(--ease); }
  @keyframes slideup { from { transform: translateY(100%); } }
}

@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .btn { padding: 0 18px; }
  .board { grid-template-columns: repeat(3, 1fr); }
  .coupon-code { font-size: 1.25rem; }
}

/* Téléphone en paysage : peu de hauteur */
@media (max-height: 480px) and (orientation: landscape) {
  .page { padding-top: calc(var(--nav-h) + var(--safe-t) + 14px); }
  .hero { min-height: 0; }
  .reward-card { padding: 20px 22px; }
}

/* Écrans tactiles : zones de 44 px minimum */
@media (pointer: coarse) {
  .menu-link, .adm-link, .filter, .btn-sm { min-height: 44px; }
  .field input, .field select { min-height: 56px; }
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .fx { transition: none; }
}

/* ==========================================================================
   Icônes (sprite Tabler Icons) : badges colorés, puis thème Noël du calendrier
   ========================================================================== */
/* Icône seule : <svg class="ico"><use href="assets/icons/sprite.svg#i-clé"></use></svg> (trait = currentColor) */
svg.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Badge : carré arrondi en dégradé, reflet intérieur, ombre douce colorée, icône blanche au trait.
   Taille = --ib (classes ib-xs … ib-xl), couleur = classe tone-* (red, green, gold, ice, berry, mute). */
.ib { --ib: 48px; position: relative; isolation: isolate; flex: none; display: inline-grid; place-items: center; width: var(--ib); height: var(--ib);
  border-radius: calc(var(--ib) * .3); color: #fff; vertical-align: middle;
  background: linear-gradient(150deg, var(--ib-a, #ff7d88), var(--ib-b, #d1243a));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 -3px 8px rgba(0, 0, 0, .16),
    0 2px 4px rgba(0, 0, 0, .22), 0 8px 20px -8px var(--ib-glow, rgba(230, 57, 70, .6)); }
.ib::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 85% at 28% 0%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 58%); }
.ib > .ico { width: calc(var(--ib) * .56); height: calc(var(--ib) * .56); filter: drop-shadow(0 1px 1.2px var(--ib-ink, rgba(0, 0, 0, .3))); }
/* Petites tailles : trait fin, on ajoute un liseré sombre pour qu'il reste net sur les teintes claires */
.ib-xs > .ico, .ib-sm > .ico { filter: drop-shadow(0 1px 1px var(--ib-ink, rgba(0, 0, 0, .3))) drop-shadow(0 0 .6px var(--ib-ink, rgba(0, 0, 0, .3))); }
.ib-xs { --ib: 24px; } .ib-sm { --ib: 34px; } .ib-md { --ib: 48px; } .ib-lg { --ib: 64px; } .ib-xl { --ib: 104px; }
.ib-xs, .ib-sm { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 1px 2px rgba(0, 0, 0, .25), 0 4px 10px -5px var(--ib-glow, rgba(230, 57, 70, .6)); }
.ib-xs > .ico { width: calc(var(--ib) * .64); height: calc(var(--ib) * .64); }
.ib-xl { border-radius: calc(var(--ib) * .32);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 -6px 16px rgba(0, 0, 0, .18),
    0 4px 10px rgba(0, 0, 0, .3), 0 22px 48px -14px var(--ib-glow, rgba(230, 57, 70, .6)); }
.ib-xl > .ico { width: calc(var(--ib) * .52); height: calc(var(--ib) * .52); }
.tone-red   { --ib-a: #ff7d88; --ib-b: #d1243a; --ib-glow: rgba(230, 57, 70, .6);  --ib-ink: rgba(110, 0, 20, .38); --ib-soft: rgba(230, 57, 70, .2); }
.tone-green { --ib-a: #3fcf96; --ib-b: #0b7550; --ib-glow: rgba(20, 170, 110, .5); --ib-ink: rgba(0, 60, 35, .42);  --ib-soft: rgba(52, 211, 153, .17); }
.tone-gold  { --ib-a: #f8c04c; --ib-b: #b4610a; --ib-glow: rgba(255, 180, 40, .5); --ib-ink: rgba(80, 35, 0, .65);   --ib-soft: rgba(255, 204, 92, .18); }
.tone-ice   { --ib-a: #86c8ff; --ib-b: #2a62cc; --ib-glow: rgba(80, 150, 255, .55); --ib-ink: rgba(10, 45, 120, .48); --ib-soft: rgba(100, 170, 255, .18); }
.tone-berry { --ib-a: #ff8ac6; --ib-b: #a0175c; --ib-glow: rgba(219, 39, 119, .55); --ib-ink: rgba(90, 0, 45, .42);  --ib-soft: rgba(236, 72, 153, .18); }
.tone-mute  { --ib-a: #66739a; --ib-b: #283252; --ib-glow: rgba(0, 0, 0, .45);     --ib-ink: rgba(0, 0, 0, .35);    --ib-soft: rgba(160, 190, 255, .08); }
.ib.tone-gold::before, .ib.tone-ice::before { opacity: .55; } /* teintes claires : reflet plus discret pour ne pas noyer l'icône blanche */

/* Showcase : badge au centre du visuel quand il n'y a pas d'image envoyée */
.sc-media.has-badge { background: radial-gradient(60% 80% at 50% 55%, var(--ib-soft, rgba(59, 130, 255, .14)), transparent 72%), linear-gradient(135deg, rgba(59, 130, 255, .08), rgba(255, 255, 255, .015)); }
.sc-badge { --ib: 96px; transition: transform .4s var(--ease); }
@media (hover: hover) { .showcase-card:hover .sc-badge { transform: translateY(-4px) rotate(-4deg) scale(1.04); } }

/* Admin : badges dans les listes et aperçu du sélecteur d'icône */
.with-thumb { display: inline-flex; align-items: center; gap: 8px; }
.icon-pick { display: flex; align-items: center; gap: 10px; }
.icon-pick select { flex: 1; min-width: 0; }

/* ---------- Calendrier : thème Noël ---------- */
.theme-xmas { --accent: #e63946; --accent-2: #ffb4bb; --fx: 255, 255, 255; }
.theme-xmas .bg-glow { background: radial-gradient(900px 480px at 50% -8%, rgba(230, 57, 70, .16), transparent 70%), radial-gradient(700px 420px at 0% 100%, rgba(52, 211, 153, .08), transparent 70%), radial-gradient(700px 420px at 100% 60%, rgba(255, 204, 92, .07), transparent 70%), var(--bg-grad); }
.theme-xmas .btn-primary, .theme-xmas .btn-glow { background: linear-gradient(180deg, #d9303f, #b31b2c); box-shadow: 0 1px 0 rgba(255, 255, 255, .26) inset, 0 8px 24px -10px rgba(230, 57, 70, .7); }
.theme-xmas .btn-primary:hover, .theme-xmas .btn-glow:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .26) inset, 0 0 0 3px rgba(230, 57, 70, .25), 0 12px 30px -10px rgba(230, 57, 70, .85); }
.theme-xmas .tab.is-active::after { background: var(--accent); }
.theme-xmas .eyebrow { color: var(--gold); }
.theme-xmas .countdown { color: var(--gold); }

.xmas-hero { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); margin-bottom: 18px; min-height: clamp(220px, 34vw, 320px); display: flex; align-items: flex-end; isolation: isolate; }
.xmas-photo, .xmas-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.xmas-photo { z-index: -2; }
.xmas-photo img { object-fit: cover; object-position: 70% 40%; transform: scale(1.04); animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.12) translateX(-2%); } }
.xmas-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 8, 22, .94) 0%, rgba(5, 8, 22, .75) 45%, rgba(5, 8, 22, .25) 100%), linear-gradient(0deg, rgba(5, 8, 22, .85), transparent 55%); }
.xmas-hero-in { padding: clamp(20px, 4vw, 38px); max-width: 640px; }
.hero-badge { display: grid; margin-bottom: 14px; animation: floaty 6s ease-in-out infinite; } /* bloc : toujours au-dessus du sur-titre */
@keyframes floaty { 50% { translate: 0 -6px; } }
.xmas-hero .h1 { margin-bottom: .4rem; }
.xmas-hero .lede { margin-bottom: .4rem; }

/* Cases : badge décoratif (case fermée) et badge du lot (case ouverte) */
.tile-front { gap: 2px; }
.theme-xmas .tile-num { font-size: clamp(1.2rem, .9rem + 1.4vw, 1.9rem); }
.tile-mark { --ib: clamp(30px, 1.8vw + 22px, 46px); margin-bottom: 5px; pointer-events: none; transition: transform .35s var(--ease), filter .3s; }
.tile.is-locked .tile-mark { filter: saturate(.75) brightness(.92); }
/* La 24 : le grand cadeau doré reste éclatant même fermé */
.tile[data-day="24"].is-locked .tile-front { opacity: .9; }
.tile[data-day="24"].is-locked .tile-mark { filter: none; }
.tile[data-day="24"] .tile-mark { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 0 0 1px rgba(255, 204, 92, .35), 0 6px 18px -4px rgba(255, 180, 40, .6); }
.tile.is-missed .tile-mark { filter: grayscale(1) brightness(.8); }
/* Halo du badge de la case du jour : ombre fixe sur un pseudo-élément, seule son opacité varie */
.tile.is-today .tile-mark::after, .tile.is-available .tile-mark::after { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 14px 3px var(--ib-glow, rgba(255, 204, 92, .5)); opacity: 0; animation: markglow 2.4s ease-in-out infinite; }
@keyframes markglow { 50% { opacity: 1; } }
.tile-back { gap: 8px; }
.tile-prize { display: grid; place-items: center; pointer-events: none; }
.tile-prize .ib { --ib: clamp(42px, 3.2vw + 22px, 64px); }
/* « Pop » du lot : seulement pour la case qu'on vient d'ouvrir (is-fresh, posé par calendar.js), pas à chaque chargement */
.tile.is-fresh .tile-prize .ib { animation: prizepop .6s .45s var(--ease) both; }
@keyframes prizepop { from { opacity: 0; scale: .55; rotate: -12deg; } }
.tile.is-hidden-prize .tile-title { color: var(--muted); }
.tile.is-hidden-prize .tile-prize .ib { opacity: .7; }
/* Numéro du jour, en petit dans le coin de la face ouverte */
.tile-day { position: absolute; top: 7px; left: 9px; font-size: .7rem; font-weight: 750; line-height: 1; letter-spacing: -.01em; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.tile[data-day="24"] .tile-day { color: var(--gold); }
.theme-xmas .tile-front { background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)), var(--surface); }
.theme-xmas .tile.is-today .tile-front, .theme-xmas .tile.is-available .tile-front { border-color: var(--gold); background: linear-gradient(160deg, rgba(255, 204, 92, .16), rgba(230, 57, 70, .1)), var(--surface); }
.theme-xmas .tile { --tile-ring: rgba(255, 204, 92, .7); }
.theme-xmas .tile.is-today .tile-tag, .theme-xmas .tile.is-available .tile-tag { color: var(--gold); }
.theme-xmas .tile-back { background: radial-gradient(90% 70% at 50% 34%, rgba(255, 255, 255, .07), transparent 70%), linear-gradient(160deg, rgba(52, 211, 153, .12), rgba(52, 211, 153, .03)), var(--surface); border-color: rgba(52, 211, 153, .45); }
.theme-xmas .tile[data-day="24"] .tile-back { border-color: rgba(255, 204, 92, .6); background: radial-gradient(90% 70% at 50% 34%, rgba(255, 204, 92, .18), transparent 70%), var(--surface); }
@media (hover: hover) { .tile:hover .tile-mark { transform: translateY(-3px) rotate(-6deg) scale(1.06); } }

/* Cadeaux de l'équipe */
.grant { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 18px; }
.grant-badge { grid-row: span 2; }
.grant h3 { margin: 0 0 2px; }

/* Fenêtre récompense : grand badge flottant, halo de la couleur du lot et rayons lumineux */
.reward-icon { position: relative; display: grid; place-items: center; width: 156px; height: 156px; margin: -20px auto 0; isolation: isolate; }
.reward-icon::before, .reward-icon::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.reward-icon::before { inset: 0; background: radial-gradient(closest-side, var(--ib-glow, rgba(255, 204, 92, .45)), transparent 78%); animation: halo 3.2s ease-in-out infinite; }
.reward-icon::after { inset: -16px; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .1) 0deg 7deg, transparent 7deg 30deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%); animation: spin 26s linear infinite; }
.reward-icon .ib-xl { animation: floaty 4s ease-in-out infinite; }
@keyframes halo { 50% { opacity: .6; scale: .9; } }
@keyframes spin { to { rotate: 360deg; } }
.theme-xmas .reward-glow { background: radial-gradient(closest-side, rgba(255, 204, 92, .3), transparent); }
.theme-xmas .coupon { border-color: rgba(255, 204, 92, .55); }
.theme-xmas .coupon-code { color: var(--gold); }

@media (max-width: 760px) {
  .xmas-hero::after { background: linear-gradient(0deg, rgba(5, 8, 22, .95) 10%, rgba(5, 8, 22, .55) 70%, rgba(5, 8, 22, .35)); }
  .hero-badge { --ib: 52px; margin-bottom: 10px; }
  .tile-prize .ib { --ib: clamp(44px, 13vw, 60px); } /* le titre est masqué sur mobile : le badge prend la place */
  .reward-icon { width: 136px; height: 136px; margin-top: -14px; }
  .reward-icon .ib-xl { --ib: 92px; }
}
@media (max-width: 380px) {
  .tile-mark { --ib: 30px; margin-bottom: 3px; }
  .tile-lock { top: 7px; right: 7px; }
  .tile-day { top: 6px; left: 7px; font-size: .64rem; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .reward-icon { width: 112px; height: 112px; margin-top: -8px; }
  .reward-icon .ib-xl { --ib: 72px; }
}
/* Sélecteurs aussi spécifiques que ceux qui posent les animations, sinon ces derniers gagnent */
@media (prefers-reduced-motion: reduce) {
  .xmas-photo img, .hero-badge, .tile.is-fresh .tile-prize .ib, .reward-icon .ib-xl, .reward-icon::before, .reward-icon::after { animation: none; }
  .tile.is-today::before, .tile.is-available::before, .tile.is-today .tile-mark::after, .tile.is-available .tile-mark::after { animation: none; opacity: 0; }
}

/* ---------- QR code de la double authentification ---------- */
.qr-box { width: min(240px, 100%); margin: 6px auto 14px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 12px 40px -12px rgba(0, 0, 0, .6); }
.qr-svg { display: block; width: 100%; height: auto; }
.qr-svg, .qr-svg * { stroke: none !important; } /* le style global des icônes (trait) ne doit pas toucher au QR code */
.qr-manual { margin: 0 0 6px; }
.qr-manual summary { cursor: pointer; color: var(--muted); font-size: .88rem; font-weight: 600; text-align: center; padding: 6px; }
.qr-manual[open] summary { margin-bottom: 8px; }

/* ---------- Dernière étape : Discord ---------- */
.dc-card { max-width: 480px; }
.dc-card .eyebrow { margin-bottom: .6rem; }
.dc-steps { list-style: none; margin: 22px 0 18px; padding: 0; display: grid; gap: 12px; }
.dc-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: border-color .25s, background .25s; }
.dc-step.is-current { border-color: rgba(88, 101, 242, .55); background: rgba(88, 101, 242, .08); }
.dc-step.is-done { border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .06); }
.dc-step.is-todo { opacity: .55; }
.dc-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; background: rgba(255, 255, 255, .08); color: var(--muted); }
.dc-step.is-current .dc-dot { background: #5865f2; color: #fff; }
.dc-step.is-done .dc-dot { background: var(--ok); color: #04130c; }
.dc-dot svg { width: 18px; height: 18px; stroke-width: 2.6; }
.dc-body h2 { margin: 4px 0 4px; font-size: 1rem; letter-spacing: -.01em; }
.dc-body p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.dc-body .dc-role-note { padding: 12px 14px; border: 1px solid rgba(255, 204, 92, .28); border-radius: 12px; background: rgba(255, 204, 92, .07); color: var(--text); }
.dc-body .btn + .btn { margin-top: 8px; }
.dc-who { display: flex; align-items: center; gap: 8px; margin: 0 !important; color: var(--text) !important; }
.dc-who img { width: 24px; height: 24px; border-radius: 50%; }
.dc-ok { color: var(--ok) !important; margin: 0 !important; font-weight: 600; }
.dc-live { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0 !important; font-size: .85rem !important; }
.dc-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--accent-2); animation: dcspin .8s linear infinite; }
@keyframes dcspin { to { transform: rotate(360deg); } }
.dc-foot { text-align: center; }
.dc-remind { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(88, 101, 242, .5); background: rgba(88, 101, 242, .12); font-size: .92rem; transition: background .2s; }
.dc-remind:hover { background: rgba(88, 101, 242, .2); }
.dc-remind > span:nth-child(2) { flex: 1; min-width: 0; }
.dc-remind-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8e98ff; box-shadow: 0 0 0 0 rgba(142, 152, 255, .6); animation: pulse 2s infinite; }
.dc-remind-go { flex: none; font-weight: 700; color: #b3baff; white-space: nowrap; }
@media (max-width: 440px) { .dc-remind { flex-wrap: wrap; } .dc-remind-go { margin-left: 21px; } .dc-step { padding: 14px 12px; gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .dc-spin, .dc-remind-dot { animation: none; } }

/* ---------- Community, forum and support ---------- */
.forum-categories, .forum-list, .ticket-thread { display: grid; gap: 10px; }
.forum-board-section + .forum-board-section { margin-top: clamp(2.5rem, 6vw, 4rem); }
.forum-section-heading, .forum-composer-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.forum-section-heading .eyebrow, .forum-composer-heading .eyebrow { margin-bottom: 5px; }
.forum-section-heading .h2, .forum-composer-heading .h2 { margin: 0; }
.forum-section-note, .forum-back-link { color: var(--muted); font-size: .86rem; }
.forum-board-search { display: grid; gap: 7px; max-width: 460px; margin: 0 0 14px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.forum-board-search input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); color: var(--text); font-size: 16px; }
.forum-board-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,255,.18); }
.forum-category, .forum-topic { display: flex; align-items: center; gap: 16px; padding: 16px 18px; transition: border-color .2s, transform .2s, background .2s; }
.forum-category:hover, .forum-topic:hover, .ticket-summary:hover { border-color: var(--line-2); transform: translateY(-1px); }
.forum-category:hover, .forum-topic:hover { background: var(--surface-2); }
.forum-category > span:nth-child(2), .forum-topic-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.forum-category strong, .forum-topic strong { font-size: 1.03rem; }
.forum-category small, .forum-topic-main > span { color: var(--muted); font-size: .88rem; }
.forum-category-icon, .forum-topic-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; color: var(--accent-2); background: rgba(59, 130, 255, .13); font-size: 1.25rem; }
.forum-count { flex: none; color: var(--muted); font-size: .82rem; }
.forum-count span { color: var(--accent-2); }
.forum-topic-main .forum-topic-board { color: var(--accent-2); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.forum-topic-latest { display: grid; gap: 3px; min-width: 150px; text-align: right; font-size: .84rem; }
.forum-topic-latest b { font-weight: 600; }
.forum-topic-latest time { color: var(--muted); font-size: .78rem; }
.forum-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.forum-crumb a { color: var(--accent-2); }
.forum-toolbar, .forum-thread-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.forum-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-thread-toolbar { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.forum-thread-toolbar .muted { font-size: .9rem; }
.forum-thread { display: grid; gap: 10px; }
.forum-post { display: grid; grid-template-columns: minmax(130px, .24fr) minmax(0, 1fr); gap: 22px; }
.forum-author { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; color: var(--accent-2); font-weight: 650; }
.forum-author-avatar { display: inline-flex; }
.forum-post-number { color: var(--muted); font-size: .76rem; font-weight: 400; }
.member-avatar-wrap { position: relative; isolation: isolate; display: inline-grid; place-items: center; flex: none; border-radius: 50%; vertical-align: middle; }
.member-avatar-image, .member-avatar-fallback { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.member-avatar-fallback { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; }
.member-avatar-nav { width: 28px; height: 28px; }
.member-avatar-forum { width: 48px; height: 48px; }
.member-avatar-profile { width: 82px; height: 82px; }
.member-avatar-admin::before { content: ""; position: absolute; z-index: 0; inset: -5px; border: 1px solid rgba(192, 155, 67, .72); border-radius: 50%;
  background: radial-gradient(circle at 17% 12%, #f0d48b 0 1.5px, transparent 2.5px), radial-gradient(circle at 87% 35%, #f0d48b 0 1.5px, transparent 2.5px), radial-gradient(circle at 65% 94%, #f0d48b 0 1.5px, transparent 2.5px), repeating-conic-gradient(from 4deg, #567c5b 0deg 7deg, #315c3d 7deg 14deg, transparent 14deg 18deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  box-shadow: 0 0 0 1px rgba(14, 25, 19, .85), 0 0 9px rgba(118, 146, 118, .2); }
.member-avatar-crown { position: absolute; z-index: 2; top: -8px; right: -8px; display: grid; place-items: center; width: 19px; height: 17px; border: 1px solid rgba(255, 226, 145, .9); border-radius: 7px; color: #ffe08a; background: linear-gradient(145deg, #6c5522, #332813); box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.member-avatar-crown svg { width: 13px; height: 12px; filter: drop-shadow(0 0 3px rgba(255, 215, 107, .35)); }
.member-name { display: inline-flex; align-items: center; gap: 4px; }
.member-name-admin { color: #ffd76b !important; font-weight: 750; text-shadow: 0 0 12px rgba(255, 199, 72, .24); }
.member-name-admin svg { width: 14px; height: 12px; flex: none; fill: currentColor; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.forum-post-body { min-width: 0; }
.forum-post-date { display: block; margin-bottom: 12px; color: var(--muted); font-size: .8rem; }
.forum-post:target { border-color: var(--accent); }
.forum-copy { white-space: normal; overflow-wrap: anywhere; }
.forum-media { max-width: min(100%, 720px); max-height: 520px; margin-top: 16px; border-radius: 12px; border: 1px solid var(--line); background: #000; object-fit: contain; }
.forum-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; color: var(--muted); font-size: .88rem; }
.forum-empty { display: grid; justify-items: center; gap: 8px; }
.forum-empty .h2, .forum-empty p { margin: 0; }
.forum-empty .btn { margin-top: 8px; }
.community-form { margin-top: 22px; padding: clamp(18px, 4vw, 26px); }
.community-form .h2 { margin: 0; }
.forum-composer-heading { align-items: center; }
.upload-label { display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }
.upload-label input[type="file"] { width: 100%; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,.025); font-size: .88rem; }
.community-dropzone { display: grid; gap: 10px; padding: 16px; border: 1px dashed var(--line-2); border-radius: 14px; background: rgba(255,255,255,.02); transition: border-color .2s, background .2s; }
.community-dropzone > p { margin: 0; color: var(--muted); font-size: .88rem; }
.community-dropzone.is-dragging { border-color: var(--accent); background: rgba(59,130,255,.1); }
.community-media-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.community-preview-media { width: auto; max-width: min(100%, 360px); max-height: 240px; border: 1px solid var(--line); border-radius: 10px; background: #000; object-fit: contain; }
.ticket-grid { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.ticket-live, .ticket-sidebar, .ticket-content { display: grid; gap: 12px; min-width: 0; }
.ticket-live.has-new-activity { animation: ticket-update-pulse .9s ease-in-out 2; }
@keyframes ticket-update-pulse { 50% { filter: brightness(1.25); } }
.ticket-sidebar { align-content: start; position: sticky; top: calc(var(--nav-h) + 18px); }
.ticket-sidebar > .h2 { margin: 0 0 2px; }
.ticket-new-link { margin-bottom: 4px; }
.ticket-summary { display: grid; gap: 4px; padding: 14px; transition: border-color .2s, transform .2s; }
.ticket-summary strong { overflow-wrap: anywhere; }
.ticket-summary > span { color: var(--muted); font-size: .84rem; }
.ticket-summary.is-selected { border-color: var(--accent); background: rgba(59, 130, 255, .08); }
.ticket-summary.has-new-reply { border-color: var(--accent); animation: ticket-update-pulse .9s ease-in-out 2; }
.ticket-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; }
.ticket-heading .eyebrow { margin-bottom: 6px; }
.ticket-heading .h2 { margin: 0; }
.ticket-heading-meta { display: grid; justify-items: end; gap: 7px; }
.ticket-presence { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; }
.ticket-presence::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 9px rgba(52,211,153,.55); }
.ticket-live-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 2px 2px 4px; color: var(--muted); font-size: .82rem; }
.ticket-live-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-live-status.is-error { color: var(--bad); }
.ticket-message-author { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.ticket-message-author time { font-size: .75rem; }
.ticket-author-profile { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.ticket-author-profile:hover .member-name { color: var(--accent-2); }
.member-avatar-ticket { width: 28px; height: 28px; flex: none; }
.member-avatar-ticket .member-avatar-image, .member-avatar-ticket .member-avatar-fallback { width: 100%; height: 100%; border-radius: 50%; }
.member-avatar-ticket .member-avatar-fallback { display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: .75rem; }
.ticket-thread { max-height: min(65vh, 720px); overflow: auto; align-content: start; padding: 2px 4px 2px 0; scroll-behavior: smooth; }
.ticket-message { width: min(86%, 680px); padding: 14px 16px; border-radius: 16px 16px 4px 16px; justify-self: end; background: linear-gradient(145deg, rgba(59,130,255,.2), rgba(59,130,255,.08)); }
.ticket-message-attachment { display: block; width: fit-content; max-width: 100%; margin-top: 10px; }
.ticket-message-attachment img { display: block; max-width: min(100%, 520px); max-height: 420px; border-radius: 12px; object-fit: contain; }
.ticket-message-audio { display: block; width: min(100%, 420px); margin-top: 10px; }
.ticket-attachment-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ticket-attachment-picker { display: grid; gap: 6px; color: var(--text, #fff); font-size: .92rem; }
.ticket-attachment-picker input { max-width: min(100%, 320px); color: var(--muted, #aab4c8); }
.ticket-attachment-controls [data-attachment-status] { flex-basis: 100%; }
.ticket-message.is-staff { justify-self: start; border-color: rgba(255,255,255,.1); border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.045); }
.ticket-message small { display: block; margin-top: 8px; color: var(--muted); font-size: .75rem; text-align: right; }
.ticket-message.is-new { animation: ticket-message-in .35s var(--ease); }
@keyframes ticket-message-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ticket-message-head { display: flex; justify-content: space-between; gap: 12px; }
.ticket-message p { margin: 12px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.ticket-message-head strong { font-size: .86rem; }
.ticket-message-head time { font-size: .75rem; }
.ticket-typing { display: inline-flex; align-items: center; gap: 9px; justify-self: start; padding: 9px 13px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; color: var(--muted); background: rgba(255,255,255,.04); font-size: .82rem; animation: ticket-message-in .2s ease-out; }
.typing-dots { display: inline-flex; align-items: center; gap: 3px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); animation: typing-bounce 1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .14s; }
.typing-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes typing-bounce { 50% { opacity: .35; transform: translateY(-3px); } }
.ticket-heading-meta { flex: none; }
.ticket-close { justify-self: end; }
.ticket-empty { padding: 36px 20px; }
.ticket-empty .h2 { margin-bottom: 8px; }
.ticket-empty p { margin: 0; }
.friends-section { display: grid; gap: 12px; margin-top: 28px; }
.push-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.friends-section > .h2 { display: flex; align-items: center; gap: 9px; margin: 0; }
.friends-list { display: grid; gap: 10px; }
.friend-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; }
.friend-identity { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.member-avatar-friend { width: 38px; height: 38px; }
.member-avatar-friend .member-avatar-image, .member-avatar-friend .member-avatar-fallback { width: 100%; height: 100%; border-radius: 50%; }
.member-avatar-friend .member-avatar-fallback { display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-weight: 750; }
.friend-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.friend-actions form { margin: 0; }
.profile-social-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.profile-social-actions form { margin: 0; }
.dm-layout { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.8fr); gap: 18px; align-items: stretch; }
.dm-sidebar { display: grid; align-content: start; gap: 8px; padding: 16px; }
.dm-sidebar-heading, .dm-thread-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dm-sidebar-heading .h2 { margin: 0; }
.dm-conversation-link { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid transparent; border-radius: 12px; color: inherit; text-decoration: none; }
.dm-conversation-link:hover, .dm-conversation-link.is-selected { border-color: var(--line); background: rgba(255,255,255,.04); }
.dm-conversation-info { display: grid; flex: 1; min-width: 0; gap: 3px; }
.dm-conversation-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-conversation-info small, .dm-thread-status small { color: var(--muted); font-size: .75rem; }
.dm-thread { display: flex; flex-direction: column; min-width: 0; min-height: 65vh; gap: 14px; padding: 18px; }
.dm-thread-heading { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dm-thread-status { display: grid; justify-items: end; gap: 4px; }
.dm-message-list { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 220px; max-height: 62vh; overflow: auto; padding: 4px; }
.dm-typing { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; color: var(--muted); background: rgba(255,255,255,.04); font-size: .82rem; animation: ticket-message-in .2s ease-out; }
.dm-message { display: flex; align-items: flex-end; gap: 8px; width: min(90%, 760px); align-self: flex-start; }
.dm-message.is-mine { flex-direction: row-reverse; align-self: flex-end; }
.member-avatar-dm { width: 30px; height: 30px; flex: none; border-radius: 50%; }
.member-avatar-dm .member-avatar-image, .member-avatar-dm .member-avatar-fallback { width: 100%; height: 100%; border-radius: 50%; }
.member-avatar-dm .member-avatar-fallback { display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: .8rem; }
.dm-message-content { min-width: 0; max-width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.045); overflow-wrap: anywhere; }
.dm-message.is-mine .dm-message-content { border-color: rgba(59,130,255,.28); border-radius: 16px 16px 4px 16px; background: linear-gradient(145deg, rgba(59,130,255,.2), rgba(59,130,255,.08)); }
.dm-message.is-new { animation: ticket-message-in .3s ease-out; }
.dm-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .78rem; }
.dm-message-meta a { color: var(--text); font-weight: 700; text-decoration: none; }
.dm-message-meta time { color: var(--muted); font-size: .72rem; }
.dm-message-content p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-media { display: grid; gap: 5px; margin-top: 9px; }
.dm-media img, .dm-media video { display: block; width: auto; max-width: min(100%, 420px); max-height: 360px; border: 1px solid var(--line); border-radius: 10px; background: #000; object-fit: contain; }
.dm-media small { color: var(--muted); font-size: .7rem; }
.dm-compose { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.dm-upload { display: grid; gap: 7px; color: var(--muted); font-size: .82rem; }
.dm-request-banner { display: grid; gap: 8px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); color: var(--muted); font-size: .88rem; }
.dm-request-banner strong { color: var(--text); }
.dm-empty { display: grid; align-content: center; justify-items: start; flex: 1; gap: 8px; padding: 30px; }
.dm-empty .h2, .dm-empty p { margin: 0; }
.ticket-email-note { margin: -1rem 0 0; color: var(--muted); font-size: .9rem; }
.ticket-email-note a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.ticket-category-field { display: grid; gap: 7px; }
.ticket-category-field > label { color: var(--muted); font-size: .86rem; font-weight: 600; }
.ticket-category-field select { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); color: var(--text); font-size: 16px; }
.ticket-category-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 255, .18); }
.ticket-category-field option { background: var(--surface-2); }
.ticket-reply-form { margin-top: 10px; }
.profile-card { padding: clamp(18px, 4vw, 30px); }
.profile-top { display: flex; align-items: center; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.profile-top .h2 { margin: 0 0 6px; }
.profile-top .muted { white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-form { max-width: 680px; padding-top: 22px; }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 760px) {
  .ticket-grid { grid-template-columns: 1fr; }
  .dm-layout { grid-template-columns: 1fr; }
  .dm-sidebar { max-height: 260px; overflow: auto; }
  .dm-thread { min-height: 55vh; padding: 14px; }
  .ticket-sidebar { position: static; }
  .ticket-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket-sidebar > .h2, .ticket-sidebar > .ticket-new-link { grid-column: 1 / -1; }
  .ticket-thread { max-height: none; }
  .forum-post { grid-template-columns: 1fr; gap: 14px; }
  .forum-author { display: grid; grid-template-columns: 42px 1fr; align-items: center; }
  .forum-author-avatar { grid-row: span 2; }
  .forum-author-avatar .member-avatar-wrap { width: 38px; height: 38px; }
  .forum-toolbar { align-items: flex-start; flex-direction: column; }
  .forum-topic-latest { min-width: 0; }
}
@media (max-width: 440px) {
  .forum-category, .forum-topic { gap: 10px; padding: 13px; }
  .forum-category-icon, .forum-topic-icon { width: 34px; height: 34px; }
  .forum-count, .forum-topic-latest { display: none; }
  .forum-thread-toolbar { align-items: flex-start; flex-direction: column; }
  .forum-toolbar-actions { width: 100%; }
  .forum-toolbar-actions .btn { flex: 1; }
  .forum-composer-heading { align-items: flex-start; flex-direction: column; }
  .forum-pagination { gap: 8px; }
  .ticket-sidebar { grid-template-columns: 1fr; }
  .friend-card { align-items: flex-start; flex-direction: column; }
  .friend-actions { width: 100%; }
  .dm-message { width: 100%; }
  .dm-thread-heading { align-items: flex-start; }
  .ticket-live-controls { align-items: flex-start; flex-direction: column; }
  .ticket-heading { align-items: flex-start; flex-direction: column; }
  .ticket-heading-meta { width: 100%; justify-items: start; display: flex; align-items: center; flex-wrap: wrap; }
  .ticket-message-head { flex-direction: column; gap: 3px; }
  .profile-top { align-items: flex-start; flex-direction: column; }
}

.forum-featured { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.forum-directory { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.02); }
.forum-directory > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; }
.forum-directory > summary::-webkit-details-marker { display: none; }
.forum-directory > summary > span:first-child { display: grid; gap: 3px; }
.forum-directory > summary strong { font-size: 1.05rem; }
.forum-directory > summary .eyebrow { margin: 0; }
.forum-directory[open] > summary { border-bottom: 1px solid var(--line); }
.forum-directory[open] > summary .forum-section-note span { display: inline-block; transform: rotate(45deg); }
.forum-directory-content { padding: 16px; }
.forum-directory .forum-board-search { max-width: none; }
.forum-directory .forum-categories { max-height: min(52vh, 480px); overflow: auto; overscroll-behavior: contain; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); padding: 2px; }
.ticket-audit-filter { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.ticket-audit-filter .field { flex: 1; max-width: 360px; }
.ticket-audit-list { display: grid; gap: 10px; }
.ticket-audit-entry { padding: 16px; }
.ticket-audit-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ticket-audit-entry-head time { color: var(--muted); font-size: .82rem; }
.ticket-audit-entry p { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.ticket-audit-entry .btn { min-height: 34px; }
@media (max-width: 540px) {
  .forum-directory > summary { align-items: flex-start; flex-direction: column; }
  .ticket-audit-filter { align-items: stretch; flex-wrap: wrap; }
  .ticket-audit-filter .field { flex-basis: 100%; max-width: none; }
  .ticket-audit-entry-head { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .typing-dots i { animation: none; opacity: .7; } }
@media (max-width: 760px) { .member-avatar-forum { width: 38px; height: 38px; } }

/* ---------- Anti-inspection (assets/js/protect.js, config anti_inspect) ---------- */
html.gf-protect body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.gf-protect img, html.gf-protect a, html.gf-protect svg, html.gf-protect video { -webkit-user-drag: none; }
/* Restent sélectionnables : champs, codes à copier, contenus écrits par les membres, panel admin. */
html.gf-protect :is(input, textarea, select, [contenteditable=""], [contenteditable="true"], .allow-select, .coupon-code,
  .acct-codes, .forum-post-body, .msg-body, .hd-msg-body, .ticket-content, .dm-message-content, code, pre),
html.gf-protect :is(.allow-select, .coupon-code, .acct-codes, .forum-post-body, .msg-body, .hd-msg-body, .ticket-content, .dm-message-content) *,
html.gf-protect body.page-admin, html.gf-protect body.page-admin * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html.gf-devtools-open body > *:not(.gf-devtools-wall) { visibility: hidden !important; }
.gf-devtools-wall { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: center; padding: 24px;
  background: var(--bg, #06091a); color: var(--text, #e8ecf8); }
.gf-devtools-box { max-width: 420px; padding: 28px 26px; border-radius: 18px; text-align: center;
  background: var(--surface, #0d1430); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.gf-devtools-box strong { display: block; margin-bottom: 8px; font-size: 1.15rem; }
.gf-devtools-box p { margin: 0; color: var(--muted, #a9b3d1); line-height: 1.5; }
@media print { html.gf-protect body { display: none !important; } }
html.gf-printing body { display: none !important; }
