/* ==============================================================================
   Feuille de style unifiée Flight Ecosystem — Design System Cockpit & Aero (#1152)
   flight-es.fr (Portail, Mon Compte, Accueil & Pages publiques)
   ============================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/static/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/static/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/static/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/static/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:focus-visible {
  outline: 2px solid #2F5585;
  outline-offset: 2px;
}

html.dark :focus-visible {
  outline-color: #60a5fa;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 9999;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  background-color: #1E3A5F;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
}

:root {
  color-scheme: light dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mono, .readout {
  font-family: 'JetBrains Mono', monospace;
}

.readout {
  letter-spacing: 0.02em;
}

/* Surfaces et cartes à élévation */
.surface-card {
  background-color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.surface-card-hover:hover {
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
}

/* Squelettes animés (Shimmer) */
.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.375rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Navigation items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.nav-item[aria-current="page"] {
  background-color: #f0f4f9;
  color: #1e3a5f;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #1e3a5f;
}

/* ==============================================================================
   MODE SOMBRE COCKPIT (html.dark)
   ============================================================================== */

html.dark body {
  background-color: #0b111a;
  color: #e2e8f0;
}

html.dark .surface-card {
  background-color: #111a28;
  border-color: rgba(51, 65, 85, 0.65);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.35);
}

html.dark .surface-card-hover:hover {
  border-color: rgba(100, 116, 139, 0.75);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.6);
}

html.dark header {
  background-color: rgba(17, 26, 40, 0.95) !important;
  border-color: rgba(51, 65, 85, 0.7) !important;
}

html.dark footer {
  background-color: #0b111a !important;
  border-color: rgba(51, 65, 85, 0.6) !important;
}

html.dark .bg-white {
  background-color: #111a28 !important;
}

html.dark .bg-slate-50 {
  background-color: #0d1520 !important;
}

html.dark .bg-slate-100 {
  background-color: #172335 !important;
}

html.dark .text-slate-900 {
  color: #f1f5f9 !important;
}

html.dark .text-slate-800 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-700 {
  color: #cbd5e1 !important;
}

html.dark .text-slate-600 {
  color: #94a3b8 !important;
}

html.dark .text-slate-500 {
  color: #64748b !important;
}

html.dark .text-slate-400 {
  color: #475569 !important;
}

html.dark .border-slate-200 {
  border-color: rgba(51, 65, 85, 0.6) !important;
}

html.dark .border-slate-300 {
  border-color: rgba(71, 85, 105, 0.8) !important;
}

html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(51, 65, 85, 0.5) !important;
}

html.dark .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(51, 65, 85, 0.6) !important;
}

html.dark .skeleton-box {
  background: linear-gradient(90deg, #172335 25%, #253852 50%, #172335 75%);
  background-size: 200% 100%;
}

html.dark input, html.dark select, html.dark textarea {
  background-color: #172335 !important;
  color: #f1f5f9 !important;
  border-color: rgba(71, 85, 105, 0.8) !important;
}

html.dark input::placeholder, html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark .nav-item {
  color: #94a3b8;
}

html.dark .nav-item:hover {
  background-color: #172335;
  color: #f8fafc;
}

html.dark .nav-item[aria-current="page"] {
  background-color: #1b2f48;
  color: #60a5fa;
  box-shadow: inset 3px 0 0 #3b82f6;
}

/* Densité compacte pour tableaux métier */
body.density-compact table th {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  font-size: 0.6875rem !important;
}

body.density-compact table td {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  font-size: 0.75rem !important;
}
