/* ==========================================================
   Compléments pour la page « Honoraires conventionnés »
   À ajouter à la fin de documents.css
   ========================================================== */

.fees-page {
  --document-width: 1080px;
}

.fees-document {
  overflow: hidden;
}

.fees-header {
  margin-bottom: clamp(34px, 5vw, 54px);
}

.fees-lead {
  max-width: 700px;
  margin: 24px auto 0;
  color: var(--text-light, #657286);
  font-size: 1rem;
  line-height: 1.7;
}

.fees-section {
  margin-top: clamp(42px, 6vw, 66px);
}

.fees-section > h2 {
  margin: 0 0 24px;
  padding-bottom: 13px;
  color: var(--text, #43546a);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.25;
  border-bottom: 1px solid rgba(67, 84, 106, 0.14);
}

.fees-section > p,
.practitioners-panel > p,
.fees-check-list,
.fees-notice p,
.home-visit-fee p,
.fees-legal-note {
  color: var(--text-light, #657286);
  font-size: 1rem;
  line-height: 1.75;
}

.fees-section > p {
  margin: 0 0 18px;
}

.practitioners-panel {
  padding: clamp(24px, 4vw, 34px);
  background: #f7f5f1;
  border-left: 3px solid var(--accent, #dfad68);
  border-radius: 0 8px 8px 0;
}

.practitioners-panel > h2 {
  border-bottom-color: rgba(67, 84, 106, 0.1);
}

.practitioners-panel > p {
  margin: 0 0 18px;
}

.fees-check-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 1.35rem;
}

.fees-check-list > li::marker,
.practitioner-numbers li::marker {
  color: var(--accent, #dfad68);
}

.practitioner-numbers {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-left: 1.25rem;
}

.fees-notice {
  margin-top: 28px;
  padding: 22px 24px;
  background: rgba(223, 173, 104, 0.1);
  border: 1px solid rgba(223, 173, 104, 0.55);
  border-radius: 8px;
}

.fees-notice p {
  margin: 0;
}

.fees-notice strong,
.home-visit-fee strong {
  color: var(--text, #43546a);
}

.fees-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(67, 84, 106, 0.14);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(67, 84, 106, 0.06);
}

.fees-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.fees-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fees-table th,
.fees-table td {
  padding: 17px 14px;
  border-right: 1px solid rgba(67, 84, 106, 0.12);
  border-bottom: 1px solid rgba(67, 84, 106, 0.12);
  text-align: center;
  vertical-align: middle;
  line-height: 1.45;
}

.fees-table tr > *:last-child {
  border-right: 0;
}

.fees-table tbody tr:last-child > * {
  border-bottom: 0;
}

.fees-table thead th {
  color: var(--text, #43546a);
  background: #f7f5f1;
  font-size: 0.9rem;
  font-weight: 700;
}

.fees-table thead th:first-child {
  width: 18%;
}

.fees-table tbody th {
  color: var(--text, #43546a);
  background: rgba(247, 245, 241, 0.58);
  font-weight: 700;
}

.fees-table tbody td {
  color: var(--text-light, #657286);
  font-size: 0.94rem;
}

.fees-table tbody tr:nth-child(even) td {
  background: rgba(247, 245, 241, 0.3);
}

.home-visit-fee {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 22px;
  padding: 22px 24px;
  background: #f7f5f1;
  border: 1px solid rgba(67, 84, 106, 0.14);
  border-radius: 8px;
}

.home-visit-fee h3 {
  margin: 0;
  color: var(--text, #43546a);
  font-size: 1rem;
}

.home-visit-fee p {
  margin: 0;
}

.fees-legal-note {
  max-width: 760px;
  margin: clamp(42px, 6vw, 62px) auto 0;
  padding-top: 24px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  border-top: 1px solid rgba(67, 84, 106, 0.14);
}

/* ---------- Tablettes et mobiles ---------- */

@media (max-width: 760px) {
  .fees-table-wrapper {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .fees-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .fees-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .fees-table,
  .fees-table tbody,
  .fees-table tr,
  .fees-table th,
  .fees-table td {
    display: block;
    width: 100%;
  }

  .fees-table tbody {
    display: grid;
    gap: 20px;
  }

  .fees-table tbody tr {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(67, 84, 106, 0.14);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(67, 84, 106, 0.06);
  }

  .fees-table tbody th {
    padding: 16px 18px;
    color: var(--text, #43546a);
    background: #f7f5f1;
    border: 0;
    border-bottom: 1px solid rgba(67, 84, 106, 0.12);
    text-align: left;
  }

  .fees-table tbody td {
    display: grid;
    grid-template-columns: minmax(145px, 42%) 1fr;
    gap: 15px;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid rgba(67, 84, 106, 0.1);
    text-align: right;
  }

  .fees-table tbody td:last-child {
    border-bottom: 0;
  }

  .fees-table tbody td::before {
    content: attr(data-label);
    color: var(--text, #43546a);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
  }

  .fees-table tbody tr:nth-child(even) td {
    background: #ffffff;
  }

  .home-visit-fee {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .fees-table tbody td {
    grid-template-columns: 1fr;
    gap: 5px;
    text-align: left;
  }
}

/* ---------- Impression ---------- */

@media print {
  .fees-page {
    --document-width: 100%;
  }

  .fees-table-wrapper {
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
  }

  .fees-table {
    min-width: 0;
    font-size: 9pt;
  }

  .fees-table th,
  .fees-table td {
    padding: 8px 6px;
  }

  .fees-table tbody tr {
    break-inside: avoid;
  }

  .fees-notice,
  .home-visit-fee,
  .practitioners-panel {
    break-inside: avoid;
  }
}
