/* --- PALETTE DE COULEURS ECO-TECH --- */
:root {
  --primary-color: #2e7d32; /* Vert Forêt (Boutons, Accents) */
  --secondary-color: #1b5e20; /* Vert très foncé (Navbar, Titres forts) */
  --accent-color: #81c784; /* Vert clair (Détails) */
  --bg-color: #f4f6f8; /* Gris très pâle (Fond de page, plus doux que le blanc) */
  --card-bg: #ffffff; /* Blanc pur (Fond des graphiques) */
  --text-dark: #2c3e50; /* Gris foncé (Texte) */
  --text-light: #6c757d; /* Gris moyen (Sous-titres) */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05); /* Ombre douce "Pro" */
}

/* =========================
   HERO AVEC IMAGE + OVERLAY
========================= */

.hero-saas {
  position: relative;
  text-align: center;
  padding: 70px 20px 65px;

  /* SUPPRIMER L’EFFET CARTE */
  border-radius: 0;
  box-shadow: none;

  overflow: hidden;

  background-image: url("assets/img.png");
  background-size: cover;
  background-position: center;
}

#intro {
  width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* OVERLAY BLANC (pour lisibilité du texte) */
.hero-saas::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(249, 251, 249, 0.7);
  z-index: 0;
}

/* GLOW VERT DISCRET */
.hero-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(46, 125, 50, 0.22),
    rgba(46, 125, 50, 0.1),
    transparent 70%
  );
  filter: blur(45px);
  z-index: 1;
}

/* TEXTE AU-DESSUS */
.hero-title,
.hero-subtitle {
  position: relative;
  z-index: 2;
}
.hero-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.05;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(44, 62, 80, 0.75);
  max-width: 760px;

  margin: 0 auto;
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-saas {
    padding: 60px 16px 55px;
  }

  .hero-glow {
    width: 420px;
    height: 240px;
  }
}

#intro {
  width: 100%;
  margin: 0; /* enlève marges possibles */
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.hero-saas {
  width: 100vw; /* plein écran */
  margin-left: calc(50% - 50vw); /* casse l'alignement container bootstrap */
  margin-right: calc(50% - 50vw);

  border-radius: 0 !important;
  box-shadow: none !important;
}

/* LOGO DANS LE MENU */
.brand img {
  height: 56px; /* taille du logo */
  width: auto;
  display: block;
}

/* --- TYPOGRAPHIE & BASE --- */
body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: "Inter", sans-serif; /* Texte courant */
  line-height: 1.6;
}

h1,
h2,
h3,
.navbar-brand {
  font-family: "Poppins", sans-serif; /* Titres modernes */
  color: var(--secondary-color);
  font-weight: 700;
}

/* --- NAVIGATION RAFFINÉE --- */
.navbar {
  background-color: rgba(
    255,
    255,
    255,
    0.95
  ) !important; /* Blanc translucide */
  backdrop-filter: blur(10px); /* Effet verre flouté */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  color: var(--primary-color) !important;
  letter-spacing: -0.5px;
}

.nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin-left: 15px;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.selected-site-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  margin-bottom: 6px;
  background: #fff;
}

.selected-site-chip button {
  width: 26px;
  height: 26px;
  border: 1px solid #adb5bd;
  border-radius: 6px;
  background: #f8f9fa;
  line-height: 1;
}

/* --- HERO SECTION (Introduction) --- */
#intro .p-5 {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #e8f5e9 100%
  ); /* Dégradé subtil vert */
  border: none;
  box-shadow: var(--shadow-soft);
}

/* Espace après le hero */
#intro {
  margin-bottom: 26px;
}

/* ou plus ciblé : espace avant la 1ère section */
#viz-bar {
  margin-top: 18px;
}

/* --- CONTENEURS DE VISUALISATION (CARDS) --- */
.viz-container {
  background-color: var(--card-bg);
  border: none; /* On enlève la bordure grise moche */
  border-radius: 16px; /* Coins bien arrondis */
  box-shadow: var(--shadow-soft); /* L'ombre qui donne de la profondeur */
  height: 500px;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease; /* Petit effet au survol */
}

.viz-container:hover {
  transform: translateY(-5px); /* Monte légèrement au survol */
}

/* --- BOUTONS STYLISÉS --- */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 50px; /* Boutons pilules */
  padding: 10px 25px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 50px;
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* --- SÉPARATEURS --- */
hr.featurette-divider {
  opacity: 0.1;
  margin: 5rem 0;
}

/* =========================
   RADAR – LAYOUT FINAL
========================= */

/* Radar uniquement */
#chart-radar.viz-container {
  height: 720px !important;
  min-height: 720px !important;
}


.radar-container {
  position: relative;
  height: 520px;
}

.radar-chart {
  width: 100%;
  height: 100%;
  max-width: none;
  position: relative;
  min-height: 520px;
}

#chart-radar svg {
  width: 100%;
  height: 100%;
  display: block;
}

#chart-radar {
  width: 100%;
  height: 100%;
  min-height: 520px;
  position: relative;
}

/* Scatter legend */
#scatter-legend {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
/*========================================
=============Map===========================
===========================================*/
#chart-map {
  position: relative;
  height: 900px;
  min-height: 900px;
  width: 100%;
  padding-top: 120px;
  box-sizing: border-box;
}

/* Header overlay plein largeur */
.map-header {
  pointer-events: none;
}

.map-header-inner {
  pointer-events: auto;
  background: rgba(240, 240, 240, 0.95);
  border-bottom: 1px solid #ddd;
  padding: 12px 16px;
}

/* Titre comme ton exemple */
.map-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
  color: #222;
}

