/* ============================
   Base Intro et header
============================ */
.intro {
    width: 100%;
    overflow-x: hidden; /* empêche un scroll horizontal parasite */
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    text-align: center;
    box-sizing: border-box; /* évite que padding dépasse la largeur */
}

/* ============================
   Grille Produits (commerce)
============================ */
.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.info-card {
	background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
	padding: 15px 15px;
}

.produit-liste {
  width: 100%;
  max-width: 600px;  /* Limite la largeur pour lisibilité */
  margin: 0 auto;    /* Centre la liste horizontalement */
  padding: 20px;
  border-radius: 8px;
}

.produit-liste dt {
  font-weight: bold;   /* Termes en gras */
  margin-top: 15px;
  color: #333;
}

.produit-liste dd {
  margin: 0 1px 0 0; /* Décalage à gauche pour la définition */
  text-align: left;          /* Texte aligné à gauche */
  color: #555;
}


.product-info {
    padding: 15px 20px;
    text-align: center;
}

.product-info h2 {
    font-size: 1.4rem;
    margin: 10px 0;
    color: #333;
}

.product-subtitle {
    font-size: 1rem;
    color: #777;
    margin-bottom: 10px;
	height: 50px;
}

.product-subtitle-2 {
    font-size: 1rem;
    color: #777;
    margin-bottom: 10px;
	height: 10px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #007BFF;
}

.cta {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta:hover {
    background-color: #0056b3;
}

.modal {
    display: none; /* cachée par défaut */
    position: fixed;
    z-index: 2000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); /* voile assombrissant */
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* permet de scroller si contenu trop long */
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeInUp 0.3s ease;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    text-align: center; /* ou left selon votre goût */
}

.modal-body {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.modal-place {
    flex: 1;
	width: 50%;
	
}

.modal-place img {
	display: block;         /* transforme l’image en bloc */
    margin: 0 auto;         /* centre horizontalement */
    width: 100%;
	max-width: 300px;
	position: center;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}


.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #666;          /* gris plus doux */
    cursor: pointer;
    transition: color 0.3s;
}

.modal .close:hover {
    color: #007BFF;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
}
.modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-table th, 
.modal-table td {
    padding: 0.9rem 1.2rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.modal-table th {
    background-color: #eef2f7;
    font-weight: 600;
    color: #2c3e50;
}

.modal-table tr:nth-child(even) {
    background-color: #ffffff;
}

.modal-table tr:hover {
    background-color: #f1f7ff;
    transition: background-color 0.3s ease;
}

.modal-table tr:first-child th {
    background-color: #007BFF;
    color: #ffffff;
    font-size: 1rem;
}

.modal-table th:first-child {
    text-align: left;
    background-color: #f0f4f8;
    color: #34495e;
    font-weight: 600;
}

.modal-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: #2c3e50;
}



@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Version responsive
============================ */
@media (max-width: 1024px) {
    .produits-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 480px) {

    /* Intro */
    .intro {
        max-width: 100%;    /* pleine largeur */
        margin: 0;
        padding: 30px 15px;
    }

    .intro h1 {
        font-size: 1.7rem;
    }

    .intro p {
        font-size: 1rem;
    }

    /* Grille produits */
    .produits-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* deux colonnes */
        gap: 0;                         /* pas d’espace entre les cases */
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .container {
        padding: 0;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .product-card {
        margin: 0;
        border-radius: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .product-info h2 {
        font-size: 1.3rem;
    }

    .product-subtitle,
    .product-subtitle-2 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .product-info .cta {
        margin-top: 12px;
        padding: 8px 16px;
        font-size: 0.95rem;
    }

    /* Modales */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 95vh;
        padding: 1rem;
        overflow-y: auto;
        top: 2.5vh;
        position: relative;
    }

    .modal .close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
    }

    .modal-title {
        font-size: 1.3rem;
        margin-top: 0;
        margin-bottom: 1rem;
        text-align: center;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-place {
        width: 100%;
        box-sizing: border-box;
    }

    /* Tableau dans modale */
    .modal-table,
    .modal-table thead,
    .modal-table tbody,
    .modal-table th,
    .modal-table td,
    .modal-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .modal-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 0.5rem 1rem;
        background: #fff;
    }

    .modal-table tr:first-child {
        display: none; /* masque l’en-tête */
    }

    .modal-table th,
    .modal-table td {
        text-align: left;
        padding: 0.25rem 0;
        width: 100%;
    }

    .modal-table td:before,
    .modal-table th:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        color: #2c3e50;
        margin-bottom: 0.2rem;
    }

    .modal-table th:first-child {
        display: none;
    }
}
