/* Police supprimée - chargée via HTML optimisé */

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --background: #f4f2ed;
  --foreground: #2e2e2e;
  --card: #f4f2ed;
  --card-foreground: #2e2e2e;
  --popover: #ffffff;
  --popover-foreground: #2e2e2e;
  --primary: #3e5c3b;
  --primary-foreground: #f4f2ed;
  --secondary: #d8ccb5;
  --secondary-foreground: #2e2e2e;
  --muted: #d8ccb5;
  --muted-foreground: #2e2e2e;
  --accent: #c2a976;
  --accent-foreground: #2e2e2e;
  --destructive: hsl(0 84% 60%);
  --destructive-foreground: hsl(0 0% 98%);
  --border: #d8ccb5;
  --input: #d8ccb5;
  --ring: #c2a976;
  --chart-1: hsl(203.8863 88.2845% 53.1373%);
  --chart-2: hsl(159.7826 100% 36.0784%);
  --chart-3: hsl(42.0290 92.8251% 56.2745%);
  --chart-4: hsl(147.1429 78.5047% 41.9608%);
  --chart-5: hsl(341.4894 75.2000% 50.9804%);
  --sidebar: hsl(180 6.6667% 97.0588%);
  --sidebar-foreground: hsl(210 25% 7.8431%);
  --sidebar-primary: hsl(203.8863 88.2845% 53.1373%);
  --sidebar-primary-foreground: hsl(0 0% 100%);
  --sidebar-accent: hsl(211.5789 51.3514% 92.7451%);
  --sidebar-accent-foreground: hsl(203.8863 88.2845% 53.1373%);
  --sidebar-border: hsl(205.0000 25.0000% 90.5882%);
  --sidebar-ring: hsl(202.8169 89.1213% 53.1373%);
  --font-sans: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 0.75rem;
  --shadow-2xs: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-xs: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-sm: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 1px 2px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 1px 2px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-md: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 2px 4px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-lg: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 4px 6px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-xl: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 8px 10px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-2xl: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --tracking-normal: 0em;
  --spacing: 0.25rem;
}

/* Accessibilité - Focus visible pour navigation clavier */
:focus-visible { 
  outline: 3px solid #2563eb; 
  outline-offset: 3px; 
}

.dark {
  --background: #2e2e2e;
  --foreground: #f4f2ed;
  --card: #2e2e2e;
  --card-foreground: #f4f2ed;
  --popover: #1a1a1a;
  --popover-foreground: #f4f2ed;
  --primary: #3e5c3b;
  --primary-foreground: #f4f2ed;
  --secondary: #c2a976;
  --secondary-foreground: #f4f2ed;
  --muted: #c2a976;
  --muted-foreground: #f4f2ed;
  --accent: #d8ccb5;
  --accent-foreground: #2e2e2e;
  --destructive: hsl(356.3033 90.5579% 54.3137%);
  --destructive-foreground: hsl(0 0% 100%);
  --border: #c2a976;
  --input: #c2a976;
  --ring: #d8ccb5;
  --chart-1: hsl(203.8863 88.2845% 53.1373%);
  --chart-2: hsl(159.7826 100% 36.0784%);
  --chart-3: hsl(42.0290 92.8251% 56.2745%);
  --chart-4: hsl(147.1429 78.5047% 41.9608%);
  --chart-5: hsl(341.4894 75.2000% 50.9804%);
  --sidebar: hsl(228 9.8039% 10%);
  --sidebar-foreground: hsl(0 0% 85.0980%);
  --sidebar-primary: hsl(202.8169 89.1213% 53.1373%);
  --sidebar-primary-foreground: hsl(0 0% 100%);
  --sidebar-accent: hsl(205.7143 70% 7.8431%);
  --sidebar-accent-foreground: hsl(203.7736 87.6033% 52.5490%);
  --sidebar-border: hsl(205.7143 15.7895% 26.0784%);
  --sidebar-ring: hsl(202.8169 89.1213% 53.1373%);
  --font-sans: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 0.75rem;
  --shadow-2xs: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-xs: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-sm: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 1px 2px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 1px 2px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-md: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 2px 4px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-lg: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 4px 6px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-xl: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00), 0px 8px 10px -1px hsl(202.8169 89.1213% 53.1373% / 0.00);
  --shadow-2xl: 0px 2px 0px 0px hsl(202.8169 89.1213% 53.1373% / 0.00);
}

