/* ============================================================
   EquipDoc — Documentation interne équipements
   Design system : navy / gris / blanc
   ============================================================ */

:root {
  --navy-900: #0a1628;
  --navy-800: #0f1e3d;
  --navy-700: #1a2b4a;
  --navy-600: #243b5c;
  --navy-500: #34507a;

  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50:  #f8fafc;

  --white: #ffffff;
  --success: #059669;
  --success-bg: #d1fae5;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #dc2626;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --header-h: 64px;
}

* { box-sizing: border-box; }

html {
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  display: none;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg { display: block; max-width: 100%; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-800);
  border-bottom: 1px solid var(--navy-900);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  color: var(--white);
}

.navbar-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--white);
}

.brand-mark {
  height: 38px;
  width: auto;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fff;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18);
}
.brand-mark img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.brand-stack { display: flex; flex-direction: column; line-height: 1.1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: -21px;
  height: 2px;
  background: var(--blue-500);
  border-radius: 2px;
  pointer-events: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-300);
  transition: background 120ms, color 120ms;
  position: relative;
}

.nav-link:hover {
  background: var(--navy-700);
  color: var(--white);
}

.nav-link.active {
  background: var(--navy-700);
  color: var(--white);
}


.nav-link svg { width: 16px; height: 16px; }

.nav-link.disabled {
  color: var(--gray-500);
  cursor: not-allowed;
  opacity: 0.6;
}

.nav-link.disabled:hover { background: transparent; color: var(--gray-500); }

.nav-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--navy-600);
  color: var(--gray-300);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}


.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-700);
  border: 1px solid var(--navy-600);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  width: 280px;
  color: var(--gray-300);
  font-size: 13px;
}

.nav-search svg { width: 14px; height: 14px; color: var(--gray-400); flex: none; }

.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.nav-search input::placeholder { color: var(--gray-400); }

.nav-search kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--navy-600);
  color: var(--gray-400);
  border: 1px solid var(--navy-500);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--navy-600);
  background: var(--navy-700);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, var(--blue-500));
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
}

.nav-user-role {
  font-size: 11px;
  color: var(--gray-400);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.breadcrumb a:hover { color: var(--navy-700); }
.breadcrumb svg { width: 12px; height: 12px; opacity: 0.6; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
}

.page-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  margin: 0;
}

.page-actions { display: flex; gap: 10px; }

/* ============================================================
   STATS
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  flex: none;
}
.stat-icon svg { width: 20px; height: 20px; }

.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.gray  { background: var(--gray-100); color: var(--gray-700); }

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px 0;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-trend {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.stat-trend.up { color: var(--success); }

/* ============================================================
   TOOLBAR
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 120ms;
}

.chip:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.chip.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.chip-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.chip.active .chip-count {
  background: var(--navy-600);
  color: var(--gray-200);
}

.toolbar-spacer { flex: 1; }

.toolbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  width: 280px;
}
.toolbar-search:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-50); }
.toolbar-search svg { width: 14px; height: 14px; color: var(--gray-400); flex: none; }
.toolbar-search input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-800);
  flex: 1;
  min-width: 0;
  background: transparent;
}

#cat-filter {
  appearance: none;
  height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  color: var(--gray-700);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 120ms;
}
#cat-filter:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-50); }
#cat-filter:hover { border-color: var(--gray-300); }

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle button {
  padding: 7px 10px;
  color: var(--gray-500);
  display: grid;
  place-items: center;
  border-right: 1px solid var(--gray-200);
}
.view-toggle button:last-child { border-right: none; }
.view-toggle button.active { background: var(--gray-100); color: var(--navy-800); }
.view-toggle svg { width: 16px; height: 16px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 120ms;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--navy-800);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-900); }

.btn-secondary {
  background: var(--white);
  color: var(--gray-800);
  border-color: var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-block { width: 100%; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ============================================================
   GRID + CARDS
   ============================================================ */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.equipment-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 160ms, box-shadow 160ms, border-color 160ms;
  cursor: pointer;
  position: relative;
}

