/* ============================================
   COMPARATEUR - STRIPE 2026 DESIGN
   ============================================ */

/* Hero */
.comparateur-hero {
    position: relative;
    z-index: 10;
    background: #fafafa;
    padding: 80px 0 50px;
    text-align: center;
    overflow: visible;
}
.comparateur-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
    pointer-events: none;
}
.comparateur-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #0a0a0a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.comparateur-hero h1 i {
    background: linear-gradient(135deg, #6366f1, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 8px;
}
.comparateur-hero p {
    color: #6b7280;
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Search bar in hero */
.comparateur-search-wrapper {
    position: relative;
    max-width: 480px;
    margin: 28px auto 0;
}
.comparateur-search-wrapper input {
    width: 100%;
    padding: 14px 20px 14px 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    outline: none;
    transition: all .25s;
    box-sizing: border-box;
}
.comparateur-search-wrapper input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12), 0 2px 8px rgba(0,0,0,.04);
}
.comparateur-search-wrapper::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
    z-index: 99999;
    display: none;
    max-height: 280px;
    overflow-y: auto;
}
.search-results-dropdown.active { display: block; }
.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .15s;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8f9ff; }
.search-result-item .result-initial {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: white; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.search-result-item .result-info { flex: 1; min-width: 0; }
.search-result-item .result-name { font-weight: 600; font-size: 14px; color: #1e293b; }
.search-result-item .result-location { font-size: 12px; color: #94a3b8; }
.search-result-item .result-action {
    font-size: 11px; color: #6366f1; font-weight: 600; white-space: nowrap;
}
.search-no-results {
    padding: 20px; text-align: center; color: #94a3b8; font-size: 13px;
}

/* Empty state */
.comparateur-empty {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.comparateur-empty .empty-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
}
.comparateur-empty .empty-card {
    width: 80px;
    height: 100px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
    animation: float 3s ease-in-out infinite;
}
.comparateur-empty .empty-card:nth-child(2) { animation-delay: .5s; }
.comparateur-empty .empty-card:nth-child(3) { animation-delay: 1s; }
.comparateur-empty .empty-plus {
    font-size: 20px; color: #cbd5e1; font-weight: 700;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.comparateur-empty .empty-icon { display: none; }
.comparateur-empty h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
}
.comparateur-empty p {
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 15px;
}
.comparateur-empty .btn-recherche,
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 14px rgba(37,99,235,.2);
}
.comparateur-empty .btn-recherche:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37,99,235,.3);
}
.comparateur-empty .empty-hint {
    margin-top: 16px;
    font-size: 13px;
    color: #94a3b8;
}

