/* ============================================================
   Avis228 — style.css v2.0
   Couleurs du drapeau togolais : Rouge #E8220A, Vert #006A4E, Blanc, Or #FFCC00
   ============================================================ */

:root {
  --primary:       #E8220A;
  --primary-dark:  #c01c08;
  --primary-light: #fff0ee;
  --secondary:     #006A4E;
  --gold:          #FFCC00;
  --dark:          #1a1a2e;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --bg-light:      #f8fafc;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --font:          'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: #fff; line-height: 1.6; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar-main {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  padding: .75rem 0;
}
.brand-flag  { font-size: 1.3rem; margin-right: .25rem; }
.brand-text  { font-weight: 800; font-size: 1.4rem; color: var(--primary); letter-spacing: -.5px; }
.navbar-main .nav-link { font-weight: 500; color: var(--text); padding: .5rem .75rem; border-radius: var(--radius-sm); transition: .2s; }
.navbar-main .nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-right: .3rem; }

/* Dropdown categories */
.dropdown-menu-categories { min-width: 260px; padding: .5rem; }
.dropdown-menu-categories .dropdown-item { border-radius: 6px; padding: .5rem .75rem; display: flex; align-items: center; font-size: .9rem; }
.dropdown-menu-categories .dropdown-item:hover { background: var(--primary-light); color: var(--primary); }

