/*
 * CNOM-RDC — Identité institutionnelle bleu, blanc, rouge
 * Portail public, espace médecin et centre de contrôle national
 */

:root {
  --blue-950: #031d3d;
  --blue-900: #052b58;
  --blue-850: #07386f;
  --blue-800: #064681;
  --blue-700: #0757a6;
  --blue-600: #126bc0;
  --blue-500: #2c83d2;
  --blue-300: #8fc2ec;
  --blue-200: #c7e0f5;
  --blue-100: #e8f3fc;
  --blue-50: #f4f9fe;
  --red-800: #a90d1a;
  --red-700: #c81020;
  --red-600: #df1728;
  --red-500: #ed2636;
  --red-100: #fde8eb;
  --red-50: #fff5f6;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-blue: #eef6fd;
  --ink: #10243e;
  --ink-strong: #061b35;
  --muted: #62758b;
  --muted-light: #8798aa;
  --line: #dce6f0;
  --line-strong: #c7d6e5;
  --success: #15805d;
  --success-soft: #e6f6ef;
  --warning: #a86608;
  --warning-soft: #fff4dd;
  --danger: #c3192d;
  --danger-soft: #fdebed;
  --info: #126bc0;
  --info-soft: #e8f3fc;
  --shadow-xs: 0 1px 2px rgba(5, 43, 88, 0.05);
  --shadow-sm: 0 8px 24px rgba(5, 43, 88, 0.08);
  --shadow-md: 0 18px 50px rgba(5, 43, 88, 0.12);
  --shadow-lg: 0 30px 80px rgba(3, 29, 61, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1380px;
  --header-height: 88px;
  --sidebar-width: 286px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  background: var(--surface-soft);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.public-body {
  background: var(--white);
}

body.dashboard-body {
  background: #eef3f8;
}

body.menu-open,
body.sidebar-open {
  overflow: hidden;
}

::selection {
  background: var(--blue-700);
  color: var(--white);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

p,
h1,
h2,
h3,
ul,
ol,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3,
b,
strong {
  color: var(--ink-strong);
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.45rem, 5vw, 5.35rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.75rem);
}

h3 {
  font-size: 1.15rem;
}

:focus-visible {
  outline: 3px solid rgba(7, 87, 166, 0.35);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--blue-900);
  font-weight: 800;
  box-shadow: var(--shadow-md);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.noscript-notice {
  position: relative;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--warning-soft);
  color: #704505;
  font-size: 0.9rem;
  text-align: center;
}

/* Boutons */
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  border-color: var(--blue-700);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  color: var(--white);
  box-shadow: 0 10px 28px rgba(7, 87, 166, 0.22);
}

.btn-primary:hover {
  border-color: var(--blue-800);
  background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
  box-shadow: 0 15px 34px rgba(7, 87, 166, 0.3);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue-800);
}

.btn-ghost:hover {
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.btn-light {
  border-color: var(--white);
  background: var(--white);
  color: var(--blue-900);
  box-shadow: 0 12px 28px rgba(3, 29, 61, 0.18);
}

.btn-light:hover {
  background: var(--blue-50);
}

.btn-glass {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.18);
}

.btn-sm {
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.btn-lg {
  min-height: 56px;
  padding: 15px 24px;
  border-radius: 14px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* En-tête public */
.motion-canvas {
  position: fixed;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
}

.institution-bar {
  position: relative;
  z-index: 101;
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  padding: 6px max(24px, calc((100vw - var(--container)) / 2));
  background: var(--blue-950);
  color: rgba(255, 255, 255, 0.91);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.035em;
}

.institution-bar-note {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.68);
}

.flag-line {
  display: inline-flex;
  width: 30px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.flag-line i {
  width: 33.333%;
}

.flag-line i:nth-child(1) { background: var(--blue-500); }
.flag-line i:nth-child(2) { background: var(--white); }
.flag-line i:nth-child(3) { background: var(--red-600); }

.public-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
  padding: 10px max(24px, calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid rgba(199, 214, 229, 0.82);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 24px rgba(5, 43, 88, 0.055);
  backdrop-filter: blur(18px) saturate(150%);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--blue-700), var(--blue-900));
  box-shadow: 0 10px 24px rgba(7, 87, 166, 0.22);
}

.brand-mark::before {
  width: 17px;
  height: 27px;
  border: 4px solid var(--white);
  border-top: 0;
  border-radius: 4px 4px 12px 12px;
  content: "";
  transform: rotate(12deg);
}

.brand-mark::after {
  position: absolute;
  width: 15px;
  height: 5px;
  right: 6px;
  top: 7px;
  border-radius: 999px;
  background: var(--red-500);
  content: "";
  transform: rotate(-26deg);
}

.brand > span:last-child,
.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand b {
  color: var(--blue-800);
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.brand small {
  max-width: 270px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  line-height: 1.35;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.public-nav > a {
  position: relative;
  padding: 12px 11px;
  border-radius: 10px;
  color: #40566e;
  font-size: 0.9rem;
  font-weight: 680;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.public-nav > a::after {
  position: absolute;
  width: 0;
  height: 3px;
  left: 50%;
  bottom: 4px;
  border-radius: 999px;
  background: var(--red-600);
  content: "";
  transform: translateX(-50%);
  transition: width 0.22s var(--ease);
}

.public-nav > a:hover,
.public-nav > a.is-active {
  background: var(--blue-50);
  color: var(--blue-800);
}

.public-nav > a:hover::after,
.public-nav > a.is-active::after {
  width: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle,
.sidebar-toggle,
.sidebar-close {
  display: none;
  border: 0;
  background: transparent;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-active span:nth-child(1),
body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2),
body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3),
body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-actions,
.menu-backdrop,
.sidebar-backdrop {
  display: none;
}

.site-main {
  position: relative;
  min-height: 55vh;
}

/* Accueil */
.hero-section {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 660px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 100px);
  padding: clamp(74px, 9vw, 124px) max(24px, calc((100vw - var(--container)) / 2)) 112px;
  background:
    radial-gradient(circle at 82% 25%, rgba(44, 131, 210, 0.38), transparent 31%),
    radial-gradient(circle at 4% 100%, rgba(227, 6, 19, 0.2), transparent 27%),
    linear-gradient(125deg, var(--blue-950) 0%, var(--blue-900) 52%, var(--blue-800) 100%);
  color: var(--white);
}

.hero-section::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 100%);
  content: "";
}

