/* Page Entreprise — barèmes DOJ (refonte visuelle : lisibilité, moins « néon », grilles propres) */

.ent-wrap {
  position: relative;
  z-index: 1;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) clamp(2.5rem, 6vw, 4rem);
}

/* Page avec `.layout` (sidebar + recherche) : pas de double cadrage horizontal */
.ent-wrap--in-layout {
  max-width: none;
  margin: 0;
  padding: 0 0 clamp(2.5rem, 6vw, 4rem);
}

/* Recherche : `.sidebar__link` force `display: block`, il faut rétablir `hidden` */
.ent-block[hidden],
#ent-sidebar-nav a.sidebar__link[hidden],
#con-sidebar-nav a.sidebar__link[hidden] {
  display: none !important;
}

/* Intro */
.ent-intro-card {
  position: relative;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  padding: 1.15rem 1.35rem 1.25rem 1.5rem;
  border-radius: 14px;
  background: rgba(14, 12, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.ent-intro-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 14px 0 0 14px;
  background: var(--theme-gradient-rail);
  opacity: 0.85;
}

.ent-intro-card .ent-lead {
  margin: 0;
  max-width: 62ch;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(200, 196, 212, 0.95);
}

.ent-meta {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(154, 150, 168, 0.9);
}

/* Blocs */
.ent-blocks {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ent-block {
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.ent-block + .ent-block {
  padding-top: clamp(1.35rem, 3vw, 2rem);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ent-block section {
  margin: 0;
}

/* Titres de section */
.ent-section-title {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 1.15rem;
  padding: 0 0 0.55rem 0.85rem;
  border-left: 3px solid var(--theme-border-strong);
  color: #f4f2f8;
  line-height: 1.25;
}

.ent-subsection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.ent-subsection:last-child {
  margin-bottom: 0;
}

/* Grilles : cartes alignées en hauteur naturelle (pas de grands vides) */
.ent-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 288px), 1fr));
  gap: 1.1rem;
  align-items: start;
}

@media (min-width: 1100px) {
  .ent-grid-cards--dense {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Carte */
.ent-card {
  position: relative;
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1rem;
  background: rgba(16, 14, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ent-card::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--theme-gradient-shine);
  opacity: 0.75;
}

.ent-card:hover {
  transform: translateY(-1px);
  border-color: var(--theme-border-faint);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
}

/* Carte « article » (blocs Constitution, price_cards) */
.ent-card--article {
  background: rgba(11, 11, 14, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.055);
  padding: 1.25rem 1.35rem 1.2rem;
}

.ent-card--article::after {
  left: 1.1rem;
  right: auto;
  width: 2.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--theme-gradient-shine-short);
  opacity: 1;
}

.ent-card--article h3 {
  margin: 0.1rem 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fafafa;
}

.ent-article-chip {
  display: inline-block;
  margin: 0 0 0.8rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--theme-chip-text);
  background: var(--theme-chip-bg);
  border: 1px solid var(--theme-chip-border);
  border-radius: 999px;
}

.ent-article-panel {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.32);
  padding: 1.2rem 1.35rem 1.25rem;
}

.ent-card--article .ent-article-panel .ent-kv-list {
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.ent-card--article .ent-article-panel .ent-kv-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(248, 248, 250, 0.92);
}

.ent-card--article .ent-article-panel .ent-kv-list li:nth-child(even) {
  background: transparent;
}

.ent-card--article .ent-article-panel .ent-kv-list li:hover {
  background: transparent;
}

.ent-card--article .ent-article-panel .ent-kv-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ent-card--article .ent-article-panel .ent-kv-list li:first-child {
  padding-top: 0;
}

.ent-card--article .ent-article-panel .ent-kv-list li.ent-kv-list__prose {
  display: block;
  padding: 0;
  border: none;
}

.ent-card--article .ent-prose-flow {
  color: rgba(248, 248, 250, 0.93);
}

.ent-card h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.ent-card h3 {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.92rem;
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fafaf9;
  line-height: 1.3;
}

/* Sous-titre type « TARIFS » (courte étiquette) */
.ent-card .ent-sub {
  display: inline-flex;
  margin: 0 0 0.65rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--theme-tag-text);
  background: var(--theme-tag-bg);
  border: 1px solid var(--theme-tag-border);
  border-radius: 6px;
}

/* Phrase d’accroche sous le titre (ex. bloc taxes) */
.ent-card-lead {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(186, 182, 198, 0.96);
  max-width: 62ch;
}

/* Tableau libellé / montant */
.ent-kv-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.ent-kv-list li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.86rem;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ent-kv-list li:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.ent-kv-list li:hover {
  background: var(--theme-hover-row);
}

@media (min-width: 520px) {
  .ent-kv-list li {
    grid-template-columns: 1fr minmax(5.5rem, auto);
    align-items: center;
  }
}

.ent-kv-list li:last-child {
  border-bottom: none;
}

