.password-generator-container {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e9ecef;
}

#generated-password {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    background: #212A37;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

#generated-password:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.btn-copy {
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.btn-copy:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

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

/* Barre de sécurité du mot de passe */
.password-strength {
    margin-bottom: 20px;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

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

.strength-fill.weak {
    background: #dc3545;
    width: 15%;
}

.strength-fill.fair {
    background: #ffc107;
    width: 35%;
}

.strength-fill.good {
    background: #17a2b8;
    width: 55%;
}

.strength-fill.strong {
    background: #28a745;
    width: 75%;
}

.strength-fill.ultra {
    background: #6f42c1;
    width: 100%;
}

.strength-text {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #6c757d;
    transition: color 0.3s ease;
}

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

.strength-text.fair {
    color: #856404;
}

.strength-text.good {
    color: #0c5460;
}

.strength-text.strong {
    color: #155724;
}

.strength-text.ultra {
    color: #4a1d96;
}

.password-options {
    margin-bottom: 25px;
}

/* Options en grille pour les checkboxes et radios */
.option-group {
    margin-bottom: 5px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Conteneur pour forcer le retour à la ligne */
.password-options {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.password-options .option-group {
    flex: 1 1 calc(33.333% - 13.33px);
    min-width: 200px;
}

/* Le slider prend toute la largeur */
.option-group.slider-option {
    flex: 1 1 100%;
    min-width: 100%;
}

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

.option-group input[type="checkbox"],
.option-group input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.option-group input[type="checkbox"] + span,
.option-group input[type="radio"] + span {
    font-weight: 500;
    color: #555;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.length-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.length-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#length-value {
    font-weight: 700;
    color: #007bff;
    font-size: 18px;
    min-width: 30px;
    text-align: center;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #555;
    margin-bottom: 0;
    cursor: pointer;
    padding: 5px 0;
}

.radio-group label:hover {
    color: #007bff;
}

/* Style pour le dropdown */
.letter-case-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.letter-case-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.letter-case-select:hover {
    border-color: #007bff;
}

.btn-generate {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-generate:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

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

/* Animation pour le bouton copier */
.copied-text {
    color: #ffffff;
    font-weight: 700;
    animation: fadeInOut 0.3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Responsive design */
@media (max-width: 768px) {
    .password-generator-container {
        border-radius: 6px;
    }
    
    .password-generator-form {
        padding: 15px;
    }
    
    .password-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-copy {
        width: 100%;
    }
    
    .slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    #length-value {
        text-align: center;
        font-size: 16px;
    }
    
         /* Sur mobile, les options restent empilées */
     .option-group:not(.slider-option) {
         display: block;
         width: 100%;
         margin-right: 0;
         margin-bottom: 15px;
     }
}

/* États de chargement */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Amélioration de l'accessibilité */
.password-generator-container:focus-within {
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.2);
}

/* Style pour les messages d'erreur */
.error-message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
}

/* Style pour les descriptions d'options */
.option-description {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
    line-height: 1.4;
}
