/* ================================================================
   GazBenin — Design System v2
   Direction : Minimalisme industriel raffiné
   Typographie : Barlow Condensed (display) + Instrument Sans (body)
   Palette : Noir charbon · Blanc ivoire · Vermillon · Ardoise
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --ink:        #111318;
  --ink-2:      #1C2030;
  --ink-3:      #252A3A;
  --slate:      #3D4459;
  --muted:      #6B7280;
  --border:     #E4E6EC;
  --border-2:   #CDD0DA;
  --surface:    #F7F8FA;
  --white:      #FFFFFF;
  --ivory:      #FAFAFA;

  --red:        #C8341A;
  --red-hover:  #A82910;
  --red-pale:   #FDF0ED;
  --red-border: #F0C4BC;

  --success:    #1A7A4A;
  --success-bg: #EBF5F0;
  --warning:    #925C10;
  --warning-bg: #FEF5E7;
  --danger:     #C8341A;
  --danger-bg:  #FDF0ED;
  --info:       #1A4FA8;
  --info-bg:    #EBF0FD;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Instrument Sans', sans-serif;

  --r-sm: 4px;
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(17,19,24,.06), 0 1px 2px rgba(17,19,24,.04);
  --shadow:    0 4px 12px rgba(17,19,24,.08), 0 2px 4px rgba(17,19,24,.04);
  --shadow-lg: 0 12px 32px rgba(17,19,24,.12), 0 4px 8px rgba(17,19,24,.06);

  --ease:   cubic-bezier(.4,0,.2,1);
  --t-fast: 120ms;
  --t:      200ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { color: var(--slate); }
a { color: var(--red); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--red-hover); }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--ink);
  height: 60px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  width: 100%; display: flex; align-items: center; gap: 24px;
    display: flex;
  align-items: center;
}

@media (min-width: 768px) { .navbar-inner { padding: 0 32px; } }

.navbar-brand {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: var(--white) !important; letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  text-decoration: none;
}

.brand-mark {
  width: 28px; height: 28px; background: var(--red); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
}

.brand-mark svg { width: 14px; height: 14px; }

.accent { color: var(--red); }

.navbar-nav { display: flex; gap: 2px; list-style: none; flex: 1; }

.navbar-nav a {
  color: rgba(255,255,255,.45); font-size: .875rem; font-weight: 500;
  padding: 6px 12px; border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease); display: block;
  text-decoration: none;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--white); background: rgba(255,255,255,.08);
}

.navbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: rgba(255,255,255,.65); transition: all var(--t) var(--ease);
  border-radius: 1px;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none; background: var(--ink-2);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 12px 20px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; color: rgba(255,255,255,.55);
  padding: 12px 0; font-size: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  text-decoration: none;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--white); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--r); font-family: var(--font-body);
  font-size: .875rem; font-weight: 600; line-height: 1;
  cursor: pointer; transition: all var(--t-fast) var(--ease);
  white-space: nowrap; text-decoration: none; letter-spacing: .01em;
}
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary   { background: var(--red);     color: var(--white);  border-color: var(--red); }
.btn-primary:hover   { background: var(--red-hover); border-color: var(--red-hover); color: var(--white); box-shadow: 0 4px 12px rgba(200,52,26,.3); transform: translateY(-1px); }

.btn-secondary { background: var(--white);   color: var(--ink);    border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface); color: var(--ink); border-color: var(--slate); }

.btn-dark      { background: var(--ink);     color: var(--white);  border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-2); color: var(--white); }

.btn-ghost     { background: transparent;    color: var(--muted);  border-color: transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }

.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.25); }
.btn-outline-white:hover { background: rgba(255,255,255,.08); color: var(--white); border-color: rgba(255,255,255,.4); }

.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-success:hover { opacity: .9; color: var(--white); }
.btn-danger  { background: var(--danger);  color: var(--white); border-color: var(--danger); }
.btn-danger:hover  { opacity: .9; color: var(--white); }

.btn-sm   { padding: 6px 13px; font-size: .8rem; }
.btn-lg   { padding: 12px 24px; font-size: 1rem; }
.btn-xl   { padding: 15px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }

.label {
  display: block; font-size: .72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 7px;
  font-family: var(--font-display);
}

.input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-family: var(--font-body); font-size: .9rem; color: var(--ink);
  background: var(--white); outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  appearance: none;
}
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,52,26,.1); }
.input::placeholder { color: #BABDC9; }
.input:disabled { background: var(--surface); color: var(--muted); }

textarea.input { resize: vertical; min-height: 88px; line-height: 1.55; }
select.input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-hint  { font-size: .77rem; color: var(--muted); margin-top: 5px; }
.form-error { font-size: .77rem; color: var(--danger); margin-top: 5px; }

/* ---- Cards ---- */
.card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.card-header {
  padding: 18px 24px; border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.card-header h3 { font-size: .95rem; font-weight: 600; }
.card-body   { padding: 24px; }
.card-footer { padding: 14px 24px; border-top: 1.5px solid var(--border); background: var(--surface); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: .68rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; font-family: var(--font-display);
}
.badge-dot::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge-info    { background: var(--info-bg);     color: var(--info);    }
.badge-neutral { background: var(--surface);     color: var(--muted);   border: 1px solid var(--border); }
.badge-dark    { background: var(--ink);         color: rgba(255,255,255,.8); }
.badge-red     { background: var(--red-pale);    color: var(--red); }

/* ---- Alerts ---- */
.alert {
  padding: 12px 16px; border-radius: var(--r); font-size: .875rem;
  display: flex; align-items: flex-start; gap: 12px;
  border-left: 3px solid; margin-bottom: 20px;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  padding: 10px 14px; text-align: left;
  font-size: .68rem; font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  border-bottom: 1.5px solid var(--border); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t-fast) var(--ease); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
tbody td { padding: 12px 14px; vertical-align: middle; }

/* ---- Stats ---- */
.stat {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.stat-label {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); font-family: var(--font-display); margin-bottom: 6px;
}
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-sub   { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.stat-accent { border-top: 3px solid var(--red); }

/* ---- Sidebar layout ---- */
.layout-app {
  display: grid; grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}

.sidebar {
  background: var(--ink); padding: 24px 10px;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
}

.sidebar-section {
  font-size: .62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.2);
  padding: 14px 12px 6px; font-family: var(--font-display);
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: rgba(255,255,255,.42); font-size: .875rem; font-weight: 500;
  transition: all var(--t-fast) var(--ease); text-decoration: none;
}
.sidebar-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .6; }
.sidebar-link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.8); }
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active { background: var(--red); color: var(--white); }
.sidebar-link.active svg { opacity: 1; }

