/* ==========================================================================
   Pages « Dossiers » (Où investir, Comparatifs, Simulateurs, Outils) :
   en-tête commun aux rubriques, composants « application »
   (panneaux arrondis, sélecteurs segmentés) réutilisables par chaque archive.
   ========================================================================== */

:root {
	--ib-d-bg: #F3F2EE;
	--ib-d-line: var(--ib-rule-2);
	--ib-d-line-2: #EDEAE3;
	--ib-d-muted: #6B6F73;
	--ib-d-soft: #FAF9F6;
	--ib-d-tint: #E6F0EC;
	--ib-d-radius: 12px;
	--ib-d-max: var(--ib-max);
}

body.post-type-archive-ville,
body.post-type-archive-comparatif,
body.post-type-archive-simulateur,
body.post-type-archive-outil,
body.tax-outil_cat { font-variant-numeric: tabular-nums; }

/* Même largeur que le reste du site (.ib-wrap). */
.ib-dwrap { max-width: var(--ib-d-max); margin: 0 auto; padding: 32px var(--ib-gutter) 56px; }

/* En-tête (modèle des rubriques, .ib-rubrique__hero) : recherche et bouton à droite. */
.ib-rubrique--dossier + * { margin-top: 32px; }
.ib-rubrique__actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.ib-rubrique__actions .ib-btn { justify-content: center; }
.ib-dsearch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ib-rule); padding: 0 12px; height: 44px; background: var(--ib-white); min-width: 0; margin: 0; }
.ib-dsearch:focus-within { border-color: var(--ib-ink); }
.ib-dsearch__ico { color: var(--ib-muted); font-size: 15px; }
.ib-dsearch input[type="search"] { border: 0; outline: 0; background: transparent; font-size: 15px; flex: 1; min-width: 0; padding: 0; -webkit-appearance: none; appearance: none; }

/* Composants partagés ----------------------------------------------------- */
.ib-dpanel { background: var(--ib-white); border: 1px solid var(--ib-d-line); border-radius: var(--ib-d-radius); }
.ib-dstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.ib-dstat { background: var(--ib-white); border: 1px solid var(--ib-d-line); border-radius: var(--ib-d-radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ib-dstat__label { font-size: 12px; color: var(--ib-d-muted); }
.ib-dstat__val { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-dstat__val--accent { color: var(--ib-accent); }

/* Sélecteur segmenté : <div class="ib-seg"><button aria-pressed="true">…</button></div> */
.ib-seg { display: inline-flex; gap: 4px; background: var(--ib-d-bg); border-radius: 8px; padding: 3px; }
.ib-seg--white { background: var(--ib-white); border: 1px solid var(--ib-d-line); }
.ib-seg button { border: 0; cursor: pointer; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 500; background: transparent; color: var(--ib-d-muted); }
.ib-seg button:hover { color: var(--ib-ink); }
.ib-seg button[aria-pressed="true"] { background: var(--ib-white); color: var(--ib-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* Puces des filtres : variante compacte de .ib-chip. */
.ib-chips--sm { gap: 6px; }
.ib-chips--sm .ib-chip { padding: 5px 11px; font-size: 12px; border-color: var(--ib-d-line); }

.ib-dempty { background: var(--ib-white); border: 1px dashed #C9C4B8; border-radius: var(--ib-d-radius); padding: 32px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ib-dempty[hidden], .ib-dpanel[hidden] { display: none; }
.ib-dempty strong { font-weight: 600; }
.ib-dempty span { font-size: 13px; color: var(--ib-d-muted); }
.ib-dbtn { border: 1px solid var(--ib-d-line); background: var(--ib-white); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ib-dbtn:hover { border-color: var(--ib-ink); color: var(--ib-ink); }
.ib-dbtn--ink { background: var(--ib-ink); border-color: var(--ib-ink); color: var(--ib-white); font-weight: 600; }
.ib-dbtn--ink:hover { background: #000; color: var(--ib-white); }

@media (max-width: 600px) {
	.ib-dband__h1 { font-size: 24px; }
	.ib-dband__actions { width: 100%; }
	.ib-dband__cta { flex: 1 1 auto; justify-content: center; }
}
