/* DESTINY RP — PÔLE LÉGAL & ENTREPRISES
   Direction Artistique : Minimaliste, Haute Précision, Sombre & Raffiné.
   Couleurs maîtrisées : Noir Graphite, Gris Titane, Touches Émeraude #10b981. ZÉRO EMOJI. */

@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("/fonts/ChakraPetch-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("/fonts/ChakraPetch-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("/fonts/ChakraPetch-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("/fonts/ChakraPetch-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #090b0e;
  --deep: #0e1117;
  --panel: #12161f;
  --surface: #171c26;
  --chip: #1c2230;
  --line-1: rgba(255, 255, 255, 0.05);
  --line-2: rgba(255, 255, 255, 0.09);
  --line-3: rgba(255, 255, 255, 0.14);
  --text: #f0f2f7;
  --soft: #b0b5c4;
  --muted: #72788e;
  --dim: #484d61;
  --emerald: #10b981;
  --emerald-hover: #059669;
  --gold: #f59e0b;
  --error: #ef4444;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Chakra Petch", system-ui, sans-serif;
  --cut: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  --cut-sm: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Flocons de neige très légers */
.fx-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.fx-glows { display: none; }

body::before, body::after { content: ''; position: fixed; z-index: -2; pointer-events: none; }
body::before {
  inset: 0;
  background:
    radial-gradient(1000px 600px at 50% 0%, rgba(16, 185, 129, .04), transparent 70%),
    var(--bg);
}
body::after {
  left: 50%; top: 50%; width: min(70vmin, 580px); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: url(/logo.webp?v=4) center / contain no-repeat; opacity: .03;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
}

.container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}

.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.5px; }
.emerald { color: var(--emerald); }
.gold { color: var(--gold); }

/* Topbar Sobre & Haute Sécurité */
.topbar {
  background: #0b0d11;
  border-bottom: 1px solid var(--line-1);
  color: #8b91a5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.topbar .blip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
  box-shadow: 0 0 6px var(--emerald);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 11, 14, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-1);
  width: 100%;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.brand span {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
}
.brand strong {
  color: var(--emerald);
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  cursor: pointer;
  border-bottom: 2px solid transparent;
  padding: 16px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); }
.nav a.active {
  color: #fff;
  border-bottom-color: var(--emerald);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.user-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: var(--soft);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all .15s ease;
}
.btn-emerald {
  background: var(--emerald);
  color: #051b11;
  font-weight: 700;
  clip-path: var(--cut-sm);
}
.btn-emerald:hover {
  background: var(--emerald-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--soft);
  border: 1px solid var(--line-2);
}
.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn.small {
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}
.btn-logout {
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #ef4444 !important;
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #fff !important;
}

/* Titres */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
}
.section-title {
  margin: 2px 0 4px 0;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
}
.lead {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 65ch;
  line-height: 1.4;
}

/* Stats Ligne Légère & Compacte */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 20px 0 24px 0;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 14px 16px;
  transition: border-color .15s ease;
}
.stat-card:hover {
  border-color: var(--line-3);
}
.stat-card .kicker {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.stat-card .kicker::before { display: none; }
.stat-card .val {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  margin: 2px 0;
  color: #fff;
}
.stat-card .val.highlight {
  color: var(--emerald);
}

/* Barre de Filtres Légère */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 10px 14px;
  margin-bottom: 22px;
}
.search-input-box {
  display: flex;
  align-items: center;
  background: var(--deep);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 0 10px;
  gap: 8px;
  flex: 1;
  max-width: 320px;
  height: 34px;
}
.search-input-box input {
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--body);
  font-size: 13px;
  width: 100%;
  outline: none;
}
.category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill-btn {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--muted);
  padding: 6px 12px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.pill-btn.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--emerald);
  color: #fff;
  font-weight: 600;
}

