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

:root {
  --bg: #0d0d14;
  --surface: #16161f;
  --surface2: #1e1e2a;
  --border: #2a2a3a;
  --accent: #7c6af0;
  --accent2: #4fc3f7;
  --green: #4caf82;
  --text: #e0e0f0;
  --muted: #7a7a9a;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
header {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.peepo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(124, 106, 240, 0.4);
}

.header-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* MAIN */
main {
  flex: 1;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* CARD */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* HORLOGE */
.card-clock {
  background: linear-gradient(135deg, #1a1a2e, #1e1e35);
}

.clock {
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.date {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-transform: capitalize;
}

/* MÉTÉO */
.card-weather {
  background: linear-gradient(135deg, #1a2535, #1a1e30);
  text-align: center;
}

.weather-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.weather-temp {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent2);
}

.weather-desc {
  color: var(--text);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.weather-wind {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

/* GAUGE (CPU / Disque) */
.gauge-wrap {
  position: relative;
  width: 110px;
  margin: 0 auto;
}

.gauge {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--surface2);
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.gauge-fill.disk {
  stroke: var(--green);
}

.gauge-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  font-weight: 700;
}

.disk-detail {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

/* RSS */
.card-rss {
  border-radius: 16px;
}

.rss-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #f90;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.rss-list {
  list-style: none;
}

.rss-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.rss-item:last-child { border-bottom: none; }

.rss-item a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  flex: 1;
  transition: color 0.2s;
}

.rss-item a:hover { color: var(--accent); }

.rss-date {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.rss-loading {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .header-text h1 { font-size: 1.3rem; }
  .clock { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}
