/* ===== Variables CSS ===== */
:root {
    --primary-color: #3b82f6;     /* Bleu primaire */
    --secondary-color: #10b981;   /* Vert secondaire */
    --warning-color: #f59e0b;     /* Jaune pour les avertissements */
    --danger-color: #ef4445;      /* Rouge pour les erreurs */
    --text-color: #333;          /* Couleur du texte */
    --light-gray: #ecf0f1;       /* Gris clair pour les cartes */
    --highlight-color: #fff2a8;  /* Jaune clair pour la surbrillance */
    --border-radius: 8px;        /* Bordures arrondies */
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  /* Ombre légère */
    --card-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Ombre pour les cartes au survol */
    --success-color: #28a745;     /* Vert pour les succès */
    --info-color: #17a2b8;       /* Bleu pour les infos */
}

/* ===== Réinitialisation et style de base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Barre de navigation ===== */
nav.navbar {
    background-color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===== Boutons ===== */
.btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* Bouton Voir */
.btn-view {
    background-color: #0dcaf0;
    color: white;
    border: 1px solid #0dcaf0;
}

.btn-view:hover {
    background-color: #31d2f2;
    border-color: #31d2f2;
}

/* Bouton Ouvrir */
.btn-open {
    background-color: #198754;
    color: white;
    border: 1px solid #198754;
}

.btn-open:hover {
    background-color: #20c997;
    border-color: #20c997;
}

/* Bouton Modifier */
.btn-edit {
    background-color: #ffc107;
    color: black;
    border: 1px solid #ffc107;
}

.btn-edit:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

/* Bouton Supprimer */
.btn-delete {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Bouton Primaire */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ===== Alertes (messages flash) ===== */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border-left-color: var(--info-color);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

/* ===== Entrée Tailwind v4 ===== */
@import "tailwindcss";

/* Base — typo système, confort visuel */
@layer base {
  :root {
    /* Palette de marque (ex. "brand") */
    --brand-50:  #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-300: #93c5fd;
    --brand-400: #60a5fa;
    --brand-500: #3b82f6; /* primaire */
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;
  }
  html {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    scroll-behavior: smooth;
  }
}

/* Composants — classes utilitaires composées */
@layer components {
  /* Boutons */
  .btn { @apply inline-flex items-center gap-2 rounded-md transition focus:outline-none focus:ring-2 focus:ring-blue-500; }
  .btn-primary { @apply bg-blue-600 text-white hover:bg-blue-700 px-3 py-2; }

  /* Inputs / textarea */
  .input { @apply block w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500; }

  /* Badges */
  .badge { @apply inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-full; }
  .badge-primary { @apply bg-blue-100 text-blue-800; }
  .badge-success { @apply bg-green-100 text-green-800; }
  .badge-warning { @apply bg-yellow-100 text-yellow-800; }
  .badge-danger  { @apply bg-red-100 text-red-800; }

  /* Navbar links */
  .nav-link { @apply inline-flex items-center text-sm text-gray-700 hover:text-blue-600; }

  /* Card */
  .card { @apply rounded-lg border border-gray-200 bg-white shadow-sm; }

  /* Pagination (container + items) */
  .pagination { @apply flex items-center justify-center gap-2 mt-6; }
  .page-link { @apply inline-flex items-center justify-center px-3 py-1.5 border rounded-md text-sm; }
  .page-link-default { @apply border-gray-300 text-gray-700 hover:bg-gray-100; }
  .page-link-active { @apply border-blue-600 bg-blue-600 text-white; }
  .page-link-disabled { @apply border-gray-200 text-gray-400 cursor-not-allowed; }
}

/* Couleurs par type de fichier */
.badge-type-txt { background-color: #6c757d; color: white; }
.badge-type-md { background-color: #6f42c1; color: white; }
.badge-type-docx { background-color: #0d6efd; color: white; }
.badge-type-pptx { background-color: #d63384; color: white; }
.badge-type-pdf { background-color: #dc3545; color: white; }
.badge-type-xlsx { background-color: #198754; color: white; }

.highlight {
    background-color: yellow;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}
<style>
  .auto-description-icon {
    color: #6c757d;  /* Couleur gris clair */
    font-size: 1.1em;
    margin-right: 5px;
  }
</style>
