* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.logo span {
    color: #ffd700;
    font-weight: 300;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Panels */
.form-panel, .preview-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-assistant-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Form Styles */
.cv-form {
    padding: 20px;
    max-height: 800px;
    overflow-y: auto;
}

.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.ai-suggestion-btn,
.add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    margin-top: 10px;
}

.ai-suggestion-btn:hover,
.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Preview Panel */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-selector select {
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.cv-preview {
    padding: 30px;
    min-height: 700px;
    background: white;
    overflow-y: auto;
    font-size: 14px;
}

/* Thèmes CV */
.modern-theme .cv-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    margin: -30px -30px 30px -30px;
}

.classic-theme {
    font-family: 'Times New Roman', serif;
    border: 2px solid #333;
}

.classic-theme .cv-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.creative-theme {
    border-left: 5px solid #ff6b6b;
    background: linear-gradient(45deg, #fff 0%, #f8f9fa 100%);
}

.creative-theme .cv-header {
    background: #ff6b6b;
    color: white;
    padding: 25px;
    margin: -30px -30px 30px -30px;
}

.minimal-theme {
    font-family: 'Helvetica', sans-serif;
    max-width: 700px;
    margin: 0 auto;
}

.minimal-theme .cv-header {
    text-align: center;
    margin-bottom: 30px;
}

.professional-theme {
    font-family: 'Georgia', serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.professional-theme .cv-header {
    background: #2c3e50;
    color: white;
    padding: 30px;
    margin: -30px -30px 30px -30px;
}

.elegant-theme {
    font-family: 'Playfair Display', serif;
    background: #fafafa;
}

.elegant-theme .cv-header {
    background: #8e44ad;
    color: white;
    padding: 40px 30px;
    margin: -30px -30px 30px -30px;
    text-align: center;
}

/* Éléments communs du CV */
.contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
    font-size: 0.95rem;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-section {
    margin-bottom: 25px;
}

.cv-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 5px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-block;
    padding: 5px 15px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 0.9rem;
}

.experience-item,
.education-item {
    margin-bottom: 20px;
}

.experience-item h4,
.education-item h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.company, .school {
    font-weight: 500;
    color: #667eea;
}

.date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: 10px;
}

.language-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.language-item:last-child {
    border-bottom: none;
}

.lang-level {
    color: #667eea;
    font-weight: 500;
}

.photo-preview {
    margin-top: 10px;
    max-width: 100px;
}

.photo-preview img {
    width: 100%;
    border-radius: 50%;
    border: 3px solid #667eea;
}

/* Action Buttons */
.action-buttons {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.notification.success { background: #28a745; }
.notification.error { background: #dc3545; }
.notification.info { background: #17a2b8; }

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .form-panel, .preview-panel {
        max-height: none;
    }
    
    .cv-form {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}