.ent-kv-list li.ent-kv-list__prose {
  display: block;
}

.ent-prose-flow {
  display: flex;
  flex-direction: column;
}

.ent-prose-p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.65;
  font-weight: 400;
  color: rgba(232, 230, 237, 0.94);
}

.ent-prose-p:last-child {
  margin-bottom: 0;
}

.ent-prose-flow > .ent-prose-list:last-child {
  margin-bottom: 0;
}

.ent-prose-list {
  list-style: none;
  margin: 0.2rem 0 0.95rem;
  padding: 0.15rem 0 0.2rem 1.05rem;
  border-left: 2px solid var(--theme-border-mid);
}

.ent-prose-list li {
  position: relative;
  margin: 0.55rem 0;
  padding-left: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.58;
  font-weight: 400;
  color: rgba(232, 230, 237, 0.93);
}

.ent-prose-list li:first-child {
  margin-top: 0.1rem;
}

.ent-prose-list li:last-child {
  margin-bottom: 0.1rem;
}

.ent-prose-list li::before {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 8px var(--blue-glow);
}

.ent-label {
  font-weight: 500;
  color: rgba(232, 230, 237, 0.94);
}

.ent-value {
  text-align: left;
}

@media (min-width: 520px) {
  .ent-value {
    text-align: right;
  }
}

/* Montants : discrets, chiffres tabulaires */
.ent-amt {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 0.84rem;
  color: var(--theme-highlight-dim);
  letter-spacing: 0.02em;
  max-width: 100%;
  word-break: break-word;
}

/* Badges (taxes %, primes) — léger */
.ent-rate-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--theme-rate-bg);
  color: var(--theme-highlight);
  border: 1px solid var(--theme-rate-border);
}

.ent-rate-badge--cyan {
  background: var(--theme-cyan-badge-bg);
  color: var(--theme-highlight);
  border-color: var(--theme-cyan-badge-border);
}

.ent-intro-body {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(186, 182, 198, 0.95);
}

.ent-muted {
  margin: 0.3rem 0 0;
  font-size: 0.74rem;
  color: rgba(154, 150, 168, 0.95);
  line-height: 1.45;
}

/* Taxes */
.ent-tax-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ent-tax-row {
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ent-tax-row-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 1rem;
}

.ent-tax-rate {
  flex-shrink: 0;
  font-family: var(--font-title);
  font-size: 0.82rem;
  color: var(--theme-highlight);
}

/* Habitations */
.ent-housing-cats {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.ent-zone-block h4 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-zone-caps);
}

.ent-zone-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ent-zone-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

@media (min-width: 720px) {
  .ent-zone-line {
    grid-template-columns: minmax(11rem, 1fr) 1.2fr;
    align-items: center;
    gap: 0.85rem;
  }
}

.ent-zone-name {
  font-weight: 600;
  color: rgba(244, 242, 248, 0.96);
}

.ent-zone-prices {
  color: rgba(186, 182, 198, 0.95);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.ent-zone-prices .ent-sep {
  margin: 0 0.4rem;
  opacity: 0.25;
}

/* Salaires */
.ent-card--salary .ent-kv-list {
  margin-top: 0.35rem;
}

/* SC */
.ent-sc-head {
  margin-bottom: 1.1rem;
}

.ent-sc-head .ent-section-title {
  margin-bottom: 0.4rem;
}

.ent-sc-head .ent-intro-body {
  margin: 0;
  max-width: 58ch;
  padding-left: 0.85rem;
  border-left: 2px solid var(--theme-border-soft);
}

.ent-sc-bonus {
  margin-top: 1.25rem;
}

.ent-bonus-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ent-bonus-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.12);
}

.ent-bonus-list li:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.ent-bonus-list li:last-child {
  border-bottom: none;
}

.ent-bonus-list .ent-value {
  text-align: right;
  flex: 1;
  min-width: 10rem;
  color: rgba(186, 182, 198, 0.95);
}

/* Erreur */
.ent-error {
  padding: 2rem 1.25rem;
  text-align: center;
  border-radius: 14px;
  background: rgba(60, 20, 24, 0.4);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.ent-error .ent-muted {
  color: rgba(254, 202, 202, 0.88);
  margin-top: 0.65rem;
}

/* Intro riche */
.ent-card--intro {
  background: linear-gradient(160deg, rgba(18, 28, 36, 0.55), rgba(14, 12, 22, 0.82));
}

.ent-card--intro::after {
  background: var(--theme-gradient-intro-bar);
}

.ent-card--intro h3 {
  font-size: clamp(0.88rem, 2.2vw, 1.05rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f5f5f4;
}

/* Médecins & groupes */
.ent-grouped-inner {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.ent-grouped-inner .ent-zone-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(209, 213, 219, 0.95);
  text-transform: none;
  font-family: var(--font-body);
  font-weight: 600;
}
