/* Haqia — pages publiques des textes officiels (index, texte, article) */
.ded__hero.tx__hero { padding: clamp(24px, 3.5vw, 40px) 0 clamp(28px, 4vw, 44px); }
.tx__hero .wrap { position: relative; }
.tx__title { font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
.tx__of { display: block; margin-top: 8px; font-size: .55em; font-weight: 400; color: #C9DAD2; line-height: 1.4; }
.tx__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: .88rem; color: #A9C2B8; }
.tx__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tx__ghost { color: #F3EFE4; border-color: rgba(243, 239, 228, .35); }
.tx__ghost:hover { background: rgba(243, 239, 228, .1); }
.tx__search { display: flex; gap: 8px; max-width: 720px; margin-top: 20px; }
.tx__search input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .95); color: #10201B; font: inherit; }

.tx__wrap { padding-block: 28px 56px; }
.tx__h2 { margin: 28px 0 12px; font-size: 1.25rem; font-weight: 600; }
.tx__filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tx__filters a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, var(--bg)); color: var(--ink-2); font-size: .86rem; text-decoration: none; }
.tx__filters a small { color: var(--ink-3); margin-inline-start: 4px; }
.tx__filters a.is-on { background: var(--accent); border-color: var(--accent); color: #fff; } .tx__filters a.is-on small { color: rgba(255, 255, 255, .8); }
.tx__sep { width: 1px; height: 22px; background: var(--line); margin-inline: 4px; }

.tx__codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tx__codes li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, var(--bg)); }
.tx__codes a { font-weight: 600; color: var(--ink); text-decoration: none; } .tx__codes a:hover { color: var(--accent); }
.tx__lang { font-size: .7rem; font-weight: 700; color: var(--ink-3); }

.tx__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tx__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, var(--bg)); }
.tx__list li > small { grid-column: 2; color: var(--ink-3); font-size: .8rem; }
.tx__list a { color: var(--ink); text-decoration: none; line-height: 1.5; overflow-wrap: anywhere; } .tx__list a:hover { color: var(--accent); text-decoration: underline; }
.tx__list li.is-rep a { color: var(--ink-3); text-decoration: line-through; }
.tx__none { color: var(--ink-3); }
.tx__kind { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tx__hero .tx__kind { background: rgba(235, 213, 143, .18); color: #EBD58F; }
.tx__kind--decision { background: color-mix(in srgb, #8a5a00 15%, transparent); color: #8a5a00; }
.tx__kind--circulaire { background: color-mix(in srgb, #2457a6 15%, transparent); color: #2457a6; }
.tx__pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 22px; }

.tx__toc { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tx__toc a { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; background: var(--surface, var(--bg)); }
.tx__toc a:hover { border-color: var(--accent); color: var(--accent); }

.tx__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.tx__body { max-width: 78ch; font-size: 1.06rem; line-height: 1.85; color: var(--ink); }
.tx__body[dir="rtl"] { font-size: 1.12rem; line-height: 2; }
.tx__body p { margin: 0 0 .9em; }
.tx__sub { margin: 1.4em 0 .4em; font-size: 1.1rem; font-weight: 700; }
.tx__twin { margin-top: 32px; padding: 18px 20px; border-radius: 14px; background: var(--surface-2, var(--bg)); border: 1px solid var(--line); }
.tx__twin .tx__h2 { margin-top: 0; }
.tx__artnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 28px; }
.tx__side { position: sticky; top: 90px; display: grid; gap: 12px; }
.tx__box { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface, var(--bg)); }
.tx__box p { margin: 6px 0 12px; color: var(--ink-2); font-size: .92rem; }
.tx__off { font-size: .9rem; }
.tx__warn { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, #b3261e 10%, transparent); color: #b3261e; font-weight: 600; }
.tx__note { margin-top: 28px; font-size: .82rem; color: var(--ink-3); }
.tx__cta { margin-top: 36px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: var(--surface-2, var(--bg)); }
.tx__cta p { margin: 0; max-width: 60ch; }

@media (max-width: 900px) {
  .tx__grid { grid-template-columns: minmax(0, 1fr); }
  .tx__side { position: static; }
  .tx__search { flex-direction: column; }
}

/* Page calculateur */
.tools--page { display: block; max-width: 760px; }
.tools--page .calc { opacity: 1; transform: none; }
.tx__table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: .98rem; }
.tx__table th, .tx__table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tx__table th { font-size: .82rem; color: var(--ink-3); font-weight: 600; }

/* En clair */
.tx__clair { margin: 0 0 24px; padding: 18px 20px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface, var(--bg))); }
.tx__clair-k { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.tx__clair-sum { font-size: 1.05rem; line-height: 1.7; margin: 0 0 10px; }
.tx__clair ul { margin: 0 0 10px; padding-inline-start: 1.2em; display: grid; gap: 6px; line-height: 1.6; }
.tx__clair-note { font-size: .8rem; color: var(--ink-3); margin: 0; }
.tx__faq { margin-top: 28px; }

/* Méthode et sources */
.mt__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mt__stats div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, var(--bg)); }
.mt__stats strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--accent); }
.mt__stats span { font-size: .86rem; color: var(--ink-2); }
.mt__kinds { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mt__kinds li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.mt__kinds span { color: var(--ink-3); margin-inline-start: 4px; }
@media (max-width: 700px) { .mt__stats { grid-template-columns: 1fr 1fr; } }
.bpost__body .mt__kinds { padding: 0; margin: 10px 0 0; }
.bpost__body .mt__kinds li { display: inline-block; margin: 0; list-style: none; }
.bpost__body .mt__kinds li::before { content: none; display: none; }
.tx__ocr { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, #C27803 10%, transparent); color: var(--ink-2); }

/* Questions juridiques */
.qa__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.qa__list a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, var(--bg)); color: var(--ink); text-decoration: none; line-height: 1.5; }
.qa__list a:hover { border-color: var(--accent); color: var(--accent); }
.qa__srcs ul { padding-inline-start: 1.2em; display: grid; gap: 6px; }

