
 * { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { font-family: Arial, sans-serif; background: #f4f6f8; color: #1f2937; }

/* ===== BARRE DU HAUT ===== */
.topbar {
  position: sticky; top: 0; z-index: 500;
  background: white; border-bottom: 1px solid #e5e7eb;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 5%;
}
.logo { font-size: 22px; font-weight: 800; }
.logo span { color: #e63946; }
.demo-badge { background: #fef3c7; color: #92400e; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* ===== ✅ MENU DE NAVIGATION ===== */
.menu {
  position: sticky; top: 57px; z-index: 490;
  background: white; border-bottom: 1px solid #e5e7eb;
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 10px 5%;
  -webkit-overflow-scrolling: touch;
}
.menu a {
  text-decoration: none;
  color: #374151;
  font-weight: 700;
  font-size: 14px;
  background: #f3f4f6;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: 0.2s;
}
.menu a:hover { background: #ffe4e6; }
.menu a.active { background: #08b66d; color: white; }

/* Les sections ne sont pas cachées sous le menu */
section, .panel { scroll-margin-top: 120px; }

.wrap { width: 94%; max-width: 900px; margin: auto; padding-bottom: 60px; }

/* ===== ACCUEIL / SOS ===== */
.hero { text-align: center; padding: 30px 0 10px; }
.sos-btn {
  width: 230px; height: 230px; border-radius: 50%;
  border: 14px solid #ffdfe2; background: #e63946; color: white;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; box-shadow: 0 15px 40px rgba(230,57,70,.3);
}
.sos-btn .big { font-size: 34px; }
.sos-btn .txt { font-size: 40px; font-weight: 900; }
.sos-btn small { font-size: 11px; }
.status { margin-top: 14px; color: #6b7280; font-weight: 600; }

/* ===== PANNEAUX ===== */
.panel { background: white; border: 1px solid #e5e7eb; border-radius: 16px; padding: 18px; margin-top: 20px; }
.panel h2 { font-size: 19px; margin-bottom: 12px; }
.panel h3 { font-size: 15px; margin: 14px 0 6px; }

.count { font-size: 64px; font-weight: 900; color: #e63946; text-align: center; margin: 10px 0; }

/* ===== BOUTONS ===== */
.btn { border: none; border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer; text-decoration: none; color: white; display: inline-block; }
.btn.red { background: #e63946; }
.btn.blue { background: #2563eb; }
.btn.black { background: #111827; width: 100%; margin-top: 10px; }

.log { background: #f9fafb; border-radius: 10px; padding: 10px; min-height: 40px; }
.log p { font-size: 13px; margin: 4px 0; }

#map { height: 320px; border-radius: 12px; }

/* ===== CARTES ===== */
.cards { display: grid; gap: 12px; }
.card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; }
.card h3 { margin-bottom: 6px; }
.card p { font-size: 13px; color: #4b5563; margin: 3px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.routes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.t { background: #f1f5f9; padding: 6px 9px; border-radius: 8px; font-size: 12px; }
.t.link { background: #dbeafe; color: #1d4ed8; text-decoration: none; font-weight: 700; }

/* ===== FORMULAIRE CONTACTS ===== */
.grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.grid3 input { border: 1px solid #d1d5db; border-radius: 10px; padding: 10px; font: inherit; }
.grid3 .btn { grid-column: 1 / -1; }

/* ===== BADGES ===== */
.badge { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.red { background: #fee2e2; color: #991b1b; }

.loading { color: #6b7280; padding: 10px; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal-box { background: white; border-radius: 18px; padding: 22px; width: 100%; max-width: 520px; position: relative; max-height: 90vh; overflow-y: auto; }
.x { position: absolute; right: 14px; top: 10px; border: none; background: none; font-size: 26px; cursor: pointer; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.type-btn { border: 2px solid #e5e7eb; background: #fafafa; border-radius: 16px; padding: 20px; cursor: pointer; font-size: 17px; text-align: left; }
.type-btn:hover { border-color: #e63946; background: #fff5f5; }
.ai-box textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px; font: inherit; }
.ai-box .btn { margin-top: 8px; }

.hidden { display: none !important; }

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .grid3, .types { grid-template-columns: 1fr; }
  .menu { top: 55px; }
}
/* ===== CORRECTION BOUTONS ZOOM (+ / -) DE LA CARTE ===== */
.leaflet-bar {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    color: #1f2937 !important;
    background: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    text-decoration: none !important;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-control-zoom a:hover {
    background: #f3f4f6 !important;
    color: #e63946 !important;
}

/* La carte ne passe jamais devant le menu */
.leaflet-container {
    z-index: 0;
    font-family: Arial, sans-serif;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 600px) {
    .leaflet-control-zoom a {
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
        font-size: 15px !important;
    }
}