* {
  box-sizing: border-box;
}

/* 🔑 Ces règles DOIVENT être globales */
html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #e6e6e6;
}

/* 🔑 Layout principal */
.app {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}


/* ===== COLONNE GAUCHE ===== */
.sidebar {
  width: 280px;
  min-width: 280px;
  height: 100%;
  background-color: #3b3b3b;
  color: #ffffff;
  padding: 15px;
  flex-shrink: 0;
  overflow-x: hidden;  
}

/* Titre */
.site-title {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
}

/* Météo */
.weather-widget {
  margin-bottom: 15px;
}

/* ===== LIVRAISON BOIS ===== */
.form-row {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.form-row label {
  width: 80px;          /* largeur fixe pour l’alignement */
  font-size: 12px;
}

.form-input {
  display: flex;
  align-items: center;
  flex: 1;
}

.form-input .unit {
  margin-left: 6px;
  font-size: 12px;
}


.wood-section {
  border-top: 1px solid #555;
  padding-top: 15px;
  margin-top: 15px;
}

.wood-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: normal;
}

/* Formulaire */
.wood-section label {
  display: block;
  font-size: 12px;
  margin-top: 10px;
}

.input-row {
  display: flex;
  align-items: center;
}

.input-row input {
  flex: 1;
}

.unit {
  margin-left: 6px;
  font-size: 12px;
}

input {
  background-color: #555;
  border: none;
  color: #fff;
  padding: 6px;
  width: 100%;
}

input::placeholder {
  color: #bbb;
}

.btn-validate {
  margin-top: 15px;
  width: 100%;
  background-color: #7d7d7d;
  border: none;
  padding: 8px;
  color: #fff;
  cursor: pointer;
}

.btn-validate:hover {
  background-color: #9a9a9a;
}

/* ===== INFOS BOIS (SIDEBAR BAS) ===== */

.wood-infos {
  margin-top: 20px;
}

/* UNE LIGNE = LABEL + VALEUR */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

/* Texte à gauche */
.info-row .label {
  font-size: 13px;
  color: #ddd;
  font-weight: bold;
}

/* Valeur à droite (STYLE DÉDIÉ, PAS DE .highlight) */
.info-row .value {
  font-size: 14px;
  font-weight: bold;
  background-color: #2f2f2f;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 90px;
  text-align: right;
}

/* Séparateur discret */
.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== PARTIE DROITE ===== */
.content {
  flex: 1 1 auto;
  min-width: 0; 
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chart-wrapper {
  flex: 1;
  height: 45vh;        /* 👈 hauteur lisible */
  min-height: 320px;   /* 👈 sécurité petits écrans */
  max-height: 420px;   /* 👈 évite les écrans géants */
  display: flex;
  background: #d9d9d9;
  padding: 15px;
  border-radius: 6px;
}

#energyChart {
  flex: 1;
  width: 100%;
  height: 100%;           /* 👈 OBLIGATOIRE */
  min-height: 0;     
}

/* NOUVEAU : wrapper pour futur tableau */
.table-wrapper {
  margin-top: 20px;
}

/* TABLEAU */
.table-wrapper {
  margin-top: 24px;
  background: #2b2b2b;
  padding: 16px;
  border-radius: 8px;
}

.table-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: #fff;
}

.table-scroll {
  overflow-x: auto;
}

.energy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #eee;
}

.energy-table thead {
  background: #3a3a3a;
  position: sticky;
  top: 0;
}

.energy-table th,
.energy-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #444;
  text-align: right;
  white-space: nowrap;
}

.energy-table th:first-child,
.energy-table td:first-child {
  text-align: left;
}

.energy-table th span {
  font-size: 11px;
  opacity: 0.7;
}

.energy-table tbody tr:hover {
  background: #383838;
}

/* Mise en valeur livraisons */
.energy-table tr.delivery-day {
  background: rgba(46, 125, 50, 0.25);
}

.energy-table td.delivery {
  font-weight: bold;
  color: #8bc34a;
}

.energy-table td.total {
  font-weight: bold;
}

.table-wrapper {
  margin-top: 24px;
  background: #2b2b2b;
  padding: 16px;
  border-radius: 8px;
}

.table-title {
  margin-bottom: 12px;
  color: #fff;
}

.table-scroll {
  max-height: 320px;        /* scroll vertical */
  overflow-y: auto;
  border: 1px solid #444;
}

.energy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #eee;
}

.energy-table thead {
  position: sticky;
  top: 0;
  background: #3a3a3a;
  z-index: 1;
}

.energy-table th,
.energy-table td {
  padding: 8px;
  border-bottom: 1px solid #444;
  text-align: right;
}

.energy-table th:first-child,
.energy-table td:first-child {
  text-align: left;
}

.energy-table tbody tr:hover {
  background: #383838;
}

.energy-table tr.delivery {
  background: rgba(46,125,50,0.25);
  font-weight: bold;
}

/* Week-end */
.energy-table tr.weekend {
  background: rgba(33, 150, 243, 0.15); /* bleu doux */
}

/* Livraison bois */
.energy-table tr.delivery {
  background: rgba(46, 125, 50, 0.25);
  font-weight: bold;
}

/* Si week-end + livraison */
.energy-table tr.weekend.delivery {
  background: linear-gradient(
    90deg,
    rgba(33, 150, 243, 0.2),
    rgba(46, 125, 50, 0.25)
  );
}

.table-actions {
  text-align: center;
  margin-top: 10px;
}

.btn-load-more {
  background: #3a3a3a;
  color: #fff;
  border: 1px solid #555;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-load-more:hover {
  background: #4a4a4a;
}









