/* eqen : bento Glass */

:root {
  --bg: #07070c;
  --accent: #f43f5e;
  --c2: #9f1239;
  --c3: #4c0519;
  --st: #80848e;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  --glass-border: rgba(255, 255, 255, .16);
  --glass-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .2);
  color-scheme: dark;
}

/* Couleur du statut Discord, pilotée par main.js via data-status */
html[data-status="online"] { --st: #3ddc84; }
html[data-status="idle"] { --st: #f0b232; }
html[data-status="dnd"] { --st: #f23f43; }
html[data-status="offline"] { --st: #80848e; }
html[data-status="unknown"] .status-ui { visibility: hidden; }
html[data-status="offline"] .ping,
html[data-status="unknown"] .ping { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fff;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
img { display: block; }

/* Fond */
.aurora, .grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.aurora { overflow: hidden; }
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.blob--a { top: -300px; left: -260px; width: 900px; height: 900px; background: radial-gradient(closest-side, var(--accent) 20%, transparent); opacity: .55; animation: drift 18s ease-in-out infinite; }
.blob--b { bottom: -340px; right: -240px; width: 960px; height: 960px; background: radial-gradient(closest-side, var(--c2) 20%, transparent); opacity: .34; animation: drift 22s ease-in-out infinite reverse; }
.blob--c { top: 36%; left: 42%; width: 520px; height: 520px; background: radial-gradient(closest-side, var(--c3) 20%, transparent); opacity: .28; animation: drift 20s ease-in-out infinite; }
.grain { width: 100%; height: 100%; opacity: .22; mix-blend-mode: overlay; }

/* Page */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(16px, 3vw, 48px);
}

/* Barre du haut + menu */
.topbar { position: relative; z-index: 5; display: flex; align-items: center; padding: 18px 8px; animation: fadein 1s ease .5s backwards; }
.menu-wrap { position: relative; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px 5px 5px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .25s;
}
.menu-btn:hover { background: rgba(255, 255, 255, .13); }
.menu-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.menu-btn img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.chev { width: 12px; height: 12px; opacity: .7; transition: transform .25s var(--ease); }
.menu-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  width: min(332px, calc(100vw - 32px));
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(34, 34, 52, .94), rgba(18, 18, 30, .94));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .14);
  animation: pop .2s var(--ease);
}
.menu[hidden] { display: none; }
.mi {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.mi:hover, .mi:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.mi svg { flex: none; width: 18px; height: 18px; }
.mi .arrow-sm { width: 14px; height: 14px; opacity: .6; }
.mi-label { flex: 1; }
.dim { font-size: 12px; font-weight: 300; color: rgba(255, 255, 255, .62); }
.sep { height: 1px; margin: 6px 8px; border: 0; background: rgba(255, 255, 255, .1); }
.switch { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--accent); transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transform: translateX(16px); transition: transform .25s var(--ease); }
[aria-checked="false"] .switch { background: rgba(255, 255, 255, .2); }
[aria-checked="false"] .switch::after { transform: none; }

/* Scène + grille : la grille s'étire avec l'écran pour remplir la page */
.stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 3vh, 40px) 0; }
.frame { position: relative; width: 100%; max-width: 1440px; }

.bento {
  --row: clamp(170px, 21vh, 232px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: var(--row) calc(var(--row) * 1.2) var(--row);
  gap: clamp(14px, 1.2vw, 18px);
}

.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 1.9vw, 28px);
  border-radius: 30px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--glass-shadow);
  color: #fff;
  text-decoration: none;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) backwards;
}
.bento > :nth-child(1) { animation-delay: .05s; }
.bento > :nth-child(2) { animation-delay: .13s; }
.bento > :nth-child(3) { animation-delay: .21s; }
.bento > :nth-child(4) { animation-delay: .29s; }
.bento > :nth-child(5) { animation-delay: .37s; }
.bento > :nth-child(6) { animation-delay: .45s; }
.bento > :nth-child(7) { animation-delay: .53s; }
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .17), transparent 62%);
}
.tile:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (hover: hover) {
  a.tile:hover, .tile--vault:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, .34);
    box-shadow: 0 36px 70px -28px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
  }
  .tile:hover::before { opacity: 1; }
  a.tile:hover .arrow { transform: translate(3px, -3px); opacity: 1; }
}