.hero-section::after {
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 8px;
  left: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 0;
  background: linear-gradient(90deg, var(--red-600) 0 34%, var(--white) 34% 66%, var(--blue-500) 66%);
  content: "";
}

.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
}

.orb-one {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.018), 0 0 0 140px rgba(255, 255, 255, 0.012);
}

.orb-two {
  width: 260px;
  height: 260px;
  left: -130px;
  bottom: -100px;
  background: rgba(227, 6, 19, 0.08);
  filter: blur(10px);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

.eyebrow,
.section-kicker,
.topbar-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #d7ebfc;
}

.eyebrow > span {
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: var(--red-500);
  box-shadow: 0 0 16px rgba(237, 38, 54, 0.55);
}

.hero-content h1 {
  max-width: 800px;
  margin: 22px 0 24px;
  color: var(--white);
  font-size: clamp(3rem, 5.7vw, 5.9rem);
  font-weight: 820;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.hero-content h1 em {
  color: #a9d5f7;
  font-style: normal;
  font-weight: 680;
}

.hero-content > p {
  max-width: 700px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.77);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-section .btn-primary {
  border-color: var(--red-600);
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  box-shadow: 0 13px 34px rgba(200, 16, 32, 0.3);
}

.hero-section .btn-primary:hover {
  border-color: var(--red-500);
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 27px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 620;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-row i {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  color: #bfe1fa;
  font-size: 0.66rem;
  font-style: normal;
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 480px;
  place-items: center;
}

.digital-core {
  position: relative;
  display: grid;
  width: min(440px, 40vw);
  aspect-ratio: 1;
  place-items: center;
}

.digital-core::before {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44, 131, 210, 0.28), transparent 68%);
  content: "";
  filter: blur(8px);
  animation: coreGlow 5s ease-in-out infinite;
}

.core-ring {
  position: absolute;
  border: 1px solid rgba(170, 217, 251, 0.27);
  border-radius: 50%;
}

.ring-a {
  width: 100%;
  height: 100%;
  border-style: dashed;
  animation: ringRotate 32s linear infinite;
}

.ring-b {
  width: 76%;
  height: 76%;
  border-color: rgba(255, 255, 255, 0.2);
  animation: ringRotate 22s linear infinite reverse;
}

.ring-c {
  width: 54%;
  height: 54%;
  border-color: rgba(237, 38, 54, 0.42);
  box-shadow: 0 0 44px rgba(7, 87, 166, 0.18);
}

.core-center {
  position: relative;
  z-index: 2;
  display: flex;
  width: 43%;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.33);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(11, 83, 148, 0.92), rgba(3, 29, 61, 0.96));
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.06), 0 25px 70px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.core-center::after {
  position: absolute;
  width: 120%;
  height: 2px;
  left: -10%;
  top: 20%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  content: "";
  animation: coreScan 4.5s ease-in-out infinite;
}

.core-center small,
.core-center span {
  color: rgba(255, 255, 255, 0.64);
  font-size: clamp(0.48rem, 0.6vw, 0.62rem);
  font-weight: 750;
  letter-spacing: 0.16em;
}

.core-center strong {
  margin: 5px 0 2px;
  color: var(--white);
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 1;
}

.core-center em {
  margin-bottom: 9px;
  color: #ff8b95;
  font-size: clamp(0.68rem, 1vw, 0.95rem);
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.floating-chip {
  position: absolute;
  z-index: 5;
  display: flex;
  min-width: 156px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: rgba(4, 36, 72, 0.76);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  animation: chipFloat 6s ease-in-out infinite;
}

.floating-chip > i {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  color: #bee2fb;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}

.floating-chip > span {
  display: flex;
  flex-direction: column;
}

.floating-chip small {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.floating-chip b {
  color: var(--white);
  font-size: 0.78rem;
}

.chip-one { top: 15%; left: -5%; }
.chip-two { right: -7%; bottom: 28%; animation-delay: -2s; }
.chip-three { left: 5%; bottom: 5%; animation-delay: -4s; }

.pulse-dot {
  position: relative;
  width: 9px !important;
  height: 9px !important;
  margin: 9px;
  border-radius: 50% !important;
  background: #73d7b4 !important;
  box-shadow: 0 0 0 5px rgba(115, 215, 180, 0.13);
}

/* Services rapides */
.quick-services {
  position: relative;
  z-index: 5;
  display: grid;
  width: min(calc(100% - 48px), var(--container));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: -52px auto 0;
}

.quick-card {
  position: relative;
  display: grid;
  min-height: 184px;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 25px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.quick-card::before {
  position: absolute;
  width: 0;
  height: 4px;
  left: 0;
  bottom: 0;
  background: var(--red-600);
  content: "";
  transition: width 0.3s var(--ease);
}

.quick-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-7px);
}

.quick-card:hover::before {
  width: 100%;
}

.quick-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.75rem;
  font-weight: 850;
}

.quick-card:nth-of-type(2) .quick-icon,
.quick-card:nth-of-type(4) .quick-icon {
  background: var(--red-100);
  color: var(--red-700);
}

.quick-card small {
  color: var(--blue-700);
  font-size: 0.62rem;
  font-weight: 820;
  letter-spacing: 0.12em;
}

.quick-card h3 {
  margin: 5px 0 8px;
  font-size: 1.05rem;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.55;
}

.quick-card > b {
  color: var(--blue-600);
}

/* Sections publiques */
.section {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
  padding: clamp(74px, 8vw, 116px) 0;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}

.section-copy h2,
.stats-heading h2,
.section-heading h2 {
  margin: 13px 0 20px;
}

.section-copy > p,
.stats-heading > p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 13px;
}

.feature-list li > span {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 850;
}

.feature-list li:nth-child(2) > span {
  background: var(--red-100);
  color: var(--red-700);
}

