/* ==========================================================================
   NEWSLETTER MODAL - CONTENAIR (Dark Luxury Theme)
   ========================================================================== */

.cr-newsletter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 16px;
    box-sizing: border-box;
}

.cr-newsletter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cr-newsletter-modal {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: linear-gradient(145deg, rgba(28, 28, 30, 0.98), rgba(18, 18, 20, 0.98));
    border: 1px solid rgba(255, 214, 0, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
                0 0 35px rgba(255, 214, 0, 0.12);
    padding: 36px 32px 32px;
    color: #EFEEE4;
    text-align: center;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.cr-newsletter-overlay.active .cr-newsletter-modal {
    transform: scale(1) translateY(0);
}

/* Effet halo lumineux en arrière-plan */
.cr-newsletter-modal::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 214, 0, 0.18) 0%, rgba(255, 214, 0, 0) 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* Bouton de fermeture */
.cr-newsletter-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #B5B5B5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    outline: none;
    padding: 0;
    z-index: 10;
}

.cr-newsletter-close:hover {
    background: rgba(255, 214, 0, 0.2);
    border-color: #FFD600;
    color: #FFD600;
    transform: rotate(90deg);
}

/* Icône animée / badge */
.cr-newsletter-badge-wrapper {
    margin-bottom: 16px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.cr-newsletter-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.25), rgba(255, 214, 0, 0.05));
    border: 1.5px solid rgba(255, 214, 0, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD600;
    font-size: 26px;
    margin-bottom: 12px;
    box-shadow: 0 0 20px rgba(255, 214, 0, 0.2);
    animation: crPulseGlow 3s infinite ease-in-out;
}

@keyframes crPulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 214, 0, 0.15);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 214, 0, 0.35);
        transform: translateY(-3px);
    }
}

.cr-newsletter-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 214, 0, 0.12);
    border: 1px solid rgba(255, 214, 0, 0.3);
    border-radius: 20px;
    color: #FFD600;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Titre & Description */
.cr-newsletter-title {
    font-family: "Bai Jamjuree", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.cr-newsletter-desc {
    font-family: "Bai Jamjuree", sans-serif;
    font-size: 0.88rem;
    color: #A0A0A0;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Formulaire */
.cr-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cr-newsletter-input-group {
    position: relative;
    width: 100%;
}

.cr-newsletter-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.cr-newsletter-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #FFFFFF;
    font-family: "Bai Jamjuree", sans-serif;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.cr-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.cr-newsletter-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #FFD600;
    box-shadow: 0 0 12px rgba(255, 214, 0, 0.25);
}

.cr-newsletter-input:focus + .cr-newsletter-input-icon,
.cr-newsletter-input-group:focus-within .cr-newsletter-input-icon {
    color: #FFD600;
}

/* Bouton Soumettre */
.cr-newsletter-submit {
    position: relative;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FFD600 0%, #FFC107 100%);
    border: none;
    border-radius: 12px;
    color: #0A0A0A;
    font-family: "Bai Jamjuree", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(255, 214, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
}

.cr-newsletter-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #FFE033 0%, #FFD600 100%);
    box-shadow: 0 8px 25px rgba(255, 214, 0, 0.5);
    transform: translateY(-1px);
}

.cr-newsletter-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.cr-newsletter-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner de chargement */
.cr-newsletter-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-top-color: #0A0A0A;
    border-radius: 50%;
    animation: crSpin 0.7s infinite linear;
    display: inline-block;
}

@keyframes crSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Zone de message de retour */
.cr-newsletter-message {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-top: 10px;
    display: none;
    text-align: center;
    animation: crFadeIn 0.3s ease;
}

@keyframes crFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.cr-newsletter-message.success {
    display: block;
    background: rgba(0, 200, 83, 0.12);
    border: 1px solid rgba(0, 200, 83, 0.4);
    color: #00e676;
}

.cr-newsletter-message.error {
    display: block;
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ff6b6b;
}

/* Reassurance micro-copy */
.cr-newsletter-footer {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.cr-newsletter-footer i {
    color: #FFD600;
    font-size: 11px;
}

/* --- Responsive mobile --- */
@media (max-width: 576px) {
    .cr-newsletter-modal {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    .cr-newsletter-title {
        font-size: 1.25rem;
    }

    .cr-newsletter-desc {
        font-size: 0.82rem;
        margin-bottom: 18px;
    }

    .cr-newsletter-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}
