/**
 * Styles pour le formulaire de réinitialisation de mot de passe
 *
 * @package WooImport
 * @author Johann ROCHE <contact@jr.agency>
 * @copyright 2025 JR Agency
 * @license GPL-2.0+
 * @link https://jr.agency
 */

/* Conteneur principal */
.csv-password-reset-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.csv-password-reset-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* En-tête */
.csv-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

.csv-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.csv-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Formulaire */
.csv-password-form {
    padding: 30px;
}

.csv-form-group {
    margin-bottom: 25px;
}

.csv-form-group label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    color: #333;
}

.csv-form-group label .required {
    color: #e74c3c;
    font-weight: bold;
}

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

.csv-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.csv-input:read-only {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Champ de mot de passe avec bouton toggle */
.csv-password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.csv-password-field .csv-input {
    padding-right: 45px;
}

.csv-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.csv-toggle-password:hover {
    color: #3498db;
}

.csv-toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Indicateur de force du mot de passe */
.csv-password-strength {
    margin-top: 10px;
}

.csv-strength-bar {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.csv-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.csv-strength-text {
    margin: 5px 0 0 0;
    font-size: 13px;
    font-weight: 600;
}

/* Texte de correspondance des mots de passe */
.csv-match-text {
    margin: 8px 0 0 0;
    font-size: 14px;
    font-weight: 600;
}

.csv-match-text.match {
    color: #27ae60;
}

.csv-match-text.error {
    color: #e74c3c;
}

/* Texte d'aide */
.csv-help-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Conseils de sécurité */
.csv-security-tips {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.csv-security-tips p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.csv-security-tips ul {
    margin: 0;
    padding-left: 20px;
}

.csv-security-tips li {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

/* Bouton de soumission */
.csv-form-actions {
    margin-top: 30px;
}

.csv-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.csv-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.csv-submit-btn:active {
    transform: translateY(0);
}

.csv-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.csv-submit-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Pied de page */
.csv-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.csv-footer p {
    margin: 0;
}

.csv-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.csv-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Boîte d'erreur */
.csv-error-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.csv-error-box h2 {
    color: #e74c3c;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.csv-error-box p {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.csv-error-box .button {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.csv-error-box .button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Messages flash */
.csv-flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    font-weight: 600;
}

.csv-flash-success {
    background: #27ae60;
    color: #ffffff;
}

.csv-flash-error {
    background: #e74c3c;
    color: #ffffff;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .csv-password-reset-container {
        padding: 10px;
        margin: 20px auto;
    }

    .csv-header {
        padding: 20px;
    }

    .csv-header h2 {
        font-size: 24px;
    }

    .csv-subtitle {
        font-size: 14px;
    }

    .csv-password-form {
        padding: 20px;
    }

    .csv-submit-btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .csv-flash-message {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 14px;
    }
}

/* Animation de chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

.spinner.is-active {
    visibility: visible;
}