/* UNITY RP ACCORDION MÉTIERS (SCROLL & EXPANDING CARDS) */
.unity-underline {
  text-decoration: underline;
  text-decoration-color: var(--emerald);
  text-underline-offset: 12px;
  text-decoration-thickness: 5px;
}

.unity-accordion-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 30px 10px 50px;
  margin-top: 10px;
  margin-bottom: 50px;
  scrollbar-width: thin;
  scrollbar-color: var(--emerald) rgba(255, 255, 255, 0.05);
  cursor: grab;
}
.unity-accordion-viewport:active {
  cursor: grabbing;
}
.unity-accordion-viewport::-webkit-scrollbar {
  height: 6px;
}
.unity-accordion-viewport::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}
.unity-accordion-viewport::-webkit-scrollbar-thumb {
  background: var(--emerald);
  border-radius: 3px;
}

.unity-accordion {
  display: flex;
  gap: 20px;
  height: 620px;
  min-width: 100%;
  width: max-content;
  align-items: stretch;
}

/* CARTE ACCORDÉON EXPANDANTE (UNITY RP EXACT) */
.unity-card {
  position: relative;
  width: 170px;
  flex: 0 0 170px;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #0d1017;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  cursor: pointer;
  user-select: none;
}

/* Hover & Active Expanded States */
.unity-card:hover,
.unity-card.active {
  flex: 0 0 560px;
  width: 560px;
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 32px rgba(16, 185, 129, 0.18);
}

/* Background image & gradient overlay */
.unity-card-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: grayscale(40%) contrast(120%);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.unity-card:hover .unity-card-backdrop,
.unity-card.active .unity-card-backdrop {
  opacity: 0.32;
  transform: scale(1.05);
}

.unity-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 11, 14, 0.4) 0%, rgba(9, 11, 14, 0.85) 60%, rgba(9, 11, 14, 0.98) 100%);
  z-index: 1;
}

/* État Réduit (Vertical) */
.unity-card-collapsed {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 30px 14px;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.unity-card:hover .unity-card-collapsed,
.unity-card.active .unity-card-collapsed {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.collapsed-logo-box {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.collapsed-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.collapsed-vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 1.5px;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
}

.collapsed-pill {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}
.collapsed-pill.gold {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.collapsed-pill.error {
  background: var(--error);
  box-shadow: 0 0 10px var(--error);
}

/* État Déployé (Full Content) */
.unity-card-expanded {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px 42px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}
.unity-card:hover .unity-card-expanded,
.unity-card.active .unity-card-expanded {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.expanded-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.expanded-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.expanded-logo-box {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}
.expanded-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.expanded-title {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 42px);
  color: #fff;
  letter-spacing: 0.5px;
  margin: 14px 0 8px 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.expanded-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expanded-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 14px 0;
}
.meta-row-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.6px;
}
.meta-val {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta-val.clickable {
  color: var(--emerald);
  cursor: pointer;
}
.meta-val.clickable:hover {
  text-decoration: underline;
}

/* BOUTON SKEWED INCLINÉ UNITY RP */
.btn-unity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--emerald);
  color: #051a10;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transform: skewX(-10deg);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  width: fit-content;
}
.btn-unity span {
  display: inline-block;
  transform: skewX(10deg);
}
.btn-unity:hover {
  background: var(--emerald-hover);
  color: #fff;
  transform: skewX(-10deg) translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
}
.btn-unity-gold {
  background: var(--gold);
  color: #170e02;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}
.btn-unity-gold:hover {
  background: #d97706;
  color: #fff;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
}

/* Mobile responsive fallback */
@media (max-width: 768px) {
  .unity-accordion {
    flex-direction: column;
    height: auto;
    width: 100%;
  }
  .unity-card, .unity-card.active, .unity-card:hover {
    flex: none;
    width: 100%;
    height: 480px;
  }
  .unity-card-collapsed {
    display: none !important;
  }
  .unity-card-expanded {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    padding: 24px;
  }
}

/* Grille des Cartes (Backup / Alternate) */
.entreprises-grid, .organisations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* CARTE ENTREPRISE & ORGANISATION */
.ent-card, .org-card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
  position: relative;
  overflow: hidden;
}
.ent-card:hover, .org-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}
.ent-card.libre {
  border-color: rgba(245, 158, 11, 0.3);
}

