/* ============================================================
   me.alexis-sgl.fr — tokens repris de budget.alexis-sgl.fr (thème sombre)
   ============================================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrainsmono-latin.woff2) format('woff2');
}

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg: #0b0d12;
  --surface: #13161d;
  --surface-2: #171b23;
  --surface-3: #1d222c;
  --border: #252b37;
  --border-strong: #323a49;
  --text: #e9ecf2;
  --text-2: #c3cad6;
  --muted: #8b95a8;
  --faint: #5f697c;
  --accent: #8b80ff;
  --accent-hover: #9d94ff;
  --accent-soft: rgba(139, 128, 255, .14);
  --pos: #3ccf91;
  --pos-soft: rgba(60, 207, 145, .12);
  --neg: #ff6b81;
  --neg-soft: rgba(255, 107, 129, .12);
  --warn: #f5b049;
  --warn-soft: rgba(245, 176, 73, .12);
  --info: #5cb8f0;
  --info-soft: rgba(92, 184, 240, .12);
  --c1: #8b80ff;
  --c2: #22b8d8;
  --c3: #fb8c3c;
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --ease: cubic-bezier(.22, 1, .36, 1); /* courbe d'alexis-sgl.fr */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 30rem at 15% -10%, rgba(139, 128, 255, .08), transparent 60%),
    radial-gradient(40rem 25rem at 100% 0%, rgba(34, 184, 216, .05), transparent 60%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ic { width: 18px; height: 18px; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- Composants ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-size: 11.5px; font-weight: 500;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.badge.ok .dot { background: var(--pos); }
.badge.ko .dot { background: var(--neg); }

.alert { margin-top: 18px; padding: 9px 12px; border-radius: var(--radius-xs); border: 1px solid; font-size: 13.5px; }
.alert.danger { color: var(--neg); background: var(--neg-soft); border-color: rgba(255, 107, 129, .3); }
.alert.info { color: var(--info); background: var(--info-soft); border-color: rgba(92, 184, 240, .3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: var(--radius-sm); padding: 10px 16px;
  font-weight: 550; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-google { width: 100%; margin-top: 24px; background: var(--text); color: var(--bg); }
.btn-google:hover { background: var(--text-2); }

.btn-icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.btn-logout:hover { color: var(--neg); border-color: rgba(255, 107, 129, .4); }

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: 100%; max-width: 380px; padding: 32px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(19, 22, 29, .8); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 20px; }
.login-card .muted { margin-top: 4px; font-size: 13.5px; }
.login-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--accent);
}

/* ---------- Coquille ---------- */
.shell { max-width: 1600px; margin: 0 auto; padding: 24px 16px 40px; display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 640px) { .shell { padding: 32px 24px 48px; } }
@media (min-width: 1024px) { .shell { padding: 36px 32px 56px; } }

.top { display: flex; flex-direction: column-reverse; gap: 16px; }
@media (min-width: 640px) { .top { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.hello { font-size: 24px; letter-spacing: -.02em; }
.hello span { color: var(--accent); }
@media (min-width: 640px) { .hello { font-size: 30px; } }
.health { list-style: none; padding: 0; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.top-right { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.clock { text-align: right; }
.clock-time { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.clock-date { color: var(--muted); font-size: 13px; }
.clock-date::first-letter { text-transform: uppercase; }
@media (min-width: 640px) { .clock-time { font-size: 32px; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: 1fr; grid-auto-rows: minmax(176px, auto); gap: 16px; }
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2, .span-4 { grid-column: span 2; }
}
@media (min-width: 1280px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .span-4 { grid-column: span 4; }
  .tall { grid-row: span 2; }
}

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(19, 22, 29, .7); backdrop-filter: blur(6px);
  transition: border-color .3s var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card > :not(.card-title) { margin: 16px; flex: 1; }
.card-title {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 550; color: var(--text-2);
}
.card-title .ic { width: 16px; height: 16px; color: var(--muted); transition: color .3s var(--ease); }
.card:hover .card-title .ic { color: var(--accent); }

.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 112px; padding: 12px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.placeholder p { max-width: 240px; font-size: 12.5px; color: var(--faint); }

/* ---------- Météo ---------- */
.weather { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.weather-main { display: flex; align-items: flex-start; justify-content: space-between; }
.weather-main .muted { font-size: 13.5px; }
.weather-temp { font-family: var(--mono); font-size: 38px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.weather-label { color: var(--text-2); font-size: 13.5px; }
.weather-ico { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
.stats > div { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-2); }
.stats dt { color: var(--faint); }
.stats dd { margin: 0; font-family: var(--mono); color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