.feature-list b,
.feature-list small {
  display: block;
}

.feature-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.insight-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0, rgba(44, 131, 210, 0.13), transparent 34%),
    linear-gradient(150deg, var(--white), var(--blue-50));
  box-shadow: var(--shadow-md);
}

.insight-panel::before {
  position: absolute;
  width: 6px;
  height: 100%;
  left: 0;
  top: 0;
  background: linear-gradient(var(--blue-700) 0 70%, var(--red-600) 70%);
  content: "";
}

.panel-head,
.card-heading,
.section-heading,
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-head > div,
.form-head > div,
.card-heading > div {
  display: flex;
  flex-direction: column;
}

.panel-head small,
.card-heading small {
  color: var(--blue-700);
  font-size: 0.65rem;
  font-weight: 820;
  letter-spacing: 0.12em;
}

.panel-head b {
  margin-top: 4px;
  font-size: 1.05rem;
}

.live-badge,
.date-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--blue-200);
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.province-visual {
  display: grid;
  gap: 15px;
  margin: 30px 0;
}

.province-visual > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) 1fr;
  align-items: center;
  gap: 14px;
}

.province-visual span {
  color: #415b74;
  font-size: 0.82rem;
  font-weight: 680;
}

.province-visual i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddeaf5;
}

.province-visual i b {
  display: block;
  width: var(--level, 60%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
}

.province-visual > div:last-child i b {
  background: linear-gradient(90deg, var(--red-700), var(--red-500));
}

.panel-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(7, 87, 166, 0.07);
  color: #4e657c;
  font-size: 0.79rem;
  line-height: 1.55;
}

.panel-note i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 5px rgba(18, 107, 192, 0.1);
}

.stats-section {
  padding: clamp(76px, 8vw, 112px) max(24px, calc((100vw - var(--container)) / 2));
  background: linear-gradient(135deg, var(--blue-50), #f9fcff 48%, var(--red-50));
  border-block: 1px solid var(--line);
}

.stats-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.stats-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 27px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  position: absolute;
  width: 90px;
  height: 90px;
  right: -38px;
  bottom: -38px;
  border-radius: 50%;
  background: var(--blue-100);
  content: "";
}

.stat-card:nth-child(4)::after {
  background: var(--red-100);
}

.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.1em;
}

.stat-card strong {
  display: block;
  margin: 13px 0 9px;
  color: var(--blue-800);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  font-weight: 850;
  line-height: 1;
}

.stat-card:nth-child(4) strong {
  color: var(--red-700);
}

.stat-card > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.news-section {
  padding-top: clamp(74px, 8vw, 110px);
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading a,
.card-heading a,
.article-detail > a {
  color: var(--blue-700);
  font-size: 0.86rem;
  font-weight: 780;
}

.section-heading a:hover,
.card-heading a:hover,
.article-detail > a:hover {
  color: var(--red-700);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-grid-wide {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
  padding-bottom: 90px;
}

.news-card {
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-card::before {
  position: absolute;
  width: 100%;
  height: 4px;
  left: 0;
  top: 0;
  background: linear-gradient(90deg, var(--blue-700) 0 75%, var(--red-600) 75%);
  content: "";
}

.news-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.news-category {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-card time,
.news-card > small,
.article-detail time {
  margin-top: 15px;
  color: var(--muted-light);
  font-size: 0.75rem;
}

.news-card h2,
.news-card h3 {
  margin: 14px 0 11px;
  font-size: 1.28rem;
}

.news-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.news-card > a {
  margin-top: auto;
  color: var(--blue-700);
  font-size: 0.86rem;
  font-weight: 800;
}

.cta-section {
  display: flex;
  width: min(calc(100% - 48px), var(--container));
  min-height: 250px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 10px auto 90px;
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 5%, rgba(255, 255, 255, 0.14), transparent 25%),
    linear-gradient(125deg, var(--blue-900), var(--blue-700));
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.cta-section .section-kicker {
  color: #bcdcf6;
}

.cta-section h2 {
  margin: 11px 0 8px;
  color: var(--white);
}

.cta-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

/* Pages publiques internes */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 8vw, 112px) max(24px, calc((100vw - var(--container)) / 2));
  background:
    radial-gradient(circle at 82% 20%, rgba(44, 131, 210, 0.33), transparent 28%),
    linear-gradient(125deg, var(--blue-950), var(--blue-800));
  color: var(--white);
}

.page-hero::after {
  position: absolute;
  width: 180px;
  height: 5px;
  left: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 0;
  background: var(--red-600);
  content: "";
}

.page-hero .section-kicker {
  color: #b9dcf7;
}

.page-hero h1 {
  max-width: 1000px;
  margin: 16px 0 18px;
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
}

.page-hero > a:first-child {
  display: inline-flex;
  margin-bottom: 22px;
  color: #c5e3fa;
  font-size: 0.86rem;
  font-weight: 750;
}

.page-hero > .btn {
  margin-top: 28px;
}

.content-grid,
.service-grid,
.province-grid {
  display: grid;
  width: min(calc(100% - 48px), var(--container));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto;
  padding: clamp(68px, 8vw, 104px) 0;
}

.content-card,
.service-card,
.province-card {
  position: relative;
  overflow: hidden;
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-card {
  min-height: 255px;
}

.content-card > span,
.service-card > span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.75rem;
  font-weight: 850;
}

.content-card:nth-child(2) > span,
.service-card:nth-child(3n + 2) > span {
  background: var(--red-100);
  color: var(--red-700);
}

.content-card h2,
.service-card h2,
.province-card h2 {
  margin: 22px 0 12px;
  font-size: 1.35rem;
}

.content-card p,
.service-card p,
.province-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

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

.service-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover,
.province-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.service-card b {
  margin-top: auto;
  color: var(--blue-700);
  font-size: 0.86rem;
}

.province-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 34px;
}

.province-card {
  min-height: 215px;
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.province-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.province-card > div:first-child > small {
  color: var(--muted-light);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.province-card h2 {
  margin-top: 25px;
}

.province-card > a {
  color: var(--blue-700);
  font-size: 0.84rem;
  font-weight: 800;
}

.legal-banner {
  display: flex;
  width: min(calc(100% - 48px), var(--container));
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto 90px;
  padding: 34px 38px;
  border: 1px solid var(--blue-200);
  border-left: 6px solid var(--red-600);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--blue-50), var(--white));
}

.legal-banner h2 {
  margin: 10px 0 8px;
  font-size: 1.6rem;
}

.legal-banner p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
}