.ent-card-head, .org-card-head {
  padding: 14px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line-1);
}
.ent-card-title-group, .org-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ent-logo-img, .org-logo-img {
  width: 42px;
  height: 42px;
  min-width: 42px;
  object-fit: contain;
  background: var(--deep);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 3px;
}
.ent-title, .org-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ent-category, .org-type {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

/* Badges de Statut */
.badge-status {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 3px;
  white-space: nowrap;
}
.badge-active, .badge-officialise, .badge-ouvert {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-libre, .badge-probation, .badge-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-fermee, .badge-guerre, .badge-closed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.badge-inactif {
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  border: 1px solid var(--line-2);
}

.ent-card-body, .org-card-body {
  padding: 14px 16px;
  flex: 1;
}
.ent-desc, .org-desc {
  font-size: 13px;
  color: var(--soft);
  margin: 0 0 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ent-info-row, .org-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-1);
  font-size: 12px;
}
.ent-info-label, .org-info-label { color: var(--muted); }
.ent-info-val, .org-info-val { font-weight: 600; color: #fff; }

.ent-card-foot, .org-card-foot {
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Modales */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 8, 11, 0.85);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none !important; }

.modal-box {
  background: var(--panel);
  border: 1px solid var(--line-3);
  border-radius: 6px;
  width: 100%;
  padding: 24px;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px;
  border-bottom: 1px solid var(--line-1);
  padding-bottom: 12px;
}
.modal-title { margin: 0; font-size: 20px; }

/* Formulaires */
.field { margin-bottom: 14px; }
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 6px;
}
.input, .select, .textarea {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--body);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--emerald);
}

/* Tableaux du Dashboard */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th {
  background: var(--deep);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
}
.dash-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
  color: var(--soft);
}
.dash-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--deep);
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
}
.cat-pill .btn-del-cat {
  color: var(--error);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: bold;
}

.logo-choice-box {
  background: var(--deep);
  border: 1px solid var(--line-2);
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  background: #151821; border: 1px solid var(--emerald);
  color: #fff; padding: 10px 16px; border-radius: 4px;
  font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(20px); transition: all .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }


/* ==========================================================================
   UNITY RP METIERS ACCORDION & HORIZONTAL SCROLL (EXACT FIDELITY)
   ========================================================================== */

.unity-underline {
  position: relative;
  text-decoration: underline;
  text-decoration-color: var(--emerald);
  text-underline-offset: 12px;
  text-decoration-thickness: 5px;
}

/* Accordion Wrapper */
.unity-viewport-wrapper {
  position: relative;
  width: 100%;
  margin: 32px 0 60px;
}

/* Header bar above accordion with scroll hints & navigation arrows */
.unity-viewport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 8px;
}

.unity-scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', var(--body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.unity-scroll-hint svg {
  animation: pulse-horizontal 1.8s infinite ease-in-out;
}

