.fiche-page {
  --fiche-navy: #0c2244;
  --fiche-blue: #174fb4;
  --fiche-red: #9e2d35;
  --fiche-identity-text: var(--white);
  --fiche-amount-background: #fff7f8;
  --fiche-amount-border: #f0d5d8;
  --fiche-amount-icon: #ffe9eb;
  --fiche-status-background: #fff0f0;
  --fiche-status-border: #edb6b6;
  --fiche-status-text: #84242a;
  padding-block: clamp(28px, 5vw, 64px);
}

:root[data-theme=dark] .fiche-page {
  --fiche-navy: var(--dark);
  --fiche-blue: var(--blue);
  --fiche-red: #ff9ea7;
  --fiche-identity-text: var(--ink);
  --fiche-amount-background: #342431;
  --fiche-amount-border: #784754;
  --fiche-amount-icon: #4b2e3e;
  --fiche-status-background: #342431;
  --fiche-status-border: #784754;
  --fiche-status-text: #ffc1c6;
}

.fiche-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 16px;
  color: var(--fiche-blue);
  font-size: .92rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.fiche-back span { font-size: 1.15rem; }

.fiche-heading { display: flex; align-items: center; gap: 11px; }
.fiche-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mist);
  color: var(--fiche-blue);
}
.fiche-icon::before { display: grid; place-items: center; font: 750 .8rem/1 var(--body); }
.fiche-icon--amount { background: var(--fiche-amount-icon); color: var(--fiche-red); }
.fiche-icon--amount::before, .fiche-icon--status::before {
  width: 19px;
  height: 19px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.fiche-icon--amount::before { content: "€"; }
.fiche-icon--status::before { content: "i"; }
.fiche-icon--companies::before {
  content: "";
  width: 16px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 2px 2px 0 0;
  background:
    repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 4px) 2px 3px / 3px 10px,
    repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 4px) 7px 3px / 3px 10px;
  background-repeat: no-repeat;
}
.fiche-icon--document::before {
  content: "";
  width: 15px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 4px) center / 7px 9px no-repeat;
}

.fiche-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  border: 1px solid var(--rule);
  border-radius: 19px;
  overflow: hidden;
  background: var(--white);
}

.fiche-identity, .fiche-summary {
  min-width: 0;
  padding: clamp(22px, 4.4vw, 56px);
}

.fiche-identity {
  position: relative;
  isolation: isolate;
  background: var(--fiche-navy);
  color: var(--fiche-identity-text);
  overflow: hidden;
}

.fiche-identity::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .22;
  background-image: linear-gradient(#6a99d6 1px, transparent 1px), linear-gradient(90deg, #6a99d6 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(120deg, transparent 48%, #000);
  pointer-events: none;
}

.fiche-identity .directory-label {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 20px;
  padding: 4px 10px;
  border: 1px solid #6c8db7;
  border-radius: 5px;
  color: #c7ddf8;
  font-size: .8rem;
  line-height: 1.4;
}

.fiche-identity .company-managers { margin: 0 0 6px; gap: 8px; }
.fiche-identity .company-managers li { column-gap: 14px; }
.fiche-identity .company-manager-name {
  font-size: clamp(1.8rem, 4.5vw, 4.25rem);
  overflow-wrap: anywhere;
}
.fiche-identity .company-manager-role { color: #c7ddf8; }
.fiche-identity h1 {
  font: 700 clamp(1.55rem, 3.4vw, 3.5rem)/1.07 var(--display);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.fiche-identity:has(.company-managers:not([hidden])) h1 { font-size: clamp(1.18rem, 2.55vw, 2.15rem); }

.fiche-identity .company-data {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid #5f7da3;
}
.fiche-identity .company-data div { min-width: 0; }
.fiche-identity .company-data dt { color: #c7ddf8; font-size: .79rem; }
.fiche-identity .company-data dd { color: var(--fiche-identity-text); font-weight: 700; overflow-wrap: anywhere; }

.fiche-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.fiche-summary .company-amount, .fiche-summary .company-status { margin: 0; }
.fiche-summary .company-amount {
  padding: clamp(14px, 2vw, 21px);
  border: 1px solid var(--fiche-amount-border);
  border-radius: 13px;
  background: var(--fiche-amount-background);
}
.fiche-summary .company-amount h2 { font: 700 1rem/1.3 var(--display); }
.fiche-summary .company-amount strong {
  display: block;
  margin: 9px 0 6px;
  color: var(--fiche-red);
  font-size: clamp(2rem, 4.1vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.fiche-summary .company-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: .9rem;
}
.fiche-summary .company-status:is([data-status=liquidation], [data-status=liquidated], [data-status=closed]) {
  border-color: var(--fiche-status-border);
  background: var(--fiche-status-background);
  color: var(--fiche-status-text);
}
.company-status .fiche-icon { width: 30px; height: 30px; background: var(--white); color: inherit; }
.fiche-summary .company-status a { display: inline-block; margin-top: 2px; }
.fiche-review-note { padding-top: 13px; border-top: 1px solid var(--rule); font-size: .82rem; }
.fiche-summary:not(:has(#company-amount:not([hidden]), #company-status:not([hidden]))) .fiche-review-note { padding: 0; border: 0; }

.fiche-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 22px; margin-top: 22px; }
.fiche-body:has(#company-related[hidden]) { grid-template-columns: minmax(0, 1fr); }
.fiche-section, .fiche-body #company-related {
  min-width: 0;
  padding: clamp(19px, 3vw, 33px);
  border: 1px solid var(--rule);
  border-radius: 13px;
  background: var(--white);
  overflow-wrap: anywhere;
}
.fiche-section h2 { margin: 0 0 12px; font: 740 clamp(1.22rem, 2.7vw, 1.65rem)/1.14 var(--display); letter-spacing: -.026em; }
.fiche-section > p, .fiche-register-note, .fiche-footnote { color: var(--muted); font-size: .88rem; }
.fiche-section a:not(.btn), .fiche-footnote a { color: var(--fiche-blue); text-underline-offset: 3px; }

.fiche-body #company-related-list { gap: 0; margin-top: 14px; }
.fiche-body #company-related-list > li { padding: 13px 0; }
.fiche-body #company-related-list > li:last-child { padding-bottom: 0; }
.fiche-body .related-company-title { margin: 0; font: 750 1.1rem/1.3 var(--display); }
:root[data-theme=dark] #company-related-list li:is([data-status=liquidation], [data-status=liquidated], [data-status=closed]) :is(.related-company-title, .related-company-status) { color: var(--fiche-red); }
.fiche-body #company-related-list p { margin-top: 3px; font-size: .9rem; }
.related-company-identity { color: var(--muted); font-variant-numeric: tabular-nums; }
.related-company-links { font-size: .86rem; }

.fiche-resources h3 { margin-bottom: 5px; font-size: .98rem; }
.fiche-resources > section, .fiche-register-note, .fiche-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.fiche-resources ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.fiche-resources li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--mist);
  font-size: .86rem;
  font-weight: 650;
}
.fiche-resources li a:hover { border-color: #a7bedf; background: var(--white); }
.fiche-register-note p + p { margin-top: 5px; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.fiche-footnote { margin-top: 18px; }

@media (max-width: 780px) {
  .fiche-overview, .fiche-body { grid-template-columns: minmax(0, 1fr); }
  .fiche-identity .company-data { margin-top: 18px; }
}
