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

html,
body {
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- HEADER CO-BRANDÉ --- */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  gap: 0.5rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

.city-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}

.city-logo {
  height: 36px;
  max-width: 145px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background-color: var(--border-light);
  opacity: 0.85;
  flex-shrink: 0;
}

.powered-by {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  opacity: 0.85;
  flex: 0 0 auto;
  white-space: nowrap;
}

.powered-by span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.powered-by strong {
  font-weight: 700;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--color-primary);
}

.hide-mobile {
  display: none;
}

.btn-outline-sm {
  text-decoration: none;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.btn-outline-sm:hover {
  background-color: var(--color-primary);
  color: var(--text-inverse);
}

/* --- HERO AVEC PHOTO DE FOND & VOILE BLEU --- */
.hero {
  background-color: var(--color-primary);
  background-image:
    linear-gradient(180deg, rgba(0, 42, 92, 0.76) 0%, rgba(0, 58, 123, 0.46) 100%),
    url('../assets/montpellier-fond-flou.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-inverse);
  padding: 2.25rem 0 2.75rem;
}

.hero-container {
  max-width: 760px;
  text-align: left;
}

.city-selector-wrapper {
  margin-bottom: 1rem;
}

.city-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  color: var(--text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.city-pill:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.hero-title {
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-inverse);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 10px rgba(0, 18, 45, 0.25);
}

.highlight-city {
  display: block;
  color: #F4A261;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.5rem;
}

/* Carte de recherche / message */
.search-card {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: 0 14px 36px rgba(0, 18, 45, 0.28);
}

.input-wrapper textarea {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  resize: none;
  transition: border-color 0.2s;
}

.input-wrapper textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Sélecteur de périmètre */
.scope-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.scope-option {
  cursor: pointer;
}

.scope-option input {
  position: absolute;
  opacity: 0;
}

.scope-option span {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.scope-option input:checked + span {
  background-color: #FDF3EB;
  color: var(--color-primary);
  border-color: #E08A53;
  font-weight: 600;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--bg-subtle);
}

.reassurance-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background-color: #D96B27;
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.82rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background-color: #C25A1B;
}

.btn-full {
  width: 100%;
}

/* --- COMMERÇANTS À DÉCOUVRIR --- */
.featured-shops {
  padding: 2.25rem 0 3.5rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--color-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.shops-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  scrollbar-width: none;
}

.shops-track::-webkit-scrollbar {
  display: none;
}

.shop-card {
  flex: 0 0 82%;
  max-width: 310px;
  scroll-snap-align: start;
  background-color: var(--bg-surface);
  border: 1px solid rgba(0, 58, 123, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 28, 65, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 28, 65, 0.08);
}

.shop-cover {
  height: 76px;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid rgba(0, 58, 123, 0.06);
}

.shop-category {
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 58, 123, 0.08);
}

.shop-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shop-name {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.shop-bio {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  flex: 1;
  line-height: 1.48;
}

.shop-meta {
  font-size: 0.78rem;
  color: #526071;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.btn-card {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background-color: #FAF6F1;
  border: 1px solid rgba(0, 58, 123, 0.1);
  color: var(--color-primary);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-card:hover {
  background-color: #FDF2E9;
  border-color: rgba(217, 107, 39, 0.35);
}

/* --- MODALES --- */
.modal-sheet {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(92vw, 440px);
  margin: auto;
  box-shadow: 0 20px 50px rgba(0, 18, 45, 0.35);
}

.modal-sheet::backdrop {
  background: rgba(0, 22, 51, 0.6);
  backdrop-filter: blur(3px);
}

.modal-content {
  padding: 1.4rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.modal-header h2 {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.btn-close {
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-main);
}

.modal-recap {
  background: var(--bg-subtle);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  border-left: 3px solid var(--color-accent);
}

.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.text-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.feedback-box {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: #E8F6EE;
  color: #145A32;
  font-size: 0.9rem;
  font-weight: 500;
}

.city-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.city-choice-btn {
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.city-choice-btn:hover {
  background: var(--color-primary-light);
}

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

/* --- TABLETTE & DESKTOP --- */
@media (min-width: 768px) {
  .header-inner {
    min-height: 68px;
    gap: 0.75rem;
  }

  .brand-group {
    gap: 0.7rem;
  }

  .city-logo {
    height: 64px;
    max-width: 240px;
  }

  .powered-by span {
    font-size: 0.82rem;
  }

  .btn-outline-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.84rem;
  }

  .hide-mobile {
    display: inline-flex;
  }

  .hero {
    padding: 4rem 0 3.75rem;
  }

  .hero-container {
    margin: 0 auto;
    text-align: center;
  }

  .hero-title {
    font-size: 2.6rem;
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.45;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .scope-selector {
    justify-content: center;
  }

  .form-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .btn-primary {
    width: auto;
    padding: 0.88rem 1.65rem;
    font-size: 1rem;
  }

  .btn-full {
    width: 100%;
  }

  .shops-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
  }

  .shop-card {
    flex: none;
    max-width: none;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}