/* Espace professionnel de santé : coquille, en-têtes de page, tableau de bord (hx-) et analyses (tx-, an-). */

/* ——— Coquille : pas de menu latéral, retour par le logo ou le bandeau ——— */
.shell.hcp.is-on, .shell.hcp.is-on.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.shell.hcp .hcp-side, .shell.hcp .hcp-burger, .shell.hcp .hcp-crumb, .shell.hcp .hcp-who, .hcp-voile { display: none !important; }
.hcp-top-home { display: inline-flex; align-items: center; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.hcp-top-home:focus-visible { outline: 2px solid #0075c9; outline-offset: 3px; }
.hcp-top-nav { display: flex; align-items: center; gap: 0.4rem; flex: none; margin-left: 0.2rem; }
.hcp-top-nav:empty { display: none; }
.hcp-top-back { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 38px; padding: 0 1rem 0 0.8rem; border: 0; border-radius: 999px; background: #0f172a; color: #fff; font: inherit; font-size: 0.85rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background 0.2s; }
.hcp-top-back > i { display: inline-flex; transition: transform 0.2s; }
.hcp-top-back:hover { background: #1e293b; }
.hcp-top-back:hover > i { transform: translateX(-2px); }
.hcp-top-back:focus-visible { outline: 3px solid rgba(15, 23, 42, 0.2); outline-offset: 2px; }
.hcp-top-back--ghost { padding: 0 0.9rem; background: #f1f4f8; color: #0f172a; }
.hcp-top-back--ghost:hover { background: #e6ebf1; }
.hcp-top-logo { display: block; width: auto; height: 48px; object-fit: contain; }
.shell.hcp.is-home .hcp-top-logo { height: 56px; }
.shell.hcp.is-home .hcp-gsearch { visibility: hidden; }
.hcp-page { max-width: 1240px; }

.pg-head { margin: 0.6rem 0 1.6rem; padding: 0; background: none; color: #0f172a; }
.pg-head-main { display: flex; align-items: center; gap: 0.9rem; }
.pg-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--tb); color: var(--t); }
.pg-kicker { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t); }
.pg-head h1 { margin: 0.1rem 0 0; font-size: clamp(1.4rem, 1.05rem + 1vw, 1.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: #0f172a; }
.pg-sub { margin: 0.3rem 0 0; max-width: 60rem; font-size: 0.92rem; line-height: 1.5; color: #64748b; }

/* Les anciens en-têtes de vue laissent la place au bandeau commun. */
.shell.hcp:not(.is-home) .view > .hero,
.shell.hcp:not(.is-home) .view > .hero + .note,
.shell.hcp:not(.is-home) .view > .hcp-hello { display: none; }

.shell.hcp .hcp-top { padding-top: 0.7rem; padding-bottom: 0.7rem; background: rgba(255, 255, 255, 0.85); backdrop-filter: saturate(1.6) blur(12px); border-bottom-color: #eef1f5; }
.shell.hcp .hcp-gsearch input { border: 1px solid transparent; background: #f3f5f8; border-radius: 999px; min-height: 40px; padding-left: 1.1rem; font-size: 0.9rem; }
.shell.hcp .hcp-gsearch input:focus { outline: none; border-color: #cbd5e1; background: #fff; box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05); }
.shell.hcp .hcp-iconbtn { border-color: transparent; background: none; color: #475569; border-radius: 999px; }
.shell.hcp .hcp-iconbtn:hover { background: #f1f4f8; color: #0f172a; }
.hcp-page .panel { border: 1px solid #edf0f4; border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: none; }
.hcp-page .panel h3, .tx-card h3 { margin: 0 0 0.9rem; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; color: #0f172a; }
.hcp-page .kpi { border: 1px solid #edf0f4; border-radius: 14px; padding: 0.9rem 1rem; box-shadow: none; }
.hcp-page .kpi span { font-size: 0.78rem; font-weight: 500; color: #64748b; }
.hcp-page .kpi strong { font-size: 1.45rem; font-weight: 650; letter-spacing: -0.03em; }
.hcp-page .hcp-card { border-color: #edf0f4; border-radius: 16px; box-shadow: none; }
.hcp-page table { font-size: 0.9rem; border-collapse: collapse; }
.hcp-page thead { background: none; }
.hcp-page th { padding: 0.6rem 0.8rem; border-bottom: 1px solid #edf0f4; color: #94a3b8; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; }
.hcp-page td { padding: 0.75rem 0.8rem; border-bottom: 1px solid #f3f5f8; color: #334155; }
.hcp-page tbody tr:last-child td { border-bottom: 0; }
.hcp-page tbody tr { transition: background 0.15s; }
.hcp-page tbody tr:hover { background: #fafbfc; }
.hcp-page .toolbar input, .hcp-page .hcp-search--inline, .hcp-page .hcp-search:not(.hx-search) input { border: 1px solid #e6eaf0; background: #fff; border-radius: 10px; }
.hcp-page .toolbar input:focus, .hcp-page .hcp-search:not(.hx-search) input:focus { outline: none; border-color: #94a3b8; box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05); }
.hcp-page .btn { border-radius: 10px; box-shadow: none; font-weight: 600; }
.hcp-page .note { font-size: 0.84rem; color: #64748b; }

.hx {
    --ink: #0f1b2d;
    --muted: #5b6b80;
    --line: #e3eaf3;
    margin: 0 auto;
    padding: clamp(0.4rem, 1.2vw, 0.8rem) 0 1rem;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
}
.hx-tone-blue { --t: #0075c9; --tb: #e6f1fb; }
.hx-tone-teal { --t: #0f8f86; --tb: #e2f5f2; }
.hx-tone-violet { --t: #6d5bd0; --tb: #efecfc; }
.hx-tone-sand { --t: #b9732a; --tb: #fbf1e3; }
.hx-tone-rose { --t: #c2567a; --tb: #fbe9ef; }

/* ——— Bandeau ——— */
.hx-hero { padding: clamp(0.6rem, 2vw, 1.6rem) 0 0.4rem; text-align: center; }
.hx-date { margin: 0; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; }
.hx-hero h1 { margin: 0.4rem 0 0; font-size: clamp(1.7rem, 1.1rem + 1.8vw, 2.6rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; color: #0f172a; }
.hx-hero h1 span { color: #0075c9; }

.hcp-search.hx-search { display: flex; align-items: center; gap: 0.7rem; max-width: 680px; margin: 1.4rem auto 0; padding: 0 0.9rem 0 1.1rem; min-height: 54px; background: #fff; color: #94a3b8; border: 1px solid #e6eaf0; border-radius: 999px; box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.25); text-align: left; }
.hcp-search.hx-search:focus-within { border-color: #94a3b8; box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06), 0 12px 32px -20px rgba(15, 23, 42, 0.25); }
.hcp-search.hx-search input { flex: 1; min-width: 0; min-height: 46px; padding: 0; border: 0; background: transparent; font-size: 0.96rem; color: var(--ink); }
.hcp-search.hx-search input:focus { outline: none; }
.hx-search kbd { font: inherit; font-size: 0.72rem; color: #94a3b8; border: 1px solid #e6eaf0; border-radius: 6px; padding: 0.1rem 0.4rem; white-space: nowrap; }
.hx-search .hcp-ghits { top: calc(100% + 8px); max-height: 420px; color: var(--ink); text-align: left; }

/* ——— Espaces ——— */
.hx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.7rem, 1.4vw, 1rem); }
.hx-tile { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; min-height: 160px; padding: 1.1rem 1.15rem; border: 1px solid #edf0f4; border-radius: 16px; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.hx-tile:hover { border-color: #dfe4ea; box-shadow: 0 16px 34px -24px rgba(15, 23, 42, 0.3); transform: translateY(-2px); }
.hx-tile:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }
.hx-tile-h { display: flex; align-items: center; gap: 0.55rem; }
.hx-tile-h b { flex: 1; min-width: 0; font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-tile-h > svg { color: #b6c2d1; transition: color 0.2s, transform 0.2s; }
.hx-tile:hover .hx-tile-h > svg { color: var(--t); transform: translateX(2px); }
.hx-tile-ic { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--tb); color: var(--t); }
.hx-tile-val { display: flex; flex-direction: column; margin-top: auto; }
.hx-tile-val strong { font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.7rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-tile-val small { font-size: 0.78rem; color: var(--muted); }
.hx-tile-txt { font-size: 0.8rem; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-tile-val + .hx-tile-txt { margin-top: 0; }
.hx-tile-h + .hx-tile-txt { margin-top: auto; }
.hx-wait { color: #b6c2d1; }

.hx-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.2rem; font-size: 0.8rem; }
.hx-foot-links button, .hx-foot-links a { padding: 0.3rem 0.2rem; border: 0; background: none; color: #64748b; font: inherit; text-decoration: none; cursor: pointer; }
.hx-foot-links button:hover, .hx-foot-links a:hover { color: #0075c9; }
.hx-foot-links #hx-logout { color: #8b3a3a; }

/* ——— Analyses Transparence (préfixe tx-) ——— */
.tx-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.tx-card { margin: 0; min-width: 0; }
.tx-card h3 { margin: 0 0 0.85rem; font-size: 0.95rem; font-weight: 650; color: #0f1b2d; }
.tx-bars { display: flex; flex-direction: column; gap: 0.6rem; }
.tx-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto 3rem; gap: 0.25rem 0.6rem; align-items: baseline; font-size: 0.84rem; }
.tx-bar-lib { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0f1b2d; }
.tx-bar b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-bar em { font-style: normal; color: #64748b; text-align: right; font-variant-numeric: tabular-nums; }
.tx-bar-track { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: #f1f4f8; overflow: hidden; }
.tx-bar-track span { display: block; height: 100%; border-radius: inherit; background: #c98a45; }
.tx-more { margin: 0.7rem 0 0; font-size: 0.78rem; color: #94a3b8; }
.tx-years { display: flex; align-items: stretch; gap: 0.5rem; height: 170px; }
.tx-year { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.tx-year b { font-size: 0.72rem; font-weight: 600; color: #0f1b2d; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-year-col { flex: 1; width: 100%; max-width: 44px; display: flex; align-items: flex-end; }
.tx-year-col span { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: #c98a45; }
.tx-year:last-child .tx-year-col span { background: #b9732a; }
.tx-year small { font-size: 0.76rem; color: #64748b; }

/* ——— Analyses des pages (préfixe an-) ——— */
.tx-grid--2 { grid-template-columns: 1fr 1fr; }
.tx-bars--blue .tx-bar-track span { background: #3b93d6; }
.tx-bar em.is-up, .an-epi-evol em.is-up { color: #c2410c; }
.tx-bar em.is-down, .an-epi-evol em.is-down { color: #0d6b62; }
.tx-bar em.is-flat, .an-epi-evol em.is-flat { color: #64748b; }
.tx-bar.is-mine .tx-bar-lib { font-weight: 650; color: #0075c9; }
.tx-bar.is-mine .tx-bar-track span { background: #0075c9; }
.an-regions .tx-bar-track span { background: #d08aa3; }

.an-badge { display: inline-flex; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; background: #eef2f7; color: #475569; }
.an-badge.an-tone-violet { background: #efecfc; color: #4a3aa0; } .an-badge.an-tone-teal { background: #e2f5f2; color: #0d5c56; } .an-badge.an-tone-ok { background: #e3f6ec; color: #0d6b45; } .an-badge.an-tone-sand { background: #fbf1e3; color: #8a5a18; } .an-badge.an-tone-blue { background: #e6f1fb; color: #0b5c9e; }
#h-table, #market-table, #science-table, #sent-regions, #view-transparence .panel { max-width: 100%; overflow-x: auto; }
.an-date { white-space: nowrap; color: #64748b; font-variant-numeric: tabular-nums; }

.an-epi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.an-epi-card { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.9rem 1rem; border: 1px solid #e3eaf3; border-radius: 16px; background: #fff; color: #0f172a; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.an-epi-card:hover { border-color: #e2c6d1; }
.an-epi-card.is-on { border-color: #c2567a; box-shadow: 0 0 0 3px rgba(194, 86, 122, 0.12); }
.an-epi-h { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.an-epi-h b { font-size: 0.95rem; }
.an-epi-h small { font-size: 0.74rem; color: #94a3b8; white-space: nowrap; }
.an-epi-card > strong { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.an-epi-card > strong small { font-size: 0.78rem; font-weight: 500; color: #94a3b8; }
.an-epi-evol { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.8rem; color: #64748b; }
.an-epi-evol em { display: inline-block; min-width: 3.6rem; font-style: normal; font-weight: 650; font-variant-numeric: tabular-nums; }

.an-seg { display: inline-flex; gap: 0.2rem; margin-bottom: 1.2rem; padding: 0.25rem; border-radius: 999px; background: #f1f4f8; }
.an-seg button { padding: 0.45rem 1rem; border: 0; border-radius: 999px; background: none; color: #475569; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.an-seg button.is-on { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.an-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0 0 0.8rem; }
.an-chips:empty { display: none; }
.an-chips-lib { font-size: 0.8rem; color: #64748b; margin-right: 0.2rem; }
.an-chips button { padding: 0.3rem 0.75rem; border: 0; border-radius: 999px; background: #f1f4f8; color: #334155; font: inherit; font-size: 0.8rem; cursor: pointer; }
.an-chips button:hover { background: #e6ebf1; }
.an-chips button.is-on { background: #0f172a; color: #fff; }

.hcp-ess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.7rem; }
.hcp-ess { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.9rem 1rem; border: 1px solid #edf0f4; border-top: 3px solid #cbd5e1; border-radius: 14px; background: #fff; }
.hcp-ess b { font-size: 0.92rem; color: #0f1b2d; }
.hcp-ess span { font-size: 0.82rem; line-height: 1.45; color: #475569; }
.hcp-ess--ok { border-top-color: #13804f; }
.hcp-ess--teal { border-top-color: #0f8f86; }
.hcp-ess--sand { border-top-color: #b9732a; }
.hcp-ecart { font-weight: 650; font-variant-numeric: tabular-nums; color: #64748b; }
.hcp-ecart.is-down { color: #0d6b62; }
.hcp-ecart.is-up { color: #c2410c; }

/* ——— Typographie ——— */
.shell.hcp { font-feature-settings: 'cv11', 'ss01', 'ss03'; -webkit-font-smoothing: antialiased; }
.shell.hcp h1, .shell.hcp h2, .shell.hcp h3, .st-i.st-txt strong, .hcp-fiche-h h1 { font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; }
.hcp-page td, .hcp-page .muted { line-height: 1.45; }

/* ——— En bref : les trois points à retenir en tête de page (préfixe st-) ——— */
.st { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin: 0 0 1.25rem; }
.st-i { position: relative; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; padding: 1rem 1.1rem 1.05rem; border: 1px solid #edf0f4; border-radius: 16px; background: #fff; }
.st-i::before { content: ""; position: absolute; left: 1.1rem; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--t, #0075c9); }
#view-market { --t: #6d5bd0; } #view-science, #view-ordonnances { --t: #0f8f86; } #view-sentinelles { --t: #c2567a; } #view-transparence { --t: #b9732a; } #view-annuaire { --t: #6d5bd0; }
.st-l { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: #94a3b8; }
.st-i strong { font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; color: #0f172a; font-variant-numeric: tabular-nums; }
.st-i.st-txt strong { font-size: 1.08rem; letter-spacing: -0.015em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-i strong sup { font-size: 0.55em; }
.st-i small { font-size: 0.82rem; line-height: 1.4; color: #64748b; }
.st-i.st-up::before { background: #e4572e; }
.st-i.st-up strong { color: #c2410c; }
.st-i.st-ok::before { background: #13804f; }
.st-i.st-mute strong { color: #94a3b8; }
.st-more { display: block; width: 100%; margin: 0.6rem 0 0; padding: 0.7rem; border: 0; border-radius: 12px; background: #f6f8fa; color: #0f172a; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.st-more span { font-weight: 400; color: #94a3b8; }
.st-more:hover { background: #eef1f5; }
.an-chips button b { margin-left: 0.2rem; font-weight: 600; color: #94a3b8; font-variant-numeric: tabular-nums; }
.an-chips button.is-on b { color: rgba(255, 255, 255, 0.65); }
.st-add summary { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; cursor: pointer; list-style: none; font-weight: 600; color: #0f172a; }
.st-add summary::-webkit-details-marker { display: none; }
.st-add summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #f1f4f8; font-weight: 600; }
.st-add[open] summary::before { content: "−"; }
.st-add summary span { font-size: 0.82rem; font-weight: 400; color: #94a3b8; }
.st-labo { margin: 0; padding: 0.75rem 0.2rem; border: 0; border-bottom: 1px solid #f3f5f8; border-radius: 0; background: none; box-shadow: none; }
.st-labo:last-of-type { border-bottom: 0; }
.st-labo-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.st-labo-h span { font-size: 0.84rem; color: #64748b; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-quick { padding: 0.2rem 0; }
.st-quick .st-l { margin-bottom: 0.6rem; }
.st-quick-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.st-quick-list button { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 100%; padding: 0.55rem 0.9rem; border: 1px solid #edf0f4; border-radius: 999px; background: #fff; color: #0f172a; font: inherit; font-size: 0.86rem; font-weight: 500; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.st-quick-list button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-quick-list button svg { flex: none; color: #0075c9; }
.st-quick-list button:hover { border-color: #dfe4ea; box-shadow: 0 8px 20px -16px rgba(15, 23, 42, 0.35); }
/* ——— Responsive ——— */
@media (max-width: 1180px) {
    .tx-grid { grid-template-columns: 1fr 1fr; }
    .tx-grid:not(.tx-grid--2) .tx-card:first-child { grid-column: 1 / -1; }
    .an-epi-evol { font-size: 0.76rem; }
}
@media (max-width: 700px) {
    .tx-grid, .tx-grid--2 { grid-template-columns: minmax(0, 1fr); }
    .an-epi { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
    .hx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hx-tile { min-height: 0; }
}
@media (max-width: 560px) {
    .st { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
    .st-i { padding: 0.85rem 0.95rem; }
    .hx { gap: 0.85rem; padding-top: 0.3rem; }
    .hx-hero { padding: clamp(0.6rem, 2vw, 1.6rem) 0 0.4rem; text-align: center; }
    .hx-search kbd { display: none; }
    .hcp-top-logo, .shell.hcp.is-home .hcp-top-logo { height: 40px; }
    .pg-ic { width: 40px; height: 40px; border-radius: 12px; }
    .hcp-top-nav { padding-left: 0.5rem; }
    .hcp-top-back { padding: 0 0.3rem; }
    .hcp-top-back span, .hcp-top-back--ghost { display: none; }
    .hcp-page .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
    .hcp-page .kpi strong { font-size: 1.2rem; }
    .pg-sub { font-size: 0.84rem; }
    .hcp-search.hx-search input { font-size: 1rem; }
    .hx-tiles { gap: 0.55rem; }
    .hx-tile { padding: 0.8rem; gap: 0.4rem; }
    .hx-tile-txt { display: none; }
    .hx-tile-h { align-items: flex-start; }
    .hx-tile-h b { white-space: normal; line-height: 1.25; }
}
@media (prefers-reduced-motion: reduce) {
    .hx-tile, .hx-tile-h > svg { transition: none; }
}

/* ——— Espace médicaments : la page se réorganise selon la largeur ——— */
.shell.hcp, .shell.hcp .hcp-main { min-width: 0; }
.shell.hcp .hcp-page {
    padding: 1.1rem max(clamp(0.85rem, 2.2vw, 2.2rem), env(safe-area-inset-right)) max(3.5rem, env(safe-area-inset-bottom)) max(clamp(0.85rem, 2.2vw, 2.2rem), env(safe-area-inset-left));
}
.shell.hcp .hcp-top {
    flex-wrap: nowrap;
    gap: 0.5rem 0.65rem;
    padding-left: max(clamp(0.7rem, 2vw, 1.4rem), env(safe-area-inset-left));
    padding-right: max(clamp(0.7rem, 2vw, 1.4rem), env(safe-area-inset-right));
}
.shell.hcp .hcp-gsearch { min-width: 0; }
.shell.hcp .hcp-gsearch input { min-width: 0; }
.shell.hcp .hcp-top-nav { min-width: 0; }
.shell.hcp .hcp-search--inline { min-width: 0; }
.shell.hcp .hcp-search--inline input { min-width: 0; width: 100%; }
.shell.hcp .hcp-filters {
    grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(9.5rem, 1fr)) auto;
    align-items: stretch;
}
.shell.hcp .hcp-filters .hcp-solid { white-space: nowrap; align-self: stretch; }
.shell.hcp .hcp-facts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
}
.shell.hcp .hcp-fiche-top { flex-wrap: wrap; align-items: flex-start; }
.shell.hcp .hcp-fiche-top > div:first-child { flex: 1 1 16rem; min-width: 0; }
.shell.hcp .hcp-actions { flex: 1 1 auto; justify-content: flex-end; }
.shell.hcp .hcp-card-h { flex-wrap: wrap; align-items: flex-start; }
.shell.hcp .hcp-card-h .hcp-badge { white-space: normal; max-width: 100%; }
.shell.hcp .hcp-ess-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.shell.hcp .hcp-row { flex-wrap: wrap; align-items: flex-start; }
.shell.hcp .hcp-row > div { min-width: 0; flex: 1 1 12rem; }
.shell.hcp .hcp-tabs {
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.4rem 0.35rem;
}
.shell.hcp .hcp-tabs::-webkit-scrollbar { display: none; }
.shell.hcp .hcp-tabs button { flex: 0 0 auto; white-space: nowrap; }
.shell.hcp .hcp-scroll { -webkit-overflow-scrolling: touch; }
.shell.hcp .hcp-compare { min-width: 36rem; }
.shell.hcp .hcp-med { grid-template-columns: minmax(0, 1fr) auto auto; }
.shell.hcp .hcp-sim { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }

@media (max-width: 1180px) {
    .shell.hcp .hcp-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .shell.hcp .hcp-filters .hcp-search--inline,
    .shell.hcp .hcp-filters .hcp-solid { grid-column: 1 / -1; }
    .shell.hcp .hcp-filters select { grid-column: span 2; }
    .shell.hcp .hcp-iconbtn span { display: none; }
    .shell.hcp .hcp-iconbtn { width: 40px; justify-content: center; padding: 0; }
    .shell.hcp .hcp-top-logo,
    .shell.hcp.is-home .hcp-top-logo { height: 42px; }
}

@media (max-width: 900px) {
    .shell.hcp .hcp-top {
        display: grid;
        grid-template-columns: auto auto auto minmax(0, 1fr);
        grid-template-areas:
            "logo notif fav nav"
            "search search search search";
        align-items: center;
        column-gap: 0.4rem;
        row-gap: 0.45rem;
    }
    .shell.hcp.is-home .hcp-gsearch { display: none; }
    .shell.hcp.is-home .hcp-top { grid-template-areas: "logo notif fav nav"; }
    .shell.hcp .hcp-top-home { grid-area: logo; }
    .shell.hcp .hcp-gsearch { grid-area: search; }
    .shell.hcp #hcp-notif { grid-area: notif; }
    .shell.hcp #hcp-fav { grid-area: fav; }
    .shell.hcp .hcp-top-nav { grid-area: nav; margin-left: 0; justify-content: flex-end; }
    .shell.hcp .hcp-med { grid-template-columns: minmax(0, 1fr) auto; }
    .shell.hcp .hcp-med-tags { grid-column: 1 / -1; justify-content: flex-start; }
    .shell.hcp .hcp-sim { grid-template-columns: minmax(0, 1fr); }
    .shell.hcp .hcp-fiche-h { padding: 1.05rem 1rem 1rem; }
    .shell.hcp .pg-head-main { align-items: flex-start; }
    .shell.hcp .hcp-table--stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
    .shell.hcp .hcp-scroll:has(.hcp-table--stack) { overflow: visible; }
    .shell.hcp .hcp-table--stack,
    .shell.hcp .hcp-table--stack tbody { display: block; width: 100%; }
    .shell.hcp .hcp-table--stack tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem 0.75rem;
        padding: 0.85rem 0.1rem;
        border-bottom: 1px solid #e8eef5;
    }
    .shell.hcp .hcp-table--stack tr.is-me { background: #f3f8fd; border-radius: 12px; padding-inline: 0.65rem; }
    .shell.hcp .hcp-table--stack td {
        display: block;
        width: auto;
        border: 0;
        padding: 0;
        min-width: 0;
    }
    .shell.hcp .hcp-table--stack td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.12rem;
        color: #94a3b8;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
    .shell.hcp .hcp-table--stack td:nth-child(-n+2) { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    .shell.hcp .hcp-filters { grid-template-columns: minmax(0, 1fr); }
    .shell.hcp .hcp-filters .hcp-search--inline,
    .shell.hcp .hcp-filters select,
    .shell.hcp .hcp-filters .hcp-solid { grid-column: 1 / -1; }
    .shell.hcp .hcp-filters .hcp-solid { width: 100%; }
}

@media (max-width: 760px) {
    .shell.hcp .hcp-gsearch input,
    .shell.hcp .hcp-filters select,
    .shell.hcp .hcp-filters input,
    .shell.hcp .hcp-search--inline input,
    .shell.hcp .hcp-sim select,
    .shell.hcp .hcp-sim input { font-size: 16px; }
    .shell.hcp .hcp-top-back:not(.hcp-top-back--ghost) {
        position: relative;
        width: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }
    .shell.hcp .hcp-top-back:not(.hcp-top-back--ghost) > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .shell.hcp .hcp-top-back--ghost { display: inline-flex; padding: 0 0.75rem; }
    .shell.hcp .hcp-top-back--ghost span { display: inline; }
    .shell.hcp .hcp-tabs { position: static; }
    .shell.hcp .hcp-item { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
    .shell.hcp .hcp-item time { padding-top: 0; }
    .shell.hcp .hcp-card { padding: 0.95rem 0.9rem 0.9rem; }
    .shell.hcp .pg-head { margin-bottom: 1rem; }
}

@media (max-width: 640px) {
    .shell.hcp .hcp-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .shell.hcp .hcp-actions .hcp-link,
    .shell.hcp .hcp-actions .hcp-solid { justify-content: center; text-align: center; }
    .shell.hcp .hcp-med { grid-template-columns: minmax(0, 1fr); }
    .shell.hcp .hcp-med-prix { justify-content: space-between; }
    .shell.hcp .hcp-hello h1,
    .shell.hcp .hcp-fiche-h h1 { font-size: 1.45rem; }
}

@media (max-width: 420px) {
    .shell.hcp .hcp-actions { grid-template-columns: minmax(0, 1fr); }
    .shell.hcp .hcp-table--stack tr { grid-template-columns: minmax(0, 1fr); }
    .shell.hcp .hx-tiles { grid-template-columns: minmax(0, 1fr); }
    .shell.hcp .hcp-top-logo,
    .shell.hcp.is-home .hcp-top-logo { height: 36px; }
}

@media (pointer: coarse) {
    .shell.hcp .hcp-tabs button,
    .shell.hcp .hcp-filters select,
    .shell.hcp .hcp-filters .hcp-solid,
    .shell.hcp .hcp-link,
    .shell.hcp .st-quick-list button { min-height: 44px; }
}

/* ——— Accueil de la recherche médicaments ——— */
.med-home { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 0.35rem; }
.med-sec-h { margin-bottom: 0.75rem; }
.med-sec-h .st-l, .med-reprise .st-l, .med-home > section > .st-l { margin: 0 0 0.7rem; }
.med-sec-h .st-l { margin: 0 0 0.2rem; }
.med-sec-h p:last-child { margin: 0; color: #64748b; font-size: 0.9rem; }
.med-pistes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.med-piste, .med-reprise-card {
    border: 1px solid #edf0f4;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.med-piste { display: flex; flex-direction: column; align-items: flex-start; gap: 0.28rem; min-height: 176px; padding: 1.05rem 1.05rem 1rem; }
.med-piste-h { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 0.65rem; }
.med-piste-h > svg, .med-reprise-card > svg { color: #b6c2d1; flex: none; transition: color 0.2s, transform 0.2s; }
.med-piste-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tb, #e6f1fb); color: var(--t, #0075c9); }
.med-piste-k { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t, #0075c9); }
.med-piste b, .med-reprise-txt b { font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.med-piste-txt, .med-reprise-txt span { font-size: 0.82rem; line-height: 1.4; color: #64748b; }
.med-piste:hover, .med-reprise-card:hover { border-color: #d7e2ee; box-shadow: 0 16px 34px -24px rgba(15, 23, 42, 0.45); transform: translateY(-2px); }
.med-piste:hover .med-piste-h > svg, .med-reprise-card:hover > svg { color: var(--t, #0075c9); transform: translateX(2px); }
.med-reprise-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0.65rem; }
.med-reprise-card { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.8rem 0.9rem; }
.med-reprise-txt { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.med-reprise-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-medicaments.is-idle .hcp-filters {
    margin-bottom: 1.35rem;
    padding: 0.7rem;
    border: 1px solid #edf0f4;
    border-radius: 18px;
    background: #fff;
}
@media (max-width: 980px) {
    .med-pistes { grid-template-columns: 1fr 1fr; }
    .med-piste { min-height: 156px; }
}
@media (max-width: 420px) {
    .med-home { gap: 1.15rem; }
    .med-pistes { grid-template-columns: minmax(0, 1fr); }
    .med-piste { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .med-piste, .med-reprise-card, .med-piste-h > svg, .med-reprise-card > svg { transition: none; }
}
