/**
 * Feuille de style principale CongoMuv (E-Ticket)
 * Variables CSS selon la charte graphique ONATRA
 * Design professionnel, épuré et intuitif
 */

/* Variables de couleurs ONATRA */
:root {
  /* Palette principale */
  --color-onatra: #0B63B7;
  --color-onatra-dark: #0B2540;
  --color-accent: #F59E0B;
  --color-white: #FFFFFF;
  --color-black: #111827;
  
  /* Neutres */
  --color-gray-50: #F8FAFC;
  --color-gray-100: #F1F5F9;
  --color-gray-200: #E2E8F0;
  --color-gray-500: #64748B;
  --color-gray-700: #334155;
  
  /* États */
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #06B6D4;
  
  /* Typographie */
  --font-display: 'Inter', 'Roboto', system-ui, sans-serif;
  --font-body: 'Inter', 'Roboto', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;
  
  /* Espacements */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Bordures */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Ombres */
  --shadow-soft: 0 2px 8px rgba(11, 99, 183, 0.08);
  --shadow-medium: 0 4px 16px rgba(11, 99, 183, 0.12);
  --shadow-large: 0 8px 24px rgba(11, 99, 183, 0.16);
}

/* Import de la police Inter depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset et base */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-onatra-dark);
  background-color: var(--color-gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-onatra-dark);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 28px;
  font-weight: 700;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

/* Composants boutons */
.btn-primary {
  background-color: var(--color-onatra);
  color: var(--color-white);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.12s ease;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: var(--shadow-medium);
}

.btn-primary:focus {
  outline: none;
  ring: 2px;
  ring-color: rgba(11, 99, 183, 0.3);
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-onatra);
  border: 1px solid var(--color-onatra);
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-secondary:hover {
  background-color: var(--color-gray-50);
}

/* Composants inputs */
.input-field {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  font-size: 16px;
  transition: all 0.12s ease;
  background-color: var(--color-white);
}

.input-field:focus {
  outline: none;
  border-color: var(--color-onatra);
  box-shadow: 0 0 0 3px rgba(11, 99, 183, 0.1);
}

.input-field::placeholder {
  color: var(--color-gray-500);
}

/* Composants cards */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--spacing-xl);
  transition: all 0.12s ease;
}

.card:hover {
  box-shadow: var(--shadow-medium);
}

/* Badges et tags */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background-color: #EEF6FF;
  color: var(--color-onatra);
}

/* Code ticket (monospace) */
.ticket-code {
  font-family: var(--font-mono);
  font-size: 14px;
  background-color: var(--color-gray-100);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-onatra-dark);
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible pour l'accessibilité */
*:focus-visible {
  outline: 2px solid var(--color-onatra);
  outline-offset: 2px;
}

/* Cible tactile minimale (44x44px) */
button, a, input[type="submit"], input[type="button"] {
  min-height: 44px;
  min-width: 44px;
}


/* Shell admin */
body.admin-shell {
  background:
    radial-gradient(circle at top right, rgba(11, 99, 183, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f8fafc 45%, #f1f5f9 100%);
}

body.admin-shell main {
  min-height: calc(100vh - 4rem);
}

body.admin-shell main > div:first-child h1 {
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

body.admin-shell .bg-white.rounded-2xl,
body.admin-shell .bg-white.rounded-xl,
body.admin-shell .bg-white.p-6.rounded-2xl,
body.admin-shell .bg-white.p-6.rounded-xl,
body.admin-shell .bg-white.rounded-2xl.shadow-md,
body.admin-shell .bg-white.rounded-xl.shadow-md {
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

body.admin-shell .shadow-md {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

body.admin-shell .menu-item {
  position: relative;
  border: 1px solid transparent;
}

body.admin-shell .menu-item:hover {
  border-color: rgba(11, 99, 183, 0.12);
  transform: translateX(2px);
}

body.admin-shell .admin-sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

body.admin-shell .admin-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 9999px;
}

body.admin-shell table {
  border-collapse: separate;
  border-spacing: 0;
}

body.admin-shell thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

body.admin-shell tbody td {
  color: #1e293b;
}

body.admin-shell tbody tr {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

body.admin-shell tbody tr:hover {
  background-color: rgba(248, 250, 252, 0.9);
}

body.admin-shell input[type="text"],
body.admin-shell input[type="email"],
body.admin-shell input[type="number"],
body.admin-shell input[type="date"],
body.admin-shell input[type="time"],
body.admin-shell input[type="password"],
body.admin-shell input[type="tel"],
body.admin-shell select,
body.admin-shell textarea {
  width: 100%;
  border: 1px solid #dbe4ee;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.85rem 0.95rem;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body.admin-shell textarea {
  min-height: 120px;
  resize: vertical;
}

body.admin-shell input:focus,
body.admin-shell select:focus,
body.admin-shell textarea:focus {
  outline: none;
  border-color: rgba(11, 99, 183, 0.7);
  box-shadow: 0 0 0 4px rgba(11, 99, 183, 0.10);
  background: #ffffff;
}

body.admin-shell label {
  color: #334155;
}

body.admin-shell button[type="submit"],
body.admin-shell a.bg-onatra,
body.admin-shell a.bg-gray-500,
body.admin-shell a.bg-red-500,
body.admin-shell a.bg-green-500,
body.admin-shell a.bg-purple-500,
body.admin-shell a.bg-orange-500 {
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

body.admin-shell .bg-green-100.border,
body.admin-shell .bg-red-100.border,
body.admin-shell .bg-amber-50.border,
body.admin-shell .bg-yellow-100.border {
  border-radius: 1rem;
}

body.admin-shell .overflow-x-auto {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.65) transparent;
}

@media (max-width: 1023px) {
  body.admin-shell main {
    min-height: auto;
  }
}
