/* Palette Haut-Conseil : noir, gris, blanc administratif, dore */
:root {
  --hc-noir: #111214;
  --hc-gris-anthracite: #3a3d42;
  --hc-gris-acier: #4b5563;
  --hc-dore: #c8a24a;
  --hc-dore-clair: #e8d7a9;
  --hc-blanc-admin: #d9dde2;
  --hc-blanc: #ffffff;
  --hc-fond-sombre: #0c1118;
  --hc-fond-sombre-2: #111926;
  --hc-carte-sombre: #17191d;
  --hc-carte-sombre-2: #1d2025;
  --hc-texte-clair: #d9dde2;
  --hc-texte-dore: #d9c38a;
  --hc-texte-dore-2: #c8a24a;
  --hc-texte-dore-fort: #f1dfb0;
}

body {
  background: radial-gradient(circle at top right, #2a2d32 0%, var(--hc-fond-sombre) 55%, #090a0d 100%);
  color: var(--hc-texte-dore);
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--hc-texte-dore-fort);
}

.story-kicker {
  color: var(--hc-dore);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hc-hero {
  display: grid;
  gap: 16px;
  margin: 1rem 0 1.5rem;
}

.hc-hero-banner,
.hc-seal-asset {
  display: block;
  width: 100%;
}

.hc-hero-banner {
  border: 1px solid #4b5563;
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(5, 8, 14, 0.36);
  background: #111214;
}

.hc-seal-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid #4b5563;
  border-left: 4px solid var(--hc-dore);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #1a1d22 0%, #12151a 100%);
  box-shadow: 0 10px 22px rgba(5, 8, 14, 0.28);
}

.hc-seal-asset {
  max-width: 220px;
  margin: 0 auto;
}

.hc-seal-copy h2 {
  margin: 0 0 0.45rem;
}

.hc-seal-copy p {
  margin: 0;
  color: var(--hc-blanc-admin);
}

.hc-sections-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid #4b5563;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 18, 20, 0.5) 0%, rgba(5, 8, 14, 0.3) 100%);
}

.hc-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid #4b5563;
  border-left: 3px solid var(--hc-dore);
  border-radius: 12px;
  background: linear-gradient(180deg, #1a1d22 0%, #121518 100%);
  text-decoration: none;
  transition: all 0.28s ease;
}

