/* =====================================================================
   RÉGLAGES DE LA PAGE — couleurs, tailles et espaces
   ===================================================================== */
.page-poids {
  --poids-green: #087f43;
  --poids-soft: #eef8f1;
  --poids-cream: #ffffff;
  --poids-gap: 48px;
}

.page-poids main {
  max-width: 1400px;
  margin: auto;
  padding: 32px 24px 56px;
}

.page-poids main :is(h1, h2, h3) {
  color: var(--poids-green);
  margin: 0 0 16px;
}

.page-poids main p {
  margin: 0 0 16px;
}

.page-poids main img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.weight-lead {
  font-size: 18px !important;
}

.page-poids .weight-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--poids-green);
  background: var(--poids-green);
  color: #fff;
  font: 700 15px Arial, sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.page-poids .weight-button:hover {
  background: #007b32;
  border-color: #007b32;
  color: white;
}

.page-poids .weight-button.secondary {
  background: white;
  color: #007b32;
  border-color: #b7d7bd;
}

.page-poids .weight-button.secondary:hover {
  background: var(--poids-soft);
}

.page-poids :is(a, button, input, select):focus-visible {
  outline: 3px solid #265239;
  outline-offset: 4px;
}

.weight-section {
  margin-top: var(--poids-gap);
  scroll-margin-top: 100px;
}

.weight-panel {
  padding: 28px;
  border-radius: 24px;
  background: var(--poids-soft);
  border: 1px solid #d9e8d8;
}

.weight-panel.cream {
  background: var(--poids-cream);
}

.weight-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.weight-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: 700 15px Arial, sans-serif;
  color: #294a36;
}

.page-poids .weight-field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #aec8b5;
  border-radius: 10px;
  font: 400 16px Arial, sans-serif;
  color: #233c2b;
  background: white;
  box-sizing: border-box;
}

.weight-field.full {
  grid-column: 1/-1;
}

.weight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.weight-result {
  border-radius: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #c9dccb;
}

.weight-result[hidden] {
  display: none;
}

.weight-number {
  font-size: 32px !important;
  font-weight: 700;
  color: #007b32;
  line-height: 1.2 !important;
}

.weight-error {
  color: #9d2020;
  font-weight: 700;
}

.weight-small {
  font-size: 14px !important;
  color: #536455;
}

.weight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.weight-card {
  padding: 24px;
  border-radius: 20px;
  background: var(--poids-cream);
  border: 1px solid #e1e7dc;
}

.weight-table-wrap {
  overflow: auto;
  border: 1px solid #d5e0d2;
  border-radius: 18px;
}

.page-poids .weight-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 15px;
}

.page-poids .weight-table :is(th, td) {
  padding: 15px 18px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #d9e4d7;
}

.page-poids .weight-table th {
  background: #087f43;
  color: #fff;
}

.page-poids .weight-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.page-poids .weight-table tbody tr:nth-child(even) {
  background: #eef8f1;
}

.weight-details {
  padding: 18px 0;
  border-bottom: 1px solid #d9e4d7;
}

.weight-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: #28583a;
}

.weight-details p {
  margin-top: 14px !important;
}

.weight-formula {
  font-family: monospace;
  font-size: 14px !important;
  overflow-wrap: anywhere;
}

@media(max-width:900px) {
  .weight-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width:480px) {
  .page-poids {
    --poids-gap: 32px;
  }

  .page-poids main {
    padding: 22px 16px 40px;
  }

  .weight-panel {
    padding: 20px;
  }

  .weight-fields {
    grid-template-columns: 1fr;
  }

  .weight-field.full {
    grid-column: auto;
  }

  .weight-lead {
    font-size: 16px !important;
  }
}

/* Conclusion : même largeur et même rythme que le contenu principal. */
.page-poids #content .weight-closing-note {
  width: 100%;
  box-sizing: border-box;
  margin: 36px 0 0;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid #d7e5d9;
  border-left: 5px solid #087847;
  border-radius: 20px;
  background: #edf7f0;
}

.page-poids #content .weight-closing-note h2 {
  margin: 0 0 18px;
  color: #075e3a;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.3;
}

.page-poids #content .weight-closing-note p {
  margin: 0;
  line-height: 1.75;
}

@media (max-width: 700px) {
  .page-poids #content .weight-closing-note {
    margin-top: 24px;
    padding: 22px;
    border-radius: 16px;
  }
}
