/**
 * Styles CSS pour le plugin AI CV Generator
 * Frontend public styles
 */

/* Container principal */
.aicvg-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Header */
.aicvg-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.aicvg-title {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.aicvg-description {
    color: #7f8c8d;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

/* Formulaire */
.aicvg-form {
    margin-bottom: 30px;
}

.aicvg-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.aicvg-section-title {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Grille responsive */
.aicvg-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.aicvg-col {
    flex: 1;
}

.aicvg-col-full {
    width: 100%;
}

/* Champs de formulaire */
.aicvg-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #34495e;
}

.aicvg-form input[type="text"],
.aicvg-form input[type="email"],
.aicvg-form input[type="tel"],
.aicvg-form textarea,
.aicvg-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.aicvg-form input[type="text"]:focus,
.aicvg-form input[type="email"]:focus,
.aicvg-form input[type="tel"]:focus,
.aicvg-form textarea:focus,
.aicvg-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.aicvg-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Bouton de soumission */
.aicvg-submit-section {
    text-align: center;
    margin-top: 30px;
}

.aicvg-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
}

.aicvg-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.aicvg-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Animation de chargement */
.aicvg-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: aicvg-spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes aicvg-spin {
    to { transform: rotate(360deg); }
}

/* Zone de résultat */
.aicvg-result {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.aicvg-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.aicvg-result-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.4em;
}

.aicvg-result-actions {
    display: flex;
    gap: 10px;
}

.aicvg-action-btn {
    padding: 8px 16px;
    border: 2px solid #3498db;
    background: transparent;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.aicvg-action-btn:hover {
    background: #3498db;
    color: white;
}

.aicvg-action-btn.aicvg-primary {
    background: #3498db;
    color: white;
}

.aicvg-action-btn.aicvg-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* Contenu du CV */
.aicvg-cv-content {
    background: white;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
}

.aicvg-cv-content h1,
.aicvg-cv-content h2,
.aicvg-cv-content h3 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.aicvg-cv-content h1 {
    font-size: 1.8em;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.aicvg-cv-content h2 {
    font-size: 1.4em;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 5px;
}

.aicvg-cv-content h3 {
    font-size: 1.2em;
}

/* Messages */
.aicvg-messages {
    margin-top: 20px;
}

.aicvg-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
}

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

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

.aicvg-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aicvg-container {
        margin: 10px;
        padding: 15px;
    }
    
    .aicvg-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .aicvg-title {
        font-size: 1.8em;
    }
    
    .aicvg-result-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .aicvg-result-actions {
        justify-content: center;
    }
    
    .aicvg-submit-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .aicvg-container {
        margin: 5px;
        padding: 10px;
    }
    
    .aicvg-section {
        padding: 15px;
    }
    
    .aicvg-cv-content {
        padding: 15px;
    }
    
    .aicvg-result-actions {
        flex-direction: column;
    }
}

/* Animations */
.aicvg-fade-in {
    animation: aicvg-fadeIn 0.5s ease-in;
}

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

/* États de validation */
.aicvg-form input.error,
.aicvg-form textarea.error,
.aicvg-form select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.aicvg-form input.success,
.aicvg-form textarea.success,
.aicvg-form select.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

