@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,700;0,900;1,300&family=Fira+Code:wght@300;400&display=swap');

:root {
  --void:       #080808;
  --charcoal:   #111318;
  --storm:      #1c2030;
  --nimbus:     #2a3050;
  --cloud-dark: #3a4060;
  --lightning:  #f0d020;
  --arc:        #f8e840;
  --thunder:    #c0a010;
  --warm-grey:  #9090a0;
  --silver:     #c8c8d8;
  --snow-white: #f0f0f8;
  --danger-red: #e04030;
  --cyan-radar: #20e0c0;
  --card-bg:    rgba(28,32,48,0.7);
  --card-border:rgba(240,208,32,0.18);
  --text-main:  #dcdce8;
  --text-muted: #7070a0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 300;
  background: var(--void);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

/* ── Storm background ── */
.storm-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%,   rgba(42,48,80,0.7)  0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 10% 60%,  rgba(240,208,32,0.04)0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 80%,  rgba(32,224,192,0.03)0%, transparent 50%),
    linear-gradient(180deg, #0a0a10 0%, #080810 50%, #060608 100%);
}

/* ── Radar ring canvas ── */
#radar-canvas {
  position: fixed;
  top: 0; right: 0;
  width: 600px; height: 600px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
}

/* ── Lightning flashes ── */
#lightning-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

/* ── Hero: dramatic bold full-bleed ── */
.hero {
  padding: 80px 0 60px;
  position: relative;
  opacity: 0;
  animation: stormIn 1s 0.1s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes stormIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lightning);
  margin-bottom: 20px;
}

.hero-title-wrap {
  position: relative;
  margin-bottom: 30px;
}

.hero h1 {
  font-size: clamp(5rem, 14vw, 13rem);
  font-weight: 900;
  font-style: italic;
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--snow-white);
  text-transform: uppercase;
  position: relative;
}
.hero h1 .ghost {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240,208,32,0.2);
  font-size: 40%;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(240,208,32,0.2);
}
.hero-stat { }
.hero-stat-val {
  font-family: 'Fira Code', monospace;
  font-size: 2rem;
  font-weight: 400;
  color: var(--lightning);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}
.hero-stat-lbl { font-size: 0.88rem; color: var(--text-muted); line-height: 1.4; }

.hero-desc {
  grid-column: 1 / -1;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ── Divider ── */
.storm-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 60px 0;
  opacity: 0.4;
}
.storm-divider::before, .storm-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,208,32,0.6));
}
.storm-divider::after { transform: scaleX(-1); }
.storm-divider span {
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  color: var(--thunder);
  letter-spacing: 0.3em;
  white-space: nowrap;
}

/* ── Sec util ── */
.sec-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.63rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lightning);
  margin-bottom: 8px;
}
.sec-title {
  font-size: 2.8rem;
  font-weight: 700;
  font-style: italic;
  color: var(--snow-white);
  margin-bottom: 32px;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ── Phénomènes grid ── */
.phenomena-section { margin: 0 0 70px; opacity: 0; animation: rise 0.8s 0.9s forwards; }

.pheno-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: rgba(240,208,32,0.08);
  border-radius: 14px;
  overflow: hidden;
}

.pheno-cell {
  background: var(--card-bg);
  padding: 24px 20px;
  backdrop-filter: blur(10px);
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}
.pheno-cell:hover { background: rgba(42,48,80,0.85); }
.pheno-cell::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--lightning);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.pheno-cell:hover::after { transform: scaleX(1); }

.pheno-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.pheno-cell h3 {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--silver);
  margin-bottom: 8px;
}
.pheno-cell p { font-size: 0.92rem; font-weight: 300; line-height: 1.7; color: var(--text-muted); }
.pheno-scale {
  margin-top: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  color: var(--thunder);
  letter-spacing: 0.12em;
}

/* ── Alert scale table ── */
.scale-section { margin: 0 0 70px; opacity: 0; animation: rise 0.8s 1.1s forwards; }