/* Pages piliers par domaine */
.hub__arts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.hub__arts li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, var(--bg)); }
.hub__arts a { font-weight: 600; color: var(--ink); text-decoration: none; } .hub__arts a:hover { color: var(--accent); }
.hub__arts p { margin: 6px 0 0; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }

/* Connecteur MCP */
.mcp__url { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.mcp__url code { padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.95); color: #10201B; font-size: 1rem; }
.mcp__code { padding: 12px 16px; border-radius: 10px; background: #0E1A16; color: #E8F0EC; overflow-x: auto; font-size: .92rem; }

/* Guides des pages domaine */
.hub__guide { margin: 8px 0 36px; }
.hub__intro p { font-size: 1.08rem; line-height: 1.75; max-width: 78ch; margin: 0 0 14px; }
.hub__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 40px; }
.hub__covers, .hub__bodies { padding-inline-start: 20px; line-height: 1.6; }
.hub__covers li, .hub__bodies li { margin: 6px 0; }
.hub__rules { counter-reset: r; list-style: none; padding: 0; display: grid; gap: 12px; }
.hub__rules li { counter-increment: r; position: relative; padding: 14px 18px 14px 56px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--line, rgba(11,47,40,.12)); line-height: 1.6; }
[dir=rtl] .hub__rules li { padding: 14px 56px 14px 18px; }
.hub__rules li::before { content: counter(r); position: absolute; inset-inline-start: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.hub__note { font-size: .9rem; opacity: .75; margin-top: 12px; }
.hub__gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 28px; }
.hub__gloss div { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line, rgba(11,47,40,.12)); }
.hub__gloss dt { font-weight: 600; } .hub__gloss dd { margin: 4px 0 0; line-height: 1.55; }
.hub__faq { margin-bottom: 28px; }