.map-subtitle {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}
/* Options horizontales */
.map-controls-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.map-control label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 4px;
}

.map-control select {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fff;
}

/* Toggle boutons */
.map-toggle {
  display: flex;
  gap: 8px;
}

.map-toggle button {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.map-toggle button.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.viz-section {
  margin: 28px 0;
}
.section-title {
  font-weight: 900;
  margin: 0 0 12px;
}

.donuts-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
}
.donuts-controls label {
  font-size: 12px;
  color: #555;
  font-weight: 700;
}
.donuts-controls select,
.donuts-controls input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

.donuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.donut-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  padding: 10px 10px 14px;
  position: relative;
}
.donut-title {
  font-weight: 900;
  font-size: 13px;
  margin: 2px 0 8px;
}
.donut-sub {
  font-size: 11px;
  color: #666;
  margin-bottom: 6px;
}

.donuts-tooltip {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  max-width: 320px;
  z-index: 9999;
}

#chart-radar {
  width: 100%;
  min-height: 520px;
  position: relative;
  overflow: visible !important;
}

/* petits badges */
.selected-sites .badge {
  margin: 0 6px 6px 0;
  cursor: pointer;
}

/* LOGO */
.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #198754; /* vert */
}

/* ===== MENU PLUS PREMIUM ===== */
.top-menu {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(25, 135, 84, 0.25);
}

.menu-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 28px; /* moins haut, plus fin */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 42px; /* un peu plus présent */
  width: auto;
  display: block;
}

.menu-links {
  display: flex;
  align-items: center;
  gap: 10px; /* plus serré + pro */
}

.menu-link {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1b5e20;

  padding: 8px 12px;
  border-radius: 999px; /* pill */
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-link:hover {
  background: rgba(25, 135, 84, 0.1);
  transform: translateY(-1px);
}

.menu-link.active {
  background: rgba(25, 135, 84, 0.16);
}

.menu-link.active::after {
  display: none; /* on enlève le soulignement (plus moderne) */
}

/* Bouton "Informations" comme petit CTA */
.menu-link.info-link {
  background: rgba(25, 135, 84, 0.12);
  border: 1px solid rgba(25, 135, 84, 0.25);
}
.menu-link.info-link:hover {
  background: rgba(25, 135, 84, 0.18);
}

/* =====================================================
   SECTIONS (pour scroll propre)
===================================================== */
section {
  scroll-margin-top: 90px;
}

/* =====================================================
   MENU ACTIF (VERT)
===================================================== */
.menu-link.active {
  background: rgba(25, 135, 84, 0.15); /* vert bootstrap transparent */
  font-weight: 600;
  position: relative;
}

/* soulignement vert (optionnel mais très propre) */
.menu-link.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: #198754;
  border-radius: 2px;
}

/* =====================================================
   FOOTER - BLANC & VERT
===================================================== */
.site-footer {
  margin-top: 30px;
  padding: 10px 0;
  background: #ffffff;
  border-top: 1px solid #198754;
}

.footer-title,
.footer-text {
  display: none;
}

.footer-copy {
  font-size: 0.75rem;
  color: #6c757d;
}

/* =========================
   KPI – PAGE INFORMATIONS
========================= */
.kpi-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 18px;
  text-align: center;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
}

.kpi-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===============================
   TABLE DATASET – INTERACTIVE
================================ */

.data-table tbody tr {
  opacity: 0;
  transform: translateY(6px);
  transition: background 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.table-visible tbody tr {
  animation: rowFadeIn 0.4s ease forwards;
  animation-delay: calc(var(--i) * 60ms);
}

@keyframes rowFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover intelligent */
.data-table tbody tr:hover {
  background: rgba(25, 135, 84, 0.08);
  transform: translateX(4px);
}

/* Green / Non green */
.data-table td.green {
  color: #198754;
  font-weight: 600;
}

.data-table td.not-green {
  color: #dc3545;
  font-weight: 600;
}

/* =====================
   KPI ROW – ALIGNÉE
===================== */
.kpi-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: nowrap;
}

/* Carte KPI */
.kpi-card {
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  padding: 18px 12px;
  text-align: center;
}

/* Valeur KPI */
.kpi-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: #198754; /* vert */
  line-height: 1.1;
}

/* Label KPI */
.kpi-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 992px) {
  .kpi-row {
    flex-wrap: wrap;
  }
  .kpi-card {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (max-width: 576px) {
  .kpi-card {
    flex: 1 1 100%;
  }
}

/* =====================
   MENU RESPONSIVE
===================== */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #198754;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu-links {
    position: absolute;
    top: 64px;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    width: 220px;
    border-left: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    display: none;
  }

  .menu-links.open {
    display: flex;
  }

  .menu-link {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
  }
}

/* =====================
   VISUALISATIONS RESPONSIVE
===================== */

.viz-container {
  height: 480px;
  position: relative;
  overflow: visible !important;
}

/* Tablette */
@media (max-width: 992px) {
  .viz-container {
    height: 420px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .viz-container {
    height: 320px;
  }
}

.legend-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green {
  background: #9ccc65;
}

.dot-red {
  background: #b71c1c;
}

.legend-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
}
 .radar-site-list .list-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.radar-site-list .site-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 85%;
}

.radar-site-list .site-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #ced4da;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
}

.radar-site-list .is-selected .site-check {
  border-color: #0d6efd;
  background: rgba(13, 110, 253, 0.12);
}

.radar-site-list .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Sous-cases radar (séparation claire) */
.radar-subcard {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.radar-subcard-title {
  font-weight: 900;
  font-size: 0.95rem;
  color: #1b5e20;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
