:root {
  color-scheme: dark light;
  --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg-gradient-start: #101836;
  --bg-gradient-end: #090d1f;
  --glass-strong: #202532;
  --glass-medium: #181c25;
  --glass-soft: rgba(255, 255, 255, 0.04);
  --color-border: rgba(148, 163, 184, 0.16);
  --color-text: #e8edf7;
  --color-text-soft: rgba(226, 232, 240, 0.76);
  --color-muted: rgba(148, 163, 184, 0.8);
  --color-heading: #ffffff;
  --color-primary: #4f46ef;
  --color-primary-soft: rgba(79, 70, 239, 0.12);
  --color-primary-strong: rgba(79, 70, 239, 0.28);
  --color-warning: #f59e0b;
  --color-success: #34d399;
  --shadow-soft: 0 25px 45px rgba(15, 23, 42, 0.45);
  --radius-lg: 28px;
  --radius-xl: 32px;
  --sidebar-width: 280px;
  --transition: 180ms ease;
}

[data-theme="light"] {
  --bg-gradient-start: #f1f5ff;
  --bg-gradient-end: #e2e8f0;
  --glass-strong: rgba(255, 255, 255, 0.96);
  --glass-medium: rgba(255, 255, 255, 0.92);
  --glass-soft: rgba(148, 163, 184, 0.16);
  --color-border: rgba(99, 102, 241, 0.16);
  --color-text: #1f2937;
  --color-text-soft: rgba(55, 65, 81, 0.76);
  --color-muted: rgba(107, 114, 128, 0.8);
  --color-heading: #0f172a;
  --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  min-height: 100vh;
  background: radial-gradient(120% 120% at 85% 10%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(90% 120% at 20% 20%, rgba(14, 165, 233, 0.18), transparent 60%),
    linear-gradient(160deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.sidebar-collapsed {
  --sidebar-width: 96px;
}

body.mobile-nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

a:hover,
a:focus {
  color: #c7d2fe;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

select {
  background-color: var(--glass-medium);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
}

select option,
select optgroup {
  background-color: #0b1224;
  color: #cbd5f5;
}

[data-theme="light"] select option,
[data-theme="light"] select optgroup {
  background-color: #ffffff;
  color: #1f2937;
}

.app-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 90% at 20% 15%, rgba(79, 70, 239, 0.2), transparent 55%),
    radial-gradient(80% 85% at 80% 0%, rgba(14, 165, 233, 0.2), transparent 60%);
  opacity: 0.6;
  z-index: 0;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 0;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.app-frame {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  column-gap: 0;
  position: relative;
  transition: grid-template-columns var(--transition);
}

.shell-sidebar {
  background: var(--glass-strong);
  border: 1px solid var(--color-border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
  transition: padding var(--transition), gap var(--transition), box-shadow var(--transition);
  z-index: 99;
  border-radius: 0;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(79, 70, 239, 0.22);
  color: inherit;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: rgba(79, 70, 239, 0.32);
  box-shadow: 0 14px 28px rgba(79, 70, 239, 0.24);
}

[data-theme="light"] .sidebar-toggle {
  background: rgba(79, 70, 239, 0.16);
  color: #312e81;
}

[data-theme="light"] .sidebar-toggle:hover,
[data-theme="light"] .sidebar-toggle:focus-visible {
  background: rgba(79, 70, 239, 0.24);
}

.sidebar-toggle:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.6);
  outline-offset: 2px;
}

.toggle-icon {
  font-size: 16px;
  line-height: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.24);
  color: #c7d2fe;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  color: var(--color-muted);
  font-size: 13px;
}

.sidebar-partners {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 6px;
  align-items: center;
  width: 100%;
}

.partner-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--glass-weak);
  text-align: center;
}

.partner-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  min-width: 38px;
}

.partner-image {
  width: 70%;
  max-height: 100px;
  object-fit: contain;
  display: block;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section + .sidebar-section {
  margin-top: 24px;
}

.sidebar-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  font-weight: 600;
  padding-left: 14px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 18px;
  color: var(--color-text);
  font-weight: 500;
  background: transparent;
}

.sidebar-link .link-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sidebar-link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-link.is-disabled:hover,
.sidebar-link.is-disabled:focus-visible {
  background: transparent;
}

.sidebar-link:hover {
  background: rgba(79, 70, 239, 0.1);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(79, 70, 239, 0.8) 100%);
  box-shadow: 0 18px 32px rgba(79, 70, 239, 0.4);
  color: #fff;
}

.sidebar-link .icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link .link-label {
  flex: 1;
  font-size: 14px;
  min-width: 0;
}

