/*
 * Complements a Bootstrap 5.3.8.
 * Toute la mise en page est assuree par Bootstrap : ce fichier ne contient
 * que les quelques ajustements specifiques au projet.
 */

/* Ratio constant pour les visuels des cartes produit */
.product-card .card-img-top {
    aspect-ratio: 4 / 3;
    background-color: var(--bs-secondary-bg);
}

/* Visuel de la fiche produit */
.product-detail-img {
    max-height: 460px;
}

/* Effet de survol des cartes produit et des cartes d'accueil */
.product-card,
.home-card {
    transition: transform .15s ease-in-out, box-shadow .15s ease-in-out;
}

.product-card:hover,
.home-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bs-box-shadow) !important;
}

/* Le badge du panier reste colle au libelle du lien */
.navbar .nav-link .badge {
    font-size: .7rem;
    vertical-align: text-top;
}

/* Modale RGPD des cookies : bloque visuellement l'arriere-plan */
#cookieConsentModal .form-check-label {
    cursor: pointer;
}

#cookieConsentModal .form-check-input:disabled {
    opacity: .65;
}

/* Structure et actions des cartes produit */
.product-card .card-body {
    min-height: 0;
}

.product-card-footer {
    margin-top: auto;
}

.product-card-form {
    min-width: 0;
}

.product-card-form > .d-flex {
    width: 100%;
    min-width: 0;
}

.product-card-qty {
    min-width: 4.5rem;
}

.product-card-btn {
    flex: 1 1 auto;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .product-card-form > .d-flex {
        flex-wrap: wrap;
    }

    .product-card-qty,
    .product-card-btn {
        width: 100%;
        flex-basis: 100%;
    }
}

.text-white-important {
    color: #fff !important;
}

/* Carte produit en rupture de stock : entierement desactivee (pas de clic, pas de survol) */
.product-card.product-card-unavailable {
    opacity: .55;
    filter: grayscale(.6);
    pointer-events: none;
    cursor: not-allowed;
}

.product-card.product-card-unavailable:hover {
    transform: none;
    box-shadow: var(--bs-box-shadow-sm) !important;
}

/* ---- Utilitaires (remplacent les attributs style inline) ---- */
.js-hidden { display: none; }
.form-inline-block { display: inline; }
.w-auto-important { width: auto; }
.w-qty-input { width: 6rem; }
.w-12rem { width: 12rem; }
.mw-20rem { max-width: 20rem; }
.mw-560 { max-width: 560px; }
.quill-editor-box { min-height: 400px; }
.thumb-150 { max-height: 150px; }
.img-cover { object-fit: cover; }
.content-img { max-width: 100%; }
.content-img-w-50 { width: 50px; }
.content-img-w-100 { width: 100px; }
.content-img-w-150 { width: 150px; }
.content-img-w-200 { width: 200px; }
.content-img-w-300 { width: 300px; }
.content-img-w-500 { width: 500px; }
