:root {
  --blue: #005696;
  --blue-deep: #003d6b;
  --blue-soft: #0072bc;
  --green: #008148;
  --green-soft: #00a35a;
  --grey: #8c929d;
  --ink: #1a2332;
  --muted: #5c6570;
  --line: #e4e8ee;
  --bg: #f3f6fa;
  --white: #ffffff;
  --warn: #c45c26;
  --warn-bg: #fff3ea;
  --ok: #008148;
  --ok-bg: #e8f6ef;
  --shadow: 0 18px 50px rgba(0, 61, 107, 0.08);
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ar: "Cairo", "DM Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 86, 150, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 129, 72, 0.08), transparent 50%),
    linear-gradient(165deg, #eef3f8 0%, #f7f9fc 40%, #eef5f1 100%);
}

.bg-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    repeating-linear-gradient(
      -28deg,
      transparent,
      transparent 38px,
      rgba(0, 86, 150, 0.035) 38px,
      rgba(0, 86, 150, 0.035) 76px
    );
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.container.narrow {
  width: min(560px, calc(100% - 2rem));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(228, 232, 238, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 86, 150, 0.15);
  transition: transform 0.35s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.04) rotate(-2deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue);
  font-size: 1.05rem;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--blue-deep);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover {
  background: rgba(0, 86, 150, 0.08);
}

.nav-cta {
  background: var(--blue);
  color: #fff !important;
}

.nav-cta:hover {
  background: var(--blue-deep);
}

.nav-muted {
  color: var(--grey);
  font-size: 0.85rem;
}

.main {
  position: relative;
  z-index: 1;
  padding: 2.2rem 0 4rem;
  min-height: calc(100vh - 180px);
}

.hero {
  padding: 1.5rem 0 2rem;
}

.hero-content {
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-soft);
  margin: 0 0 0.8rem;
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-title .ar {
  font-family: var(--ar);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.25;
}

.hero-title .fr {
  font-size: clamp(1.55rem, 3.5vw, 2.35rem);
  font-weight: 600;
  color: var(--ink);
}

.hero-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}

.hero-lead {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 129, 72, 0.1);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
}

.year-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 129, 72, 0.18);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.75; }
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
  text-align: start;
}

.action-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
  margin-inline: auto;
}

.action-grid.action-grid--triple,
.action-grid.action-grid--quad {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.action-grid.action-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-grid.action-grid--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.action-grid.action-grid--triple .action-card,
.action-grid.action-grid--quad .action-card {
  padding: 1.25rem;
  min-width: 0;
}

.action-grid.action-grid--triple .action-card h2,
.action-grid.action-grid--quad .action-card h2 {
  font-size: 1.05rem;
}

.action-grid.action-grid--triple .action-card p,
.action-grid.action-grid--quad .action-card p {
  font-size: 0.88rem;
}

.action-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 61, 107, 0.14);
}

.action-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.action-card--disabled {
  cursor: default;
  opacity: 0.72;
}

.action-card--disabled:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.action-card--disabled .action-card-body {
  pointer-events: none;
}

.action-link--disabled {
  color: var(--muted);
  cursor: default;
}

.zone-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.zone-toggle {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 40, 80, 0.12);
  border-radius: 12px;
  background: #f7f9fc;
  cursor: pointer;
}

.zone-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.zone-toggle-ui {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #c5ced9;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.zone-toggle-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.zone-toggle input:checked + .zone-toggle-ui {
  background: #1f6feb;
}

.zone-toggle input:checked + .zone-toggle-ui::after {
  transform: translateX(20px);
}

.zone-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.zone-toggle-text small {
  color: var(--muted);
}

.passerelle-search {
  max-width: none;
  margin-inline: 0;
}

.passerelle-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(110px, 0.5fr) minmax(140px, 0.7fr) auto;
  gap: 0.85rem;
  align-items: end;
}

.passerelle-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(110px, 0.45fr) minmax(130px, 0.55fr) auto;
  gap: 0.85rem;
  align-items: end;
}

.passerelle-search-actions {
  display: flex;
  align-items: end;
}

.passerelle-search-actions .btn {
  white-space: nowrap;
  min-height: 46px;
}

@media (max-width: 1100px) {
  .passerelle-search-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .passerelle-search-row,
  .passerelle-search-grid {
    grid-template-columns: 1fr;
  }

  .passerelle-search-actions .btn {
    width: 100%;
  }
}

.action-card--disabled:hover .arrow {
  transform: none;
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0, 86, 150, 0.1);
  color: var(--blue);
  margin-bottom: 0.35rem;
  flex-shrink: 0;
  overflow: hidden;
}