.sidebar-link .badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.32);
  color: #eef2ff;
  font-size: 12px;
  font-weight: 600;
}

[data-theme="light"] .sidebar-link .badge {
  background: rgba(79, 70, 239, 0.18);
  color: #312e81;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.82);
}

.sidebar-foot .tenant-chip {
  border-radius: 22px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  width: 225px;
}

[data-theme="light"] .sidebar-foot .tenant-chip {
  background: rgba(255, 255, 255, 0.8);
}

.tenant-avatar {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: rgba(79, 70, 239, 0.28);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.tenant-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tenant-name {
  font-weight: 600;
  font-size: 15px;
}

.tenant-role {
  font-size: 12px;
  color: var(--color-muted);
}

.shell-sidebar.collapsed,
body.sidebar-collapsed .shell-sidebar {
  padding: 28px 18px;
  align-items: center;
}

body.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.shell-sidebar.collapsed .brand-text,
body.sidebar-collapsed .brand-text,
.shell-sidebar.collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-section-title,
.shell-sidebar.collapsed .tenant-meta,
body.sidebar-collapsed .tenant-meta,
.shell-sidebar.collapsed .logout-label,
body.sidebar-collapsed .logout-label,
.shell-sidebar.collapsed .sidebar-partners,
body.sidebar-collapsed .sidebar-partners {
  display: none;
}

.shell-sidebar.collapsed .sidebar-section,
body.sidebar-collapsed .sidebar-section {
  align-items: center;
}

.shell-sidebar.collapsed .sidebar-nav,
body.sidebar-collapsed .sidebar-nav {
  align-items: center;
}

.shell-sidebar.collapsed .partner-label,
body.sidebar-collapsed .partner-label {
  display: none;
}

body.sidebar-collapsed .partner-image {
  width: 80%;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 12px;
  gap: 0;
  position: relative;
}

body.sidebar-collapsed .sidebar-link .icon {
  width: 22px;
  height: 22px;
}

body.sidebar-collapsed .sidebar-link svg {
  width: 22px;
  height: 22px;
}

body.sidebar-collapsed .sidebar-link .link-text {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  background: var(--glass-strong);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 10px 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--color-text);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 20;
}

body.sidebar-collapsed .sidebar-link.active .link-text {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(79, 70, 239, 0.8) 100%);
  color: #fff;
  box-shadow: 0 18px 32px rgba(79, 70, 239, 0.4);
}

body.sidebar-collapsed .sidebar-link .badge {
  margin-left: 0;
}

body.sidebar-collapsed .sidebar-link:hover .link-text,
body.sidebar-collapsed .sidebar-link:focus-visible .link-text {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

body.sidebar-collapsed .sidebar-foot {
  align-items: center;
}

body.sidebar-collapsed .sidebar-foot .tenant-chip {
  padding: 12px;
  flex-direction: column;
  gap: 10px;
}

body.sidebar-collapsed .tenant-avatar {
  width: 40px;
  height: 40px;
}

body.sidebar-collapsed .logout-link {
  justify-content: center;
}

.logout-icon {
  font-size: 15px;
  line-height: 1;
}

.logout-label {
  white-space: nowrap;
}

.logout-link {
  font-size: 13px;
  color: var(--color-muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.shell-main {
  background: var(--glass-medium);
  border: 1px solid var(--color-border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(28px);
  border-radius: 0;
}

.shell-main-standalone {
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  margin: 0 auto;
}

.shell-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
  gap: 24px;
  margin-bottom: 36px;
}

.header-greeting {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-eyebrow {
  font-size: 14px;
  color: var(--color-muted);
}

.header-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0;
}

.header-subtitle {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 15px;
}

.header-tools {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-fab {
  position: fixed;
  top: 20px;
  right: 20px;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(11, 15, 28, 0.72);
  box-shadow: 0 18px 30px rgba(5, 7, 16, 0.4);
  color: var(--color-heading);
  cursor: pointer;
  z-index: 120;
  backdrop-filter: blur(18px);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.mobile-nav-fab .fab-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.mobile-nav-fab .fab-icon span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-nav-fab .fab-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.mobile-nav-fab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

body.mobile-nav-open .mobile-nav-fab {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 25px 40px rgba(79, 70, 239, 0.35);
}

body.mobile-nav-open .mobile-nav-fab .fab-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.mobile-nav-open .mobile-nav-fab .fab-icon span:nth-child(2) {
  opacity: 0;
}

body.mobile-nav-open .mobile-nav-fab .fab-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-backdrop {
  display: none;
}

.header-search {
  position: relative;
}

.header-search input[type="search"] {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  padding: 14px 16px 14px 44px;
  color: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .header-search input[type="search"] {
  background: rgba(248, 250, 252, 0.8);
}

.header-search input[type="search"]::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.header-search .search-icon {
  position: absolute;
  inset: 0 auto 0 16px;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: rgba(148, 163, 184, 0.7);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.header-moa-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.header-moa-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.header-actions .meta-pill {
  flex-shrink: 0;
}

.header-project-switcher {
  flex: 1 1 280px;
  min-width: 240px;
}

.sidebar-partners {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center; /* centre horizontalement */
    justify-content: center;
    text-align: center;
}

.partner-logo img {
    display: block;
    margin: 0 auto; /* sécurité */
}


.project-switcher {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.project-switcher-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-switcher-header label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 600;
}

.project-switcher-meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-heading);
}

.project-switcher-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(11, 16, 30, 0.85);
}

.project-switcher select {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--color-heading);
  font-weight: 600;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.project-switcher select:focus {
  outline: none;
}

.project-switcher-icon {
  font-size: 18px;
}

.project-switcher-caret {
  font-size: 14px;
  color: var(--color-muted);
}

[data-theme="light"] .project-switcher {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(79, 70, 239, 0.18);
}

[data-theme="light"] .project-switcher-field {
  background: rgba(248, 250, 252, 0.9);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn .icon svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 18px 32px rgba(79, 70, 239, 0.4);
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.16);
  color: var(--color-heading);
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.26);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-heading);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}

[data-theme="light"] .meta-pill {
  background: rgba(79, 70, 239, 0.12);
  color: #4338ca;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

[data-theme="light"] .page-intro {
  background: rgba(255, 255, 255, 0.72);
}

.page-intro-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
}

.page-intro h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-heading);
}

