/* =================================================================
   E-LETTER SHORTCODES - STYLES MODERNES RESPONSIVE RECTANGULAIRES
   ================================================================= */

/* Container principal du formulaire - Format rectangulaire */
.eletter-form-container {
    max-width: 600px;
    width: 100%;
    margin: 30px auto;
    padding: 40px 45px;
    background: #ffffff;
    border-radius: 16px;
    border: 3px solid #dc2626;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.15),
                0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Effet de brillance sur le cadre */
.eletter-form-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #dc2626, #ef4444, #f87171, #dc2626);
    background-size: 300% 300%;
    border-radius: 18px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Focus vert sur tout le formulaire */
.eletter-form-container:focus-within {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}
.eletter-form-container:focus-within::before {
    background: linear-gradient(45deg, #22c55e, #4ade80, #bbf7d0, #22c55e);
    animation: borderGlowGreen 3s ease-in-out infinite;
}
@keyframes borderGlowGreen {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.eletter-form-container:hover {
    box-shadow: 0 15px 40px rgba(220, 38, 38, 0.25),
                0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    border-color: #b91c1c;
}

/* Titre du formulaire */
.eletter-form-container h3 {
    color: #1f2937;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.eletter-form-container p {
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 400;
}

/* Champs de formulaire - Style rectangulaire */
.eletter-form-container input[type="text"],
.eletter-form-container input[type="email"],
.eletter-form-container select {
    width: 100%;
    padding: 18px 22px;
    margin: 12px 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: #f9fafb;
    box-sizing: border-box;
    min-height: 56px;
}

/* Focus : le champ passe au vert */
.eletter-form-container input[type="text"]:focus,
.eletter-form-container input[type="email"]:focus,
.eletter-form-container select:focus {
    outline: none;
    border-color: #22c55e !important;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
    transform: scale(1.02);
}

/* Bouton d'inscription - Rouge vif par défaut, vert vif au focus */
.eletter-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    color: white;
    padding: 20px 25px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
    min-height: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}
.eletter-submit-btn:focus,
.eletter-submit-btn:active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #166534 100%) !important;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.15);
    outline: none;
}
.eletter-submit-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 50%, #7f1d1d 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
}

/* Effet de brillance sur le bouton */
.eletter-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}
.eletter-submit-btn:hover::before {
    left: 100%;
}

/* Case à cocher GDPR - plus grande, facile à cliquer */
.eletter-gdpr-container {
    display: flex;
    align-items: flex-start;
    margin: 25px 0;
    padding: 20px;
    background: #fef2f2;
    border-radius: 12px;
    border-left: 5px solid #dc2626;
    border: 1px solid #fecaca;
}
.eletter-gdpr-container input[type="checkbox"] {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    margin-right: 14px;
    margin-top: 2px;
    accent-color: #dc2626;
    cursor: pointer;
    display: inline-block;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.eletter-gdpr-container input[type="checkbox"]:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}
.eletter-gdpr-container label,
.eletter-gdpr-container span,
.eletter-gdpr-container a {
    font-size: 12px !important;
    color: #374151;
    line-height: 1.4;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    word-break: break-word;
}

/* Messages de statut */
.eletter-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
}

.eletter-message.success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.eletter-message.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Animation de chargement */
.eletter-loading {
    opacity: 0.7;
    pointer-events: none;
}

.eletter-loading .eletter-submit-btn {
    background: #6b7280;
    cursor: not-allowed;
}

.eletter-loading .eletter-submit-btn::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 12px;
    border: 3px solid transparent;
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Template Popup */
.eletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.eletter-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.eletter-popup-content {
    background: white;
    border-radius: 16px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border: 3px solid #dc2626;
}

.eletter-popup-overlay.active .eletter-popup-content {
    transform: scale(1);
}

.eletter-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.eletter-popup-close:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

/* Template Inline */
.eletter-form-container.inline {
    margin: 25px 0;
    padding: 30px;
    border: 3px solid #dc2626;
    border-radius: 12px;
    background: #ffffff;
    max-width: 100%;
}

/* Template Sidebar */
.eletter-form-container.sidebar {
    max-width: 100%;
    padding: 25px;
    background: #ffffff;
    border: 2px solid #dc2626;
    border-radius: 12px;
}

.eletter-form-container.sidebar h3 {
    font-size: 22px;
    margin-bottom: 18px;
}

/* Responsivité Mobile */
@media (max-width: 768px) {
    .eletter-form-container {
        margin: 20px 15px;
        padding: 30px 25px;
        max-width: none;
    }
    .eletter-form-container h3 {
        font-size: 24px;
    }
    .eletter-popup-content {
        width: 95%;
        margin: 15px;
    }
    .eletter-submit-btn {
        font-size: 16px;
        padding: 18px 20px;
    }
}

@media (max-width: 480px) {
    .eletter-form-container {
        margin: 15px 10px;
        padding: 25px 20px;
    }
    .eletter-form-container h3 {
        font-size: 22px;
    }
    .eletter-form-container input,
    .eletter-form-container select {
        padding: 16px 18px;
        font-size: 15px;
        min-height: 52px;
    }
    .eletter-submit-btn {
        padding: 16px 18px;
        font-size: 15px;
        min-height: 56px;
    }
    .eletter-gdpr-container {
        padding: 12px 8px;
    }
    .eletter-gdpr-container input[type="checkbox"] {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        margin-right: 10px;
    }
    .eletter-gdpr-container label,
    .eletter-gdpr-container span,
    .eletter-gdpr-container a {
        font-size: 11px !important;
    }
}

/* Effet de pulsation sur le bouton pour attirer l'attention */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.eletter-submit-btn.pulse {
    animation: pulse 2s infinite;
}
