
/* =========================================
   INSTITUT RIVE DROITE - SIDE CART
   ========================================= */

/* OVERLAY */
#ird-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 20, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: opacity 450ms ease, visibility 450ms ease;
    z-index: 99998;
    cursor: none;
}

body.ird-cart-open #ird-cart-overlay {
    opacity: 1;
    visibility: visible;
}

/* PANNEAU */
#ird-side-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 450ms cubic-bezier(.77, 0, .175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,.08);
}

body.ird-cart-open #ird-side-cart {
    transform: translateX(0);
}

body.ird-cart-open {
    overflow: hidden;
}

/* HEADER */
.ird-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 28px;
    border-bottom: 1px solid #eeeeee;
    flex-shrink: 0;
}

.ird-cart-header h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 400;
    color: #333;
}

#ird-cart-close {
    border: none;
    background: transparent;
    font-size: 29px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    transition: color .25s ease, transform .25s ease;
    padding: 0;
}

#ird-cart-close:hover {
    color: #963F88;
    transform: rotate(90deg);
}

/* CONTENU */
.ird-cart-content {
    padding: 25px 28px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* PRODUIT */
.ird-cart-product {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
}

/* IMAGE */
.ird-cart-product-image {
    width: 110px;
    min-width: 110px;
}

.ird-cart-product-image img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}

/* INFORMATIONS */
.ird-cart-product-info {
    flex: 1;
    min-width: 0;
}

.ird-cart-product-name {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.ird-cart-product-name a {
    color: #333333;
    text-decoration: none;
}

.ird-cart-product-name a:hover {
    color: #963F88;
}

.ird-cart-product-price {
    color: #963F88;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 13px;
}

/* BENEFICIAIRE ET MESSAGE */
.ird-cart-product-meta {
    font-size: 12px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ird-cart-product-meta dl {
    margin: 0;
}

.ird-cart-product-meta dt {
    font-weight: 600;
    color: #444;
    margin-top: 5px;
}

.ird-cart-product-meta dd {
    margin: 0 0 5px 0;
    padding-left: 10px;
}

.ird-cart-product-meta dd p {
    margin: 0;
}

/* QUANTITE ET SUPPRESSION */
.ird-cart-product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.ird-cart-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    overflow: hidden;
}

.ird-cart-quantity button {
    width: 30px;
    height: 30px;
    border: none;
    background: #f8f5f7;
    color: #963F88;
    font-size: 17px;
    cursor: pointer;
    transition: background .2s ease;
}

.ird-cart-quantity button:hover {
    background: #eee3ec;
}

.ird-qty-value {
    min-width: 30px;
    text-align: center;
    font-size: 13px;
    color: #333;
}

.ird-cart-remove {
    border: none;
    background: transparent;
    color: #999;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    padding: 5px 0;
}

.ird-cart-remove:hover {
    color: #963F88;
}

/* FOOTER */
.ird-cart-footer {
    padding: 22px 28px 28px;
    border-top: 1px solid #eeeeee;
    background: #fff;
    flex-shrink: 0;
}

.ird-cart-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
    color: #444;
}

.ird-cart-subtotal strong {
    color: #333;
    font-size: 19px;
    font-weight: 600;
}

/* BOUTON COMMANDER */
.ird-cart-checkout {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: #963F88;
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 40px;
    transition: background .25s ease, transform .25s ease;
    box-sizing: border-box;
}

.ird-cart-checkout:hover {
    background: #78316C;
    transform: translateY(-2px);
}

/* VOIR MON PANIER */
.ird-cart-view {
    display: block;
    margin-top: 13px;
    text-align: center;
    color: #963F88 !important;
    font-size: 12px;
    text-decoration: none !important;
}

.ird-cart-view:hover {
    text-decoration: underline !important;
}

/* PANIER VIDE */
.ird-cart-empty {
    text-align: center;
    padding: 50px 15px;
    color: #777;
    font-size: 14px;
}

.ird-cart-empty a {
    display: inline-block;
    margin-top: 15px;
    color: #963F88;
}

/* MOBILE */
@media (max-width: 600px) {
    #ird-side-cart {
        width: 100%;
    }

    .ird-cart-header {
        padding: 20px;
    }

    .ird-cart-content {
        padding: 20px;
    }

    .ird-cart-footer {
        padding: 20px;
    }

    .ird-cart-product-image {
        width: 95px;
        min-width: 95px;
    }

    .ird-cart-product-image img {
        height: 95px;
    }
}

/* ACCESSIBILITE */
@media (prefers-reduced-motion: reduce) {
    #ird-side-cart,
    #ird-cart-overlay,
    #ird-cart-close {
        transition: none;
    }
}


/* CURSEUR PERSONNALISE */
#ird-custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #963F88;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 100001;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition:
        transform 350ms cubic-bezier(.2,.8,.2,1),
        opacity 250ms ease;
    will-change: left, top, transform;
}

#ird-custom-cursor span {
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    color: #ffffff;
}

#ird-custom-cursor.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#ird-custom-cursor.is-hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

@media (hover: none), (pointer: coarse) {
    #ird-custom-cursor {
        display: none !important;
    }

    #ird-cart-overlay {
        cursor: auto;
    }
}



/* Conteneur général du panier */
#ird-side-cart {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

/* En-tête fixe */
.ird-cart-header {
    flex: 0 0 auto;
}

/* Contenu du panier */
.ird-cart-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* Seule la liste des produits défile */
.ird-cart-products {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Pied de panier fixe */
.ird-cart-footer {
    flex: 0 0 auto;
    padding: 24px;
    background: #fff;
    border-top: 1px solid #eaeaea;
}
