/* ============================================
   NEWSLETTER - STYLES
   ============================================ */

/* ============================================
   1. SECTION NEWSLETTER
   ============================================ */

.newsletter-section {
    background: linear-gradient(135deg, #061248 0%, #1a3b8a 60%, #2c5bb0 100%);
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.03);
    transform: rotate(-15deg);
    pointer-events: none;
}

.newsletter-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 40%;
    height: 150%;
    background: rgba(255, 255, 255, 0.02);
    transform: rotate(20deg);
    pointer-events: none;
}

.newsletter-section h4 {
    color: white;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.newsletter-section h4 i {
    color: #ffd700;
}

.newsletter-section .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    position: relative;
    z-index: 1;
}

.newsletter-section .row {
    position: relative;
    z-index: 1;
}

/* ============================================
   2. FORMULAIRE
   ============================================ */

.newsletter-section .form-control {
    border-radius: 8px 0 0 8px;
    border: 2px solid transparent;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.newsletter-section .form-control:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    outline: none;
}

.newsletter-section .form-control.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.newsletter-section .form-control.success {
    border-color: #28a745;
    background: #f0fff4;
}

.newsletter-section .form-control:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.newsletter-section .btn {
    border-radius: 0 8px 8px 0;
    background: #ffd700;
    color: #061248;
    font-weight: 700;
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.newsletter-section .btn:hover {
    background: #f5c900;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.newsletter-section .btn:active {
    transform: translateY(0);
}

.newsletter-section .btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.newsletter-section .btn .btn-text {
    position: relative;
    z-index: 1;
}

.newsletter-section .btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   3. MESSAGES
   ============================================ */

#newsletterMessage {
    min-height: 24px;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    transition: all 0.3s ease;
}

#newsletterMessage .text-success {
    color: #28a745 !important;
}

#newsletterMessage .text-danger {
    color: #dc3545 !important;
}

#newsletterMessage .text-warning {
    color: #ffc107 !important;
}

#newsletterMessage .text-info {
    color: #17a2b8 !important;
}

#newsletterMessage .text-light {
    color: rgba(255, 255, 255, 0.8) !important;
}

#newsletterMessage .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ============================================
   4. ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

#newsletterMessage .alert {
    animation: slideDown 0.3s ease forwards;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    margin: 0;
    border: none;
}

#newsletterMessage .alert-success {
    background: #d4edda;
    color: #155724;
}

#newsletterMessage .alert-danger {
    background: #f8d7da;
    color: #721c24;
}

#newsletterMessage .alert-warning {
    background: #fff3cd;
    color: #856404;
}

#newsletterMessage .alert-info {
    background: #cce5ff;
    color: #004085;
}

/* ============================================
   5. SUCCESS STATE
   ============================================ */

.newsletter-section .success-state {
    display: none;
    animation: fadeIn 0.5s ease;
}

.newsletter-section .success-state.show {
    display: block;
}

.newsletter-section .success-state .checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #28a745;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: 700;
    margin-right: 8px;
}

/* ============================================
   6. CONFIRMATION PAGE
   ============================================ */

.confirmation-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.confirmation-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.confirmation-card .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.confirmation-card .icon.success {
    color: #28a745;
}

.confirmation-card .icon.error {
    color: #dc3545;
}

.confirmation-card .icon.warning {
    color: #ffc107;
}

.confirmation-card .icon.info {
    color: #17a2b8;
}

.confirmation-card h2 {
    font-weight: 700;
    color: #061248;
    margin-bottom: 0.5rem;
}

.confirmation-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.confirmation-card .btn {
    border-radius: 10px;
    padding: 0.6rem 2rem;
}

/* ============================================
   7. UNSUBSCRIBE PAGE
   ============================================ */

.unsubscribe-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.unsubscribe-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.unsubscribe-card .icon {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.unsubscribe-card h2 {
    font-weight: 700;
    color: #061248;
    margin-bottom: 0.5rem;
}

.unsubscribe-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.unsubscribe-card .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.6rem 1rem;
    text-align: center;
}

.unsubscribe-card .form-control:focus {
    border-color: #1a3b8a;
    box-shadow: 0 0 0 0.2rem rgba(26, 59, 138, 0.15);
}

/* ============================================
   8. RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .newsletter-section {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .newsletter-section {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .newsletter-section .row {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-section .col-md-6:last-child {
        margin-top: 1.5rem;
    }
    
    .newsletter-section h4 {
        font-size: 1.3rem;
    }
    
    .newsletter-section .form-control {
        border-radius: 8px;
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .newsletter-section .btn {
        border-radius: 8px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .newsletter-section .d-flex {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .confirmation-card,
    .unsubscribe-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .newsletter-section {
        padding: 1.5rem 1rem;
    }
    
    .newsletter-section h4 {
        font-size: 1.1rem;
    }
    
    .newsletter-section .text-muted {
        font-size: 0.85rem;
    }
    
    .confirmation-card .icon {
        font-size: 3rem;
    }
    
    .confirmation-card h2 {
        font-size: 1.3rem;
    }
}

/* ============================================
   9. DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .newsletter-section .form-control {
        background: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }
    
    .newsletter-section .form-control:focus {
        border-color: #ffd700;
    }
    
    .confirmation-card,
    .unsubscribe-card {
        background: #1a1a2e;
    }
    
    .confirmation-card h2,
    .unsubscribe-card h2 {
        color: #e0e0e0;
    }
    
    .confirmation-card p,
    .unsubscribe-card p {
        color: #aaa;
    }
    
    .newsletter-section .btn {
        background: #ffd700;
        color: #061248;
    }
}

/* ============================================
   10. SCROLLBAR
   ============================================ */

.newsletter-section ::-webkit-scrollbar {
    width: 4px;
}

.newsletter-section ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.newsletter-section ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}