/**
 * MATCHING SCORE - Styles
 * Badge de compatibilité offre/profil
 */

/* Badge compact (liste d'offres) */
.matching-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.matching-badge.matching-excellent {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.matching-badge.matching-high {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.matching-badge.matching-medium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.matching-badge.matching-low {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

/* Score circulaire (page détail) */
.matching-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.matching-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.matching-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.matching-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3;
}

.matching-progress {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease-out;
}

.matching-excellent .matching-progress {
    stroke: #10b981;
}

.matching-high .matching-progress {
    stroke: #3b82f6;
}

.matching-medium .matching-progress {
    stroke: #f59e0b;
}

.matching-low .matching-progress {
    stroke: #6b7280;
}

.matching-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
}

.matching-excellent .matching-value {
    color: #10b981;
}

.matching-high .matching-value {
    color: #3b82f6;
}

.matching-medium .matching-value {
    color: #f59e0b;
}

.matching-low .matching-value {
    color: #6b7280;
}

.matching-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

/* Détails du matching (tooltip ou modal) */
.matching-details {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 280px;
}

.matching-details-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.matching-details-score {
    font-size: 32px;
    font-weight: 800;
}

.matching-details-level {
    font-size: 14px;
    font-weight: 600;
}

.matching-details-message {
    font-size: 13px;
    color: #64748b;
}

.matching-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.matching-criterion {
    display: flex;
    align-items: center;
    gap: 10px;
}

.matching-criterion-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.matching-criterion-icon.metier {
    background: #8b5cf6;
}

.matching-criterion-icon.localisation {
    background: #ec4899;
}

.matching-criterion-icon.contrat {
    background: #06b6d4;
}

.matching-criterion-icon.competences {
    background: #f59e0b;
}

.matching-criterion-icon.preferences {
    background: #10b981;
}

.matching-criterion-info {
    flex: 1;
}

.matching-criterion-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

.matching-criterion-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.matching-criterion-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease-out;
}

.matching-criterion-fill.full { background: #10b981; }
.matching-criterion-fill.high { background: #3b82f6; }
.matching-criterion-fill.medium { background: #f59e0b; }
.matching-criterion-fill.low { background: #ef4444; }

.matching-criterion-value {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    min-width: 40px;
    text-align: right;
}

/* Tips pour améliorer le score */
.matching-tips {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.matching-tips-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.matching-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
}

.matching-tip i {
    color: #f59e0b;
}

.matching-tip a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.matching-tip a:hover {
    text-decoration: underline;
}

/* Animation d'entrée */
@keyframes matchingFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.matching-score {
    animation: matchingFadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 640px) {
    .matching-circle {
        width: 50px;
        height: 50px;
    }
    
    .matching-value {
        font-size: 12px;
    }
    
    .matching-details {
        min-width: 260px;
    }
}

/* Version inline pour les cards */
.matching-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.matching-inline-score {
    font-size: 16px;
    font-weight: 800;
}

.matching-inline-label {
    font-size: 11px;
    color: #64748b;
}

.matching-inline.matching-excellent .matching-inline-score { color: #10b981; }
.matching-inline.matching-high .matching-inline-score { color: #3b82f6; }
.matching-inline.matching-medium .matching-inline-score { color: #f59e0b; }
.matching-inline.matching-low .matching-inline-score { color: #6b7280; }

/* Hover effect sur les cards */
.offer-card:hover .matching-badge,
.job-card:hover .matching-badge {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Dark mode */
[data-theme="dark"] .matching-details {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .matching-details-header {
    border-bottom-color: #334155;
}

[data-theme="dark"] .matching-criterion-label {
    color: #e2e8f0;
}

[data-theme="dark"] .matching-criterion-bar {
    background: #334155;
}

[data-theme="dark"] .matching-tips {
    border-top-color: #334155;
}

[data-theme="dark"] .matching-tip {
    background: #0f172a;
    color: #94a3b8;
}

[data-theme="dark"] .matching-bg {
    stroke: #334155;
}

/* Pulse animation pour les bons matchs */
@keyframes matchingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.matching-badge.matching-excellent {
    animation: matchingPulse 2s infinite;
}

/* CTA pour compléter le profil */
.matching-cta-complete {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    margin-top: 12px;
}

.matching-cta-complete i {
    font-size: 20px;
    color: #0284c7;
}

.matching-cta-complete-text {
    flex: 1;
}

.matching-cta-complete-title {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.matching-cta-complete-desc {
    font-size: 11px;
    color: #0284c7;
}

.matching-cta-complete-btn {
    padding: 6px 12px;
    background: #0284c7;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.matching-cta-complete-btn:hover {
    background: #0369a1;
}
