/* ========================
   VARIABLES & RESET
   ======================== */
:root {
  --orange: #F5820A;
  --gold: #F5B800;
  --navy: #0D1B2A;
  --navy-light: #142233;
  --red: #D0002E;
  --text: #F8F6F1;
  --gray: #8A8F9A;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--text);
  color: var(--navy);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================
   NAVBAR
   ======================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,27,42,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245,130,10,0.15);
  transition: background 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text);
}
.logo span { color: var(--orange); }
.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--gray);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  transition: opacity 0.2s !important;
}
.btn-nav:hover { opacity: 0.85; }

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--navy);
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s;
}
.mobile-menu.open {
  display: flex;
  max-height: 300px;
  padding: 1rem 0;
}
.mobile-menu a {
  color: var(--text);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ========================
   BUTTONS
   ======================== */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: var(--navy);
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary.large { padding: 1rem 2.2rem; font-size: 1.1rem; }
.btn-primary.full-width { width: 100%; text-align: center; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--orange); background: rgba(245,130,10,0.1); }
.btn-outline.large { padding: 1rem 2.2rem; font-size: 1.1rem; }

/* ========================
   SECTIONS
   ======================== */
.section-dark {
  background: var(--navy);
  color: var(--text);
  padding: 5rem 0;
}
.section-light {
  background: var(--text);
  color: var(--navy);
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-title span { color: var(--orange); }
.section-sub {
  text-align: center;
  color: var(--gray);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}
.section-dark .section-sub { color: #aab0bc; }

/* ========================
   HERO
   ======================== */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--text);
  padding: 9rem 0 6rem;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(245,130,10,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(245,184,0,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--text), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: #aab0bc;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--orange);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* PHONE SCREENSHOT */
.hero-visual { display: flex; justify-content: center; }

.phone-frame {
  position: relative;
  width: 260px;
  border-radius: 36px;
  border: 3px solid rgba(245,130,10,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.phone-screenshot {
  width: 100%;
  display: block;
}

.hero-wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
}
.hero-wave svg { width: 100%; height: 60px; display: block; }

/* ========================
   STEPS
   ======================== */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  position: relative;
}

.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: var(--navy);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}

.step-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--navy); }
.step p { font-size: 0.85rem; color: #555; }

.step-arrow {
  font-size: 1.8rem;
  color: var(--orange);
  opacity: 0.4;
  padding-top: 3rem;
  font-weight: 300;
}

/* ========================
   VIDEO
   ======================== */
.section-video { padding-top: 3rem; padding-bottom: 4rem; }

.video-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.video-phone-frame {
  width: 300px;
  border-radius: 36px;
  border: 3px solid rgba(245,130,10,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
  background: #000;
}

.video-phone-frame video {
  width: 100%;
  display: block;
  border-radius: 0;
}

@media (max-width: 480px) {
  .video-phone-frame { width: 240px; }
}

/* ========================
   FEATURES GRID
   ======================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--navy-light);
  border: 1px solid rgba(245,130,10,0.15);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(245,130,10,0.4);
  transform: translateY(-3px);
}
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text); }
.feature-card p { font-size: 0.9rem; color: #aab0bc; }

/* ========================
   MAIRIES
   ======================== */
.mairie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

.avantages-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.check {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.dashboard-preview {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.dash-commune { font-weight: 700; font-size: 1rem; }
.badge-active {
  background: rgba(0,200,100,0.15);
  border: 1px solid rgba(0,200,100,0.3);
  color: #00c864;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
}

.dash-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.metric {
  background: var(--navy-light);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}
.metric-val { display: block; font-size: 1.4rem; font-weight: 900; color: var(--orange); }
.metric-label { font-size: 0.7rem; color: var(--gray); }

.dash-status {
  background: rgba(0,200,100,0.08);
  border: 1px solid rgba(0,200,100,0.2);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: #6ee7b7;
  margin-bottom: 1rem;
}

.dash-history { display: flex; flex-direction: column; gap: 0.5rem; }
.hist-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--gray);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hist-type {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.hist-type.malaise { background: rgba(245,130,10,0.2); color: var(--orange); }
.hist-type.incendie { background: rgba(208,0,46,0.2); color: #ff4466; }
.hist-time { margin-left: auto; }
.hist-resolve { color: #6ee7b7; font-size: 0.75rem; }

/* ========================
   LOGIN BOX
   ======================== */
.login-box {
  max-width: 420px;
  margin: 0 auto;
  background: var(--navy-light);
  border: 1px solid rgba(245,130,10,0.2);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 0.4rem;
}
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--orange);
}

.login-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 1rem;
}
.login-note a { color: var(--orange); }

/* ========================
   CTA FINALE
   ======================== */
.section-cta {
  background: linear-gradient(135deg, var(--navy), #1a2c40);
  color: var(--text);
  padding: 5rem 0;
  text-align: center;
}
.section-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 1rem;
}
.section-cta h2 span { color: var(--orange); }
.section-cta p {
  color: #aab0bc;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.store-badges {
  display: flex;
  justify-content: center;
}

/* ========================
   FOOTER
   ======================== */
footer {
  background: #060f18;
  color: var(--gray);
  padding: 2.5rem 0 1rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand p { font-size: 0.85rem; margin-top: 0.4rem; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a { font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--orange); }
.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  padding-top: 1.2rem;
  color: #555;
}

/* ========================
   ANIMATIONS
   ======================== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.3s !important; }
.delay-3 { transition-delay: 0.45s !important; }

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .burger { display: block; }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-btns { justify-content: center; }
  .stats { justify-content: center; }
  .hero-visual { margin-top: 1rem; }
  .phone-frame { width: 200px; }

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { padding-top: 0; transform: rotate(90deg); }
  .step { max-width: 100%; width: 100%; }

  .mairie-grid { grid-template-columns: 1fr; }
  .dash-metrics { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero { padding: 7rem 0 4rem; }
  .section-dark, .section-light { padding: 3.5rem 0; }
  .phone-frame { width: 180px; }
}