.page-intro p {
  margin: 0;
  color: var(--color-text-soft);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1010px;
}

[data-theme="light"] .dashboard-timeline {
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-timeline header {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-heading);
}

.timeline-wrapper {
  position: relative;
  padding: 12px 6px 6px;
  overflow-x: auto;
}

.timeline-items {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 8px 8px;
  min-width: 100%;
}

.timeline-line {
  position: sticky;
    top: 85px;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(90deg, #22d3ee, #6366f1, #f43f5e);
    opacity: 0.7;
    border-radius: 999px;
}

.timeline-item {
  position: relative;
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.timeline-year {
  padding: 10px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.14), rgba(99, 102, 241, 0.16));
  color: #c7d2fe;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .timeline-year {
  color: #312e81;
}

.timeline-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.35);
  display: grid;
  place-items: center;
  color: #e0f2fe;
  border: 4px solid #0f172a;
  z-index: 1;
}

[data-theme="light"] .timeline-marker {
  border-color: #f8fafc;
}

.timeline-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 14px 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .timeline-card {
  background: rgba(255, 255, 255, 0.96);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.timeline-card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--color-heading);
}

.timeline-date {
  font-size: 13px;
  font-weight: 600;
  color: #22d3ee;
}

[data-theme="light"] .timeline-date {
  color: #2563eb;
}

.timeline-block {
  margin: 6px 0 4px;
  color: var(--color-text);
  font-weight: 500;
}

.timeline-card-rows {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.timeline-card-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.timeline-card-row .timeline-date {
  min-width: 45px;
  margin-top: 2px;
}

.timeline-card-row .timeline-block {
  margin: 0;
  flex: 1;
  font-size: 14px;
}

.timeline-note {
  margin: 0;
  font-size: 13px;
  color: var(--color-muted);
}

@media (max-width: 720px) {
  .timeline-item {
    flex-basis: 220px;
  }

  .timeline-year {
    font-size: 14px;
  }

  .timeline-card h3 {
    font-size: 15px;
  }
}

.surface-card {
  background: rgba(15, 23, 42, 0.58);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .surface-card {
  background: rgba(255, 255, 255, 0.85);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.columns-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dashboard-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--color-muted);
}

.dashboard-footer .footer-links {
  display: flex;
  gap: 16px;
}

.dashboard-footer .footer-links a {
  color: var(--color-muted);
  font-size: 13px;
}

.dashboard-footer .footer-links a:hover {
  color: #c7d2fe;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
}

[data-theme="light"] .theme-switch {
  background: rgba(255, 255, 255, 0.86);
}

.theme-switch span {
  font-size: 13px;
  font-weight: 500;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.banana-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 21, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}

.banana-popup {
  background: var(--glass-strong);
  padding: 28px 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  color: var(--color-heading);
  font-size: 16px;
}

.pilot-requests-popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 11, 21, 0.78);
  z-index: 4000;
}