.equipment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-media {
  height: 180px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--blue-50) 100%);
  display: grid;
  place-items: center;
  position: relative;
  border-bottom: 1px solid var(--gray-200);
}

.card-media img,
.card-media svg.equipment-illu {
  width: 75%;
  height: 75%;
  object-fit: contain;
}

.card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  color: var(--gray-400);
  transition: opacity 150ms, transform 150ms;
  z-index: 2;
  border: 1px solid var(--gray-200);
  opacity: 0;
}
.equipment-card:hover .card-fav,
.card-fav.active { opacity: 1; }

.card-fav:hover {
  color: var(--warning);
  background: var(--white);
  transform: scale(1.05);
}

.card-fav.active {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: var(--warning-bg);
}

.card-fav svg { width: 16px; height: 16px; }
.card-fav.active svg { fill: var(--warning); }

/* Flag / signaler */
.card-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  color: var(--gray-400);
  transition: opacity 150ms, transform 150ms, right 150ms;
  z-index: 2;
  border: 1px solid var(--gray-200);
  opacity: 0;
}
.equipment-card:hover .card-flag,
.card-flag.active { opacity: 1; }
.card-flag:hover { color: var(--danger); background: var(--white); transform: scale(1.05); }
.card-flag svg { width: 15px; height: 15px; }
.card-flag.active { color: var(--danger); background: #fee2e2; border-color: #fecaca; }
.card-flag.active svg { fill: var(--danger); }
/* Décalage à gauche quand fav visible (hover ou actif) */
.card-media:hover .card-flag,
.card-media:has(.card-fav.active) .card-flag { right: 52px; }

/* Ruban en haut du card-body quand doc signalée */
.card-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  color: #b91c1c;
  border-bottom: 1px solid #fecaca;
  padding: 7px 20px;
  font-size: 12px;
  font-weight: 500;
}
.card-ribbon svg { width: 13px; height: 13px; flex: none; }

/* Stat icon red */
.stat-icon.red { background: #fee2e2; color: #b91c1c; }

/* Detail : bouton signaler */
.btn-flag {
  background: #fff;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-flag:hover { background: #fef2f2; }
.btn-flag.active {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

/* ============================================================
   SIMPLE PAGE PATTERNS (guides, support, etc.)
   ============================================================ */

/* Liste d'éléments en une colonne (style guides / FAQ / liens) */
.list-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 880px;
}

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all 120ms;
  cursor: pointer;
}

.list-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.list-item-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  flex: none;
}
.list-item-icon svg { width: 20px; height: 20px; }
.list-item-icon.amber { background: var(--warning-bg); color: var(--warning); }
.list-item-icon.green { background: var(--success-bg); color: var(--success); }
.list-item-icon.navy  { background: var(--navy-800); color: #fff; }

.list-item-body { flex: 1; min-width: 0; }

.list-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.list-item-desc {
  font-size: 13.5px;
  color: var(--gray-600);
  margin: 0 0 10px;
  line-height: 1.5;
  text-wrap: pretty;
}

.list-item-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--gray-500);
}
.list-item-meta svg { width: 12px; height: 12px; }
.list-item-meta-item { display: inline-flex; align-items: center; gap: 5px; }

.list-item-arrow {
  align-self: center;
  color: var(--gray-400);
  flex: none;
}
.list-item-arrow svg { width: 18px; height: 18px; }
.list-item:hover .list-item-arrow { color: var(--navy-800); transform: translateX(2px); }

/* Sections en colonnes (catégorisation) */
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gray-300);
}

/* Cartes contact SAV */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
}

.contact-vendor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.contact-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--navy-800);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  flex: none;
}

.contact-vendor-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.2;
}

.contact-vendor-sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--gray-700);
  padding: 6px 0;
}

