/* Styles pour l'interface publique du plugin RoohSavar Newsletter */

.rsn-subscription-form-container {
    max-width: 500px;
    margin: 20px 0;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rsn-form-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.rsn-form-description {
    margin: 0 0 25px 0;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.rsn-form-fields {
    margin-bottom: 20px;
}

.rsn-field-group {
    margin-bottom: 15px;
}

.rsn-name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.rsn-field {
    margin-bottom: 15px;
}

.rsn-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.rsn-required {
    color: #dc3232;
}

.rsn-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.rsn-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.rsn-input.error {
    border-color: #dc3232;
}

.rsn-form-submit {
    text-align: center;
    margin-bottom: 20px;
}

.rsn-submit-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 150px;
    position: relative;
}

.rsn-submit-button:hover {
    background-color: #005177;
}

.rsn-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.rsn-button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rsn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: rsn-spin 1s linear infinite;
}

@keyframes rsn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rsn-form-messages {
    margin-top: 15px;
}

.rsn-message {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.rsn-message.rsn-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rsn-message.rsn-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Style alternatif - Minimal */
.rsn-style-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}

.rsn-style-minimal .rsn-form-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.rsn-style-minimal .rsn-input {
    border: 1px solid #ccc;
    border-radius: 3px;
}

.rsn-style-minimal .rsn-submit-button {
    background-color: #333;
    padding: 12px 25px;
    font-size: 14px;
}

.rsn-style-minimal .rsn-submit-button:hover {
    background-color: #555;
}

/* Style alternatif - Coloré */
.rsn-style-colorful {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.rsn-style-colorful .rsn-form-title,
.rsn-style-colorful .rsn-form-description,
.rsn-style-colorful .rsn-label {
    color: white;
}

.rsn-style-colorful .rsn-input {
    background: rgba(255, 255, 255, 0.9);
    border: none;
}

.rsn-style-colorful .rsn-submit-button {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
}

.rsn-style-colorful .rsn-submit-button:hover {
    background-color: white;
    color: #667eea;
}

/* Responsive */
@media (max-width: 600px) {
    .rsn-subscription-form-container {
        margin: 15px 0;
        padding: 20px 15px;
    }
    
    .rsn-name-fields {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .rsn-form-title {
        font-size: 20px;
    }
    
    .rsn-input {
        padding: 10px 12px;
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .rsn-submit-button {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 400px) {
    .rsn-subscription-form-container {
        padding: 15px 10px;
    }
    
    .rsn-form-title {
        font-size: 18px;
    }
    
    .rsn-form-description {
        font-size: 14px;
    }
}

/* Animation d'apparition */
.rsn-subscription-form-container {
    animation: rsn-fadeIn 0.5s ease-in-out;
}

@keyframes rsn-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus visible pour l'accessibilité */
.rsn-input:focus-visible,
.rsn-submit-button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* États de validation */
.rsn-field.has-error .rsn-input {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.rsn-field.has-success .rsn-input {
    border-color: #46b450;
    box-shadow: 0 0 0 3px rgba(70, 180, 80, 0.1);
}

.rsn-field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Style pour les formulaires intégrés dans la sidebar */
.widget .rsn-subscription-form-container {
    padding: 15px;
    margin: 0;
}

.widget .rsn-form-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.widget .rsn-name-fields {
    grid-template-columns: 1fr;
}

/* Style pour les formulaires dans le footer */
.site-footer .rsn-subscription-form-container {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.site-footer .rsn-form-title,
.site-footer .rsn-form-description,
.site-footer .rsn-label {
    color: inherit;
}


/* Styles pour les formulaires d'inscription personnalisés */

.rsn-subscription-form {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rsn-form-title {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    color: #333;
    text-align: center;
}

.rsn-form-description {
    margin: 0 0 20px 0;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.rsn-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.rsn-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.rsn-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.rsn-input.rsn-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.rsn-input-email {
    min-width: 0; /* Pour la flexibilité */
}

.rsn-button {
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.rsn-button:hover {
    background: #005a87;
}

.rsn-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rsn-form-messages {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.rsn-form-messages.rsn-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rsn-form-messages.rsn-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animation de succès */
.rsn-success-animation {
    animation: rsn-success-pulse 0.6s ease-in-out;
}

@keyframes rsn-success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Styles pour différents thèmes */
.rsn-style-minimal {
    background: transparent;
    box-shadow: none;
    border: 1px solid #e1e5e9;
}

.rsn-style-colorful {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.rsn-style-colorful .rsn-form-title,
.rsn-style-colorful .rsn-form-description {
    color: white;
}

.rsn-style-colorful .rsn-input {
    background: rgba(255,255,255,0.9);
}

.rsn-style-colorful .rsn-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
}

.rsn-style-colorful .rsn-button:hover {
    background: white;
    color: #667eea;
}

/* Responsive */
@media (max-width: 600px) {
    .rsn-form-row {
        flex-direction: column;
    }
    
    .rsn-subscription-form {
        margin: 10px;
        padding: 15px;
    }
    
    .rsn-input,
    .rsn-button {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Styles pour les widgets */
.widget .rsn-subscription-form {
    margin: 0;
    padding: 15px;
}

.widget .rsn-form-title {
    font-size: 1.2em;
}

/* Intégration avec les thèmes populaires */
.elementor-widget-container .rsn-subscription-form,
.wp-block-group .rsn-subscription-form {
    margin: 0;
}

/* Accessibilité */
.rsn-input:focus,
.rsn-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .rsn-subscription-form {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .rsn-form-title {
        color: #e2e8f0;
    }
    
    .rsn-form-description {
        color: #a0aec0;
    }
    
    .rsn-input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .rsn-input::placeholder {
        color: #a0aec0;
    }
}

