/* =========================================
   LUXURY BUTTONS COLLECTION - ÉPHÉMÈRE
   ========================================= */

/* --- 1. BUTTON GOLD SHINE (Le Lingot) --- */
/* Used on: FAQ, Livraison, Retours, Home Newsletter */
.btn-gold-shine {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    background: linear-gradient(90deg, #8a6d3b 0%, #fef4a4 50%, #8a6d3b 100%);
    background-size: 200%;
    animation: bg-shine 2s infinite linear;
    border-radius: 50px;
    color: #000 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow:
        inset 0px 0px 5px #ffffffa9,
        inset 0px 35px 30px rgba(0, 0, 0, 0.1),
        0px 5px 10px #000000cc;
}

.btn-gold-shine svg,
.btn-gold-shine i {
    color: #000 !important;
    font-size: 1.1em;
}

.btn-gold-shine::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    border-radius: 50px;
    filter: blur(0);
    z-index: -1;
    background: conic-gradient(#00000000 80deg,
            #D4AF37,
            #FFE166,
            #B8860B,
            #00000000 280deg);
    transition: all 0.3s ease;
    opacity: 0;
    /* Hidden by default to save performance, show on hover */
}

.btn-gold-shine:hover::before {
    filter: blur(15px);
    opacity: 1;
}

.btn-gold-shine:active {
    transform: translateY(2px);
    box-shadow: inset 0px 0px 5px #ffffffa9, inset 0px 35px 30px #000;
}

/* Full width variant for forms */
.btn-gold-shine.w-100 {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@keyframes bg-shine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}


/* --- 2. BUTTON GOLD SPARKLE (La Magie) --- */
/* Used on: Contact */
.btn-gold-sparkle {
    --black-700: hsla(0, 0%, 5%, 1);
    --border_radius: 9999px;
    --transtion: 0.3s ease-in-out;

    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: transparent;
    border: none;
    border-radius: var(--border_radius);
    transform: scale(calc(1 + (var(--active, 0) * 0.1)));
    transition: transform var(--transtion);
    z-index: 1;
}

.btn-gold-sparkle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: var(--black-700);
    border-radius: var(--border_radius);
    box-shadow:
        inset 0 0.5px hsla(45, 100%, 85%, 0.4),
        inset 0 -1px 2px 0 hsl(0, 0%, 0%),
        0px 4px 10px -4px hsla(0, 0%, 0%, calc(1 - var(--active, 0))),
        0 0 0 calc(var(--active, 0) * 0.375rem) hsla(45, 100%, 55%, 0.8);
    transition: all var(--transtion);
    z-index: -1;
}

.btn-gold-sparkle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: hsla(45, 80%, 60%, 0.75);
    background-image:
        radial-gradient(at 51% 89%, hsla(45, 100%, 74%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(45, 90%, 60%, 1) 0px, transparent 50%),
        radial-gradient(at 22% 91%, hsla(50, 100%, 80%, 1) 0px, transparent 50%);
    opacity: var(--active, 0);
    border-radius: var(--border_radius);
    transition: opacity var(--transtion);
    z-index: 0;
}

.btn-gold-sparkle:is(:hover, :focus-visible) {
    --active: 1;
}

.btn-gold-sparkle:active {
    transform: scale(1);
}

.btn-gold-sparkle .dots_border {
    --size_border: calc(100% + 2px);
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--size_border);
    height: var(--size_border);
    background-color: transparent;
    border-radius: var(--border_radius);
    z-index: -10;
}

.btn-gold-sparkle .dots_border::before {
    content: "";
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: left;
    width: 100%;
    height: 2rem;
    background-color: #fef4a4;
    mask: linear-gradient(transparent 0%, white 120%);
    animation: rotate 1.5s linear infinite;
}

.btn-gold-sparkle .sparkle {
    position: relative;
    z-index: 10;
    width: 1.75rem;
}

.btn-gold-sparkle .sparkle .path {
    fill: currentColor;
    stroke: currentColor;
    color: #F3E5AB;
    transition: color 0.3s;
}

.btn-gold-sparkle:is(:hover, :focus) .sparkle .path {
    color: #000;
    animation: path 1.5s linear 0.5s infinite;
}

.btn-gold-sparkle .text_button {
    position: relative;
    z-index: 10;
    background-image: linear-gradient(90deg, #F3E5AB 0%, #D4AF37 120%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1rem;
    font-weight: bold;
    color: transparent;
    transition: color 0.3s;
}

.btn-gold-sparkle:is(:hover, :focus-visible) .text_button {
    color: #000;
    background-image: none;
    -webkit-text-fill-color: #000;
}

/* Keyframes for spark */
@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes path {

    0%,
    34%,
    71%,
    100% {
        transform: scale(1);
    }

    17% {
        transform: scale(1.2);
    }

    49% {
        transform: scale(1.2);
    }

    83% {
        transform: scale(1.2);
    }
}


/* --- 3. BUTTON GOLD OUTLINE (L'Élégant) --- */
/* Used on: Footer Newsletter, Secondary Actions */
.btn-gold-outline {
    cursor: pointer;
    position: relative;
    padding: 10px 24px;
    font-size: 14px;
    color: rgb(193, 163, 98);
    border: 2px solid rgb(193, 163, 98);
    border-radius: 34px;
    background-color: transparent;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.btn-gold-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    border-radius: inherit;
    scale: 0;
    z-index: -1;
    background-color: rgb(193, 163, 98);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.btn-gold-outline:hover::before {
    scale: 5;
}

.btn-gold-outline:hover {
    color: #212121;
    scale: 1.05;
    box-shadow: 0 0px 10px rgba(193, 163, 98, 0.4);
}

.btn-gold-outline:active {
    scale: 1;
}

/* UTILITY: TEXT GOLD */
.text-gold {
    color: #D4AF37 !important;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #D4AF37 0%, #F3E5AB 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    /* Often needed for gradients on text */
}

/* --- 4. STOCK ERROR ANIMATIONS --- */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.btn-error {
    background-color: #dc3545 !important;
    /* Red */
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-error i {
    color: white !important;
}