/* Toolbar */
.comparateur-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid #e8eaed;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}
.comparateur-toolbar .count {
    background: #f0f4ff;
    color: #2563eb;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-toolbar {
    background: none;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-toolbar:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.btn-vider {
    background: none;
    border: 1px solid #fecaca;
    color: #ef4444;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-vider:hover {
    background: #fef2f2;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all .3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Verdicts */
.comparateur-verdicts {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.verdict-card {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    transition: all .2s;
}
.verdict-card.gold { background: #fffbeb; }
.verdict-card.green { background: #f0fdf4; }
.verdict-card.blue { background: #eff6ff; }
.verdict-card:hover { filter: brightness(.97); }
.verdict-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.verdict-card.gold .verdict-icon { color: #d97706; }
.verdict-card.green .verdict-icon { color: #16a34a; }
.verdict-card.blue .verdict-icon { color: #2563eb; }
.verdict-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748b;
    line-height: 1.2;
}
.verdict-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.verdict-value {
    font-size: 12px;
    color: #64748b;
}

/* Table */
.comparateur-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 32px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid #e8eaed;
    background: white;
}
.comparateur-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-feature-settings: 'tnum';
}
.comparateur-table thead th {
    background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
    padding: 24px 16px 20px;
    text-align: center;
    border-bottom: 1px solid #e8eaed;
    vertical-align: top;
}
.comparateur-table thead th:first-child {
    text-align: left;
    background: #f8fafc;
    width: 210px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    vertical-align: middle;
}
.syndic-col-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}
.syndic-col-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
}
.syndic-col-logo img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}
.syndic-col-logo .logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2b4a, #2563eb);
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}
.syndic-col-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    text-align: center;
    line-height: 1.3;
}
.syndic-col-name a {
    color: #1e293b;
    text-decoration: none;
    transition: color .2s;
}
.syndic-col-name a:hover { color: #2563eb; }
.btn-retirer {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    transition: all .2s;
    margin-top: 4px;
}
.btn-retirer:hover {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

/* Table body */
.comparateur-table tbody tr {
    transition: background .15s;
}
.comparateur-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
.comparateur-table tbody tr:hover {
    background: #f0f4ff;
}
.comparateur-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    font-size: 14px;
    color: #334155;
}
.comparateur-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    font-size: 13px;
}

/* Criterion icons */
.criterion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f0f4ff;
    color: #6366f1;
    font-size: 11px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Stars */
.compare-stars {
    color: #FBBF24;
    font-size: 14px;
    text-shadow: 0 0 6px rgba(251,191,36,.3);
}
.compare-stars .far { color: #e2e8f0; text-shadow: none; }

/* Score circle */
.score-mini-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: white;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* Boolean */
.check-yes { color: #22c55e; font-size: 18px; }
.check-no { color: #e2e8f0; font-size: 18px; }

/* Services as pills */
.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}
.services-list span {
    display: inline-block;
    background: #f0f4ff;
    color: #4f46e5;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Best badge */
.best-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 6px;
    box-shadow: 0 2px 6px rgba(245,158,11,.3);
}

/* Footer CTA */
.comparateur-table tfoot td {
    padding: 20px 16px;
    background: #f8fafc;
    border-top: 1px solid #e8eaed;
}
.btn-voir-fiche {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all .25s;
}
.btn-voir-fiche:hover {
    background: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.btn-voir-fiche i {
    transition: transform .2s;
}
.btn-voir-fiche:hover i {
    transform: translateX(3px);
}

/* Bottom add button */
.comparateur-bottom-cta {
    text-align: center;
    margin-bottom: 60px;
}
.btn-add-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all .25s;
    cursor: pointer;
}
.btn-add-more:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f8f9ff;
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp .4s ease both;
}

/* Print */
@media print {
    .comparateur-hero, .comparateur-toolbar, .btn-retirer,
    .comparateur-search-wrapper, .comparateur-bottom-cta,
    .toast, header, footer, #cookie-banner { display: none !important; }
    .comparateur-table-wrapper {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    .comparateur-table td:first-child,
    .comparateur-table thead th:first-child {
        position: static !important;
    }
    .comparateur-verdicts { break-inside: avoid; }
}

/* Responsive */
@media (max-width: 768px) {
    .comparateur-hero { padding: 50px 0 30px; }
    .comparateur-hero h1 { font-size: 1.5rem; }
    .comparateur-search-wrapper { margin: 20px 16px 0; }
    .comparateur-toolbar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        border-radius: 12px;
        margin: 0 8px 16px;
    }
    .toolbar-actions { flex-wrap: wrap; justify-content: center; }
    .comparateur-verdicts {
        flex-direction: column;
        gap: 8px;
        padding: 0 8px;
    }
    .comparateur-table-wrapper {
        margin: 0 8px 24px;
        border-radius: 12px;
    }
    .comparateur-table thead th:first-child,
    .comparateur-table td:first-child {
        min-width: 130px;
        font-size: 12px;
    }
    .syndic-col-logo { width: 50px; height: 50px; border-radius: 12px; }
    .syndic-col-name { font-size: 12px; }
    .comparateur-empty { padding: 40px 20px; min-height: 30vh; }
    .comparateur-empty .empty-card { width: 60px; height: 75px; }
}

/* Button comparateur (recherche/syndic pages) */
.btn-comparer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s;
    text-decoration: none;
}
.btn-comparer:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #6366f1;
}
.btn-comparer.added {
    background: #dcfce7;
    border-color: #22c55e;
    color: #16a34a;
}
.btn-comparer i { font-size: 12px; }

/* Badge header (fallback, header.php has its own) */
.comparateur-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: super;
}
.comparateur-badge:empty { display: none; }
