/* Styles demand-summary supprimés - fonctionnalité retirée */

.product-card-container { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem; }

/* --- Premier ensemble de règles .product-card --- */
.product-card {
    border-radius: 8px; 
    padding: 0.8rem; /* Léger ajustement du padding */
    flex: 1 1 280px; 
    max-width: calc(50% - 0.5rem); 
    display: flex; 
    flex-direction: column; 
    min-width: 280px; 
}

/* Ajustement pour quand il y a 3 cartes ou plus pour qu'elles prennent environ 1/3 */
.product-card-container:has(.product-card:nth-child(3)) .product-card {
    max-width: calc(33.333% - 0.66rem);
}

/* Ajustement pour une seule carte pour qu'elle prenne plus de place, mais pas toute la largeur si inutile */
.product-card-container:has(.product-card:first-child:last-child) .product-card {
    flex-basis: 400px; /* Une plus grande base si seule */
    max-width: 820px; /* Largeur augmentée pour ne pas casser le design horizontal */
}

.product-card img { 
    width: 100%; 
    max-height: 120px; /* TAILLE IMAGE REDUITE */
    object-fit: contain; 
    margin-bottom: 0.75rem; /* Marge ajustée */
    border-bottom: 1px solid #eee; 
    padding-bottom: 0.75rem; /* Padding ajusté */
}
.product-card h5.product-title { /* Style pour le nouveau titre produit */
    margin: 0 0 0.3rem 0; 
    font-size: 1.05rem; /* Taille ajustée */
    color: #253359;
    font-weight: 600;
    line-height: 1.3;
}
.product-card p.product-ref { /* Style pour la référence */
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}
.product-card ul.product-key-points { /* Style pour les points clés */
    font-size: 0.85rem;
    margin: 0.5rem 0;
    padding-left: 1.2rem;
    color: #333;
}
.product-card ul.product-key-points li {
    margin-bottom: 0.2rem;
}
.product-card p.product-delivery { /* Style pour le délai */
    font-size: 0.85rem;
    color: #555;
    margin: 0.3rem 0;
}
.product-card p { margin: 0.25rem 0; font-size: 0.9rem; }
.product-card .price { font-weight: bold; color: #007bff; margin-top: 0.5rem; font-size: 1rem; }
.input-row { display: flex; gap: .5rem; margin-top: auto; /* Pousse en bas */ padding-top: 0.75rem; align-items: center; }


/* --- Deuxième ensemble de règles .product-card (fusionné et nettoyé si possible) --- */
/* Ces règles étaient initialement séparées, je les intègre ici en supposant qu'elles s'appliquent au même .product-card */
/* S'il y a des différences subtiles, elles devront être ajustées manuellement */

.product-card {
    /* flex-basis: calc(33.3333% - (2rem / 3)); */ /* Déjà géré par le premier bloc et les :has() sélecteurs */
    box-sizing: border-box; 
    border-radius: 8px; 
    padding: 1rem; 
    display: flex; 
    flex-direction: column; 
    min-width: 0; 
}

.product-card img {
    max-width: 100%; 
    height: auto; 
    max-height: 120px; 
    object-fit: contain; 
    margin-bottom: 0.75rem; 
    border-radius: 4px; 
    align-self: center; 
}

.product-card .product-title { /* Renommé depuis h5.product-title pour la généricité */
    font-size: 0.95rem; 
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #333;
    min-height: 2.8em; 
    line-height: 1.4em;
}

.product-card .product-ref { /* Renommé depuis p.product-ref */
    font-size: 0.75rem; 
    color: #777;
    margin-bottom: 0.5rem;
}

.product-card .product-key-points { /* Renommé depuis ul.product-key-points */
    font-size: 0.8rem; 
    color: #555;
    list-style-position: inside; 
    padding-left: 0; 
    margin-bottom: 0.5rem;
    flex-grow: 1; 
}

.product-card .product-key-points li {
    margin-bottom: 0.15rem; 
}

.product-card .product-delivery { /* Renommé depuis p.product-delivery */
    font-size: 0.75rem; 
    color: #777;
    margin-bottom: 0.75rem;
}

.product-card .price {
    font-size: 1rem; 
    font-weight: bold;
    color: #007bff; 
    margin-bottom: 1rem;
}

.product-card .input-row {
    display: flex;
    align-items: center; 
    gap: 0.5rem; 
    margin-top: auto; 
}

.product-card .input-row input[type="number"] {
   padding: 0.4rem;
   width: 50px; 
   border: 1px solid #ccc;
   border-radius: 4px;
   text-align: center;
}

.product-card .input-row .confirm-button {
  flex-grow:1; 
  padding: .5rem .7rem; 
  font-size:0.85rem; 
  background-color: #007bff; /* Note: .confirm-button global a un gradient */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-card .input-row .confirm-button:hover {
  background-color: #0056b3;
}

/* Styles pour product-detail-card (injectés par JS) */
.product-details-container { margin: 15px 0; }
.product-detail-card { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; margin-bottom: 20px; background: #ffffff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.product-detail-header { display: flex; padding: 15px; }
.product-detail-img { width: 120px; flex-shrink: 0; margin-right: 20px; }
.product-detail-img img { width: 100%; height: auto; border-radius: 4px; }
.product-detail-summary { flex-grow: 1; }
.product-detail-summary h3 { margin: 0 0 10px; color: #2956c5; font-size: 1.3rem; }
.product-detail-short { margin: 0 0 10px; font-size: 1rem; }
.product-detail-price { font-weight: bold; font-size: 1.2rem; color: #2956c5; margin: 5px 0; }
.product-detail-delivery { font-size: 0.9rem; color: #666; margin-bottom: 15px; }
.product-detail-description { padding: 15px; border-top: 1px solid #eee; font-size: 0.95rem; line-height: 1.5; }
.product-detail-card .btn-add-to-cart { background: #2956c5; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-weight: 600; }
.product-detail-card .btn-add-to-cart.added { background: #57a957; }
@media (max-width: 600px) {
  .product-detail-header { flex-direction: column; }
  .product-detail-img { width: 100%; margin-right: 0; margin-bottom: 15px; }
}

/* Styles pour le tableau de comparaison */
.comparison-table-container {
    margin: 20px auto;
    max-width: 100%;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: white;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table thead th:first-child {
    text-align: left;
    width: 200px;
    min-width: 180px;
}

.comparison-table tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
    font-size: 13px;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-table tbody tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

.comparison-table tbody td:first-child {
    background-color: #ecf0f1 !important;
    border-right: 2px solid #bdc3c7;
    font-weight: 600;
    color: #2c3e50;
}

.comparison-table tbody td:not(:first-child) {
    text-align: center;
}

/* Style pour les images dans le tableau */
.comparison-table img {
    max-width: 120px;
    max-height: 90px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Boutons d'action pour chaque produit */
.comparison-table-container .action-container {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 10px;
}

.comparison-table-container .product-actions {
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.comparison-table-container .product-actions:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.comparison-table-container .product-actions h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
}

.comparison-table-container .product-actions input[type="number"] {
    width: 60px;
    padding: 5px;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    text-align: center;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .comparison-table-container {
        margin: 10px;
        overflow-x: scroll;
    }
    
    .comparison-table {
        min-width: 600px;
    }
    
    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .comparison-table thead th:first-child,
    .comparison-table tbody td:first-child {
        width: 150px;
        min-width: 130px;
    }
    
    .comparison-table img {
        max-width: 80px;
        max-height: 60px;
    }
    
    .comparison-table-container .action-container {
        flex-direction: column;
        align-items: center;
    }
    
    .comparison-table-container .product-actions {
        width: 100%;
        max-width: 300px;
    }
} 