/**
 * Tableau Comparatif Styles
 */

.tableau-comparatif-section {
  position: relative;
}

.tableau-comparatif {
  margin: 0;
}

.tableau-comparatif table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.tableau-comparatif thead tr {
  background-color: #951B81;
  color: #ffffff;
}

.tableau-comparatif thead th {
  padding: 1.25rem;
  text-align: center;
  font-weight: 600;
  border: 1px solid #000;
  white-space: nowrap;
}

.tableau-comparatif thead th:first-child {
  text-align: left;
  white-space: normal;
}

.tableau-comparatif tbody td {
  padding: 1.25rem;
  text-align: center;
  border-bottom: 1px solid #000;
}

.tableau-comparatif tbody tr:last-child td {
  border-bottom: 1px solid #000;
}

.tableau-comparatif tbody td:first-child {
  text-align: left;
  font-weight: 500;
}

.tableau-comparatif tbody tr:nth-child(even) {
  background-color: var(--wp--custom--neutral-100);
}

.tableau-comparatif tbody tr:hover {
  background-color: var(--wp--custom--neutral-200);
}

.tableau-comparatif tbody tr:first-child td {
  border-top: none;
}

/* Style des icônes check et cross */
.tableau-comparatif tbody td:not(:first-child) {
  font-size: 1.25rem;
}

/* Responsive Tablette */
@media (max-width: 1024px) {
  .tableau-comparatif thead th,
  .tableau-comparatif tbody td {
    padding: 1rem;
  }
}

/* Responsive Mobile */
@media (max-width: 768px) {
  .tableau-comparatif {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #951B81 #e5e5e5;
  }

  /* Scrollbar personnalisée pour webkit */
  .tableau-comparatif::-webkit-scrollbar {
    height: 8px;
  }

  .tableau-comparatif::-webkit-scrollbar-track {
    background: #e5e5e5;
    border-radius: 4px;
  }

  .tableau-comparatif::-webkit-scrollbar-thumb {
    background: #951B81;
    border-radius: 4px;
  }

  .tableau-comparatif table {
    min-width: 700px;
  }

  .tableau-comparatif thead th,
  .tableau-comparatif tbody td {
    padding: 0.875rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Colonne fonctionnalités sticky */
  .tableau-comparatif thead th:first-child,
  .tableau-comparatif tbody td:first-child {
    position: sticky;
    left: 0;
    background-color: inherit;
    z-index: 1;
    min-width: 200px;
    width: 200px;
  }

  .tableau-comparatif thead th:first-child {
    background-color: #951B81;
    z-index: 2;
    white-space: nowrap;
  }

  /* Retirer le fixed layout en mobile */
  .tableau-comparatif table.has-fixed-layout {
    table-layout: auto;
  }

  .tableau-comparatif tbody tr:nth-child(odd) td:first-child {
    background-color: #fff;
  }

  .tableau-comparatif tbody tr:nth-child(even) td:first-child {
    background-color: var(--wp--custom--neutral-100, #f5f5f5);
  }

  /* Style des icônes sur mobile */
  .tableau-comparatif tbody td:not(:first-child) {
    font-size: 1rem;
  }
}

/* Responsive Mobile petit */
@media (max-width: 480px) {
  .tableau-comparatif table {
    min-width: 600px;
  }

  .tableau-comparatif thead th,
  .tableau-comparatif tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }
}