/* Annuaire des avocats */
.dir__filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; margin-top: 22px; }
.dir__filters label { display: grid; gap: 4px; font-size: .85rem; color: inherit; opacity: .95; }
.dir__filters select, .dir__filters input { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.95); color: #12302a; font: inherit; }
.dir__neutral { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: .92rem; margin: 0 0 16px; }
.dir__neutral--sm { font-size: .82rem; }
.dir__count { font-weight: 600; margin: 0 0 12px; }
.dir__grid { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dir__card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line, rgba(11,47,40,.12)); border-radius: 16px; background: var(--surface, #fff); }
.dir__cardlink { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.dir__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 1.4rem; flex: none; }
.dir__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dir__avatar--lg { width: 112px; height: 112px; font-size: 2.2rem; border: 3px solid rgba(255,255,255,.6); }
.dir__who { display: grid; } .dir__who small { opacity: .75; }
.dir__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.dir__tags span, .dir__tags a { padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .8rem; text-decoration: none; }
.dir__meta { margin: 0; font-size: .85rem; opacity: .8; }
.dir__none { padding: 18px; border: 1px dashed var(--line, rgba(11,47,40,.2)); border-radius: 14px; }
.dir__join { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, rgba(11,47,40,.12)); margin: 0 0 28px; }
.dir__join p { margin: 4px 0 0; }
.dir__id { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.dir__badge { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.15); font-size: .85rem; }
.dir__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
@media (max-width: 900px) { .dir__layout { grid-template-columns: 1fr; } }
.dir__box { padding: 18px; border-radius: 16px; border: 1px solid var(--line, rgba(11,47,40,.12)); background: var(--surface, #fff); position: sticky; top: 90px; }
.dir__box h2 { font-size: 1.05rem; margin-top: 0; } .dir__box p { margin: 0 0 12px; line-height: 1.5; }
.dir__bio p { line-height: 1.7; }
.dir__book { margin-top: 28px; padding: 20px; border-radius: 18px; border: 1px solid var(--line, rgba(11,47,40,.12)); background: var(--surface, #fff); }
.dir__book fieldset { border: 0; padding: 0; margin: 0 0 14px; } .dir__book legend { font-weight: 600; margin-bottom: 8px; }
.dir__days, .dir__times { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dir__day, .dir__time { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line, rgba(11,47,40,.2)); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.dir__day.is-on, .dir__time.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.dir__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.dir__fields label { display: grid; gap: 4px; font-size: .9rem; }
.dir__fields input, .dir__fields select, .dir__fields textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, rgba(11,47,40,.2)); font: inherit; background: var(--bg, #fff); color: inherit; }
.dir__wide { grid-column: 1 / -1; }
.dir__check { display: flex !important; gap: 8px; align-items: flex-start; }
.dir__msg { min-height: 1.2em; } .dir__ok { padding: 14px; border-radius: 12px; background: var(--brand-soft); font-weight: 600; }
.dir__note { font-size: .85rem; opacity: .8; }
.dir__cities a { white-space: nowrap; }

/* ===== Couverture de la base (chiffres en direct) ===== */
.cv__stamp { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .86rem; opacity: .85; }
.cv__live { width: 9px; height: 9px; border-radius: 50%; background: #3BD38A; box-shadow: 0 0 0 0 rgba(59, 211, 138, .6); animation: cvpulse 2s infinite; }
@keyframes cvpulse { 70% { box-shadow: 0 0 0 9px rgba(59, 211, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 211, 138, 0); } }
.cv__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 6px 0 28px; }
.cv__kpis > * { display: grid; gap: 2px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface, var(--bg)); color: inherit; text-decoration: none; }
.cv__kpis > a:hover { border-color: var(--brand); }
.cv__kpis strong { font-family: var(--f-display, inherit); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.cv__kpis span { font-size: .86rem; color: var(--ink-2); }
.cv__charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cv__charts figure { margin: 0; padding: 14px 14px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, var(--bg)); }
.cv__charts figcaption { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.cv__chart { width: 100%; height: auto; display: block; }
.cv__grid { stroke: var(--line); stroke-width: 1; }
.cv__ax { fill: var(--ink-3); font-size: 11px; }
.cv__area { fill: color-mix(in srgb, var(--brand) 14%, transparent); }
.cv__line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.cv__dot { fill: var(--bg); stroke: var(--brand); stroke-width: 2; }
.cv__hist { margin: 12px 0 8px; } .cv__hist summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.cv__tw { overflow-x: auto; }
.cv table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cv th { text-align: start; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cv td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cv__num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.cv__plus { color: var(--brand); font-weight: 700; }
.cv__minus { color: var(--muted, #6b7280); font-weight: 700; }
.cv__bo { margin: 26px 0; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, var(--surface, var(--bg))), var(--surface, var(--bg))); }
.cv__bo .tx__h2 { margin-top: 0; }
.cv__progress { position: relative; height: 26px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 10px 0 18px; }
.cv__progress span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #3BD38A)); border-radius: 999px; min-width: 6px; }
[dir="rtl"] .cv__progress span { inset: 0 0 0 auto; }
.cv__progress b { position: relative; display: block; text-align: center; line-height: 26px; font-size: .82rem; }
.cv__cols { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.cv__cols div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cv__cols span { width: 100%; max-width: 46px; border-radius: 6px 6px 0 0; background: var(--brand); }
.cv__cols b { font-size: .72rem; margin-top: 4px; } .cv__cols small { font-size: .7rem; color: var(--ink-3); }
.cv__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.cv__bars { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.cv__bars a { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; color: inherit; text-decoration: none; font-size: .9rem; }
.cv__bars a:hover { background: var(--surface-2); }
.cv__lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv__bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cv__bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.cv__recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cv__recent li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; }
.cv__recent a { flex: 1; min-width: 200px; color: inherit; font-weight: 600; }
.cv__recent small { color: var(--ink-3); }
.cv__note { margin: 22px 0 8px; color: var(--ink-2); font-size: .9rem; }
@media (max-width: 900px) { .cv__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cv__charts, .cv__grid { grid-template-columns: 1fr; } }
