/* --- Structure générale --- */
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #f5f7fa;
  padding-top: 40px; /* espace pour respirer */
}

/* Titre légèrement au-dessus de la carte */
h1 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.title-gradient {
  font-size: 2rem;
  margin-bottom: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #6a5cff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Carte centrée visuellement */
#map {
  height: 500px;
  min-height: 400px;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}

/* --- Panneau gauche --- */
.col-md-3.bg-white {
  background-color: #ffffff;
  border-right: 1px solid #dee2e6;
  padding: 1.2rem;
}

/* Labels */
label.form-label {
  font-weight: 600;
}

/* Inputs */
input.form-control, select.form-select {
  border-radius: 0.375rem;
}

/* --- Boutons horizontaux style toolbar --- */
.toolbar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-icon {
  background: none !important;
  border: none !important;
  padding: 0.4rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-icon i {
  font-size: 1.6rem;
  color: #444;
  transition: 0.2s ease;
}

.btn-icon:hover i {
  color: #45fd0d;
  transform: scale(1.2);
}

/* Tableau */
.table-responsive {
  margin-top: 1.5rem;
}

/* Mobile table */
@media (max-width: 576px) {
  #summary-table thead { display: none; }
  #summary-table tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
  }
  #summary-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border: 0 !important;
  }
  #summary-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 0.75rem;
  }
}

/*  Volet résumé  */
#summary-sidebar {
  position: fixed;
  top: 0;
  right: -380px; /* ← cachée par défaut */
  width: 360px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e3e3e3;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0,0,0,0.05);
  z-index: 900;
  transition: right 0.3s ease; 
}

#summary-sidebar.open {
  right: 0; /* ← visible */
}


.summary-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Décale le contenu principal */
.container {
  margin-right: 380px;
}

#inputs-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.input-block label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}




#toggle-summary {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 950;
}


.summary-entry {
  background: #141415;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.summary-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.row-3 { grid-template-columns: 1fr 1fr 1fr; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-1 { grid-template-columns: 1fr; }

.summary-item {
  background: #665cd9b5;
  border: 1px solid #ccc;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  color:#000000;
}

.summary-item[contenteditable="true"]:focus {
  outline: 2px solid #6a5cff;
  background: #eef0ff;
}

.summary-footer {
  margin-top: 2rem;
  font-weight: 700;
  color: #0d6efd;
  font-size: 1rem;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.summary-item[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
}
.summary-item:empty::before,
.summary-item:not(:focus):not([data-has-content])::before {
  content: attr(data-placeholder);
  color: #999;
}

.summary-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #6a5cff;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 950;
  transition: background 0.2s ease, transform 0.2s ease;
}

.summary-toggle:hover {
  background: #584ae0;
  transform: scale(1.05);
}
