/**
 * Styles principaux pour PassCypher Generator Pro WordPress
 */

.passcypher-generator-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.passcypher-generator-container[data-theme="dark"] {
    background: #1a1a1a;
    border-color: #333;
    color: #ffffff;
}

.passcypher-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.passcypher-header h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.passcypher-header p {
    margin: 0;
    font-size: 16px;
    color: #718096;
}

/* Onglets */
.passcypher-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
    gap: 0;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: #4a5568;
    background: #f7fafc;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f7fafc;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #667eea;
}

/* Contenu des onglets */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checkbox-group label:hover {
    background: #f7fafc;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Résultat */
.result-container {
    margin-top: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #2d3748;
    font-weight: 600;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-content input[type="password"],
.result-content input[type="text"] {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.result-content input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.result-info {
    margin-top: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #4a5568;
    font-weight: 600;
}

.info-item span {
    color: #667eea;
    font-weight: 600;
}

/* Thème sombre */
.passcypher-generator-container[data-theme="dark"] .passcypher-header h3 {
    color: #ffffff;
}

.passcypher-generator-container[data-theme="dark"] .passcypher-header p {
    color: #a0aec0;
}

.passcypher-generator-container[data-theme="dark"] .tab-button {
    color: #a0aec0;
}

.passcypher-generator-container[data-theme="dark"] .tab-button:hover {
    color: #ffffff;
    background: #2d3748;
}

.passcypher-generator-container[data-theme="dark"] .tab-button.active {
    color: #667eea;
    background: #2d3748;
}

.passcypher-generator-container[data-theme="dark"] .form-group label {
    color: #e2e8f0;
}

.passcypher-generator-container[data-theme="dark"] .form-group input,
.passcypher-generator-container[data-theme="dark"] .form-group select {
    background: #2d3748;
    border-color: #4a5568;
    color: #ffffff;
}

.passcypher-generator-container[data-theme="dark"] .form-group input:focus,
.passcypher-generator-container[data-theme="dark"] .form-group select:focus {
    border-color: #667eea;
}

.passcypher-generator-container[data-theme="dark"] .checkbox-group label {
    color: #e2e8f0;
}

.passcypher-generator-container[data-theme="dark"] .checkbox-group label:hover {
    background: #2d3748;
}

.passcypher-generator-container[data-theme="dark"] .result-container {
    background: #2d3748;
    border-color: #4a5568;
}

.passcypher-generator-container[data-theme="dark"] .result-header h4 {
    color: #ffffff;
}

.passcypher-generator-container[data-theme="dark"] .result-content input {
    background: #1a202c;
    border-color: #4a5568;
    color: #ffffff;
}

.passcypher-generator-container[data-theme="dark"] .result-info {
    background: #1a202c;
    border-color: #4a5568;
}

.passcypher-generator-container[data-theme="dark"] .info-item {
    border-color: #4a5568;
}

.passcypher-generator-container[data-theme="dark"] .info-item strong {
    color: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .passcypher-generator-container {
        margin: 10px;
        padding: 20px;
    }
    
    .passcypher-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
        border-right: none;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Animations */
.passcypher-generator-container * {
    transition: all 0.3s ease;
}

/* États de chargement */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Notifications */
.passcypher-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #48bb78;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.passcypher-notification.error {
    background: #f56565;
}

.passcypher-notification.warning {
    background: #ed8936;
}