.article-detail {
  width: min(calc(100% - 48px), 940px);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 104px) 0;
}

.article-detail .news-category {
  display: flex;
  margin-top: 34px;
}

.article-detail h1 {
  margin: 20px 0;
  color: var(--blue-950);
  font-size: clamp(2.3rem, 5vw, 4.4rem);
}

.article-lead {
  margin: 30px 0;
  padding: 24px 28px;
  border-left: 5px solid var(--red-600);
  background: var(--blue-50);
  color: #3f5870;
  font-size: 1.15rem;
  line-height: 1.75;
}

.article-body {
  color: #334a62;
  font-size: 1.02rem;
  line-height: 1.9;
}

/* Formulaires publics */
.auth-section {
  display: grid;
  min-height: calc(100vh - 122px);
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 0.65fr);
  align-items: stretch;
  background: var(--surface-soft);
}

.auth-aside {
  display: flex;
  min-height: 640px;
  justify-content: center;
  flex-direction: column;
  padding: clamp(48px, 8vw, 110px) max(42px, calc((100vw - var(--container)) / 2));
  background:
    radial-gradient(circle at 15% 90%, rgba(227, 6, 19, 0.2), transparent 29%),
    linear-gradient(145deg, var(--blue-950), var(--blue-700));
  color: var(--white);
}

.auth-aside .section-kicker {
  color: #bddcf4;
}

.auth-aside h1 {
  max-width: 650px;
  margin: 16px 0 20px;
  color: var(--white);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.auth-aside > p,
.auth-aside > small {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.72);
}

.auth-aside ul {
  display: grid;
  gap: 12px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.auth-aside li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.auth-aside li i {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #c4e3fa;
  font-style: normal;
}

.form-card {
  width: min(calc(100% - 48px), 540px);
  align-self: center;
  justify-self: center;
  padding: clamp(30px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.form-head {
  justify-content: flex-start;
  margin-bottom: 28px;
}

.form-head h2 {
  margin: 0 0 3px;
  font-size: 1.65rem;
}

.form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-mark {
  display: inline-block;
  width: 9px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(var(--blue-700) 0 64%, var(--red-600) 64%);
}

.form-card form,
.tracking-card form,
.compact-form {
  display: grid;
  gap: 18px;
}

.form-foot {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.84rem;
}

.form-foot a {
  color: var(--blue-700);
  font-weight: 800;
}

.form-page {
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 94px) 0;
}

.form-page.compact {
  max-width: 1060px;
}

.form-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 30px;
}

.form-page-head > div:first-child {
  max-width: 790px;
}

.form-page-head h1 {
  margin: 12px 0 14px;
  color: var(--blue-950);
  font-size: clamp(2.25rem, 4.5vw, 4.15rem);
}

.form-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.privacy-badge {
  display: flex;
  min-width: 245px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--blue-200);
  border-radius: 15px;
  background: var(--blue-50);
}

.privacy-badge > i {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-700);
  color: var(--white);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.privacy-badge span {
  display: flex;
  flex-direction: column;
}

.privacy-badge b {
  font-size: 0.86rem;
}

.privacy-badge small {
  color: var(--muted);
  font-size: 0.7rem;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 26px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.step-indicator > span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.step-indicator > span small {
  position: absolute;
  margin-top: 70px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
}

.step-indicator > span.active {
  border-color: var(--blue-700);
  background: var(--blue-700);
  color: var(--white);
  box-shadow: 0 0 0 5px var(--blue-100);
}

.step-indicator > span.active small {
  color: var(--blue-700);
}

.step-indicator > i {
  width: min(8vw, 105px);
  height: 2px;
  margin: 0 8px;
  background: var(--line);
}

.institutional-form {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.institutional-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.institutional-form fieldset + fieldset {
  margin-top: 34px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.institutional-form legend {
  width: 100%;
  margin-bottom: 22px;
  color: var(--blue-950);
  font-size: 1.03rem;
  font-weight: 820;
}

.institutional-form legend > span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.69rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.identified-fields:not([hidden]) {
  display: grid;
}

.institution-field:not([hidden]) {
  display: flex;
}

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

label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #29445f;
  font-size: 0.82rem;
  font-weight: 750;
}

label > small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 49px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: #97a8b9;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--blue-300);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(18, 107, 192, 0.12);
}

input[type="file"] {
  min-height: 56px;
  padding: 8px;
  background: var(--surface-soft);
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.78rem;
  font-weight: 800;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: var(--blue-700);
}

fieldset:disabled {
  opacity: 0.72;
}

fieldset:disabled input,
fieldset:disabled select,
fieldset:disabled textarea {
  background: #edf1f5;
  cursor: not-allowed;
}

.requester-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px !important;
  padding: 6px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px;
  background: var(--surface-soft);
}

.requester-switch legend {
  width: auto;
  margin: 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.requester-switch label {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: row;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--white);
  color: #38526c;
  cursor: pointer;
}

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  margin-top: 25px;
  padding: 15px;
  border: 1px solid var(--blue-200);
  border-radius: 13px;
  background: var(--blue-50);
  color: #405a72;
  font-size: 0.79rem;
  line-height: 1.55;
  cursor: pointer;
}

.check-row input {
  margin-top: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.success-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 17px;
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid #a8ddc8;
  border-radius: var(--radius-lg);
  background: var(--success-soft);
}

.success-panel > span {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--success);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 850;
}