.contact-row svg { width: 14px; height: 14px; color: var(--gray-400); flex: none; }
.contact-row strong { color: var(--navy-900); font-weight: 500; }
.contact-row a { color: var(--blue-600); }
.contact-row a:hover { text-decoration: underline; }

.contact-row code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  background: var(--gray-100);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--navy-900);
}

.contact-hours {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.contact-hours svg { width: 12px; height: 12px; }

/* nav-user devient cliquable */
a.nav-user { text-decoration: none; cursor: pointer; transition: background 120ms, border-color 120ms; }
a.nav-user:hover { background: var(--navy-600); border-color: var(--navy-500); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--gray-50);
}

.auth-aside {
  background: var(--navy-900);
  color: var(--white);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.25), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(96, 165, 250, 0.12), transparent 50%);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.auth-brand .brand-mark { height: 44px; width: auto; border-radius: 10px; padding: 5px 7px; }
.auth-brand-text { font-size: 17px; font-weight: 600; }
.auth-brand-sub { font-size: 11px; color: var(--gray-400); letter-spacing: 0.06em; text-transform: uppercase; }

.auth-pitch {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.auth-pitch h2 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.2;
  text-wrap: balance;
}
.auth-pitch p {
  font-size: 15px;
  color: var(--gray-300);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 420px;
  text-wrap: pretty;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-200);
}
.auth-features svg { width: 18px; height: 18px; color: #60a5fa; flex: none; }

.auth-footer {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  font-size: 12px;
  color: var(--gray-500);
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  margin: 0 0 32px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.form-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-50);
}
.form-input::placeholder { color: var(--gray-400); }

.form-row-helpers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}
.form-check input { width: 15px; height: 15px; accent-color: var(--blue-600); }

.form-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-600);
}
.form-link:hover { text-decoration: underline; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--gray-200);
}

.auth-help {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { padding: 32px 24px; min-height: auto; }
  .auth-pitch h2 { font-size: 22px; }
  .auth-pitch { display: none; }
  .auth-footer { display: none; }
}

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */
.account-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: flex-start;
}

.account-side {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.account-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, var(--blue-500));
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 32px;
  font-weight: 600;
  margin: 0 auto 14px;
  letter-spacing: -0.02em;
}

.account-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0 0 4px;
}
.account-role {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 18px;
}

.account-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--gray-200);
  padding-top: 14px;
  text-align: left;
}
.account-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--gray-700);
  font-weight: 500;
}
.account-nav a:hover { background: var(--gray-50); }
.account-nav a.active { background: var(--navy-800); color: var(--white); }
.account-nav svg { width: 15px; height: 15px; }

.account-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 20px;
}

.account-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.account-card .sect-help {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 22px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.account-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Read-only info row */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.info-row:last-child { border-bottom: none; }
.info-key { font-size: 13px; color: var(--gray-500); }
.info-val { font-size: 14px; color: var(--navy-900); font-weight: 500; }

@media (max-width: 880px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .field-row { grid-template-columns: 1fr; }
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 30, 61, 0.92);
  color: var(--white);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-ref {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.card-desc {
  font-size: 13.5px;
  color: var(--gray-600);
  margin: 0 0 16px 0;
  line-height: 1.5;
  flex: 1;
  text-wrap: pretty;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--gray-500);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--gray-200);
  margin-bottom: 14px;
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-meta svg { width: 12px; height: 12px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.status-dot.warn::before { background: var(--warning); box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15); }
.status-dot.gray::before { background: var(--gray-400); box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2); }

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--navy-800);
  color: var(--white);
  transition: background 120ms;
}

.card-cta:hover { background: var(--navy-900); }
.card-cta svg { width: 13px; height: 13px; }

.card-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: all 120ms;
}
.card-edit-btn:hover {
  color: var(--navy-800);
  border-color: var(--gray-300);
  background: var(--gray-50);
}
.card-edit-btn svg { width: 13px; height: 13px; }

/* ============================================================
   VUE LISTE (toggle grille → liste)
   ============================================================ */