.scale-table {
  width: 100%;
  border-collapse: collapse;
}
.scale-table th {
  font-family: 'Fira Code', monospace;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lightning);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(240,208,32,0.15);
}
.scale-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(240,208,32,0.06);
  font-size: 0.93rem;
  font-weight: 300;
  color: var(--text-muted);
}
.scale-table tr:hover td { background: rgba(240,208,32,0.04); }
.scale-table td:first-child { font-weight: 700; color: var(--silver); text-transform: uppercase; }

.alert-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}
.alert-green  { background: #30c060; box-shadow: 0 0 6px #30c060; }
.alert-yellow { background: #f0c020; box-shadow: 0 0 6px #f0c020; }
.alert-orange { background: #f07020; box-shadow: 0 0 6px #f07020; }
.alert-red    { background: #e03030; box-shadow: 0 0 6px #e03030; }
.alert-violet { background: #a030e0; box-shadow: 0 0 6px #a030e0; }

/* ── Instruments ── */
.instruments-section { margin: 0 0 70px; opacity: 0; animation: rise 0.8s 1.3s forwards; }

.instr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.instr-card {
  padding: 20px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  transition: transform 0.25s, border-color 0.25s;
}
.instr-card:hover { transform: translateY(-3px); border-color: rgba(240,208,32,0.4); }
.instr-icon { font-size: 1.6rem; margin-bottom: 10px; display: block; }
.instr-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--silver);
  margin-bottom: 6px;
}
.instr-card p { font-size: 0.88rem; font-weight: 300; line-height: 1.65; color: var(--text-muted); }
.instr-unit {
  margin-top: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  color: var(--thunder);
  letter-spacing: 0.1em;
}

/* ── Fronts & systèmes ── */
.fronts-section { margin: 0 0 70px; opacity: 0; animation: rise 0.8s 1.5s forwards; }

.fronts-list { display: flex; flex-direction: column; gap: 0; border: 1px solid rgba(240,208,32,0.12); border-radius: 14px; overflow: hidden; }
.front-item {
  display: grid;
  grid-template-columns: 14px 180px 1fr;
  gap: 0;
  border-bottom: 1px solid rgba(240,208,32,0.07);
  align-items: stretch;
  transition: background 0.3s;
}
.front-item:last-child { border-bottom: none; }
.front-item:hover { background: rgba(240,208,32,0.04); }

.front-color-bar { min-height: 100%; }
.front-name {
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--silver);
  border-right: 1px solid rgba(240,208,32,0.08);
  display: flex; align-items: center;
}
.front-desc { padding: 18px 20px; font-size: 0.92rem; font-weight: 300; line-height: 1.7; color: var(--text-muted); }

/* ── Records météo ── */
.records-section { margin: 0 0 70px; opacity: 0; animation: rise 0.8s 1.7s forwards; }

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.record-card {
  padding: 22px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s;
}
.record-card:hover { transform: scale(1.02); }
.record-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.rec-hot::before   { background: linear-gradient(90deg, #e04030, #f07020); }
.rec-cold::before  { background: linear-gradient(90deg, #2080e0, #40d8f8); }
.rec-wind::before  { background: linear-gradient(90deg, #f0d020, #c0a010); }
.rec-rain::before  { background: linear-gradient(90deg, #20c080, #2a9a8a); }
.rec-snow::before  { background: linear-gradient(90deg, #c0d8f8, #9090c0); }
.rec-hail::before  { background: linear-gradient(90deg, #a030e0, #6020b0); }

.record-card h3 {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.record-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--snow-white);
  line-height: 1;
  margin-bottom: 4px;
}
.record-loc { font-size: 0.85rem; font-style: italic; color: var(--text-muted); margin-bottom: 2px; }
.record-year { font-family: 'Fira Code', monospace; font-size: 0.7rem; color: var(--thunder); }

/* ── Footer ── */
footer {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 1px solid rgba(240,208,32,0.12);
  text-align: center;
  font-family: 'Fira Code', monospace;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

#meteo-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--thunder), var(--lightning));
  z-index: 9999;
}

@media (max-width: 720px) {
  .pheno-grid { grid-template-columns: 1fr 1fr; }
  .hero-bottom { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: clamp(3.5rem, 16vw, 8rem); }
}
@media (max-width: 480px) {
  .pheno-grid { grid-template-columns: 1fr; }
  .front-item { grid-template-columns: 8px 1fr; }
  .front-name { display: none; }
}