.action-icon-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  width: 100%;
  direction: ltr; /* icône à gauche, drapeaux à droite même en arabe */
}

.action-icon-row .action-icon {
  margin-bottom: 0;
}

.action-flags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline-start: auto;
}

.action-flag {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15, 40, 80, 0.12);
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.action-flag:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 86, 150, 0.35);
}

.action-flag.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 86, 150, 0.2);
}

.action-flag svg {
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.lang-ar .action-card h2,
.lang-ar .action-card p,
.lang-ar .action-link,
.lang-ar .hero-lead,
.lang-ar .eyebrow,
.lang-ar .brand-sub,
.lang-ar .nav-link {
  font-family: "Cairo", "DM Sans", sans-serif;
}

.lang-ar .action-card h2,
.lang-ar .action-card p,
.lang-ar .action-link {
  text-align: right;
}

.action-card.is-ar h2,
.action-card.is-ar p,
.action-card.is-ar .action-link {
  font-family: "Cairo", "DM Sans", sans-serif;
  text-align: right;
}

.action-icon.accent {
  background: rgba(0, 129, 72, 0.12);
  color: var(--green);
}

.action-card h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--blue-deep);
}

.action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  color: var(--blue-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

.action-link .arrow {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 114, 188, 0.1);
  transition: transform 0.3s ease;
}

.action-card:hover .arrow {
  transform: translateX(4px);
}

.page-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.page-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  margin-bottom: 0.8rem;
  animation: floatLogo 4.5s ease-in-out infinite;
  box-shadow: 0 10px 28px rgba(0, 86, 150, 0.16);
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.page-intro h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.page-intro .ar {
  font-family: var(--ar);
  font-size: 1.55rem;
  color: var(--blue);
  font-weight: 700;
}

.page-intro .fr {
  font-size: 1.35rem;
  color: var(--blue-deep);
  font-weight: 650;
}

.muted {
  color: var(--muted);
}

.ar-inline {
  font-family: var(--ar);
}

.search-card,
.info-card,
.status-card,
.import-card,
.history-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(228, 232, 238, 0.7);
}

.search-card {
  padding: 1.6rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 1.02rem;
  color: var(--ink);
  background: #fbfcfe;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue-soft);
  box-shadow: 0 0 0 4px rgba(0, 114, 188, 0.12);
  background: #fff;
}

.captcha-box {
  background: #f5f8fc;
  border-radius: 12px;
  padding: 0.85rem;
  border: 1px dashed rgba(0, 86, 150, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-soft), var(--blue));
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 86, 150, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.btn-accent {
  background: linear-gradient(135deg, var(--green-soft), var(--green));
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 129, 72, 0.25);
}

.btn-outline {
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--line);
}

.btn-outline:hover {
  border-color: var(--blue-soft);
  background: rgba(0, 114, 188, 0.04);
}

.btn-block {
  width: 100%;
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--grey);
  font-size: 0.8rem;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-card {
  text-align: center;
  padding: 1.8rem 1.4rem;
  margin-bottom: 1.1rem;
}

.status-ok {
  background: var(--ok-bg);
  border-color: rgba(0, 129, 72, 0.2);
}

.status-warn {
  background: var(--warn-bg);
  border-color: rgba(196, 92, 38, 0.2);
}

.status-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.35rem;
}

.status-ok .status-icon {
  background: rgba(0, 129, 72, 0.15);
  color: var(--ok);
}

.status-warn .status-icon {
  background: rgba(196, 92, 38, 0.15);
  color: var(--warn);
}

.status-card h1 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.status-card .ar {
  font-family: var(--ar);
}

.info-card {
  overflow: hidden;
}

.info-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  background: #f7f9fc;
  color: var(--grey);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.info-head .ar {
  font-family: var(--ar);
  text-transform: none;
  letter-spacing: 0;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--line);
}

.info-row .k {
  font-size: 0.82rem;
  color: var(--muted);
}

.info-row .k.ar {
  font-family: var(--ar);
  text-align: end;
}

.info-row .v {
  text-align: center;
  font-weight: 600;
  color: var(--ink);
}

.info-row.highlight .moyenne {
  font-size: 1.45rem;
  color: var(--warn);
  font-weight: 700;
}

.status-ok ~ .info-card .info-row.highlight .moyenne,
.status-ok + .info-card .info-row.highlight .moyenne {
  color: var(--ok);
}

.info-foot {
  margin: 0;
  padding: 0.95rem 1.2rem 1.15rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
}

