/* CV Matcher Pro - Frontend Styles */

/* Container principal */
.cv-matcher-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Titres */
.cv-matcher-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    text-align: center;
}

.cv-matcher-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px;
    text-align: center;
    line-height: 1.6;
}

/* Zone d'upload */
.cv-matcher-upload-area {
    margin-bottom: 24px;
}

.cv-matcher-upload-box {
    position: relative;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 48px 32px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.cv-matcher-upload-box:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.cv-matcher-upload-box.drag-over {
    border-color: #0073aa;
    background: #e6f3ff;
    transform: scale(1.02);
}

.cv-matcher-upload-icon {
    color: #0073aa;
    margin-bottom: 16px;
}

.cv-matcher-upload-text {
    font-size: 16px;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.cv-matcher-upload-text strong {
    color: #0073aa;
    font-weight: 600;
}

.cv-matcher-upload-info {
    font-size: 13px;
    color: #999;
    margin: 0;
}

#cv-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Preview du fichier */
.cv-matcher-file-preview {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #f9f9f9;
}

.cv-matcher-file-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cv-matcher-file-icon {
    flex-shrink: 0;
    color: #0073aa;
}

.cv-matcher-file-details {
    flex: 1;
    min-width: 0;
}

.cv-matcher-file-name {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cv-matcher-file-size {
    display: block;
    font-size: 13px;
    color: #666;
}

.cv-matcher-file-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #dc3545;
    border-radius: 4px;
    transition: background 0.2s;
}

.cv-matcher-file-remove:hover {
    background: #ffe6e6;
}

/* Actions */
.cv-matcher-actions {
    text-align: center;
    margin-bottom: 20px;
}

.cv-matcher-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0073aa;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.cv-matcher-submit-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.3);
}

.cv-matcher-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cv-matcher-btn-loader {
    display: none;
}

.cv-matcher-submit-btn.loading .cv-matcher-btn-text {
    display: none;
}

.cv-matcher-submit-btn.loading .cv-matcher-btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-matcher-spinner {
    animation: cv-rotate 1s linear infinite;
}

@keyframes cv-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.cv-matcher-message {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

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

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

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

/* Résultats */
.cv-matcher-results {
    margin-top: 32px;
    padding: 32px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cv-matcher-score {
    text-align: center;
    margin-bottom: 32px;
}

.cv-matcher-score h3 {
    font-size: 20px;
    margin: 0 0 20px;
    color: #1a1a1a;
}

.cv-matcher-score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    margin: 0 auto;
}

.cv-matcher-score-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.cv-matcher-score-label {
    font-size: 13px;
    opacity: 0.9;
}

.cv-matcher-summary {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cv-matcher-summary h4 {
    font-size: 16px;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.cv-matcher-summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-matcher-summary li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
}

.cv-matcher-summary li:last-child {
    border-bottom: none;
}

.cv-matcher-redirect-info {
    text-align: center;
    font-size: 15px;
    color: #666;
}

/* Thème minimal */
.cv-matcher-theme-minimal {
    box-shadow: none;
    border: 1px solid #e0e0e0;
    padding: 24px;
}

.cv-matcher-theme-minimal .cv-matcher-title {
    font-size: 24px;
}

.cv-matcher-theme-minimal .cv-matcher-upload-box {
    padding: 32px 24px;
}

/* Thème élégant */
.cv-matcher-theme-elegant {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.cv-matcher-theme-elegant .cv-matcher-title,
.cv-matcher-theme-elegant .cv-matcher-subtitle {
    color: #ffffff;
}

.cv-matcher-theme-elegant .cv-matcher-upload-box {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.cv-matcher-theme-elegant .cv-matcher-upload-box:hover {
    background: #ffffff;
}

.cv-matcher-theme-elegant .cv-matcher-submit-btn {
    background: #ffffff;
    color: #667eea;
}

.cv-matcher-theme-elegant .cv-matcher-submit-btn:hover {
    background: #f8f9fa;
    color: #764ba2;
}

/* Formulaire simple */
.cv-matcher-simple {
    max-width: 500px;
    margin: 20px auto;
}

.cv-matcher-simple-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.cv-matcher-simple-label {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.cv-matcher-simple-label:hover {
    background: #005a87;
}

.cv-matcher-simple-filename {
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    min-width: 200px;
}

.cv-matcher-simple-submit {
    padding: 12px 24px;
    background: #28a745;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.cv-matcher-simple-submit:hover {
    background: #218838;
}

.cv-matcher-simple-messages {
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .cv-matcher-container {
        padding: 24px;
        margin: 20px;
    }
    
    .cv-matcher-title {
        font-size: 24px;
    }
    
    .cv-matcher-upload-box {
        padding: 32px 20px;
    }
    
    .cv-matcher-simple-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cv-matcher-simple-filename {
        min-width: 100%;
    }
}
