/* ============================================
   BAROMETRE DES CHARGES - CLEAN MODERN
   ============================================ */

/* Hero */
.barometre-hero {
    background: #0f172a;
    padding: 90px 0 60px;
    text-align: center;
    color: white;
}
.barometre-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -.02em;
}
.barometre-hero p {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}
.hero-pills {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 20px;
}
.hero-pill i { color: #fbbf24; font-size: 11px; }
.hero-counter {
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}
.hero-counter strong {
    color: #fbbf24;
    font-weight: 700;
}

/* Section */
.barometre-section {
    padding: 50px 0 60px;
    background: #f8fafc;
}

/* Card formulaire */
.barometre-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 30px rgba(0,0,0,.04);
    border: 1px solid #e2e8f0;
    padding: 40px;
}
.barometre-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 28px;
}

/* Form */
.barometre-form .form-group {
    margin-bottom: 22px;
}
.barometre-form label.field-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #334155;
}
.barometre-form .label-hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: 13px;
}
.barometre-form input[type="text"],
.barometre-form input[type="number"],
.barometre-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.barometre-form input:focus,
.barometre-form select:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Equipements */
.equip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.equip-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    font-size: 14px;
    color: #334155;
}
.equip-checkbox:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.equip-checkbox:has(input:checked) {
    border-color: #0f172a;
    background: #f1f5f9;
}
.equip-checkbox input[type="checkbox"] {
    accent-color: #0f172a;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.equip-checkbox input:checked + span {
    font-weight: 600;
    color: #0f172a;
}
.equip-checkbox .eq-icon {
    color: #94a3b8;
    font-size: 13px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.equip-checkbox:has(input:checked) .eq-icon {
    color: #0f172a;
}

/* Submit */
.btn-comparer {
    width: 100%;
    padding: 14px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-top: 10px;
}
.btn-comparer:hover { background: #1e293b; }
.btn-comparer:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; }

/* ============ Results ============ */
.barometre-result {
    display: none;
    max-width: 720px;
    margin: 30px auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 30px rgba(0,0,0,.04);
    border: 1px solid #e2e8f0;
    padding: 40px;
    animation: fadeInUp .4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    text-align: center;
    margin-bottom: 28px;
}
.result-header .result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.result-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0;
}

/* Comparison */
.result-comparison {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}
.result-box {
    flex: 1;
    text-align: center;
    padding: 0;
}
.result-box + .result-box {
    border-left: 1px solid #e2e8f0;
}
.result-box .box-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
    margin-bottom: 8px;
}
.result-box .box-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
}
.result-box .box-unit {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

/* Percentile gauge */
.percentile-section {
    margin: 0 0 28px;
    padding: 0 0 28px;
    border-bottom: 1px solid #e2e8f0;
}
.percentile-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    margin-bottom: 16px;
}
.percentile-bar-container {
    position: relative;
    margin: 0 0 40px;
}
.percentile-bar {
    height: 8px;
    background: linear-gradient(90deg, #22c55e 0%, #fbbf24 50%, #ef4444 100%);
    border-radius: 4px;
    position: relative;
}
.percentile-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}
.percentile-marker {
    position: absolute;
    top: -8px;
    width: 24px;
    height: 24px;
    background: #0f172a;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transform: translateX(-50%);
    transition: left .8s cubic-bezier(.4,.2,.2,1);
    z-index: 2;
}
.percentile-marker-label {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.percentile-ref-marks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
}
.percentile-ref-mark {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 14px;
    background: rgba(71,85,105,.5);
    transform: translateX(-50%);
}
.percentile-ref-label {
    position: absolute;
    bottom: -22px;
    transform: translateX(-50%);
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
}
.percentile-interpretation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
}
.percentile-interpretation.good {
    background: #f0fdf4;
    color: #166534;
}
.percentile-interpretation.average {
    background: #fffbeb;
    color: #92400e;
}
.percentile-interpretation.high {
    background: #fef2f2;
    color: #991b1b;
}
.percentile-interpretation i { font-size: 18px; }
.percentile-interpretation .interp-text { flex: 1; }
.percentile-interpretation .interp-detail {
    font-weight: 400;
    font-size: 13px;
    margin-top: 2px;
    opacity: .85;
}

