/* ===== Urgence Helvetica — feuille de style principale ===== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #090c11;
  --bg-elevated: #0f141b;
  --bg-card: #131a23;
  --border: #212b38;
  --border-light: #2c3a4a;
  --text: #e7edf3;
  --text-dim: #93a1b3;
  --text-faint: #5c6a7c;
  --red: #e63946;
  --red-dim: #a3232e;
  --amber: #ff8c42;
  --green: #3ddc97;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font-head: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
  color: #fff;
}

p { color: var(--text-dim); margin: 0 0 1em; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Boutons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-play {
  background: linear-gradient(135deg, var(--red), var(--red-dim));
  color: #fff;
  box-shadow: 0 0 0 rgba(230, 57, 70, 0.5);
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}

.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-nav {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-lg { padding: 18px 40px; font-size: 1.15rem; }

/* ===== Header / Nav ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: #fff;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--red);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #fff;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.brand-mark::before { width: 4px; height: 16px; }
.brand-mark::after { width: 16px; height: 4px; }

.brand-name strong { color: var(--red); font-weight: 700; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  border-color: var(--red);
}

.main-nav a.btn { border-bottom: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  display: block;
}

/* ===== Hero ===== */

.hero {
  position: relative;
  padding: 110px 24px 100px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(230, 57, 70, 0.16), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
  background-blend-mode: normal, overlay, overlay, normal;
  border-bottom: 1px solid var(--border);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 30%, transparent 40%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: pulse 1.6s infinite;
}

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

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero h1 span { color: var(--red); }

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 64px;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stats .stat { text-align: center; }

.hero-stats .stat .num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
}

.hero-stats .stat .label {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== Sections ===== */

section.section {
  padding: 90px 24px;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.section-head .kicker {
  display: block;
  color: var(--amber);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }

/* ===== Feature grid ===== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: var(--red-dim);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: rgba(230, 57, 70, 0.12);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; margin: 0; }

/* ===== CTA band ===== */

.cta-band {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.14), rgba(255, 140, 66, 0.08));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 70px 24px;
}

.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 480px; margin: 0 auto 30px; }

/* ===== Footer ===== */

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
}

.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: var(--text-dim); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--red); }

.footer-note {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 12px 0 0;
  text-align: center;
}

/* ===== Pages internes (règles / à propos) ===== */

.page-header {
  padding: 72px 24px 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.08), transparent);
}

.page-header .kicker {
  display: block;
  color: var(--amber);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px;
}

.rule-block {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.rule-block:last-child { border-bottom: none; }

.rule-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: rgba(230, 57, 70, 0.12);
  color: var(--red);
  font-family: var(--font-head);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.rule-block h3 { margin-bottom: 6px; font-size: 1.15rem; }
.rule-block p { margin: 0; font-size: 0.95rem; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.info-card h4 { color: var(--amber); font-size: 1rem; margin-bottom: 10px; }

.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== Placeholder "jeu en construction" ===== */

.construction {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.construction-box { max-width: 480px; }

.construction-icon {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

/* ===== Carte interactive ===== */

.map-section {
  padding: 56px 24px 100px;
}

.map-layout {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.map-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.map-frame {
  width: 100%;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(230, 57, 70, 0.08), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.ch-map {
  width: 100%;
  height: auto;
  display: block;
}

.ch-lakes path {
  fill: #1c3a52;
  stroke: none;
  pointer-events: none;
}

.canton {
  fill: #1a2532;
  stroke: #364759;
  stroke-width: 1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.12s ease, stroke 0.12s ease;
  outline: none;
}

.canton:hover,
.canton:focus-visible {
  fill: #3a3222;
  stroke: var(--amber);
}

.canton.selected {
  fill: var(--red-dim);
  stroke: var(--red);
  stroke-width: 1.5;
}

.map-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.swatch {
  width: 14px; height: 14px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid var(--border-light);
}

.swatch-default { background: #1a2532; }
.swatch-hover { background: #3a3222; border-color: var(--amber); }
.swatch-selected { background: var(--red-dim); border-color: var(--red); }

.map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 92px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.sidebar-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.sidebar-card > p { font-size: 0.9rem; margin: 0; }

.hidden { display: none; }

.canton-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.canton-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.canton-list li:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.canton-list li.active {
  background: rgba(230, 57, 70, 0.14);
  color: #fff;
}

.canton-code {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--amber);
  width: 28px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-sidebar { position: static; }
}

/* ===== Vue canton (zoom) ===== */

.canton-map-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 24px;
}

.ch-canton-zoom {
  width: 100%;
  max-height: 460px;
  height: auto;
  display: block;
}

.canton-zoom-shape {
  fill: #1a2532;
  stroke: var(--red-dim);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

/* ===== Responsive ===== */

@media (max-width: 800px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 14px;
    display: none;
  }

  .main-nav.open { display: flex; }

  .main-nav a.btn { margin-top: 8px; text-align: center; }

  .hero-stats { gap: 28px; }
}