.success-panel small {
  color: var(--success);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.success-panel h2 {
  margin: 5px 0 8px;
  font-size: 1.35rem;
}

.success-panel p {
  margin-bottom: 5px;
  color: #356451;
}

.tracking-page {
  display: grid;
  min-height: 70vh;
  place-items: center;
  padding: 70px 24px;
  background:
    radial-gradient(circle at 8% 90%, var(--red-50), transparent 30%),
    linear-gradient(135deg, var(--blue-50), var(--white));
}

.tracking-card {
  width: min(100%, 610px);
  padding: clamp(30px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.tracking-card h1 {
  margin: 12px 0 14px;
  color: var(--blue-950);
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.tracking-card > p {
  color: var(--muted);
}

.tracking-result {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
  background: var(--blue-50);
}

.tracking-result > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.tracking-result > div:first-child > div {
  display: flex;
  flex-direction: column;
}

.tracking-result small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.status-dot-large {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 7px rgba(18, 107, 192, 0.12);
}

.tracking-result dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 16px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--blue-200);
  font-size: 0.86rem;
}

.tracking-result dt {
  color: var(--muted);
}

.tracking-result dd {
  margin: 0;
  color: var(--ink-strong);
  font-weight: 750;
}

/* Notifications temporaires */
.flash-stack {
  position: fixed;
  z-index: 1500;
  top: 106px;
  right: 22px;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.dashboard-body .flash-stack {
  top: 86px;
}

.flash {
  display: flex;
  min-height: 58px;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 15px 15px 17px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  pointer-events: auto;
  animation: flashEnter 0.4s var(--ease) both;
}

.flash::before {
  display: none;
}

.flash > i {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--info-soft);
  color: var(--info);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 900;
}

.flash > span {
  flex: 1;
}

.flash button {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.flash button:hover {
  background: var(--surface-soft);
  color: var(--ink-strong);
}

.flash-success {
  border-left-color: var(--success);
}

.flash-success > i {
  background: var(--success-soft);
  color: var(--success);
}

.flash-error,
.flash-danger {
  border-left-color: var(--danger);
}

.flash-error > i,
.flash-danger > i {
  background: var(--danger-soft);
  color: var(--danger);
}

.flash-warning {
  border-left-color: var(--warning);
}

.flash-warning > i {
  background: var(--warning-soft);
  color: var(--warning);
}

.flash-info {
  border-left-color: var(--info);
}

/* Etats métier */
.status-pill {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--blue-200);
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.15;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-active,
.status-approved,
.status-paid,
.status-published,
.status-verified,
.status-issued,
.status-closed,
.status-completed,
.status-valid,
.status-success {
  border-color: #b9e6d5;
  background: var(--success-soft);
  color: #0d6c4c;
}

.status-pending,
.status-open,
.status-draft,
.status-preparation,
.status-processing,
.status-under_review,
.status-under-review,
.status-in_progress,
.status-in-progress {
  border-color: #f2d7a4;
  background: var(--warning-soft);
  color: #805005;
}

.status-correction_required,
.status-correction-required,
.status-rejected,
.status-failed,
.status-suspended,
.status-inactive,
.status-revoked,
.status-cancelled,
.status-canceled,
.status-danger {
  border-color: #f2c1c8;
  background: var(--danger-soft);
  color: var(--danger);
}

/* Pied de page public */
.public-footer {
  position: relative;
  overflow: hidden;
  border-top: 5px solid var(--red-600);
  background: var(--blue-950);
  color: rgba(255, 255, 255, 0.72);
}

.public-footer::before {
  position: absolute;
  width: 420px;
  height: 420px;
  top: -250px;
  right: -140px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.02), 0 0 0 140px rgba(255, 255, 255, 0.015);
  content: "";
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: var(--container);
  grid-template-columns: minmax(300px, 1.6fr) repeat(3, minmax(150px, 0.72fr));
  gap: clamp(34px, 5vw, 80px);
  margin: 0 auto;
  padding: 70px 30px 52px;
}

.footer-intro p {
  max-width: 490px;
  margin: 22px 0 18px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.91rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.footer-brand .brand-logo {
  width: 58px;
  height: 58px;
  padding: 3px;
  border-radius: 10px;
  background: var(--white);
}

.footer-brand .brand-mark {
  border-color: rgba(255, 255, 255, 0.22);
}

.footer-brand b,
.footer-brand small {
  color: var(--white);
}

.official-domain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 750;
}

.official-domain::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-500);
  box-shadow: 0 0 0 4px rgba(237, 38, 54, 0.16);
  content: "";
}

.footer-grid h3 {
  margin-bottom: 18px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-grid > div:not(:first-child) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-grid a:not(.brand),
.footer-grid span:not(.brand-mark):not(.brand-copy) {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.footer-grid a:not(.brand) {
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-grid a:not(.brand):hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: var(--container);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 22px 30px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* Espace sécurisé */
.dashboard-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 900;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 0, rgba(44, 131, 210, 0.22), transparent 34%),
    linear-gradient(180deg, var(--blue-950), #04172d 75%);
  color: rgba(255, 255, 255, 0.75);
  box-shadow: 18px 0 48px rgba(3, 29, 61, 0.1);
}

.sidebar::after {
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  right: -95px;
  bottom: 80px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.018), 0 0 0 76px rgba(255, 255, 255, 0.012);
  content: "";
}

.sidebar-head {
  display: flex;
  min-height: 94px;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.sidebar-brand .brand-logo {
  width: 52px;
  height: 52px;
  padding: 3px;
  border-radius: 10px;
  background: var(--white);
}

.sidebar-brand .brand-mark {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-brand b,
.sidebar-brand small {
  color: var(--white);
}

.sidebar-close {
  display: none;
  width: 38px;
  height: 38px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1.35rem;
  line-height: 1;
}

.sidebar-nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding: 17px 14px 24px;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scrollbar-width: thin;
}

.nav-label {
  display: block;
  margin: 17px 11px 7px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 3px;
}

.sidebar-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  font-weight: 650;
  transition: 0.2s ease;
}

.sidebar-nav a i {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-style: normal;
  font-size: 0.9rem;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.sidebar-nav a.is-active,
.sidebar-nav a.active {
  border-color: rgba(143, 194, 236, 0.18);
  background: linear-gradient(105deg, rgba(18, 107, 192, 0.5), rgba(18, 107, 192, 0.18));
  color: var(--white);
  box-shadow: inset 3px 0 var(--red-500);
}

.sidebar-nav a.is-active i,
.sidebar-nav a.active i {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.sidebar-foot {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.08);
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--red-600));
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 850;
}

