:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #34495e;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --text-color: #333;
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
}

header {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

header h1 {
  margin-bottom: 1rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input,
button {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ddd;
}

button {
  background-color: var(--secondary-color);
  color: white;
  cursor: pointer;
  border: none;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2980b9;
}

main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.card p {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--secondary-color);
}

.card .secondary-info {
  font-size: 0.9rem;
  color: var(--dark-color);
  margin-top: 0.5rem;
}

.chart-container {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  height: 400px;
}

.chart-container h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.main-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.data-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: white;
  box-shadow: var(--card-shadow);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--primary-color);
  color: white;
}

tr:nth-child(even) {
  background-color: #f6f8fa;
}

tr.charging {
  background-color: rgba(52, 152, 219, 0.1);
}

tr.charging-public {
  background-color: rgba(46, 204, 113, 0.1);
}

tr.charging td:nth-child(2) {
  color: var(--secondary-color);
  font-weight: bold;
}

tr.charging-public td:nth-child(2) {
  color: var(--success-color);
  font-weight: bold;
}

tr.driving {
  background-color: rgba(231, 76, 60, 0.1);
}

tr.driving td:nth-child(3) {
  color: var(--accent-color);
  font-weight: bold;
}

footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
}

.data-tables {
  margin-bottom: 2rem;
}

.data-tables h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .main-charts,
  .data-comparison {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-container {
    height: 300px;
  }
}
/* Ajouter ce code CSS pour les infobulles */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 250px;
  background-color: var(--dark-color);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  font-weight: normal;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark-color) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
/* Documentation section styles */
.documentation-section {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.documentation-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #3498db;
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid #e6e6e6;
  margin-bottom: 1.5rem;
}

.doc-tab {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  color: #7f8c8d;
  transition: all 0.3s;
}

.doc-tab:hover {
  color: #3498db;
  background-color: #f8f9fa;
}

.doc-tab.active {
  color: #3498db;
  border-bottom: 3px solid #3498db;
  margin-bottom: -2px;
}

.doc-panel {
  display: none;
}

.doc-panel.active {
  display: block;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.documentation-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.documentation-table th {
  background-color: var(--primary-color);
  padding: 1rem;
  text-align: left;
}

.documentation-table td {
  padding: 1rem;
  border-bottom: 1px solid #ecf0f1;
}

.calculation-method {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.calculation-method h4 {
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

.formula {
  padding: 1rem;
  background-color: #2c3e50;
  color: white;
  font-family: monospace;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.calendar-example {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.calendar-example ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1rem;
}

.calendar-example li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.workday-marker,
.weekend-marker,
.vacation-marker {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 3px;
}

.workday-marker {
  background-color: #3498db;
}

.weekend-marker {
  background-color: #9b59b6;
}

.vacation-marker {
  background-color: #2ecc71;
}

@media (max-width: 768px) {
  .doc-tab {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .documentation-table {
    font-size: 0.9rem;
  }

  .documentation-table th,
  .documentation-table td {
    padding: 0.75rem 0.5rem;
  }
}