/* Search bar */
.navbar-search { max-width: 400px; }
.search-wrap { position: relative; }
.search-wrap > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); z-index: 2; }
.search-wrap .form-control { padding-left: 2.5rem; border-radius: 50px; border: 1.5px solid var(--border); transition: .2s; }
.search-wrap .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,34,10,.1); }
.search-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 1050; overflow: hidden; }
.suggest-item { display: flex; align-items: center; padding: .6rem 1rem; font-size: .875rem; color: var(--text); text-decoration: none; transition: .15s; }
.suggest-item:hover { background: var(--bg-light); color: var(--primary); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #fff8f7 0%, #f0faf6 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0 3rem;
  overflow: hidden;
}
.hero-badge .badge-togo { background: linear-gradient(135deg,var(--primary),var(--secondary)); color:#fff; padding:.4rem .9rem; border-radius:50px; font-size:.8rem; font-weight:600; }
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; color: var(--dark); }
.text-gradient { background: linear-gradient(135deg, var(--primary), #ff6b00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 520px; }
.hero-search-form { max-width: 560px; }
.hero-search-wrap { display: flex; background: #fff; border: 2px solid var(--border); border-radius: 50px; overflow: hidden; box-shadow: var(--shadow-lg); transition: .2s; }
.hero-search-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(232,34,10,.12); }
.hero-search-wrap > i { flex-shrink: 0; padding: 0 .75rem 0 1.25rem; display: flex; align-items: center; color: var(--text-muted); font-size: 1.1rem; }
.hero-search-wrap .form-control { border: none; box-shadow: none; padding: .85rem .5rem; font-size: 1rem; background: transparent; }
.hero-search-wrap .form-control:focus { box-shadow: none; }
.hero-search-wrap .btn { border-radius: 50px; margin: 5px; padding: .6rem 1.5rem; font-weight: 600; }
.hero-stats { gap: 2rem !important; }
.stat-number { font-size: 1.6rem; font-weight: 800; color: var(--primary); display: block; line-height: 1; }
.stat-label  { font-size: .8rem; color: var(--text-muted); display: block; font-weight: 500; }

/* Hero illustration */
.hero-card-float { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; }
.hero-mini-card { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; box-shadow: var(--shadow); }
.hero-mini-card:nth-child(2) { margin-left: 1.5rem; }
.hero-mini-logo { width: 36px; height: 36px; border-radius: 8px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }

/* ── Section titles ───────────────────────────────────────── */
.section-title { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.page-header { background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%); color: #fff; padding: 2.5rem 0; }
.page-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: .25rem; }
.cat-header-icon { width: 56px; height: 56px; border-radius: var(--radius); background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; flex-shrink: 0; }

/* ── Category cards ───────────────────────────────────────── */
.cat-card { display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem .75rem; transition: .2s; color: var(--text); }
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--primary); margin-bottom: .6rem; transition: .2s; }
.cat-card:hover .cat-icon { background: var(--primary); color: #fff; }
.cat-name  { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.cat-count { font-size: .72rem; color: var(--text-muted); margin-top: .15rem; }

/* ── Company cards ────────────────────────────────────────── */
.company-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .2s; height: 100%; }
.company-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); transform: translateY(-2px); }
.company-card a { color: inherit; }
.company-card-header { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem 1rem .5rem; }
.company-logo-wrap { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-light); }
.company-logo { width: 100%; height: 100%; object-fit: cover; }
.company-name { font-size: .92rem; font-weight: 700; color: var(--dark); line-height: 1.3; margin: 0 0 .25rem; }
.company-meta { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.company-desc { font-size: .8rem; color: var(--text-muted); padding: 0 1rem; margin-bottom: .5rem; line-height: 1.4; }
.company-card-footer { display: flex; justify-content: space-between; align-items: center; padding: .5rem 1rem .85rem; border-top: 1px solid var(--border); margin-top: .25rem; }
.rating-wrap { display: flex; align-items: center; gap: .35rem; }
.rating-num { font-weight: 700; font-size: .9rem; }
.claimed-badge { color: var(--secondary); font-size: 1.1rem; margin-left: auto; }

/* Badges */
.cat-badge  { background: #eef2ff; color: #4f46e5; font-size: .72rem; padding: .2rem .5rem; border-radius: 4px; font-weight: 500; white-space: nowrap; }
.city-badge { background: #f0fdf4; color: #16a34a; font-size: .72rem; padding: .2rem .5rem; border-radius: 4px; font-weight: 500; }
.badge-verified { background: #d1fae5; color: #065f46; font-size: .72rem; }
.badge-rating-success { background: #d1fae5; color: #065f46; }
.badge-rating-warning  { background: #fef9c3; color: #854d0e; }
.badge-rating-danger   { background: #fee2e2; color: #991b1b; }

/* ── Stars ────────────────────────────────────────────────── */
.stars .bi, .stars-sm .bi { color: var(--gold); }
.stars { font-size: 1rem; }
.stars-sm { font-size: .75rem; }
.star-picker { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.star-picker input[type=radio] { display: none; }
.star-picker label { font-size: 1.8rem; color: #d1d5db; cursor: pointer; transition: .15s; }
.star-picker label:hover, .star-picker input:checked ~ label { color: var(--gold); }
.star-picker label i { pointer-events: none; }

/* ── Reviews ──────────────────────────────────────────────── */
.review-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.review-form-card { border-color: var(--primary); background: var(--primary-light); }
.reviewer-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),#ff6b00); color: #fff; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reviewer-avatar.lg { width: 44px; height: 44px; font-size: 1rem; }
.business-reply { background: #f0faf6; border-left: 3px solid var(--secondary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: .6rem .85rem; }
.review-feed-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; height: 100%; transition: .2s; }
.review-feed-card:hover { box-shadow: var(--shadow); }
.review-excerpt { line-height: 1.5; }

/* ── Company detail ───────────────────────────────────────── */
.company-detail-logo { width: 80px; height: 80px; border-radius: 14px; object-fit: cover; border: 2px solid var(--border); background: var(--bg-light); flex-shrink: 0; }
.info-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.info-row:last-child { border-bottom: none; }
.info-row i { color: var(--primary); flex-shrink: 0; }
.info-row a { color: var(--text); text-decoration: none; word-break: break-all; }
.info-row a:hover { color: var(--primary); }
.card-claim { border: 1.5px dashed var(--primary); background: var(--primary-light); }
.bg-success-soft { background: #d1fae5; }

/* ── Filter panel ────────────────────────────────────────────*/
.filter-panel { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 80px; }
.filter-title  { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--dark); }

/* ── Stats cards ─────────────────────────────────────────── */
.stat-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; align-items: flex-start; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: .75rem; }
.stat-val  { font-size: 1.7rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-lbl  { font-size: .8rem; color: var(--text-muted); font-weight: 500; margin-top: .2rem; }
.bg-primary-soft { background: #eef2ff; }
.bg-warning-soft { background: #fef9c3; }
.bg-success-soft { background: #d1fae5; }
.bg-danger-soft  { background: #fee2e2; }

/* ── Auth ─────────────────────────────────────────────────── */
.auth-wrapper { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: var(--bg-light); }
.auth-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.auth-tab { flex: 1; text-align: center; padding: .65rem; font-weight: 600; font-size: .9rem; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .2s; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-tab:hover { color: var(--primary); }
.auth-demo-box { background: var(--bg-light); border-radius: var(--radius-sm); padding: .75rem 1rem; border: 1px dashed var(--border); }

/* ── Profile ─────────────────────────────────────────────── */
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }

/* ── CTA section ─────────────────────────────────────────── */
.cta-section { background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 100%); color: #fff; }
.cta-box { max-width: 600px; margin: 0 auto; }
.cta-box h2 { font-weight: 800; margin-bottom: .5rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.8); padding: 3rem 0 1.5rem; }
.footer-brand .brand-text { font-size: 1.3rem; }
.footer-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.5); margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .875rem; transition: .15s; }
.footer-links a:hover { color: var(--gold); }
.site-footer hr { border-color: rgba(255,255,255,.1); }
.site-footer .text-muted { color: rgba(255,255,255,.4) !important; }
.site-footer a.text-muted:hover { color: var(--gold) !important; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { color: var(--text-muted); }

/* ── Admin layout ─────────────────────────────────────────── */
.admin-body { background: #f1f5f9; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--dark); flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-logo { padding: 1.25rem 1.25rem .75rem; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: .5rem; }
.admin-nav { padding: .75rem .75rem 1rem; flex: 1; }
.admin-nav-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: var(--radius-sm); color: rgba(255,255,255,.7); text-decoration: none; font-size: .875rem; font-weight: 500; transition: .15s; margin-bottom: .15rem; }
.admin-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav-item.active { background: var(--primary); color: #fff; }
.admin-nav-item i { font-size: 1rem; flex-shrink: 0; }
.admin-nav-item .badge { margin-left: auto; }
.admin-nav-divider { border-top: 1px solid rgba(255,255,255,.1); margin: .75rem 0; }
.text-danger-soft { color: #fca5a5 !important; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: flex-end; }
.admin-content { padding: 1.5rem; flex: 1; }

/* Admin stats */
.admin-stat-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.admin-stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .75rem; }
.admin-stat-val { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1; }
.admin-stat-lbl { font-size: .8rem; color: var(--text-muted); font-weight: 500; margin-top: .2rem; }
.admin-stat-sub { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; display: block; }

/* Admin table */
.admin-table { font-size: .875rem; }
.admin-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border); padding: .6rem .85rem; white-space: nowrap; }
.admin-table td { padding: .65rem .85rem; vertical-align: middle; border-bottom: 1px solid var(--border); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-light); }
.btn-xs { padding: .2rem .45rem; font-size: .75rem; border-radius: 4px; }

/* Pagination */
.pagination .page-link { border-radius: var(--radius-sm) !important; margin: 0 2px; font-weight: 500; color: var(--text); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-link:hover { background: var(--primary-light); color: var(--primary); }

/* Bootstrap overrides */
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,34,10,.1); }
.card { border: 1.5px solid var(--border); border-radius: var(--radius); box-shadow: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .admin-sidebar { display: none; }
  .hero-section { padding: 2.5rem 0 2rem; }
  .filter-panel { position: static; margin-bottom: 1rem; }
}
@media (max-width: 575.98px) {
  .hero-title { font-size: 1.6rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .company-card-footer { flex-wrap: wrap; gap: .3rem; }
}