.equipment-grid.list-view {
  grid-template-columns: 1fr;
  gap: 6px;
}

.equipment-grid.list-view .equipment-card {
  flex-direction: row;
  align-items: stretch;
}

.equipment-grid.list-view .card-media {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  border-bottom: none;
  border-right: 1px solid var(--gray-100);
}

.equipment-grid.list-view .card-category,
.equipment-grid.list-view .card-ribbon,
.equipment-grid.list-view .card-fav,
.equipment-grid.list-view .card-flag {
  display: none;
}

/* Badge "À revoir" visible uniquement en vue liste pour les admins */
.card-flag-badge {
  display: none;
}
.equipment-grid.list-view .card-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.card-flag-badge svg { width: 11px; height: 11px; }

.equipment-grid.list-view .card-body {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  grid-template-rows: 1fr;
  align-items: center;
  gap: 0 20px;
  padding: 12px 20px;
}

.equipment-grid.list-view .card-ref {
  grid-column: 1;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-grid.list-view .card-title {
  grid-column: 2;
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-grid.list-view .card-desc,
.equipment-grid.list-view .card-meta {
  display: none;
}

.equipment-grid.list-view .card-footer {
  grid-column: 3;
}

/* ============================================================
   EMPTY STATE / FAVORITES
   ============================================================ */
.empty {
  background: var(--white);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
}
.empty-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--gray-500);
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.empty-icon svg { width: 28px; height: 28px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--navy-900); margin: 0 0 6px; }
.empty-text { font-size: 14px; color: var(--gray-600); margin: 0 0 18px; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.detail-media {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.detail-media-main {
  height: 420px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--blue-50) 100%);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--gray-200);
}

.detail-media-main svg,
.detail-media-main img {
  width: 65%;
  height: 65%;
  object-fit: contain;
}

.detail-media-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
}

.detail-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.detail-thumb.active { border-color: var(--navy-700); box-shadow: 0 0 0 1px var(--navy-700); }
.detail-thumb svg { width: 60%; height: 60%; opacity: 0.7; }