.hc-nav-link:hover {
  border-color: var(--hc-dore);
  background: linear-gradient(180deg, #22262b 0%, #1a1e23 100%);
  box-shadow: 0 8px 16px rgba(200, 162, 74, 0.14);
}

.hc-nav-icon {
  color: var(--hc-dore);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hc-nav-title {
  color: var(--hc-texte-dore-fort);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.hc-intro-section {
  margin: 1.5rem 0 2rem;
}

/* Neutralise les teintes lavande/mauve provenant des styles globaux */
a {
  color: #e1c982;
}

a:hover,
a:focus-visible {
  color: #f1dfb0;
}

strong {
  color: #f5e6be;
}

em {
  color: #d5bd84;
}

ul li::marker,
ol li::marker {
  color: var(--hc-dore);
}

/* Styles pour les onglets */
.tabs-container {
  margin: 2em 0;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  border-bottom: 2px solid #4b5563;
  margin-bottom: 2em;
}

.tab-button {
  background: linear-gradient(180deg, #23262b 0%, #1b1e23 100%);
  border: 2px solid #4b5563;
  border-bottom: none;
  padding: 0.75em 1.5em;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  color: var(--hc-texte-dore-2);
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
}

.tab-button:hover {
  background: linear-gradient(180deg, #3a2f1d 0%, #2f281a 100%);
  color: #f4e2b7;
  border-color: var(--hc-dore);
}

.tab-button.active {
  background: linear-gradient(135deg, #23262b 0%, #111214 100%);
  color: #f5e7c2;
  border-color: var(--hc-dore);
  box-shadow: 0 6px 16px rgba(9, 13, 19, 0.45);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.event {
  background: linear-gradient(180deg, var(--hc-carte-sombre) 0%, var(--hc-carte-sombre-2) 100%);
  border: 1px solid #3a3d42;
  border-left: 4px solid var(--hc-dore);
  box-shadow: 0 8px 18px rgba(5, 8, 14, 0.4);
}

.event h3 {
  color: #ebdbae;
}

.event h4 {
  color: #dfc78e;
}

.event p,
.event li {
  color: var(--hc-texte-dore);
}

/* Style pour les sections de hierarchie */
.hierarchy-intro {
  margin-bottom: 1.5em;
  color: var(--hc-blanc-admin);
}

.hierarchy-intro-card {
  margin: 1rem 0 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #4b5563;
  border-left: 4px solid var(--hc-dore);
  border-radius: 10px;
  background: linear-gradient(180deg, #1d2025 0%, #14171b 100%);
  box-shadow: 0 8px 18px rgba(5, 8, 14, 0.28);
}

.hierarchy-kicker,
.hierarchy-code,
.hierarchy-level-index {
  margin: 0 0 0.35rem;
  color: var(--hc-dore);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hierarchy-level {
  margin-left: 1.5em;
  border: 1px solid #4b5563;
  border-left: 5px solid var(--hc-dore);
  padding: 1.2em 1.25em;
  margin-bottom: 2em;
  background: linear-gradient(180deg, #202329 0%, #171a1f 100%);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(7, 11, 18, 0.35);
}

.hierarchy-level-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 1em;
}

.hierarchy-level h4 {
  margin: 0;
  color: #f0dfb3;
  letter-spacing: 0.04em;
}

.hierarchy-summary {
  margin-bottom: 1em;
  padding: 0.85em 1em;
  border: 1px solid #4b5563;
  border-left: 4px solid var(--hc-dore);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(217, 221, 226, 0.06) 0%, rgba(17, 18, 20, 0.16) 100%);
  color: var(--hc-texte-dore-fort);
}

.hierarchy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0.9rem;
}

.hierarchy-panel {
  padding: 0.9rem 1rem;
  border: 1px solid #3a3d42;
  border-radius: 10px;
  background: linear-gradient(180deg, #191c21 0%, #111418 100%);
}

.hierarchy-panel-title {
  margin: 0 0 0.55rem;
  color: var(--hc-dore-clair);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.autonomy-badge {
  display: inline-block;
  background: #14171b;
  color: #f0dfb3;
  padding: 0.35em 0.85em;
  border: 1px solid var(--hc-dore);
  border-radius: 999px;
  font-size: 0.82em;
  font-weight: 600;
  margin-bottom: 0.5em;
  white-space: nowrap;
}

.member-card {
  background: linear-gradient(135deg, #21242a 0%, #181b20 100%);
  border: 1px solid #4b5563;
  border-left: 4px solid var(--hc-dore);
  border-radius: 6px;
  padding: 1em;
  margin-bottom: 1em;
}

.member-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0.8em;
}

.member-card h5 {
  margin: 0;
  color: #ecd8a4;
}

.member-card p {
  margin: 0.5em 0;
  font-size: 0.95em;
  color: #e1cca0;
}

.hierarchy-members-label {
  margin-top: 1.2em;
}

.hierarchy-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 1em;
}

.member-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px 4px 0 0;
  margin: -1em -1em 0.8em -1em;
  width: calc(100% + 2em);
  display: block;
}

.resource-card {
  background: linear-gradient(135deg, #1c1f24 0%, #15181d 100%);
  border-left: 4px solid var(--hc-gris-acier);
  border-top: 1px solid #4b5563;
  border-right: 1px solid #4b5563;
  border-bottom: 1px solid #4b5563;
  padding: 1em;
  margin-bottom: 1.5em;
  border-radius: 4px;
}

.resource-card h4 {
  margin-top: 0;
  color: #ecdcb2;
}

.dossier-grid,
.archive-grid {
  display: grid;
  gap: 16px;
}

.dossier-card,
.relation-file,
.archive-card {
  border: 1px solid #4b5563;
  border-left: 4px solid var(--hc-dore);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #1b1e23 0%, #13161a 100%);
  box-shadow: 0 10px 22px rgba(5, 8, 14, 0.28);
}

.dossier-code {
  margin: 0 0 0.35rem;
  color: var(--hc-dore);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dossier-summary {
  margin-bottom: 1rem;
  color: var(--hc-texte-dore-fort);
}

.dossier-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0.9rem;
}

.dossier-panel {
  padding: 0.9rem 1rem;
  border: 1px solid #3a3d42;
  border-radius: 10px;
  background: linear-gradient(180deg, #181b20 0%, #101317 100%);
}

.dossier-panel-title {
  margin: 0 0 0.55rem;
  color: var(--hc-dore-clair);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dossier-note {
  margin: 0;
  color: var(--hc-blanc-admin);
}

.resource-overview-card {
  border-left: 4px solid var(--hc-gris-acier);
}

.equal-columns-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.relation-file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0.9rem;
}

.file-stamp {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.file-stamp.hostile {
  background: rgba(200, 162, 74, 0.14);
  border: 1px solid rgba(200, 162, 74, 0.6);
  color: #f0dfb3;
}

.file-stamp.unstable {
  background: rgba(217, 221, 226, 0.1);
  border: 1px solid rgba(217, 221, 226, 0.35);
  color: var(--hc-blanc-admin);
}

.file-stamp.monitored {
  background: rgba(75, 85, 99, 0.18);
  border: 1px solid rgba(75, 85, 99, 0.55);
  color: #d8dde3;
}

.archive-card {
  border-left-color: var(--hc-blanc-admin);
}

.archive-lines {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

.archive-lines p {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-left: 3px solid var(--hc-dore);
  background: rgba(217, 221, 226, 0.04);
  border-radius: 6px;
}

.archive-warning-card {
  border-left: 4px solid var(--hc-blanc-admin);
}

.identity-grid {
  display: grid;
  gap: 16px;
}

.identity-grid.two-columns {
  grid-template-columns: 1.1fr 0.9fr;
}

.identity-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.identity-grid.equal-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.identity-card {
  border: 1px solid #4b5563;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #1a1d22 0%, #12151a 100%);
  box-shadow: 0 10px 22px rgba(5, 8, 14, 0.35);
}

.identity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.identity-card-header-copy {
  max-width: 560px;
}

.identity-title {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}

.identity-card > .identity-title {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.identity-subtitle {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--hc-texte-dore-fort);
}

.identity-muted {
  color: var(--hc-blanc-admin);
  font-size: 13px;
  line-height: 1.45;
}

.identity-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.identity-tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #4b5563;
  background: #1f2227;
  color: var(--hc-texte-dore-fort);
}

.identity-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.identity-swatch {
  height: 72px;
  border-radius: 12px;
  display: flex;
  align-items: end;
  padding: 10px;
  color: white;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.identity-rules-grid {
  display: grid;
  gap: 10px;
}

.identity-rules-grid.four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.identity-rule {
  padding: 10px 12px;
  border-radius: 12px;
  background: #20242a;
  border: 1px solid #3a3d42;
  font-size: 13px;
}

.identity-emblem-frame {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 900px) {
  .hc-seal-panel {
    grid-template-columns: 1fr;
  }

  .hierarchy-grid {
    grid-template-columns: 1fr;
  }

  .dossier-grid-inner,
  .equal-columns-grid {
    grid-template-columns: 1fr;
  }

  .relation-file-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.identity-card svg text {
  fill: #4b5563;
}

.hc-sections-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--hc-texte-dore-2);
}

.hc-sections-breadcrumb a {
  color: var(--hc-dore);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hc-sections-breadcrumb a:hover {
  color: var(--hc-texte-dore-fort);
}

.hc-sections-breadcrumb .separator {
  color: var(--hc-gris-acier);
}

.hc-sections-breadcrumb .current {
  color: var(--hc-texte-dore-fort);
  font-weight: 500;
}

.hc-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid #4b5563;
}

.nav-btn-primary,
.nav-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid #4b5563;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.nav-btn-primary {
  background: linear-gradient(180deg, rgba(200, 162, 74, 0.12) 0%, rgba(200, 162, 74, 0.05) 100%);
  color: var(--hc-texte-dore-fort);
  border-color: var(--hc-dore);
}

.nav-btn-primary:hover {
  background: linear-gradient(180deg, rgba(200, 162, 74, 0.18) 0%, rgba(200, 162, 74, 0.1) 100%);
  box-shadow: 0 6px 12px rgba(200, 162, 74, 0.16);
}

.nav-btn-secondary {
  color: var(--hc-texte-dore-2);
  border-color: #4b5563;
}

.nav-btn-secondary:hover {
  color: var(--hc-texte-dore-fort);
  border-color: var(--hc-dore);
  background: rgba(200, 162, 74, 0.06);
}

@media (max-width: 900px) {
  .identity-grid.two-columns,
  .identity-grid.three-columns,
  .identity-grid.equal-columns,
  .identity-rules-grid.four-columns,
  .identity-swatches {
    grid-template-columns: 1fr;
  }

  .hc-nav-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-btn-primary,
  .nav-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
