/* ════════════════════════════════
   ADD-TO-CART MODAL - Identité Aperitiu
   Modale de confirmation affichée après un clic sur l'icône caddie d'une
   card du catalogue. Bouton "Continuer" + lien vers le panier.
════════════════════════════════ */

:root {
    --atc-cream:     #f3e9d7;
    --atc-cream-2:   #fbf4e9;
    --atc-orange:    #ffa200;
    --atc-orange-2:  #f3a63c;
    --atc-green:     #4caf6f;
    --atc-dark:      #242323;
    --atc-muted:     #7a6b58;
    --atc-border:    rgba(36, 35, 35, 0.12);

    --atc-font-display: 'Darumadrop One', 'Caveat', cursive;
    --atc-font-body:    'DM Sans', 'Poppins', system-ui, sans-serif;
}

.atc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(36, 35, 35, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    padding: 20px;
}
.atc-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.atc-modal {
    width: 460px;
    max-width: 100%;
    background: var(--atc-cream-2);
    border-radius: 22px;
    padding: 44px 36px 32px;
    box-shadow: 0 24px 64px rgba(36, 35, 35, 0.24);
    text-align: center;
    transform: scale(.94) translateY(20px);
    transition: transform .35s cubic-bezier(.22,.68,0,1.2);
    position: relative;
    overflow: hidden;
    font-family: var(--atc-font-body);
}
.atc-modal-overlay.open .atc-modal {
    transform: scale(1) translateY(0);
}

/* Bande gradient haute signature Aperitiu - orange/jaune uniquement */
.atc-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--atc-orange-2) 0%, var(--atc-orange) 50%, var(--atc-orange-2) 100%);
}

/* Bouton fermer (rond, rotate au hover) */
.atc-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(36, 35, 35, 0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease, color .2s ease;
    color: var(--atc-dark);
}
.atc-modal-close svg {
    width: 14px; height: 14px;
}
.atc-modal-close:hover {
    background: var(--atc-orange);
    color: #fff;
    transform: rotate(90deg);
}

/* Icône succès (cercle vert avec checkmark animé) */
.atc-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    background: var(--atc-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 28px rgba(76, 175, 111, 0.32);
    animation: atcPop .45s cubic-bezier(.22,.68,0,1.6) both;
}
.atc-modal-icon svg {
    width: 36px;
    height: 36px;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: atcCheck .5s cubic-bezier(.65, .05, .36, 1) .25s forwards;
}
@keyframes atcPop {
    from { opacity: 0; transform: scale(.5); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes atcCheck {
    to { stroke-dashoffset: 0; }
}

.atc-modal-title {
    font-family: var(--atc-font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--atc-dark);
    margin: 0 0 10px;
    line-height: 1.15;
    letter-spacing: 0.005em;
}

.atc-modal-product {
    font-size: 0.95rem;
    color: var(--atc-muted);
    line-height: 1.45;
    margin: 0 0 28px;
}
.atc-modal-product strong {
    color: var(--atc-dark);
    font-weight: 700;
}
.atc-modal-product .atc-modal-variant {
    color: var(--atc-orange);
    font-weight: 600;
    font-style: normal;
}

/* Boutons */
.atc-modal-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atc-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    font-family: var(--atc-font-body);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
    letter-spacing: -0.005em;
    line-height: 1.2;
}
.atc-modal-btn svg {
    width: 18px; height: 18px;
}

.atc-modal-btn--primary {
    background: var(--atc-orange-2);
    color: #fff;
    box-shadow: 0 10px 22px rgba(243, 166, 60, 0.32);
}
.atc-modal-btn--primary:hover {
    background: var(--atc-orange);
    transform: translateY(-2px);
}

.atc-modal-btn--outline {
    background: transparent;
    color: var(--atc-dark);
    border-color: var(--atc-dark);
}
.atc-modal-btn--outline:hover {
    background: var(--atc-dark);
    color: var(--atc-cream-2);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .atc-modal {
        padding: 38px 24px 26px;
        border-radius: 18px;
    }
    .atc-modal-title { font-size: 1.55rem; }
    .atc-modal-product { font-size: 0.9rem; margin-bottom: 22px; }
    .atc-modal-icon { width: 64px; height: 64px; }
    .atc-modal-icon svg { width: 30px; height: 30px; }
}