.sidebar-foot > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-foot b,
.sidebar-foot small {
  overflow: hidden;
  color: var(--white);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot b {
  font-size: 0.78rem;
}

.sidebar-foot small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
}

.dashboard-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.dashboard-topbar {
  position: sticky;
  z-index: 700;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 16px;
  padding: 13px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid rgba(199, 214, 229, 0.85);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 22px rgba(5, 43, 88, 0.04);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.sidebar-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  color: var(--blue-900);
  font-size: 1.1rem;
}

.topbar-title,
.dashboard-topbar > div:not(.topbar-actions) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.topbar-kicker {
  color: var(--red-700);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.dashboard-topbar b {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  color: var(--blue-800);
  font-size: 1rem;
  font-weight: 800;
  transition: 0.2s ease;
}

.icon-button:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
  transform: translateY(-1px);
}

.dashboard-content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 42px);
}

.sidebar-backdrop {
  display: none;
}

/* Pages du tableau de bord */
.dashboard-welcome {
  position: relative;
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  margin-bottom: 23px;
  padding: clamp(25px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 91% 10%, rgba(255, 255, 255, 0.15), transparent 28%),
    linear-gradient(120deg, var(--blue-900), var(--blue-700));
  box-shadow: 0 18px 44px rgba(5, 43, 88, 0.18);
  color: rgba(255, 255, 255, 0.75);
}

.dashboard-welcome::after {
  position: absolute;
  width: 210px;
  height: 210px;
  right: -60px;
  bottom: -120px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.035), 0 0 0 90px rgba(255, 255, 255, 0.02);
  content: "";
}

.dashboard-welcome h1,
.dashboard-welcome h2,
.dashboard-welcome b,
.dashboard-welcome strong {
  color: var(--white);
}

.dashboard-welcome h1,
.dashboard-welcome h2 {
  margin: 7px 0 10px;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.dashboard-welcome p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
}

.dashboard-welcome .btn {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.admin-welcome {
  background:
    radial-gradient(circle at 91% 10%, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(120deg, #062b57, #084e91 70%, #0c63ae);
}

.dashboard-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 22px;
}

.dashboard-title > div:first-child {
  min-width: 0;
}

.dashboard-title h1 {
  margin: 4px 0 8px;
  color: var(--blue-950);
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
}

.dashboard-title p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.metric-grid {
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  display: flex;
  min-height: 128px;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.metric-card::after {
  position: absolute;
  width: 76px;
  height: 76px;
  right: -35px;
  bottom: -36px;
  border-radius: 50%;
  background: var(--blue-50);
  content: "";
}

.metric-icon {
  display: grid;
  width: 49px;
  height: 49px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 850;
}

.metric-icon.cyan {
  background: #e4f7fa;
  color: #087c8e;
}

.metric-icon.gold {
  background: var(--warning-soft);
  color: var(--warning);
}

.metric-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.metric-icon.purple {
  background: #f1eafd;
  color: #7045b7;
}

.metric-icon.red {
  background: var(--red-100);
  color: var(--red-700);
}

.metric-card > div:not(.metric-icon) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric-card small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 5px;
  color: var(--blue-950);
  font-size: clamp(1.55rem, 2.2vw, 2.05rem);
  line-height: 1;
}

.metric-card em {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 20px;
  margin-bottom: 22px;
}

.dashboard-card,
.table-card,
.chart-card,
.progress-card,
.payment-request-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.dashboard-card,
.progress-card,
.payment-request-card {
  padding: clamp(20px, 2.5vw, 28px);
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.card-heading h2,
.card-heading h3,
.card-heading b {
  margin: 0;
  font-size: 1rem;
}

.progress-line {
  display: flex;
  height: 9px;
  overflow: hidden;
  margin: 16px 0 20px;
  border-radius: 999px;
  background: #e6eef6;
}

.progress-line > span,
.progress-line > b,
.progress-line > i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.check-list > span,
.check-row {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 0.84rem;
}

.check-list li::before,
.check-list > span::before,
.check-row::before {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  content: "·";
  font-size: 0.8rem;
  font-weight: 900;
}

.check-list li.done,
.check-list > span.done,
.check-row.done {
  color: var(--ink);
}

.check-list li.done::before,
.check-list > span.done::before,
.check-row.done::before {
  border-color: #b9e6d5;
  background: var(--success-soft);
  color: var(--success);
  content: "✓";
}

.notification-list,
.document-list,
.action-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notification-list > *,
.document-list > *,
.action-list > * {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.notification-list > *:last-child,
.document-list > *:last-child,
.action-list > *:last-child {
  border-bottom: 0;
}

.notification-list > * > div,
.document-list > * > div,
.action-list > * > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.notification-list b,
.document-list b,
.action-list b {
  font-size: 0.82rem;
}

.notification-list p,
.document-list p,
.action-list p {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  margin: 0;
}

.notification-list small,
.document-list small,
.action-list small {
  color: var(--muted);
  font-size: 0.72rem;
}

.notification-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--red-600);
  box-shadow: 0 0 0 5px var(--red-100);
}

.notification-list time {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 0.67rem;
}

.action-list > a {
  align-items: center;
  border-radius: 11px;
  transition: background 0.18s ease, padding 0.18s ease;
}

.action-list > a:hover {
  padding-inline: 9px;
  background: var(--blue-50);
}

.action-list > a > i:last-child {
  color: var(--blue-700);
  font-style: normal;
  font-weight: 850;
}

.empty-mini {
  padding: 20px 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.documents-grid,
.fee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-grid.documents-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fee-grid {
  margin-bottom: 22px;
}

.fee-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.fee-card small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  text-transform: uppercase;
}

.fee-card strong {
  display: block;
  margin: 8px 0;
  color: var(--blue-900);
  font-size: 1.7rem;
}

.fee-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.file-icon {
  display: grid;
  width: 39px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px 8px 11px 11px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 850;
}

.payment-request-card {
  margin-top: 20px;
}

.inline-payment-form,
.compact-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 13px;
}

.inline-payment-form > *,
.compact-form > * {
  flex: 1 1 170px;
}

.inline-payment-form .btn,
.compact-form .btn {
  flex: 0 0 auto;
}

/* Tableaux et graphiques administratifs */
.table-card,
.chart-card {
  margin-bottom: 22px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar h2,
.table-toolbar h3,
.table-toolbar b {
  margin: 0;
  font-size: 1rem;
}

.search-box {
  position: relative;
  width: min(100%, 330px);
}

.search-box::before {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted-light);
  content: "⌕";
  font-size: 1rem;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px 9px 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 0.82rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-wrap table,
.mini-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.8rem;
}

.table-wrap th,
.mini-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-wrap td,
.mini-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table-wrap tbody tr,
.mini-table tbody tr {
  transition: background 0.18s ease;
}

.table-wrap tbody tr:hover,
.mini-table tbody tr:hover {
  background: var(--blue-50);
}

.table-wrap tbody tr:last-child td,
.mini-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap td a,
.mini-table td a {
  color: var(--blue-700);
  font-weight: 750;
}

.empty-cell {
  padding: 45px 20px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.chart-card {
  padding: clamp(20px, 2.5vw, 28px);
}

.bar-chart {
  display: flex;
  min-height: 250px;
  align-items: stretch;
  gap: clamp(8px, 1.5vw, 18px);
  padding: 14px 4px 0;
}

.bar-chart > div {
  display: grid;
  height: 230px;
  flex: 1;
  grid-template-areas: "value" "bar" "label";
  grid-template-rows: 27px 1fr 31px;
  align-items: end;
  justify-items: center;
}

.bar-chart i {
  display: flex;
  width: min(44px, 72%);
  height: 100%;
  align-items: flex-end;
  grid-area: bar;
  overflow: hidden;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, rgba(232, 243, 252, 0.4), var(--blue-50));
}

.bar-chart i b {
  display: block;
  width: 100%;
  min-height: 7px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-800));
  box-shadow: 0 7px 18px rgba(7, 87, 166, 0.18);
}

