/* HEPHIR · téléphone (maj17) : cartes de chantier entières, menu lisible, tableaux en cartes. */
.s-cartes { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.s-carte { grid-template-columns: minmax(0, 1fr); align-content: start; }
.s-carte-photo, .s-carte-txt { min-width: 0; }
.s-carte-photo { overflow: hidden; }
.s-carte-txt b { overflow-wrap: anywhere; }
.e-cout-vide { color: var(--warn, #8a5a00); font-weight: 600; }
@media (max-width: 899px) {
  .nav a { font-size: .74rem; }
  .s-carte-photo { aspect-ratio: 16 / 9; max-height: 220px; }
}
@media (max-width: 700px) {
  .g-table-wrap { overflow: visible; }
  table.g-table.m-cartes, table.g-table.m-cartes tbody { display: block; width: 100%; }
  table.g-table.m-cartes thead { display: none; }
  table.g-table.m-cartes tr { display: grid; gap: 6px; padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--line, #e9e0d4); border-radius: 12px; background: var(--surface, #fff); }
  table.g-table.m-cartes tr.m-titre { background: transparent; border: 0; padding: 10px 2px 0; margin: 0; }
  table.g-table.m-cartes td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0; border: 0; text-align: right; font-size: 16px; min-width: 0; }
  table.g-table.m-cartes td:first-child { display: block; text-align: left; font-size: 17px; }
  table.g-table.m-cartes td[data-titre]::before { content: attr(data-titre); font-weight: 600; color: var(--muted, #52616a); text-align: left; flex: 0 0 auto; max-width: 55%; }
  table.g-table.m-cartes td:first-child::before { display: none; }
  table.g-table.m-cartes td:empty { display: none; }
  table.g-table.m-cartes td input, table.g-table.m-cartes td select { max-width: 50%; min-width: 0; }
  table.g-table.m-cartes tr.m-titre td { display: block; text-align: left; }
}

/* Téléphone : petits tableaux restants défilants dans leur cadre, boutons longs sur deux lignes */
@media (max-width: 700px) {
  .g-table-wrap { max-width: 100%; overflow-x: auto; }
  table.g-table:not(.m-cartes) { font-size: .86rem; }
  table.g-table:not(.m-cartes) td, table.g-table:not(.m-cartes) th { padding: 6px 5px; }
  .r-btn, .btn { max-width: 100%; white-space: normal; text-align: center; }
}
