/* --- KUICHIWEB - DEMO DESIGN SYSTEM --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --primary: #3a86ff;
  --primary-dark: #0056b3;
  --primary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --secondary: #ff006e;
  --secondary-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  --accent: #8338ec;
  --success: #2ecc71;
  --warning: #ffbe0b;
  --danger: #e63946;
  --bg-main: #f4f7fc;
  --bg-card: #ffffff;
  --text-main: #2b2d42;
  --text-muted: #6c757d;
  --border-color: #e2e8f0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 50px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 35px rgba(58, 134, 255, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  font-weight: 700;
}

/* Header & Navigation */
.header-banner {
  background: #1e293b;
  color: #f8fafc;
  padding: 8px 20px;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.role-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-switcher select {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.85rem;
  cursor: pointer;
}

.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  padding: 12px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 10px 18px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  background: rgba(79, 172, 254, 0.12);
  color: var(--primary);
}

/* Hero Section */
.hero {
  position: relative;
  height: 420px;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.2s ease-in-out, transform 7s ease-out;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1.06);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.65) 0%, rgba(15,23,42,0.85) 100%);
  z-index: 2;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  width: 34px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 750px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.92;
  margin-bottom: 28px;
  font-weight: 600;
}

/* Quick Search Bar in Hero */
.hero-search {
  background: white;
  padding: 8px;
  border-radius: var(--radius-pill);
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.hero-search input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  outline: none;
}

.hero-search button {
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--primary-gradient);
  color: white;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.hero-search button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0,242,254,0.4);
}

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  flex: 1;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--text-main);
  position: relative;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  margin-top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(79, 172, 254, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5);
}

.btn-secondary {
  background: #edf2f7;
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--secondary-gradient);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 117, 140, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.badge-247 {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #e63946;
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(230, 57, 70, 0.4);
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-commune {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.card-info {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-stars {
  color: #ffc107;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Filters & Search Controls */
.filter-bar {
  background: white;
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.search-input-group {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input-group input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.filter-select {
  padding: 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  background: white;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--primary);
}

.checkbox-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  padding: 8px 16px;
  background: #f8fafc;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-backdrop.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--danger);
}

.modal-body {
  padding: 28px;
}

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

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  animation: slideIn 0.3s ease;
}

.toast-success {
  border-left: 5px solid var(--success);
}

.toast-error {
  border-left: 5px solid var(--danger);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 50px 5% 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  margin-bottom: 18px;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 25px;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.1rem; }
  .navbar { flex-direction: column; gap: 15px; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}