.hero-gradient {
  background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
}

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

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

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply font-sans antialiased bg-background text-foreground;
    font-weight: 400; /* Nunito Sans Regular (équivalent Avenir Next Regular) pour les paragraphes */
  }

  h1, h2, h3, h4, h5, h6 {
    @apply font-sans;
    font-weight: 600; /* Nunito Sans Semi-Bold (équivalent Avenir Next Demi Bold) pour les titres */
  }
}

@layer utilities {
  /* Classes pour les spécificités typographiques - Nunito Sans (équivalent Avenir Next) */
  .font-logo-light {
    font-weight: 200; /* Nunito Sans Extra Light (équivalent Avenir Next Ultra Light) */
  }
  
  .font-logo-medium {
    font-weight: 500; /* Nunito Sans Medium (équivalent Avenir Next Medium) */
  }
  
  .font-text-regular {
    font-weight: 400; /* Nunito Sans Regular (équivalent Avenir Next Regular) */
  }
  
  .font-title-demi {
    font-weight: 600; /* Nunito Sans Semi-Bold (équivalent Avenir Next Demi Bold) */
  }
}

/* Styles pour l'impression PDF */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  /* Masquer la navigation et les boutons d'impression */
  nav,
  .print\:hidden {
    display: none !important;
  }
  
  /* Style des cartes */
  .card {
    background: white !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
  }
  
  /* Couleurs du texte */
  .text-primary {
    color: #1f2937 !important;
  }
  
  .text-muted-foreground {
    color: #6b7280 !important;
  }
  
  /* Optimisations pour les tableaux */
  .overflow-x-auto {
    overflow: visible !important;
  }
  
  table {
    page-break-inside: auto;
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8px !important;
    table-layout: fixed !important;
    transform: scale(0.85) !important;
    transform-origin: top left !important;
    margin-bottom: -50px !important;
  }
  
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
  
  th, td {
    padding: 1px 2px !important;
    font-size: 6px !important;
    border: 0.5px solid #d1d5db !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
    line-height: 1.1 !important;
    max-width: none !important;
  }
  
  /* En-têtes plus lisibles */
  th {
    font-size: 7px !important;
    font-weight: bold !important;
    padding: 2px 3px !important;
  }
  
  /* Première colonne un peu plus large */
  th:first-child, td:first-child {
    width: 10% !important;
    min-width: 50px !important;
  }
  
  /* Colonnes des totaux */
  th:nth-child(2), td:nth-child(2),
  th:nth-child(3), td:nth-child(3) {
    width: 5% !important;
    min-width: 35px !important;
  }
  
  /* Colonnes des lots */
  th:nth-child(n+4), td:nth-child(n+4) {
    width: 4.5% !important;
    min-width: 30px !important;
  }
  
  /* Réduire les marges */
  .pt-24 {
    padding-top: 1rem !important;
  }
  
  .mb-8, .mb-12 {
    margin-bottom: 0.5rem !important;
  }
  
  .px-4, .px-6 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Format de page optimisé */
  @page {
    size: A4 landscape;
    margin: 0.5cm;
  }
  
  @page :first {
    size: A4 landscape;
    margin: 0.5cm;
  }
  
  html {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Conteneur principal optimisé */
  .max-w-full {
    max-width: none !important;
    width: 100% !important;
  }
  
  /* Réduire les badges */
  .badge {
    font-size: 5px !important;
    padding: 0px 1px !important;
    line-height: 1 !important;
  }
}

/* Styles pour le carrousel Embla */
.embla {
  overflow: hidden;
}

.embla__container {
  display: flex;
  gap: 1.5rem;
}

.embla__slide {
  flex: 0 0 auto;
  min-width: 0;
}
