/* ================================================================
   Espace Uniforme — CSS desktop-first professionnel
   Palette: --crf-red:#E2001A, --slate-*, Inter font (via app.css)
   ================================================================ */

/* ----------------------------------------------------------------
   HEADER FIXE
   ---------------------------------------------------------------- */
.uni-header {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.uni-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Brand */
.uni-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.uni-brand-logo {
  width: 36px;
  height: 36px;
  background: #E2001A;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.uni-brand-name {
  font-weight: 700;
  font-size: 16px;
  color: #0F172A;
  white-space: nowrap;
}

/* Nav centrale */
.uni-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.uni-nav-link {
  padding: 8px 16px;
  font-weight: 500;
  font-size: 13px;
  color: #475569;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.uni-nav-link:hover {
  background: #F1F5F9;
  color: #1E293B;
}

.uni-nav-link.active {
  background: #FEE2E5;
  color: #B30015;
  font-weight: 600;
}

/* Right zone */
.uni-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.uni-pts-chip {
  background: #E2001A;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

.uni-user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.uni-user-name {
  font-weight: 600;
  color: #475569;
}

.uni-logout-link {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.uni-logout-link:hover {
  color: #475569;
}

/* ----------------------------------------------------------------
   CONTENT WRAPPER
   ---------------------------------------------------------------- */
.uni-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* ----------------------------------------------------------------
   PAGE HERO
   ---------------------------------------------------------------- */
.uni-page-hero {
  margin-bottom: 32px;
}

.uni-page-title {
  font-size: 28px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
  line-height: 1.2;
}

.uni-page-subtitle {
  font-size: 14px;
  color: #64748B;
  margin: 0;
}

/* ----------------------------------------------------------------
   BENTO GRID (dashboard)
   ---------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bento-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 24px;
}

.bento-card.span-2 {
  grid-column: span 2;
}

.bento-card.span-3 {
  grid-column: span 3;
}

.bento-card.accent {
  background: linear-gradient(135deg, #E2001A, #A3000E);
  color: #ffffff;
  border: none;
}

/* KPI dans bento */
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  color: #64748B;
}

.bento-card.accent .kpi-label {
  color: #ffffff;
}

.kpi-value {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 6px 0 2px;
  line-height: 1;
}

.kpi-sub {
  font-size: 13px;
  opacity: 0.65;
}

/* ----------------------------------------------------------------
   SHOP PRODUCT GRID
   ---------------------------------------------------------------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.shop-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.shop-card-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
}

.shop-card-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, #F8FAFC, #E2E8F0);
}

.shop-card-body {
  padding: 16px;
}

.shop-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
  line-height: 1.3;
}

.shop-card-pts {
  font-size: 20px;
  font-weight: 800;
  color: #E2001A;
  letter-spacing: -0.5px;
  display: block;
}

.shop-card-meta {
  font-size: 12px;
  color: #94A3B8;
  margin: 2px 0 14px;
}

.shop-card-btn {
  width: 100%;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  text-align: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.shop-card.unavailable {
  opacity: 0.5;
  pointer-events: none;
}

.shop-card-insufficient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
}

/* ----------------------------------------------------------------
   FILTER BAR (catalogue)
   ---------------------------------------------------------------- */
.shop-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.shop-filter-btn {
  padding: 8px 18px;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.shop-filter-btn:hover {
  border-color: #94A3B8;
}

.shop-filter-btn.active {
  background: #0F172A;
  color: #ffffff;
  border-color: #0F172A;
}

/* ----------------------------------------------------------------
   ACTIVITY DÉCLARATION (2 colonnes desktop)
   ---------------------------------------------------------------- */
.act-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.act-types-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.act-type-btn {
  background: #ffffff;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  user-select: none;
}

.act-type-btn:hover {
  border-color: #E2001A;
  background: #FFF5F5;
}

.act-type-btn.selected {
  border-color: #E2001A;
  background: #FEE2E5;
  box-shadow: 0 0 0 4px rgba(226, 0, 26, 0.08);
}

.atb-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 8px;
}

.atb-label {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  display: block;
  line-height: 1.3;
}

.atb-rate {
  font-size: 12px;
  font-weight: 700;
  color: #E2001A;
  display: block;
  margin-top: 4px;
}

.act-form-panel {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
  animation: fadeSlideDown 0.2s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------
   QUEUE PANEL
   ---------------------------------------------------------------- */
.queue-panel {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.queue-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.queue-panel-body {
  padding: 16px 20px;
  min-height: 200px;
}

.queue-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: #94A3B8;
}

.queue-empty-state .qes-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.queue-empty-state .qes-text {
  font-size: 14px;
}

.queue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}

.queue-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.qi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.qi-content {
  flex: 1;
}

.qi-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

.qi-detail {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.qi-pts {
  font-size: 14px;
  font-weight: 800;
  color: #E2001A;
  white-space: nowrap;
}

.qi-remove {
  color: #CBD5E1;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.qi-remove:hover {
  color: #EF4444;
}

.queue-panel-footer {
  padding: 16px 20px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.queue-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #475569;
}

.queue-total-pts {
  font-size: 20px;
  font-weight: 800;
  color: #E2001A;
}

/* ----------------------------------------------------------------
   ARMOIRE GRID
   ---------------------------------------------------------------- */
.arm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.arm-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
}

.arm-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.arm-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
}

.arm-card-meta {
  font-size: 12px;
  color: #94A3B8;
  margin: 0;
}

/* ----------------------------------------------------------------
   AUTH PAGE (split screen)
   ---------------------------------------------------------------- */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: #E2001A;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: #F8FAFC;
}

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

.auth-title {
  font-size: 30px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  line-height: 1.15;
}

.auth-subtitle {
  font-size: 14px;
  color: #64748B;
  margin: 0 0 32px;
}

/* ----------------------------------------------------------------
   MODAL (commande)
   ---------------------------------------------------------------- */
.uni-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.uni-modal-overlay.open {
  display: flex;
}

.uni-modal {
  background: #ffffff;
  border-radius: 20px;
  width: min(500px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: modal-pop 0.2s ease;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.uni-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.uni-modal-body {
  padding: 24px;
}

.uni-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #F8FAFC;
}

/* ----------------------------------------------------------------
   TAILLE SELECTOR
   ---------------------------------------------------------------- */
.taille-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.taille-chip {
  padding: 8px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  background: #ffffff;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.taille-chip:hover {
  border-color: #94A3B8;
}

.taille-chip.selected {
  border-color: #E2001A;
  background: #FEE2E5;
  color: #B30015;
}

/* ----------------------------------------------------------------
   TIMELINE activités (compact)
   ---------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.tl-row:last-child {
  border-bottom: none;
}

.tl-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tl-icon.valide  { background: #ECFDF5; }
.tl-icon.attente { background: #FFFBEB; }
.tl-icon.rejete  { background: #FEF2F2; }

.tl-info {
  flex: 1;
}

.tl-name {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 2px;
}

.tl-meta {
  font-size: 11px;
  color: #94A3B8;
  margin: 0;
}

.tl-badge {
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

.tl-badge.valide  { background: #ECFDF5; color: #047857; }
.tl-badge.attente { background: #FFFBEB; color: #B45309; }
.tl-badge.rejete  { background: #FEF2F2; color: #EF4444; }

/* ----------------------------------------------------------------
   UTILITAIRES
   ---------------------------------------------------------------- */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748B;
  margin-bottom: 16px;
  display: block;
}

.pts-summary-bar {
  display: flex;
  gap: 24px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  margin-bottom: 24px;
}

.psb-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.psb-label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.psb-value {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
}