.detail-info {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-navy { background: var(--navy-800); color: var(--white); }
.badge-blue { background: var(--blue-50); color: var(--blue-600); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-gray { background: var(--gray-100); color: var(--gray-700); }

.detail-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.detail-ref {
  font-size: 13px;
  color: var(--gray-500);
  font-family: "IBM Plex Mono", "SF Mono", monospace;
  margin-bottom: 22px;
}

.detail-desc {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0 0 24px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--gray-200);
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-value {
  font-size: 14px;
  color: var(--navy-900);
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Detail sections (description longue, etc.) */
.detail-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.detail-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h3 svg { width: 16px; height: 16px; color: var(--blue-500); }

.detail-section p {
  font-size: 14.5px;
  color: var(--gray-700);
  line-height: 1.65;
  margin: 0 0 12px;
}

.detail-section p:last-child { margin-bottom: 0; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-table th, .spec-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

.spec-table th {
  width: 220px;
  font-weight: 500;
  color: var(--gray-500);
  font-size: 13px;
  background: var(--gray-50);
}

.spec-table td { color: var(--gray-900); font-weight: 500; }

.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: all 120ms;
}
.doc-item:hover { border-color: var(--blue-500); background: var(--blue-50); }

.doc-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-700);
  display: grid; place-items: center;
  flex: none;
}
.doc-icon svg { width: 18px; height: 18px; }

.doc-meta { flex: 1; }
.doc-name { font-size: 14px; font-weight: 500; color: var(--navy-900); }
.doc-info { font-size: 12px; color: var(--gray-500); }

.doc-action { color: var(--gray-500); }
.doc-action:hover { color: var(--navy-800); }
.doc-action svg { width: 18px; height: 18px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .nav-search { display: none; }
}

@media (max-width: 768px) {
  /* Navbar */
  .navbar { padding: 0 12px; }
  .navbar-inner { gap: 8px; }
  .brand-stack { display: none; }
  .brand-mark { height: 34px; }
  .nav-links { flex: 1; gap: 0; justify-content: space-evenly; }
  .nav-link { padding: 10px 8px; font-size: 13px; }
  .nav-link span.label { display: none; }
  .nav-link svg { width: 22px; height: 22px; }
  .nav-user-name, .nav-user-role { display: none; }
  .nav-user { padding: 6px; border: none; background: transparent; }
  .nav-user-avatar { width: 32px; height: 32px; font-size: 13px; }

  .nav-indicator { display: none; }



  /* Page */
  .page { padding: 20px 16px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-title { font-size: 22px; }
  .page-subtitle { font-size: 13px; }
  .page-actions { flex-wrap: wrap; gap: 8px; }
  .page-actions .btn { flex: 1; justify-content: center; min-width: 120px; }

  /* Toolbar */
  .toolbar { gap: 10px; margin-left: 10px;}
  .toolbar-search { width: 100%; }
   #cat-filter { margin-left: auto; }

 

  /* Stats */
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 20px; }

  /* Équipements */
  .equipment-grid { grid-template-columns: 1fr; gap: 14px; }
  .equipment-card { padding: 16px; }

  /* Vue liste sur mobile */
  .equipment-grid.list-view .card-media { width: 80px; }
  .equipment-grid.list-view .card-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 12px 14px;
    gap: 2px;
  }
  .equipment-grid.list-view .card-ref { grid-column: 1; grid-row: 1; font-size: 11px; }
  .equipment-grid.list-view .card-title { grid-column: 1; grid-row: 2; font-size: 14px; }
  .equipment-grid.list-view .card-footer { display: none; }

  /* Détail équipement */
  .spec-list { grid-template-columns: 1fr; }
  .spec-table th { width: 130px; font-size: 12px; }
  .detail-section { padding: 18px; }

  /* Contacts SAV */
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 16px; }

  /* Annuaire */
  .team-grid { grid-template-columns: 1fr; }

  /* Footer */
  footer { flex-direction: column; gap: 4px; text-align: center; }

  /* Fil d'Ariane */
  .breadcrumb { font-size: 12px; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .navbar-inner { gap: 8px; }
  .brand-mark { height: 30px; }
  .nav-link { padding: 6px 7px; }
  .nav-link svg { width: 17px; height: 17px; }

  .page { padding: 16px 12px; }
  .page-title { font-size: 20px; }
  .page-actions { flex-direction: column; }
  .page-actions .btn { width: 100%; }

  .stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 22px; }

  /* Annuaire — cards en colonne */
  .team-card { flex-direction: column; gap: 12px; }

  /* Contacts — picker utilisateur */
  .pick-row { flex-wrap: wrap; gap: 10px; }
  .pick-action { width: 100%; }
  .pick-action .btn { width: 100%; justify-content: center; }

  /* Boutons SAV */
  .add-dropdown { width: 100%; }
  .add-dropdown > .btn { width: 100%; justify-content: center; }
  .add-dropdown-menu { width: 100%; }
}

/* ── Animations ──────────────────────────────────────────────────────────── */

/* Pression sur les boutons */
.btn:active { transform: scale(0.96); }
.chip:active { transform: scale(0.95); }
.card-fav:active,
.card-flag:active,
.ne-tb-btn:active { transform: scale(0.88); }

/* Zoom de l'image au hover de la card */
.card-media {
  overflow: hidden;
}
.card-media img,
.card-media svg.equipment-illu {
  transition: transform 300ms ease;
}
.equipment-card:hover .card-media img,
.equipment-card:hover .card-media svg.equipment-illu {
  transform: scale(1.06);
}

/* Pop de l'étoile quand ajoutée en favori */
@keyframes fav-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}
.card-fav.active svg { animation: fav-pop 320ms ease; }

/* Entrée des cards au chargement */
@keyframes card-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.equipment-card {
  animation: card-fade-up 240ms ease both;
}
