/**
 * @file
 * Responsive styles for listing_projets_table (PPP projects listing).
 */

.projets-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 40px 0;
}

.projets-table-responsive .projets-table {
  min-width: 1100px;
  width: 100%;
  margin: 0;
  overflow: visible;
}

.projets-table-responsive .projets-table thead th {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.35;
  vertical-align: middle;
  white-space: normal;
}

.projets-table-responsive .projets-table tbody td {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  vertical-align: middle;
}

.projets-table-responsive .projets-table caption {
  caption-side: top;
  padding: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
}

@media (max-width: 991px) {
  .projets-table-responsive .projets-table {
    min-width: 980px;
  }
}

@media (max-width: 767px) {
  .projets-table-responsive {
    overflow-x: visible;
    margin: 24px 0;
  }

  .projets-table-responsive .projets-table {
    min-width: 0;
    display: block;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .projets-table-responsive .projets-table caption {
    font-size: 1.15rem;
    padding-bottom: 12px;
  }

  .projets-table-responsive .projets-table thead {
    display: none;
  }

  .projets-table-responsive .projets-table tbody {
    display: block;
  }

  .projets-table-responsive .projets-table tbody tr {
    display: block;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #d8ebe0;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(17, 83, 46, 0.08);
    overflow: hidden;
  }

  .projets-table-responsive .projets-table tbody tr:nth-child(even) {
    background: #e4eab9;
    border-color: #c8d99a;
  }

  .projets-table-responsive .projets-table tbody tr:hover {
    background: #e2f5e8;
  }

  .projets-table-responsive .projets-table tbody tr:nth-child(even):hover {
    background: #d8e4a8;
  }

  .projets-table-responsive .projets-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #e0f1e5;
    text-align: right;
  }

  .projets-table-responsive .projets-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 46%;
    max-width: 46%;
    font-weight: 600;
    color: #11532e;
    text-align: left;
    line-height: 1.35;
  }

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

  .projets-table-responsive .projets-table tbody td:empty {
    display: none;
  }

  .projets-table-responsive .projets-table tbody td.views-field-field-fiche-signalitique,
  .projets-table-responsive .projets-table tbody td.views-field-field-plan-localisation {
    align-items: center;
  }

  html[lang="ar"] .projets-table-responsive .projets-table tbody td {
    flex-direction: row-reverse;
    text-align: left;
  }

  html[lang="ar"] .projets-table-responsive .projets-table tbody td::before {
    text-align: right;
  }

  html[lang="ar"] .projets-table-responsive .projets-table caption {
    text-align: right;
  }
}