.sidebar-badge {
  margin-left: auto; background: var(--red); color: var(--white);
  font-size: .62rem; font-weight: 700; padding: 2px 6px;
  border-radius: 10px; font-family: var(--font-display);
}

.main { padding: 36px 36px; overflow-y: auto; }

/* ---- Page header ---- */
.page-header {
  background: var(--ink); padding: 40px 0 32px; color: var(--white);
}
.page-header .container { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-header h1 { color: var(--white); }
.page-header p  { color: rgba(255,255,255,.45); margin-top: 6px; }

/* ---- Boutique cards ---- */
.boutique-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  transition: all var(--t) var(--ease); cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.boutique-card:hover {
  border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px);
}

.boutique-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}

.boutique-logo {
  width: 42px; height: 42px; background: var(--ink); color: var(--white);
  border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; flex-shrink: 0;
}

.boutique-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); margin-bottom: 2px; }
.boutique-addr { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.boutique-addr svg { width: 11px; height: 11px; }

.distance-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--ink); color: rgba(255,255,255,.85);
  padding: 4px 10px; border-radius: 20px;
  font-size: .7rem; font-weight: 600; white-space: nowrap; flex-shrink: 0;
  font-family: var(--font-display); letter-spacing: .04em;
}

.stock-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stock-tag {
  padding: 4px 10px; border-radius: var(--r-sm);
  font-size: .73rem; font-weight: 600; font-family: var(--font-display);
  letter-spacing: .03em; border: 1.5px solid var(--border);
  color: var(--slate); background: var(--surface);
}
.stock-tag.avail {
  border-color: rgba(26,122,74,.25); background: var(--success-bg); color: var(--success);
}