.badge-ok,
.badge-success {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge-warn,
.badge-partial {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge-failed {
  background: #fdecee;
  color: #b42318;
}

.result-actions {
  margin-top: 1.25rem;
}

/* Sélection TS — résultats délibération (compact) */
.delib-result .page-intro {
  margin-bottom: 0.6rem;
}

.delib-result .page-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 0.35rem;
  animation: none;
}

.delib-result .status-card {
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.delib-result .status-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.delib-result .status-card h1 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
}

.delib-result .status-card p {
  margin: 0;
  font-size: 0.9rem;
}

.delib-container {
  width: min(720px, calc(100% - 1.5rem));
}

.delib-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
  padding: 0.7rem 0.85rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 86, 150, 0.08);
}

.delib-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.delib-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.delib-meta {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.delib-grid {
  display: grid;
  gap: 0.65rem;
}

.delib-card {
  background: var(--white);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 86, 150, 0.08);
  border-top: 3px solid var(--blue);
  position: relative;
  overflow: hidden;
}

.delib-card--ok { border-top-color: var(--green); }
.delib-card--wait { border-top-color: #e8a317; }
.delib-card--warn { border-top-color: #d97706; }
.delib-card--neutral { border-top-color: var(--blue); }

.delib-rank-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.delib-rank-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

.delib-liste-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  text-align: center;
  line-height: 1.2;
}

.delib-liste-badge--ok {
  background: rgba(0, 129, 72, 0.12);
  color: var(--green);
}

.delib-liste-badge--wait {
  background: rgba(232, 163, 23, 0.16);
  color: #9a6700;
}

.delib-liste-badge--warn {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.delib-liste-badge--neutral {
  background: rgba(0, 86, 150, 0.1);
  color: var(--blue);
}

.delib-efp-head {
  margin-bottom: 0.5rem;
}

.delib-efp-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.delib-efp-name {
  margin: 0;
  font-size: 1.05rem;
  color: var(--blue-deep);
  line-height: 1.25;
}

.delib-fields--identity {
  margin-bottom: 0.55rem;
}

.delib-placements {
  display: grid;
  gap: 0.4rem;
}

.delib-placement {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  background: #f7f9fc;
  border-radius: 8px;
  border-left: 3px solid var(--blue);
}

.delib-placement--ok { border-left-color: var(--green); }
.delib-placement--wait { border-left-color: #e8a317; }
.delib-placement--warn { border-left-color: #d97706; }

.delib-placement-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  min-width: 0;
  flex: 1;
}

.delib-placement-filiere {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.delib-placement-rank {
  text-align: right;
  flex-shrink: 0;
}

.delib-placement-rank .delib-rank-value {
  font-size: 1.2rem;
  display: block;
}

.delib-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.delib-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.55rem;
  background: #f7f9fc;
  border-radius: 8px;
}

.delib-field--full {
  grid-column: 1 / -1;
}

.delib-field .k {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.delib-field .v {
  font-size: 0.9rem;
  color: var(--blue-deep);
  font-weight: 600;
  word-break: break-word;
}

.delib-result .result-actions {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.4rem;
}

.delib-result .result-actions .btn {
  padding: 0.7rem 1rem;
}

@media (max-width: 560px) {
  .delib-fields {
    grid-template-columns: 1fr;
  }

  .delib-field--full {
    grid-column: auto;
  }

  .delib-liste-badge {
    max-width: 100%;
  }

  .delib-placement {
    flex-direction: column;
    align-items: stretch;
  }

  .delib-placement-rank {
    text-align: left;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
  }
}

.alert {
  margin-bottom: 1.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid rgba(0, 129, 72, 0.2);
}

.alert-error {
  background: #fdecee;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.15);
}

.import-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--muted);
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.table-total {
  font-size: 0.95rem;
  color: var(--text);
}

.table-range {
  color: var(--muted);
  font-size: 0.9rem;
}

.per-page-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.per-page-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-num {
  min-width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-deep);
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 0.4rem;
}

.page-num.is-active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.page-num:hover:not(.is-active) {
  border-color: var(--blue-soft);
  background: #f3f8fc;
}

.page-ellipsis {
  color: var(--muted);
  padding: 0 0.15rem;
}

.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
}

.auth-back {
  margin-top: 1rem;
  text-align: center;
}

.auth-back a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.auth-back a:hover {
  text-decoration: underline;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.stats-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stats-card-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: var(--blue-deep);
}

.stats-card-head .small {
  margin: 0 0 0.8rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-wrap--donut {
  height: 200px;
  max-width: 220px;
  margin: 0 auto;
}

.chart-wrap--bars {
  height: 260px;
}

.stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-ok::before { background: #008148; }
.legend-ko::before { background: #c2410c; }

@media (max-width: 1100px) {
  .stats-grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.import-head h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.6rem;
  color: var(--blue-deep);
}

.import-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.25rem;
  align-items: start;
}

.import-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.import-card,
.history-card {
  padding: 1.4rem;
}

.import-card h2,
.history-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--blue-deep);
}

.small {
  font-size: 0.86rem;
}

code {
  background: #eef3f8;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-size: 0.82rem;
}

.dropzone {
  display: block;
  cursor: pointer;
  border: 2px dashed rgba(140, 146, 157, 0.55);
  border-radius: 14px;
  background: #f8fafc;
  transition: border-color 0.25s ease, background 0.25s ease;
  margin: 0.4rem 0 0.2rem;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--green);
  background: rgba(0, 129, 72, 0.05);
}

