/* ========== VARIABLES GLOBALES ========== */
:root {
  --primary: #2c7da0;
  --primary-dark: #1f5068;
  --secondary: #61a5c2;
  --accent: #a9d6e5;
  --dark: #2c3e50;
  --light: #f8fafc;
  --white: #ffffff;
  --gray: #7f8c8d;
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #27ae60;
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.5;
}

/* ========== HEADER & NAVIGATION (commun) ========== */
.header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.logo-img {
  height: 38px;
  width: auto;
  border-radius: 8px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--dark);
  letter-spacing: -0.3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-btn {
  background: var(--primary);
  color: white;
  padding: 0.45rem 1.2rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(44, 125, 160, 0.2);
}

.nav-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.auth-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.auth-btn {
  background: transparent;
  border: 1.5px solid rgba(44, 125, 160, 0.3);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}

.auth-btn.primary {
  background: var(--primary);
  color: white;
  border: none;
}

.auth-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.user-welcome {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(44, 125, 160, 0.08);
  padding: 0.3rem 0.8rem 0.3rem 1rem;
  border-radius: 40px;
}

.user-name {
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-logout {
  background: #e2e8f0;
  border: none;
  padding: 0.25rem 0.7rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #cbd5e1;
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* ========== MENU MOBILE ========== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: #2d3a4a;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
  transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  z-index: 200;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu .close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: white;
  margin-bottom: 0.5rem;
}

.mobile-menu a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: 0.7rem 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: block;
}

.mobile-menu .auth-buttons {
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.mobile-menu .auth-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  padding: 0.7rem;
  border-radius: 40px;
}

.mobile-menu .auth-btn.primary {
  background: white;
  color: #2d3a4a;
  border: none;
}

.mobile-menu .user-welcome {
  background: white;
  flex-direction: column;
  gap: 0.6rem;
  text-align: center;
  padding: 1rem;
  border-radius: 30px;
}

.mobile-menu .user-name {
  color: #2d3a4a;
}

.mobile-menu .btn-logout {
  background: #dc2626;
  color: white;
  width: 100%;
  padding: 0.5rem;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
  z-index: 150;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== MAIN CONTAINER (commun) ========== */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  background: var(--white);
  padding: 0.8rem 1.2rem;
  border-radius: 60px;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

/* ========== BOUTONS (commun) ========== */
.btn-hero, .btn-contact, .btn-details, .btn-map, .btn-filter, .btn-reset, .btn-login-submit, .btn-retour-login, .btn-publier-register, .btn-retour-register, .action-link, .pagination-btn, .view-btn {
  transition: var(--transition);
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ========== FORMULAIRES (commun) ========== */
.form-group input, .form-group select, .form-group textarea,
.filter-group input, .filter-group select,
.register-form input, .register-form select {
  padding: 0.8rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--white);
  width: 100%;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.1);
}

/* ========== PAGE ACCUEIL (INDEX) ========== */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 4rem;
}

.hero-left {
  flex: 1.2;
  min-width: 280px;
}

.hero-badge {
  display: inline-block;
  background: rgba(44, 125, 160, 0.1);
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--primary);
  border-bottom: 3px solid var(--accent);
}

.hero-description {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-hero.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 20px rgba(44, 125, 160, 0.2);
}

.btn-hero.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.btn-hero.secondary {
  background: white;
  color: var(--primary);
  border: 1px solid rgba(44, 125, 160, 0.3);
}

.btn-hero.secondary:hover {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--dark);
}

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.category-card {
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  padding: 0.5rem;
  border-radius: 20px;
  width: 140px;
}

.category-card:hover {
  transform: translateY(-6px);
}

.category-icon-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 0.8rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.category-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
  opacity: 0.8;
}

.category-card:hover .category-label {
  opacity: 1;
  color: var(--primary);
}

.action-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.action-card {
  background: white;
  border-radius: 28px;
  padding: 1.8rem;
  flex: 1 1 260px;
  min-width: 240px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
}

.action-icon {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.action-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.action-desc {
  color: var(--gray);
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  text-decoration: none;
  font-size: 0.8rem;
}

.action-link:hover {
  background: var(--primary-dark);
  gap: 0.8rem;
}

/* ========== PAGE AGENCES (idiot-immobilier) ========== */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--gray);
}

