/* =====================================================
   CLAIRBUDGET M57 - RÉINITIALISATION MOT DE PASSE
   Styles pour l'interface personnalisée avec indicateurs
   ===================================================== */

/* Container principal - ÉLARGI POUR PC */
.clairbudget-reset-box {
    max-width: 800px !important;
    padding: 40px !important;
}

/* Sur grands écrans, encore plus large */
@media (min-width: 1200px) {
    .clairbudget-reset-box {
        max-width: 900px !important;
    }
}

/* Wrapper pour input + bouton toggle password */
.clairbudget-password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.clairbudget-password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

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

.clairbudget-toggle-password:hover {
    color: #2271b1;
}

/* =====================================================
   INDICATEURS DE VALIDATION
   ===================================================== */

.clairbudget-password-strength {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.clairbudget-password-strength h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.clairbudget-password-requirements {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.clairbudget-password-requirements li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
}

.clairbudget-password-requirements li .check-icon {
    margin-right: 10px;
    min-width: 16px;
    opacity: 0.3;
    color: #ccc;
    transition: all 0.3s ease;
}

/* État VALIDE - Coche verte animée */
.clairbudget-password-requirements li.valid {
    color: #0f9d58;
    font-weight: 500;
}

.clairbudget-password-requirements li.valid .check-icon {
    opacity: 1;
    color: #0f9d58;
    transform: scale(1.1);
    animation: checkBounce 0.3s ease;
}

@keyframes checkBounce {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

/* =====================================================
   BARRE DE FORCE DU MOT DE PASSE
   ===================================================== */

.clairbudget-password-strength-bar {
    height: 8px;
    background: #e1e4e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.strength-bar-fill {
    height: 100%;
    width: 0;
    transition: all 0.4s ease;
    border-radius: 10px;
}

/* Couleurs selon la force */
.strength-bar-fill.strength-weak {
    background: linear-gradient(90deg, #dc3545, #f44336);
}

.strength-bar-fill.strength-medium {
    background: linear-gradient(90deg, #ff9800, #ffb74d);
}

.strength-bar-fill.strength-good {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.strength-bar-fill.strength-strong {
    background: linear-gradient(90deg, #0f9d58, #4caf50);
    box-shadow: 0 0 10px rgba(15, 157, 88, 0.4);
}

/* Texte de force */
.strength-text {
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    color: #666;
    transition: color 0.3s;
}

.strength-text.text-weak {
    color: #dc3545;
}

.strength-text.text-medium {
    color: #ff9800;
}

.strength-text.text-good {
    color: #4caf50;
}

.strength-text.text-strong {
    color: #0f9d58;
    font-weight: 600;
}

/* =====================================================
   VÉRIFICATION CORRESPONDANCE DES MOTS DE PASSE
   ===================================================== */

.clairbudget-password-match {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clairbudget-password-match.match {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.clairbudget-password-match.no-match {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.clairbudget-password-match .match-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* =====================================================
   BOUTON DE SOUMISSION
   ===================================================== */

.clairbudget-btn-primary:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.clairbudget-btn-primary.enabled {
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8e 100%);
    box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3); 
    }
    50% { 
        box-shadow: 0 4px 20px rgba(34, 113, 177, 0.5); 
    }
}

/* =====================================================
   ALERTES
   ===================================================== */

.clairbudget-alert {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    gap: 10px;
}

.clairbudget-alert svg {
    min-width: 20px;
}

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

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

/* =====================================================
   TEXTE D'AIDE
   ===================================================== */

.clairbudget-help-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .clairbudget-reset-box {
        max-width: 100% !important;
    }
    
    .clairbudget-password-requirements li {
        font-size: 13px;
    }
    
    .clairbudget-password-strength {
        padding: 15px;
    }
}

/* =====================================================
   ANIMATIONS D'ENTRÉE
   ===================================================== */

.clairbudget-password-strength {
    animation: slideIn 0.3s ease;
}

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

/* =====================================================
   BOUTON SECONDAIRE (Retour)
   ===================================================== */

.clairbudget-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #2271b1;
    border: 2px solid #2271b1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.clairbudget-btn-secondary:hover {
    background: #2271b1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3);
}

/* =====================================================
   ACCESSIBILITÉ
   ===================================================== */

.clairbudget-toggle-password:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
    border-radius: 4px;
}

.clairbudget-btn-primary:focus,
.clairbudget-btn-secondary:focus {
    outline: 3px solid rgba(34, 113, 177, 0.4);
    outline-offset: 2px;
}

/* Améliorer le contraste pour les daltoniens */
.clairbudget-password-requirements li.valid .check-icon {
    filter: brightness(0.9) saturate(1.2);
}