.pilot-requests-popup {
  position: fixed;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--glass-strong);
  padding: 28px 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  color: var(--color-heading);
  text-align: center;
}

.pilot-requests-popup h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.pilot-requests-popup p {
  margin: 0 0 18px;
  color: var(--color-muted);
}

.pilot-requests-popup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pilot-requests-popup-actions .btn {
  min-width: 160px;
}

@media (max-width: 1200px) {
  .app-shell {
    padding: 0;
  }

  .app-frame {
    grid-template-columns: 1fr;
  }

  .shell-sidebar {
    position: sticky;
    top: 24px;
    align-items: flex-start;
    overflow: hidden;
    gap: 24px;  
 }

  .shell-sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    border-radius: inherit;
    z-index: -1;
  }

  .sidebar-nav {
    flex-wrap: wrap;
    flex-direction: row;
  }

  .sidebar-link {
    flex: 1 0 calc(50% - 8px);
  }
}

@media (max-width: 900px) {
  .shell-header {
    grid-template-columns: 1fr;
  }

  .header-tools {
    width: 100%;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .header-moa-logo {
    display: none;
  }

  .mobile-nav-fab {
    display: inline-flex;
  }

  .header-project-switcher {
    width: 100%;
    min-width: 0;
  }

  .project-switcher,
  .project-switcher-field,
  .project-switcher select {
    width: 100%;
    min-width: 0;
  }

  .app-frame {
    display: flex;
    flex-direction: column;
  }

  .shell-main {
    border-radius: 0;
    padding: 0;
    width: 100%;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
   
  }

  .shell-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 86vw);
    max-width: 360px;
    height: 100vh;
    transform: translateX(-110%);
    padding: 32px 24px 24px;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(3, 7, 18, 0.65);
    border-radius: 0px;
  }

  .shell-sidebar::after {
    display: none;
  }

  body.mobile-nav-open .shell-sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: none;
  }

  .sidebar-link {
    flex: 1 0 100%;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 21, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    z-index: 90;
  }

  body.mobile-nav-open .mobile-nav-backdrop {
    display: block;
  }
}

.content-spacious {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(79, 70, 239, 0.12), rgba(14, 165, 233, 0.08));
  box-shadow: var(--shadow-soft);
}

.page-hero .eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin: 0 0 6px;
}

.page-hero h1 {
  margin: 0 0 8px;
}

.page-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card {
  min-width: 220px;
  padding: 16px;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-sub {
  color: var(--color-text-soft);
  font-size: 13px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--glass-medium);
  height: 45px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-elevated {
  border-radius: 16px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.table-elevated table {
  width: 100%;
}

.table-elevated th {
  background: var(--glass-medium);
}

.table-elevated td,
.table-elevated th {
  padding: 10px 12px;
}

.table-row-form .input-compact,
.table-row-form select {
  width: 100%;
}

.cell-title {
  font-weight: 600;
}

.cell-notes {
  min-width: 220px;
}

.stacked-field {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.accent-card {
  border: 1px solid rgba(79, 70, 239, 0.35);
  background: linear-gradient(180deg, rgba(79, 70, 239, 0.12), transparent);
}


@media (max-width: 720px) {
  .app-shell {
    padding: 0;
  }

  .shell-main {
    padding: 0;
  }

  .page-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* === Profil utilisateur === */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.5rem;
}

.profile-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.profile-card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: grid;
  place-items: center;
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 700;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-meta strong {
  font-size: 1.2rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-left: auto;
}

.profile-form {
  display: grid;
  gap: 1rem;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.profile-form label {
  font-weight: 600;
  color: #e2e8f0;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
}

.profile-form input:disabled,
.profile-form select:disabled,
.profile-form textarea:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.profile-form .helper-text {
  color: #94a3b8;
  font-size: 0.85rem;
}

.profile-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.profile-tab-button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.profile-tab-button.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3));
  border-color: rgba(56, 189, 248, 0.6);
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: grid;
  gap: 1rem;
}

.profile-alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
}

.profile-alert.success {
  border-color: rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
}

.profile-alert.error {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.profile-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.profile-cta.primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(99, 102, 241, 0.35));
  border-color: rgba(56, 189, 248, 0.6);
}

.profile-cta.danger {
  background: rgba(127, 29, 29, 0.6);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

@media (max-width: 980px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    width: 100%;
    margin-left: 0;
  }
}