/* Stars */
.stars { display: flex; gap: 2px; }
.star { width: 12px; height: 12px; }
.star path { fill: var(--border-2); }
.star.on path { fill: #E8A020; }

/* ---- Search layout ---- */
.search-layout {
  display: grid; grid-template-columns: 1fr 400px; gap: 24px; align-items: start;
}
.map-sticky { position: sticky; top: 80px; }
#map {
  width: 100%; height: 520px; border-radius: var(--r-lg);
  overflow: hidden; border: 1.5px solid var(--border);
}

/* ---- Timeline ---- */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: flex; gap: 16px; padding-bottom: 24px; position: relative;
}
.timeline-item:not(:last-child)::before {
  content: ''; position: absolute; left: 9px; top: 22px;
  width: 1.5px; bottom: 0; background: var(--border);
}
.timeline-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--white);
  flex-shrink: 0; position: relative; z-index: 1;
}
.timeline-dot.done   { background: var(--success); border-color: var(--success); }
.timeline-dot.active { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px rgba(200,52,26,.14); }
.timeline-label { font-weight: 600; font-size: .9rem; padding-top: 1px; }
.timeline-desc  { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ---- Spinner ---- */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(200,52,26,.2); border-top-color: var(--red);
  border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Notification btn ---- */
.notif-btn {
  position: relative; width: 36px; height: 36px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t-fast) var(--ease);
  color: rgba(255,255,255,.55);
}
.notif-btn:hover { background: rgba(255,255,255,.1); color: var(--white); }
.notif-btn svg { width: 16px; height: 16px; }
.notif-count {
  position: absolute; top: 3px; right: 3px; min-width: 14px; height: 14px;
  background: var(--red); color: var(--white); font-size: .58rem; font-weight: 700;
  border-radius: 7px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ---- Divider ---- */
.divider { height: 1.5px; background: var(--border); border: none; margin: 24px 0; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: .85rem; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--white); color: var(--slate);
  transition: all var(--t-fast) var(--ease); text-decoration: none;
}
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination span.current { background: var(--red); color: var(--white); border-color: var(--red); }

/* ---- Fade up ---- */
.fade-up {
  opacity: 0; transform: translateY(10px);
  animation: fadeUp .3s var(--ease) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .layout-app { grid-template-columns: 200px 1fr; }
  .main { padding: 24px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  .search-layout { grid-template-columns: 1fr; }
  #map { height: 280px; order: -1; }
  .map-sticky { position: static; }
}

@media (max-width: 768px) {
  /* Navbar: hide desktop links and actions, show hamburger */
  .navbar-nav                    { display: none; }
  .navbar-end                    { display: none; }
  .hamburger                     { display: flex; }

  /* Layout */
  .layout-app { grid-template-columns: 1fr; }
  .sidebar    { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .main { padding: 20px 16px; }
  .page-header { padding: 32px 0 24px; }
}

@media (max-width: 480px) {
  .btn-xl { padding: 12px 20px; font-size: .95rem; }
}

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ink); border-top: 1px solid rgba(255,255,255,.07);
  padding: 8px 0; padding-bottom: calc(8px + env(safe-area-inset-bottom,0px));
  z-index: 150; justify-content: space-around;
}
@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  .main       { padding-bottom: 80px !important; }
}

.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: rgba(255,255,255,.3); font-size: .58rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  padding: 6px 4px; transition: color var(--t-fast) var(--ease);
  font-family: var(--font-display);
}
.bottom-nav-item svg { width: 20px; height: 20px; }
.bottom-nav-item.active { color: var(--red); }
.bottom-nav-item:hover  { color: rgba(255,255,255,.7); }