/* ── MyLastNight – Base CSS ─────────────────────────────── */

:root {
  --bg:      #08070f;
  --bg2:     #0f0d1a;
  --bg3:     #161325;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --accent:  #c084fc;
  --accent2: #f472b6;
  --green:   #4ade80;
  --text:    #ede9fe;
  --muted:   rgba(237,233,254,0.4);
  --mono:    'MapleMono', monospace;
  --sans:    'MapleMono', monospace;
  --surface: #0f0d1a;
  --navbar-h: 52px;
  --surface: #0f0d1a;
  --card-base:     rgba(15, 20, 35, 0.75);
  --text-primary:  rgba(240, 245, 255, 0.95);
  --border-subtle: rgba(30, 40, 60, 0.8);
  --danger:        #ff4b5c;
  --success:       #3ad29f;
  --radius:        24px;
  --gap:           16px;
  --shadow-deep:   0 20px 60px rgba(0, 0, 0, 0.8);	
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono) !important;
  font-feature-settings: "liga" 1, "calt" 1;
  -webkit-font-feature-settings: "liga" 1, "calt" 1;
  min-height: 100vh;
  padding-top: var(--navbar-h);
}

/* ── Grain overlay ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.4;
}

/* ── Dégradé sous navbar ── */

/* ── Page Header ── */
.mln-page-header {
    background: transparent;
    border-bottom: none;
    padding: 16px 20px 12px 20px;
}
.mln-page-header-inner {
    max-width: 1024px;
    margin: 0 auto;
}
.mln-page-sub {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted, rgba(255,255,255,0.4));
}
.mln-page-title {
  font-family: 'MapleMono', monospace;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  background: linear-gradient(135deg, #f97316, #f43f5e, #c026d3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-bottom: 0.1em;;
  font-feature-settings: "liga" 1, "calt" 1;
}

/* ── Main content ── */
.mln-main {
  position: relative;
  z-index: 1;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
    font-size: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(192,132,252,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(192,132,252,0.5); }

/* ── Grille dashboard ── */
.dashboard {
    max-width: 1024px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 2fr;
    grid-template-rows: auto auto;
    gap: var(--gap);
    padding: 16px;
}

@media (orientation: portrait) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CARTES
======================================== */

.card {
    position: relative;
    border-radius: var(--radius);
    padding: 20px;
    margin: 8px;
    overflow: hidden;
    backdrop-filter: blur(28px) saturate(0.85);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 140px;
    border: 1px solid var(--border-subtle);
    background: var(--card-base);
    box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: var(--radius);
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.15), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover::before,
.card:focus-within::before {
    opacity: 1;
}

.card * {
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.card-title,
strong {
    color: #ffffff;
    font-weight: 700;
}

.card-subtitle,
.muted {
    color: var(--muted);   /* ← via mln-base.css */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.card-subtitle {
    font-size: 13px;
    /* opacity: 0.8 supprimé — évitait double-assombrissement */
}

/* ========================================
   PILLS & CHIPS
======================================== */

.pill,
.chip,
.event-pill {
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pill-live {
    color: var(--danger);
    background: rgba(255, 75, 92, 0.2);
    border-color: rgba(255, 75, 92, 0.4);
}

.pill-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 8px rgba(255, 75, 92, 0.8);
}

.chip-primary {
    background: rgba(58, 210, 159, 0.25);
    color: var(--success);
    border-color: rgba(58, 210, 159, 0.5);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chip-action {
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.chip-action:active {
    opacity: 0.8;
}

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    opacity: 0.8;
}

.footer {
    margin-top: 16px;
    font-size: 12px;
    opacity: 0.6;
    text-align: right;
}

/* ========================================
   ERREURS & ANIMATIONS
======================================== */

.error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
}

.skeleton,
.weather-updating {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: .4; }
    50%       { opacity: .7; }
}

/*