/* Data source note */
.data-source {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    margin-top: 10px;
}

/* CTA */
.result-cta {
    text-align: center;
    padding: 0;
    margin: 0;
}
.result-cta p {
    color: #94a3b8;
    margin-bottom: 14px;
    font-size: 14px;
}
.result-cta a {
    display: inline-block;
    background: #0f172a;
    color: #fff;
    padding: 13px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background .2s;
}
.result-cta a:hover { background: #1e293b; }
.result-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.result-ctas a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all .2s;
}
.result-ctas .cta-primary {
    background: #0f172a;
    color: #fff;
}
.result-ctas .cta-primary:hover { background: #1e293b; }
.result-ctas .cta-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.result-ctas .cta-secondary:hover { background: #e2e8f0; }

/* ============ Tableau public ============ */
.barometre-tableau-section {
    padding: 50px 0 60px;
    background: #fff;
}
.barometre-tableau-section .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.tableau-header {
    margin-bottom: 30px;
}
.tableau-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.tableau-header p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    max-width: 600px;
}
.tableau-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.tableau-filter label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.tableau-filter select {
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
}
.tableau-filter select:focus {
    outline: none;
    border-color: #0f172a;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.data-table thead th:last-child,
.data-table thead th:nth-child(3),
.data-table thead th:nth-child(4) {
    text-align: right;
}
.data-table tbody tr {
    transition: background .15s;
}
.data-table tbody tr:hover {
    background: #f8fafc;
}
.data-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}
.data-table tbody td:last-child,
.data-table tbody td:nth-child(3),
.data-table tbody td:nth-child(4) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.data-table .dept-name {
    font-weight: 600;
    color: #1e293b;
}
.data-table .dept-code {
    color: #94a3b8;
    font-size: 12px;
    margin-left: 6px;
}
.data-table .arr-name {
    padding-left: 28px;
    font-weight: 500;
    color: #475569;
}
.data-table .contrib-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}
.data-table .contrib-count.empty {
    background: #f1f5f9;
    color: #94a3b8;
}
.data-table .charge-value {
    font-weight: 700;
    color: #0f172a;
}
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-note {
    margin-top: 16px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ============ SEO Content ============ */
.barometre-seo {
    padding: 50px 0 60px;
    background: #f8fafc;
}
.barometre-seo .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.barometre-seo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
}
.barometre-seo h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 28px 0 10px;
}
.barometre-seo p {
    font-size: 15px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 14px;
}
.barometre-seo a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.barometre-seo a:hover { color: #334155; }

/* ============ Error ============ */
.form-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .barometre-hero { padding: 70px 0 40px; }
    .barometre-hero h1 { font-size: 1.6rem; }
    .hero-pills { gap: 8px; }
    .hero-pill { font-size: 12px; padding: 6px 12px; }
    .barometre-card,
    .barometre-result {
        margin: 0 12px;
        padding: 28px 20px;
        border-radius: 14px;
    }
    .form-row-2 { grid-template-columns: 1fr; }
    .equip-grid { grid-template-columns: 1fr; }
    .result-comparison { flex-direction: column; gap: 20px; }
    .result-box + .result-box { border-left: none; border-top: 1px solid #e2e8f0; padding-top: 20px; }
    .result-ctas { flex-direction: column; }
    .result-ctas a { justify-content: center; }
    .barometre-tableau-section .container,
    .barometre-seo .container {
        padding: 0 16px;
    }
}
@media (max-width: 480px) {
    .barometre-hero h1 { font-size: 1.4rem; }
    .result-box .box-value { font-size: 1.8rem; }
}

/* Contexte immobilier */
.context-immobilier {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}
.context-immobilier h3 {
    font-size: 16px;
    margin-bottom: 14px;
    color: #0f172a;
}
.ctx-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}
.ctx-item:last-child { border-bottom: none; }
.ctx-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
}
.ctx-label { font-size: 13px; color: #64748b; margin-bottom: 2px; }
.ctx-value { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.ctx-detail { font-size: 13px; color: #64748b; line-height: 1.4; }