.dropzone-inner {
  padding: 1.8rem 1rem;
  text-align: center;
}

.drop-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  background: rgba(0, 129, 72, 0.12);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.file-name {
  margin: 0.6rem 0 0;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.8rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: var(--blue);
  color: #fff;
  text-align: left;
  padding: 0.7rem 0.75rem;
  font-weight: 600;
}

.data-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.data-table tr:nth-child(even) td {
  background: #f7f9fc;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-ar {
  font-family: var(--ar);
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal.delay-1 { animation-delay: 0.12s; }
.reveal.delay-2 { animation-delay: 0.24s; }
.reveal.delay-3 { animation-delay: 0.36s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .action-grid.action-grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .action-grid.action-grid--triple,
  .action-grid.action-grid--quad {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .action-grid:not(.action-grid--triple):not(.action-grid--quad),
  .import-grid,
  .import-forms {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .info-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.25rem;
  }

  .info-row .k.ar {
    text-align: center;
  }

  .nav-link:not(.nav-cta):not(.nav-muted) {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }

  .header-inner {
    padding: 0.65rem 0;
  }
}

.delib-container--split {
  width: min(1180px, calc(100% - 1.5rem));
}

.delib-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0.9rem;
  align-items: start;
}

.delib-split-left {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.delib-docs {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 86, 150, 0.12);
  border-top: 3px solid var(--green);
  padding: 0.9rem 0.95rem 1rem;
  font-family: var(--ar);
  position: sticky;
  top: 0.75rem;
}

.delib-docs-head {
  margin-bottom: 0.75rem;
  text-align: center;
}

.delib-docs-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 700;
}

.delib-docs h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--blue-deep);
}

.delib-docs-sub {
  margin: 0.3rem 0 0;
  font-size: 0.86rem;
  color: var(--blue);
  font-weight: 600;
}

.delib-docs-audience {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  background: #f3f8fc;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}

.delib-docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.delib-docs-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: start;
  background: #f7f9fc;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(0, 86, 150, 0.06);
}

.delib-docs-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 86, 150, 0.1);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
}

.delib-docs-text {
  font-size: 0.88rem;
  color: var(--blue-deep);
  line-height: 1.45;
  font-weight: 600;
}

.delib-docs-amount {
  color: #c62828;
  font-weight: 800;
}

.delib-docs-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 129, 72, 0.12);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 0.15rem;
}

.delib-docs-alert {
  margin-top: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #fdecee;
  color: #9b1c1c;
  font-size: 0.82rem;
  line-height: 1.45;
  border: 1px solid rgba(196, 36, 36, 0.15);
}

.delib-docs-link {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}

.delib-docs-link a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.delib-docs-link a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .delib-split {
    grid-template-columns: 1fr;
  }

  .delib-docs {
    position: static;
  }
}

.history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.history-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 86, 150, 0.18);
  background: #fff;
  color: var(--blue-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.history-tab:hover {
  border-color: var(--blue);
}

.history-tab.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.history-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0, 86, 150, 0.1);
  font-size: 0.75rem;
}

.history-tab.is-active .history-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.delib-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 86, 150, 0.08);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.delib-maps-link:hover {
  background: rgba(0, 86, 150, 0.14);
  text-decoration: underline;
}

.delib-countdown {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(0, 129, 72, 0.28);
}

.delib-countdown-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.delib-countdown-deadline {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.84rem;
  color: var(--blue-deep);
  font-weight: 600;
}

.delib-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.delib-countdown-unit {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 129, 72, 0.18);
  border-radius: 10px;
  padding: 0.4rem 0.25rem;
}

.delib-countdown-unit span {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.delib-countdown-unit small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.delib-countdown-ended {
  margin: 0.35rem 0 0;
  font-weight: 700;
  color: #9b1c1c;
  font-size: 0.9rem;
}

.delib-countdown.is-ended .delib-countdown-deadline {
  opacity: 0.7;
}