.bar-chart span {
  grid-area: label;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.bar-chart > div > strong {
  grid-area: value;
  color: var(--blue-900);
  font-size: 0.75rem;
}

.horizontal-chart {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.horizontal-chart > div {
  display: grid;
  grid-template-columns: minmax(95px, 0.35fr) 1fr 38px;
  align-items: center;
  gap: 12px;
}

.horizontal-chart span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-chart i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.horizontal-chart i::before {
  display: none;
}

.horizontal-chart i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
}

.horizontal-chart b {
  color: var(--blue-900);
  font-size: 0.75rem;
  text-align: right;
}

/* Carte professionnelle numérique */
.professional-card {
  position: relative;
  width: min(100%, 760px);
  min-height: 430px;
  overflow: hidden;
  margin: 0 auto 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(135deg, var(--blue-950), var(--blue-700));
  box-shadow: var(--shadow-lg);
  color: rgba(255, 255, 255, 0.75);
}

.professional-card::before {
  position: absolute;
  width: 330px;
  height: 330px;
  right: -180px;
  bottom: -180px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.035), 0 0 0 110px rgba(255, 255, 255, 0.018);
  content: "";
}

.professional-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.professional-card-head .brand,
.professional-card-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.professional-card h2,
.professional-card h3,
.professional-card b,
.professional-card strong {
  color: var(--white);
}

.professional-card-head small {
  color: rgba(255, 255, 255, 0.6);
}

.professional-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 26px;
  padding: 31px 26px;
}

.photo-placeholder {
  display: grid;
  width: 130px;
  height: 155px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 2.5rem;
}

.professional-card-body dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 24px;
  margin: 18px 0 0;
}

.professional-card-body dt {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.professional-card-body dd {
  margin: 3px 0 0;
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 700;
}

.professional-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
}

.card-security {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.72);
}

.card-security::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #56d6aa;
  box-shadow: 0 0 0 5px rgba(86, 214, 170, 0.12);
  content: "";
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--muted);
  text-align: center;
}

.empty-state > div {
  max-width: 480px;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 8px;
}

.small {
  font-size: 0.76rem !important;
}

/* Apparition discrète, sans dépendance JavaScript */
.reveal {
  animation: revealUp 0.65s var(--ease) both;
  animation-delay: var(--delay, 0s);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

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

@keyframes coreGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(143, 194, 236, 0.08), 0 24px 70px rgba(0, 0, 0, 0.26);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(143, 194, 236, 0.04), 0 30px 90px rgba(0, 0, 0, 0.32);
  }
}

@keyframes coreScan {
  0% {
    transform: translateY(-140%);
  }

  100% {
    transform: translateY(440%);
  }
}

@keyframes chipFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes flashEnter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 1200px) {
  :root {
    --container: 1160px;
  }

  .public-header {
    padding-inline: 22px;
  }

  .public-nav {
    gap: 3px;
  }

  .public-nav > a {
    padding-inline: 10px;
  }

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

  .service-grid,
  .province-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(130px, 0.65fr));
    gap: 35px;
  }
}

