/* Toast promotionnel SPA
   Barre fixe avec image, texte riche et bouton CTA.
   Layout flex responsive. */

.spa-toast {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    display: none; /* caché par défaut, affiché via JS */
    align-items: center;
    gap: 16px;
    padding: 16px 48px 16px 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    animation: spa-toast-slide-in 0.4s ease-out;
    max-height: 95vh;
    overflow-y: auto;
}

.spa-toast--bas {
    bottom: 0;
}

.spa-toast--haut {
    top: 0;
}

.spa-toast--visible {
    display: flex;
}

/* Animation : slide + fondu */
@keyframes spa-toast-slide-in {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spa-toast--haut {
    animation-name: spa-toast-slide-in-top;
}

@keyframes spa-toast-slide-in-top {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fermeture */
.spa-toast--hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Bouton close */
.spa-toast__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
    color: inherit;
}
.spa-toast__close:hover {
    opacity: 1;
}

/* Image */
.spa-toast__image {
    flex-shrink: 0;
    max-width: 100px;
    height: auto;
    border-radius: 6px;
    align-self: flex-start;
}

/* Corps texte */
.spa-toast__body {
    flex: 1;
    min-width: 0;
}

.spa-toast__title {
    font-weight: 700;
    font-size: 17px;
    margin: 0 0 6px 0;
}

.spa-toast__message {
    margin: 0 0 10px 0;
}

.spa-toast__message p {
    margin: 0 0 4px 0;
}
.spa-toast__message p:last-child {
    margin-bottom: 0;
}

/* Bouton CTA */
.spa-toast__cta {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
}
.spa-toast__cta:hover {
    background: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    color: inherit;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .spa-toast {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 40px 14px 14px;
        gap: 10px;
    }
    .spa-toast__image {
        max-width: 70px;
    }
}