.tile--wide { grid-column: span 2; padding: clamp(22px, 1.9vw, 28px) clamp(24px, 2.1vw, 32px); }
.tile--profile { grid-column: span 2; grid-row: span 2; padding: clamp(28px, 2.4vw, 38px); gap: 28px; }
.tile--discord {
  background: linear-gradient(160deg, rgba(88, 101, 242, .6), rgba(88, 101, 242, .16));
  border-color: rgba(150, 160, 255, .42);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.row { display: flex; justify-content: space-between; }
.row--start { align-items: flex-start; }
.row--end { align-items: flex-end; gap: 12px; }

.ico {
  display: grid;
  place-items: center;
  width: clamp(46px, 3.9vw, 56px);
  height: clamp(46px, 3.9vw, 56px);
  border-radius: 15px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
}
.ico svg { width: clamp(24px, 2vw, 28px); height: clamp(24px, 2vw, 28px); }
.ico--lg { width: clamp(52px, 4.3vw, 62px); height: clamp(52px, 4.3vw, 62px); border-radius: 17px; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); }
.ico--lg .discord-logo { width: clamp(28px, 2.4vw, 34px); height: clamp(28px, 2.4vw, 34px); }
.arrow { width: 16px; height: 16px; opacity: .6; transition: transform .35s var(--ease), opacity .35s; }
.tile--discord .arrow { width: 18px; height: 18px; opacity: .7; }

.label { font-size: clamp(16px, 1.35vw, 19px); font-weight: 600; }
.label--lg { font-size: clamp(20px, 1.8vw, 26px); }
.handle { font-size: clamp(12px, 1vw, 14px); font-weight: 300; color: rgba(255, 255, 255, .7); }
.handle--lg { font-size: clamp(13px, 1.1vw, 15px); }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }

/* Profil */
.avatar { position: relative; width: clamp(96px, 9vw, 130px); height: clamp(96px, 9vw, 130px); border-radius: 50%; box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .7); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #0c0c14; }
.ping, .status-dot { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--st); }
.ping { animation: ping 2.8s cubic-bezier(0, 0, .2, 1) infinite; }
.status-dot { border: 3px solid #15151d; }
.profile-text { display: flex; flex-direction: column; gap: 10px; }
h1 { margin: 0; font-size: clamp(48px, 5.4vw, 78px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.bio { margin: 0; font-size: clamp(15px, 1.3vw, 19px); font-weight: 300; line-height: 1.5; color: rgba(255, 255, 255, .74); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-size: 12px; color: rgba(255, 255, 255, .85); }
.dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--st); }
.pill-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); font-size: 12px; }

/* Vault */
.tile--vault { gap: 14px; }
.vault-head { display: flex; align-items: center; gap: 14px; }
.vault-logo { flex: none; width: clamp(52px, 4.4vw, 64px); height: clamp(52px, 4.4vw, 64px); border-radius: 17px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 12px 24px -12px rgba(0, 0, 0, .8); }
.vault-desc { margin: 0; font-size: clamp(13px, 1.05vw, 15px); font-weight: 300; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s;
}
.pill svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.pill--solid { background: rgba(255, 255, 255, .92); color: #0b0b12; }
.pill--ghost { padding: 8px 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .24); color: #fff; }
.pill:hover { transform: translateY(-2px); }
.pill:hover svg { transform: translate(2px, -2px); }
.pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Heure */
.clock { font-size: clamp(40px, 4.4vw, 64px); font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }

/* Pied de page */
.footer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 8px 22px; font-size: 12px; color: rgba(255, 255, 255, .62); animation: fadein 1s ease .5s backwards; }

/* Animations */
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 40px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Mobile */
@media (max-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(170px, auto); }
  .tile--wide, .tile--profile { grid-column: span 2; }
  .tile--profile { grid-row: auto; }
  .clock { font-size: clamp(32px, 9.5vw, 44px); }
  .pills { gap: 8px; }
  .pill { padding: 12px 12px; }
  .pill--ghost { padding: 11px 11px; }
}