@media (max-width: 1024px) {
  :root {
    --header-height: 76px;
  }

  .institution-bar {
    padding-inline: 20px;
  }

  .public-header {
    min-height: var(--header-height);
  }

  .public-header > .brand {
    margin-right: auto;
  }

  .public-header .brand-logo {
    width: 51px;
    height: 51px;
  }

  .public-header .brand-copy small {
    max-width: 230px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .public-nav {
    position: fixed;
    z-index: 1200;
    inset: 0 0 0 auto;
    display: flex;
    width: min(390px, 88vw);
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    overflow-y: auto;
    padding: 100px 24px 30px;
    background: var(--white);
    box-shadow: -24px 0 70px rgba(3, 29, 61, 0.2);
    transform: translateX(105%);
    transition: transform 0.32s var(--ease);
  }

  .public-nav.is-open,
  .public-nav.open,
  body.menu-open .public-nav {
    transform: translateX(0);
  }

  .public-nav > a {
    min-height: 48px;
    justify-content: flex-start;
    padding: 11px 13px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 0.92rem;
  }

  .public-nav > a::after {
    right: auto;
    left: 13px;
  }

  .nav-mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .header-actions {
    display: none;
  }

  .menu-backdrop {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(3, 29, 61, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  .menu-backdrop.is-open,
  .menu-backdrop.open,
  body.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .hero-section {
    grid-template-columns: 1fr;
    padding-top: clamp(64px, 8vw, 96px);
  }

  .hero-content {
    max-width: 820px;
  }

  .hero-visual {
    min-height: 470px;
  }

  .quick-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-split,
  .auth-section {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    min-height: 390px;
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr repeat(2, 1fr);
  }

  .footer-grid > div:nth-child(4) {
    grid-column: 2 / -1;
  }

  .sidebar {
    width: min(var(--sidebar-width), 88vw);
    transform: translateX(-105%);
    transition: transform 0.3s var(--ease);
  }

  .sidebar.is-open,
  .sidebar.open,
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close,
  .sidebar-toggle {
    display: grid;
    place-items: center;
  }

  .dashboard-main {
    margin-left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 850;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(3, 29, 61, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .sidebar-backdrop.is-open,
  .sidebar-backdrop.open,
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 860px) {
  .institution-bar-note {
    display: none;
  }

  .hero-section,
  .section,
  .page-hero,
  .stats-section,
  .news-section,
  .cta-section {
    padding-inline: 20px;
  }

  .hero-visual {
    min-height: 410px;
  }

  .digital-core {
    transform: scale(0.86);
  }

  .news-grid-wide,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .documents-grid,
  .fee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-inline: 22px;
  }

  .footer-intro {
    grid-column: 1 / -1;
  }

  .footer-grid > div:nth-child(4) {
    grid-column: auto;
  }

  .footer-bottom {
    padding-inline: 22px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .institution-bar {
    min-height: 32px;
    padding-inline: 15px;
    font-size: 0.63rem;
  }

  .public-header {
    padding-inline: 15px;
  }

  .public-header .brand-copy small {
    display: none;
  }

  .public-header .brand-logo {
    width: 47px;
    height: 47px;
  }

  .public-header .brand-mark {
    width: 43px;
    height: 43px;
  }

  .hero-section {
    min-height: auto;
    padding-block: 58px 52px;
  }

  .hero-content h1 {
    font-size: clamp(2.35rem, 12vw, 3.55rem);
  }

  .hero-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn,
  .form-actions .btn {
    width: 100%;
  }

  .trust-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-visual {
    min-height: 360px;
  }

  .digital-core {
    transform: scale(0.72);
  }

  .floating-chip {
    font-size: 0.67rem;
  }

  .quick-services,
  .stats-grid,
  .metric-grid,
  .service-grid,
  .province-grid,
  .news-grid,
  .content-grid,
  .documents-grid,
  .fee-grid {
    grid-template-columns: 1fr;
  }

  .quick-services {
    margin-top: 20px;
  }

  .section {
    padding-block: 64px;
  }

  .page-hero {
    padding-block: 64px 54px;
  }

  .form-card,
  .auth-aside,
  .tracking-card {
    padding: 25px 20px;
    border-radius: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .requester-switch {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracking-result dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .tracking-result dd {
    margin-bottom: 9px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-block: 50px 38px;
  }

  .footer-intro,
  .footer-grid > div:nth-child(4) {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .dashboard-topbar {
    min-height: 68px;
    padding-inline: 15px;
  }

  .dashboard-content {
    padding: 19px 15px 30px;
  }

  .dashboard-welcome {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-welcome .btn {
    width: 100%;
  }

  .topbar-actions .btn {
    width: 42px;
    overflow: hidden;
    padding-inline: 0;
    color: transparent;
  }

  .topbar-actions .btn::before {
    color: var(--blue-800);
    content: "↪";
    font-size: 1rem;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .table-wrap table,
  .mini-table {
    min-width: 680px;
  }

  .inline-payment-form,
  .compact-form {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-payment-form > *,
  .compact-form > *,
  .inline-payment-form .btn,
  .compact-form .btn {
    width: 100%;
    flex: auto;
  }

  .professional-card {
    min-height: 0;
    border-radius: 20px;
  }

  .professional-card-head,
  .professional-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .professional-card-body {
    grid-template-columns: 1fr;
  }

  .photo-placeholder {
    width: 105px;
    height: 125px;
  }

  .professional-card-body dl {
    grid-template-columns: 1fr;
  }

  .flash-stack,
  .dashboard-body .flash-stack {
    top: 78px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .public-nav {
    width: 92vw;
    padding-inline: 18px;
  }

  .hero-visual {
    min-height: 310px;
  }

  .digital-core {
    transform: scale(0.61);
  }

  .chip-one {
    left: -2%;
  }

  .chip-two {
    right: -3%;
  }

  .chip-three {
    left: 5%;
  }

  .form-head,
  .panel-head,
  .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-card {
    min-height: 108px;
  }

  .horizontal-chart > div {
    grid-template-columns: 82px 1fr 30px;
    gap: 8px;
  }

  .professional-card-head,
  .professional-card-body,
  .professional-card-foot {
    padding-inline: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .status-pill,
  .public-nav a,
  .sidebar-nav a {
    border: 1px solid ButtonText;
  }
}

@media print {
  body,
  body.dashboard-body {
    background: var(--white) !important;
    color: #000 !important;
  }

  .institution-bar,
  .public-header,
  .public-footer,
  .sidebar,
  .dashboard-topbar,
  .sidebar-backdrop,
  .menu-backdrop,
  .flash-stack,
  .btn,
  button,
  .motion-canvas {
    display: none !important;
  }

  .dashboard-main {
    margin: 0 !important;
  }

  .dashboard-content {
    max-width: none !important;
    padding: 0 !important;
  }

  .dashboard-card,
  .table-card,
  .chart-card,
  .professional-card,
  .metric-card {
    break-inside: avoid;
    box-shadow: none !important;
  }

  a[href]::after {
    content: none !important;
  }
}
