/**
 * Styles pour le générateur de CV
 */

/* Variables de couleurs */
:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #f5f5f5;
    --border-color: #ddd;
    --text-color: #333;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

/* Conteneur principal */
.cv-generator-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Titre et description */
.cv-generator-title {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.cv-generator-description {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

/* Sections du formulaire */
.cv-form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.cv-form-section h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Lignes et colonnes */
.cv-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 1rem;
}

.cv-form-column {
    flex: 1;
    padding: 0 10px;
    min-width: 250px;
}

.cv-form-column.full-width {
    flex-basis: 100%;
}

/* Labels */
.cv-form-column label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.cv-form-column .required {
    color: var(--error-color);
}

/* Champs de formulaire */
.cv-form-column input[type="text"],
.cv-form-column input[type="email"],
.cv-form-column input[type="tel"],
.cv-form-column input[type="month"],
.cv-form-column textarea,
.cv-form-column select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.cv-form-column input:focus,
.cv-form-column textarea:focus,
.cv-form-column select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.cv-form-column textarea {
    resize: vertical;
    min-height: 120px;
}

/* Champs de compétences et langues */
.habilidades-wrapper,
.idiomas-container {
    margin-bottom: 1rem;
}

.habilidad-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.habilidad-item input {
    flex: 1;
}

.remover-habilidad {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* Checkbox wrapper */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Boutons */
.cv-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-align: center;
}

.cv-button.primary {
    background-color: var(--primary-color);
    color: white;
}

.cv-button.primary:hover {
    background-color: var(--primary-hover);
}

.cv-button.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.cv-button.secondary:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.cv-button.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.cv-form-submit {
    text-align: center;
    margin-top: 2rem;
}

#generar-cv {
    min-width: 200px;
}

/* Indices et astuces */
.form-hint {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Conteneur de téléchargement */
.cv-download-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cv-download-box {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cv-download-box h3 {
    color: var(--success-color);
    font-size: 1.5rem;
    margin-top: 0;
}

.cv-download-box p {
    margin-bottom: 1.5rem;
}

.cv-download-box .cv-button {
    margin: 0.5rem;
}

/* Messages de formulaire */
#cv-form-messages {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    display: none;
}

#cv-form-messages.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
    display: block;
}

#cv-form-messages.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(46, 204, 113, 0.3);
    display: block;
}

/* Adaptabilité */
@media (max-width: 768px) {
    .cv-form-column {
        flex-basis: 100%;
    }
    
    .cv-generator-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .cv-form-section {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cv-form-section {
    animation: fadeIn 0.5s ease-out;
}