/* =============================== */
/*             MODALES             */
/* =============================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.35);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s ease;
}

.modal-overlay:not(.is-hidden) {
    display: flex;
    opacity: 1;
}

/* Fenêtre modale */
.modal-window {
    background: #fff;
    padding: 28px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    max-width: 700px;
    width: 90vw;
    position: relative;
    animation: modalFadeIn 0.25s ease;
    display: block;
    max-height: 80vh;
    overflow-y: auto;
}

/* Animation */
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* Titre */
.modal-title {
    font-size: 20px;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Bouton fermer */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #eee;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.modal-close:hover {
    background: #ddd;
}

/* =============================== */
/*   GRILLE PRODUITS (UNIFIÉE)     */
/* =============================== */

.plaque-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 10px;
    width: 100%;
}

/* Carte produit */
.plaque-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s ease;
}

.plaque-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px #0002;
}

/* Image */
.plaque-thumb {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Label */
.plaque-item span {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.plaque-item small {
    font-size: 12px;
    opacity: 0.7;
}

/* =============================== */
/*     RESPONSIVE MOBILE           */
/* =============================== */

@media (max-width: 600px) {
    .modal-window {
        padding: 20px 16px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}
/* =============================== */
/*   CATALOGUE TEMPLATES (MODALE)  */
/* =============================== */

.catalog-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Carte générique (catégories, sous-catégories, items) */
.catalog-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 110px;
    height: 110px;

    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;

    cursor: pointer;
    transition: 0.2s ease;
    text-align: center;
    overflow: hidden;
}

.catalog-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Images dans les templates */
.catalog-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Texte dans les catégories */
.catalog-card span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