@keyframes pulse-horizontal {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

.unity-nav-buttons {
  display: flex;
  gap: 10px;
}

.unity-scroll-nav {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 20px;
  font-weight: 700;
}
.unity-scroll-nav:hover {
  background: var(--emerald);
  color: #05140d;
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

/* Horizontal Viewport */
.unity-viewport {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 16px 8px 36px;
  min-height: 740px;
  -webkit-overflow-scrolling: touch;
}

/* Custom Sleek Scrollbar */
.unity-viewport::-webkit-scrollbar {
  height: 8px;
}
.unity-viewport::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.unity-viewport::-webkit-scrollbar-thumb {
  background: var(--emerald);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--emerald);
}

/* Individual Unity Card */
.unity-card {
  flex: 0 0 170px;
  min-width: 170px;
  height: 690px;
  border-radius: 26px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #0b0f14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: flex 0.55s cubic-bezier(0.25, 1, 0.5, 1),
              min-width 0.55s cubic-bezier(0.25, 1, 0.5, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              transform 0.4s ease;
  user-select: none;
}

.unity-card:hover,
.unity-card.active {
  flex: 0 0 580px;
  min-width: 580px;
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.22);
}

/* Card Background Media & Overlays */
.unity-card-bg-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.unity-card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: brightness(0.65) saturate(1.1);
}

.unity-card:hover .unity-card-bg,
.unity-card.active .unity-card-bg {
  transform: scale(1.06);
  filter: brightness(0.75) saturate(1.2);
}

.unity-card-tint {
  position: absolute;
  inset: 0;
  background: var(--emerald);
  mix-blend-mode: multiply;
  opacity: 0.25;
  transition: opacity 0.5s ease;
}

.unity-card:hover .unity-card-tint,
.unity-card.active .unity-card-tint {
  opacity: 0.15;
}

.unity-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 11, 14, 0.2) 0%,
    rgba(9, 11, 14, 0.7) 45%,
    rgba(9, 11, 14, 0.98) 100%
  );
}

/* Collapsed State Layout */
.unity-card-collapsed {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 16px;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.unity-card:hover .unity-card-collapsed,
.unity-card.active .unity-card-collapsed {
  opacity: 0;
  pointer-events: none;
}

.unity-collapsed-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.unity-collapsed-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.unity-collapsed-vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Poppins', 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ffffff;
  white-space: nowrap;
  margin: auto 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.unity-collapsed-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.unity-collapsed-badge.libre {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Expanded State Layout */
.unity-card-expanded {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 36px 40px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s,
              transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
}

.unity-card:hover .unity-card-expanded,
.unity-card.active .unity-card-expanded {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.unity-expanded-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.unity-badge {
  font-family: 'Poppins', var(--body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 4px;
}
.unity-badge-emerald {
  background: var(--emerald);
  color: #041209;
}
.unity-badge-gold {
  background: var(--gold);
  color: #1a1002;
}
.unity-badge-glass {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f2f7;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.unity-expanded-title {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.unity-expanded-desc {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0 0 20px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* Meta Data Grid (Direction, Localisation, Effectif, Salaire) */
.unity-expanded-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  background: rgba(14, 18, 24, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.unity-meta-item {
  display: flex;
  flex-direction: column;
}

.unity-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 2px;
}

.unity-meta-val {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.unity-meta-discord {
  font-size: 11px;
  color: var(--emerald);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Skewed Action Buttons (Unity RP Signature) */
.unity-expanded-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-unity-skew {
  transform: skewX(-10deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-family: 'Poppins', var(--body);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-unity-skew > span {
  transform: skewX(10deg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-unity-skew.primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #041209;
}
.btn-unity-skew.primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: skewX(-10deg) translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-unity-skew.outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.btn-unity-skew.outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
  transform: skewX(-10deg) translateY(-2px);
}

.btn-unity-skew.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #191002;
}
.btn-unity-skew.gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: skewX(-10deg) translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

/* Mobile responsive fallback */
@media (max-width: 900px) {
  .unity-viewport {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
    min-height: auto;
    gap: 16px;
    padding: 10px 0;
  }
  .unity-card {
    flex: 0 0 460px !important;
    min-width: 100% !important;
    height: 460px;
  }
  .unity-card .unity-card-collapsed {
    display: none;
  }
  .unity-card .unity-card-expanded {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    padding: 24px 20px;
  }
  .unity-expanded-title {
    font-size: 28px;
  }
  .unity-nav-buttons,
  .unity-scroll-hint {
    display: none;
  }
}