.location-alert {
  background: rgba(241, 196, 15, 0.15);
  border-left: 5px solid var(--warning);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.location-alert.success {
  background: rgba(39, 174, 96, 0.1);
  border-left-color: var(--success);
}

.filters-section {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--primary);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--dark);
}

.btn-filter, .btn-reset {
  padding: 0.6rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  border: none;
}

.btn-filter {
  background: var(--primary);
  color: white;
}

.btn-reset {
  background: #e2e8f0;
  color: var(--dark);
}

.stats-bar {
  background: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
}

.view-btn.active {
  background: var(--primary);
  color: white;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.item-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.type-icon {
  position: absolute;
  bottom: -15px;
  right: 10px;
  width: 18%;
  max-width: 70px;
  min-width: 40px;
}

.type-icon img {
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.distance-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: white;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
}

.card-content {
  padding: 1.2rem;
  margin-top: 0.5rem;
}

.item-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--dark);
}

.item-contact, .item-address {
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rating {
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--warning);
}

.views-count {
  font-size: 0.8rem;
  color: var(--gray);
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn-details, .btn-map, .btn-contact {
  flex: 1;
  padding: 0.5rem;
  border-radius: 40px;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-details {
  background: var(--primary);
  color: white;
}

.btn-map {
  background: var(--warning);
  color: white;
}

.btn-contact {
  background: var(--secondary);
  color: white;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
}

.pagination-btn.active {
  background: var(--primary);
  color: white;
}

.loading, .no-results {
  text-align: center;
  padding: 3rem;
  color: var(--gray);
}

/* ========== PAGE DÉTAIL BIEN ========== */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.image-section {
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.main-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 5rem;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  background: #f8fafc;
}

.thumbnail {
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.thumbnail:hover {
  border-color: var(--primary);
  transform: scale(1.02);
}

.thumbnail.active {
  border-color: var(--secondary);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-card {
  background: var(--white);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.title-section {
  margin-bottom: 1.5rem;
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.status-disponible {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.status-indisponible {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.title {
  font-size: 2rem;
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--gray);
  font-size: 0.95rem;
}

.section-title {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.section-title i {
  color: var(--primary);
}

.description-text {
  color: #475569;
  line-height: 1.7;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.detail-item i {
  color: var(--primary);
  margin-top: 0.2rem;
  min-width: 25px;
}

.detail-content strong {
  display: block;
  color: var(--dark);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  background: var(--white);
  border-radius: 28px;
  padding: 2rem;
  border-top: 4px solid var(--primary);
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-contact {
  padding: 0.8rem;
  border-radius: 60px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-favorite {
  background: white;
  border: 2px solid var(--danger);
  color: var(--danger);
}

.btn-favorite.active {
  background: var(--danger);
  color: white;
  border: none;
}

.location-card {
  background: var(--white);
  border-radius: 28px;
  padding: 2rem;
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.location-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.rating-display {
  margin: 1rem 0;
}

.stars {
  color: var(--warning);
  letter-spacing: 2px;
}

.avis-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0;
}

.avis-user {
  font-weight: 700;
  color: var(--dark);
}

.avis-date {
  font-size: 0.8rem;
  color: var(--gray);
  margin-left: 1rem;
}

.avis-note {
  color: var(--warning);
  margin: 0.3rem 0;
}

.stars-input i {
  font-size: 1.8rem;
  cursor: pointer;
  color: #cbd5e1;
  transition: color 0.2s;
  margin-right: 0.2rem;
}

.stars-input i.selected {
  color: var(--warning);
}

.error-message {
  text-align: center;
  padding: 2rem;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 28px;
  color: #721c24;
}

/* ========== PAGE LOGIN & REGISTER ========== */
.login-body {
  background: var(--light);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.register-form {
  max-width: 480px;
  width: 100%;
  background: var(--white);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--primary);
}

.logo-container {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon-login {
  width: 70px;
  height: 70px;
  background: var(--primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.logo-icon-login i {
  font-size: 2rem;
  color: white;
}

.register-form h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  text-align: center;
}

.subtitle-login {
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.85rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 1rem;
}

.form-group input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  font-size: 0.95rem;
}

.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-login-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: white;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  font-size: 1rem;
}

.btn-login-submit:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-retour-login {
  width: 100%;
  padding: 0.9rem;
  background: transparent;
  color: var(--primary);
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 1.5px solid rgba(44, 125, 160, 0.3);
  font-size: 1rem;
}

.btn-retour-login:hover {
  background: rgba(44, 125, 160, 0.05);
  border-color: var(--primary);
}

#login-status {
  margin-top: 1.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
  display: none;
}

#login-status.show {
  display: block;
}

#login-status.success {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
}

#login-status.error {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
}

#login-status.info {
  background: rgba(44, 125, 160, 0.1);
  color: var(--primary);
}

.link-section-login {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.link-section-login a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* ========== PAGE CARTE (styles spécifiques) ========== */
body.carte-body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
}

.header-carte {
  background: var(--white);
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  gap: 0.8rem;
  flex-wrap: wrap;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-carte {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #3498db 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.mode-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.mode-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  color: #6b7280;
  background: transparent;
  white-space: nowrap;
}

.mode-btn.active-agences {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.mode-btn.active-biens {
  background: var(--white);
  color: #e67e22;
}

.mode-badge {
  background: #e5e7eb;
  color: #374151;
  border-radius: 50px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.mode-btn.active-agences .mode-badge {
  background: var(--primary);
  color: white;
}

.mode-btn.active-biens .mode-badge {
  background: #e67e22;
  color: white;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-carte {
  padding: 0.38rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  background: var(--white);
  border: 1px solid #e5e7eb;
  color: #374151;
  transition: 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-carte-primary {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-locate {
  background: #3b82f6;
  color: white;
  border: none;
}

.btn-refresh-agences {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-refresh-biens {
  background: #e67e22;
  color: white;
  border: none;
}

.main-container-carte {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.sidebar-left {
  width: 290px;
  background: var(--white);
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  z-index: 15;
}

.sidebar-left.collapsed {
  transform: translateX(calc(-1 * 290px));
}

.sidebar-toggle-carte {
  position: absolute;
  left: 290px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-left: none;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: left 0.3s ease;
}

.sidebar-toggle-carte.collapsed {
  left: 6px;
}

.map-container {
  flex: 1;
  position: relative;
  background: #f3f4f6;
  min-width: 0;
}

#map {
  width: 100%;
  height: 100%;
  cursor: grab;
  display: block;
  touch-action: none;
}

.filter-group-carte {
  margin-bottom: 0.65rem;
}

.filter-group-carte label {
  font-size: 0.77rem;
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #6b7280;
}

.filter-select-carte,
.filter-input-carte {
  width: 100%;
  padding: 0.42rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #f9fafb;
  font-size: 0.78rem;
}

.filter-btn-carte {
  width: 100%;
  padding: 0.45rem;
  margin-bottom: 0.4rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.filter-btn-carte.biens-mode {
  background: #e67e22;
}

.map-controls {
  position: absolute;
  bottom: 1.5rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 20;
}

.map-controls button {
  width: 34px;
  height: 34px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.modal-carte {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-carte.show {
  display: flex;
}

.modal-content-carte {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

/* ========== PAGE REGISTER IMMOBILIER ========== */
.register-immobilier-body {
  background: var(--light);
  min-height: 100vh;
}

.hero-register {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title-register {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
  text-align: center;
  font-weight: 700;
}

.hero-subtitle-register {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 2rem;
  text-align: center;
}

.form-container-register {
  background: var(--white);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  border-top: 4px solid var(--primary);
}

.form-grid-register {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.form-group-register {
  display: flex;
  flex-direction: column;
}

.form-group-register.full-width {
  grid-column: 1 / -1;
}

.form-group-register label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 0.85rem;
}

.form-group-register label.required::after {
  content: " *";
  color: var(--danger);
}

.form-buttons-register {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-publier-register {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}

.btn-publier-register:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-retour-register {
  background: #e2e8f0;
  color: var(--dark);
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.btn-retour-register:hover {
  background: #cbd5e1;
  transform: translateY(-2px);
}

.section-toggle-register {
  background: #f8fafc;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1.5px solid transparent;
}

.section-toggle-register.active {
  border-color: var(--primary);
}

.section-toggle-register h4 {
  color: var(--dark);
  font-size: 0.95rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-content-register {
  display: none;
  margin-bottom: 1.5rem;
}

.section-content-register.active {
  display: block;
}

.auth-required-register {
  background: rgba(231, 76, 60, 0.1);
  border: 1.5px solid var(--danger);
  color: #721c24;
  padding: 2rem;
  border-radius: 24px;
  margin-bottom: 2rem;
  text-align: center;
}

.auth-required-register a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  margin: 0.5rem;
}

.auth-required-register a:first-of-type {
  background: var(--primary);
  color: white;
}

.auth-required-register a:last-of-type {
  background: var(--secondary);
  color: white;
}

.submission-status-register {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 16px;
  text-align: center;
  display: none;
}

.submission-status-register.success {
  display: block;
  background: rgba(39, 174, 96, 0.1);
  border: 1.5px solid var(--success);
  color: #155724;
}

.submission-status-register.error {
  display: block;
  background: rgba(231, 76, 60, 0.1);
  border: 1.5px solid var(--danger);
  color: #721c24;
}

/* ========== FOOTER (commun) ========== */
.footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  font-size: 0.8rem;
}

/* ========== RESPONSIVE GLOBAL ========== */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .burger {
    display: block;
  }
  .header-container {
    padding: 0.8rem 1rem;
  }
  .main-container {
    padding: 1.5rem 1rem;
  }
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-description {
    max-width: 100%;
    margin: 0 auto 1.5rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .categories-grid {
    gap: 1.5rem;
  }
  .category-card {
    width: 110px;
  }
  .category-icon-img {
    width: 75px;
    height: 75px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .main-image {
    height: 250px;
  }
  .title {
    font-size: 1.5rem;
  }
  .items-grid {
    grid-template-columns: 1fr;
  }
  .register-form {
    padding: 1.5rem;
  }
  .sidebar-left {
    width: 260px;
  }
  .sidebar-left.collapsed {
    transform: translateX(-100%);
  }
  .sidebar-toggle-carte {
    left: 260px;
  }
  .sidebar-toggle-carte.collapsed {
    left: 6px;
  }
  .btn-carte span, .mode-btn span {
    display: none;
  }
  .btn-carte {
    padding: 0.38rem;
  }
  .mode-btn {
    padding: 0.35rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .category-card {
    width: 90px;
  }
  .category-icon-img {
    width: 60px;
    height: 60px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .form-grid-register {
    grid-template-columns: 1fr;
  }
  .form-buttons-register {
    flex-direction: column;
  }
  .btn-retour-register, .btn-publier-register {
    width: 100%;
  }
}





/* ========== PAGE RECHERCHE BIENS ========== */
.item-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.5rem 0;
}

.item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0.5rem 0;
}

.item-details span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.rating-stars {
  color: var(--warning);
  font-size: 0.8rem;
  margin: 0.5rem 0;
}

.parent-info {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0.5rem 0;
  line-height: 1.4;
}

.parent-info i {
  width: 1.2rem;
  color: var(--primary);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.item-type-badge {
  background: var(--secondary);
  color: white;
  padding: 0.2rem 0.8rem;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-dispo {
  background: var(--success);
  color: white;
  padding: 0.2rem 0.8rem;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
}

.bien-type-icon {
  position: absolute;
  bottom: -15px;
  right: 10px;
  width: 18%;
  max-width: 70px;
  min-width: 40px;
}

.bien-type-icon img {
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.btn-detail, .btn-map-card {
  flex: 1;
  padding: 0.5rem;
  border-radius: 40px;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-detail {
  background: var(--primary);
  color: white;
}

.btn-map-card {
  background: var(--warning);
  color: white;
}

.btn-map-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive pour recherche biens */
@media (max-width: 768px) {
  .bien-type-icon {
    width: 22%;
    max-width: 55px;
    min-width: 35px;
    bottom: -10px;
    right: 6px;
  }
  .item-details {
    gap: 0.5rem;
    flex-direction: column;
  }
}