@font-face {
  font-family: 'Noto Sans';
  src: url('../fonts/NotoSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('../fonts/NotoSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('../fonts/NotoSans-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marque w'azɔ */
  --brand-slate: #1E293B;
  --brand-turquoise: #14B8A6;
  --brand-turquoise-hover: #0F766E;
  --brand-gold: #F59E0B;
  --brand-gold-dark: #92400E;

  /* Surfaces & Fonds */
  --surface-default: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --surface-card: #FFFFFF;
  --surface-dark: #1E293B;

  /* Typographie & Contraste */
  --font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;

  /* Actions */
  --action-primary: #14B8A6;
  --action-primary-hover: #0F766E;
  --action-text: #1E293B;
  --action-text-hover: #FFFFFF;

  /* Sémantique & Alertes */
  --color-success: #0F766E;
  --color-warning: #D97706;
  --color-danger: #B91C1C;
  --color-info: #1D4ED8;

  /* Bordures & Rayons */
  --border-light: #E2E8F0;
  --border-default: #CBD5E1;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Ombres */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--surface-subtle);
  -webkit-font-smoothing: antialiased;
}

/* Typographie spécifique */
h1, h2, h3, h4, h5, h6 {
  color: var(--brand-slate);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Layout w'azɔ */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar ardoise */
.sidebar {
  width: 260px;
  background-color: var(--brand-slate);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header img.logo {
  height: 32px;
  width: auto;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #94A3B8;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
}

.nav-item.active {
  background-color: var(--brand-turquoise);
  color: var(--brand-slate);
}

.nav-item img.icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.nav-item.active img.icon {
  filter: brightness(0);
  opacity: 1;
}

/* Contenu Principal */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.top-bar {
  background-color: var(--surface-default);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-body {
  padding: 32px;
  flex: 1;
}

/* Boutons w'azɔ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--action-primary);
  color: var(--action-text);
  border-color: var(--action-primary);
}

.btn-primary:hover {
  background-color: var(--action-primary-hover);
  color: var(--action-text-hover);
}

.btn-secondary {
  background-color: var(--surface-default);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background-color: var(--surface-subtle);
  border-color: var(--text-secondary);
}

/* Cartes (Cards) */
.card {
  background-color: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.badge-turquoise {
  background-color: #CCFBF1;
  color: #0F766E;
}

.badge-gold {
  background-color: #FEF3C7;
  color: var(--brand-gold-dark);
}

.badge-danger {
  background-color: #FEE2E2;
  color: var(--color-danger);
}

.badge-slate {
  background-color: #E2E8F0;
  color: var(--brand-slate);
}

/* Formulaires */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background-color: var(--surface-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-turquoise);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* ========================================================
   RESPONSIVE MOBILE & TABLET w'azɔ
   ======================================================== */

.mobile-top-header {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  /* Layout principal sur mobile */
  .app-container {
    flex-direction: column !important;
    min-height: 100vh;
  }

  /* Header mobile avec logo et burger */
  .mobile-top-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background-color: var(--brand-slate);
    padding: 12px 16px;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .mobile-top-header .mobile-logo {
    height: 28px;
    width: auto;
  }

  .btn-burger {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    line-height: 1;
  }

  /* Tiroir latéral mobile (Off-canvas) */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -290px;
    width: 280px !important;
    height: 100vh !important;
    z-index: 2000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
  }

  .sidebar.open {
    left: 0 !important;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1999;
  }

  .sidebar-overlay.active {
    display: block !important;
  }

  /* Barre d'en-tête de page */
  .top-bar {
    padding: 14px 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .top-bar > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .top-bar .btn {
    flex: 1 1 auto;
    font-size: 13px !important;
    padding: 8px 12px !important;
    text-align: center;
    justify-content: center;
  }

  /* Corps de page */
  .page-body {
    padding: 16px 12px 84px 12px !important; /* réserve d'espace pour la bottom nav */
  }

  /* Grille des statistiques et KPIs */
  .stats-grid, div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Cartes */
  .card {
    padding: 16px !important;
    border-radius: var(--radius-md) !important;
  }

  /* Tableaux défilables horizontalement */
  .table-responsive, table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Barre de navigation basse pour smartphone (style application native) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1E293B;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 990;
    justify-content: space-around;
    align-items: center;
    padding: 4px 2px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    flex: 1;
    padding: 6px 0;
    transition: all 0.2s;
  }

  .mobile-nav-item.active {
    color: var(--brand-turquoise) !important;
  }

  .mobile-nav-item .mobile-icon {
    font-size: 18px;
    line-height: 1;
  }

  /* Kanban mobile avec défilement horizontal tactile fluide */
  .kanban-board {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding-bottom: 16px !important;
  }

  .kanban-column {
    min-width: 280px !important;
    flex: 0 0 280px !important;
    scroll-snap-align: start !important;
  }

  /* Gantt et timelines défilables sur mobile */
  .gantt-chart-container, .timeline-container, .gantt-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 480px) {
  .stats-grid, div[style*="grid-template-columns: repeat(4"], div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}

