:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #172126;
  --muted: #6f7b82;
  --border: #dfe5e8;
  --primary: #111b20;
  --accent: #ff6b35;
  --accent-dark: #e95b29;
  --green: #20a464;
  --shadow: 0 18px 50px rgba(20, 35, 42, .08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .25s ease, color .25s ease;
}

body.dark {
  --bg: #0f1519;
  --surface: #172025;
  --surface-soft: #1b272d;
  --text: #f2f5f6;
  --muted: #aab5ba;
  --border: #304047;
  --primary: #f2f5f6;
  --shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 107, 53, .22);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}


/* =========================
   HEADER
========================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

body.dark .topbar {
  background: rgba(15, 21, 25, .94);
}

.brand {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.7px;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 13px;
  border-radius: 10px;
  font-weight: 700;
  transition: .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-soft);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-btn,
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 11px;
  min-height: 42px;
  padding: 0 15px;
  font-weight: 700;
}

.theme-toggle {
  width: 42px;
  padding: 0;
}


/* =========================
   HERO
========================= */

.hero {
  padding: 72px 20px 64px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 107, 53, .11), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(32, 164, 100, .08), transparent 30%);
}

.hero-inner {
  max-width: 1050px;
  margin: auto;
  text-align: center;
}

.france-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(20, 35, 42, .04);
}

.hero h1 {
  margin: 22px 0 12px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: .98;
  letter-spacing: -3px;
}

.hero p {
  max-width: 650px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-cta,
.search-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  min-height: 48px;
  padding: 0 22px;
  font-weight: 850;
  transition: transform .15s ease, background .2s ease;
}

.hero-cta:hover,
.search-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}


/* =========================
   SEARCH CARD
========================= */

.search-section {
  padding: 0 20px 55px;
}

.search-card {
  max-width: 1120px;
  margin: -12px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.mode-tabs {
  display: flex;
  padding: 9px;
  gap: 7px;
  border-bottom: 1px solid var(--border);
}

.mode-tab {
  flex: 1;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  font-weight: 850;
  transition: .2s ease;
}

.mode-tab:hover,
.mode-tab.active {
  background: var(--surface-soft);
  color: var(--text);
}

.mode-tab.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.search-form {
  padding: 28px;
}

.full-width {
  grid-column: 1 / -1;
}

.natural-search {
  position: relative;
  margin-bottom: 22px;
}

.natural-search label,
.field label,
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.natural-search input,
.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  transition: border .2s ease, box-shadow .2s ease;
}

.natural-search input:focus,
.field input:focus,
.field select:focus {
  border-color: rgba(255, 107, 53, .65);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, .08);
  outline: none;
}

/* L'exemple gris d'une case « phrase » s'efface dès qu'on clique dedans (1er oct.). */
.natural-search input:focus::placeholder {
  color: transparent;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.location-input-wrap {
  display: flex;
  position: relative;
}

.location-input-wrap input {
  padding-right: 50px;
}

.geo-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
}

.geo-btn:hover {
  background: var(--border);
}

.location-suggestions,
.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 40;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.suggestion-item {
  width: 100%;
  display: block;
  padding: 12px 14px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item:hover {
  background: var(--surface-soft);
}


/* =========================
   CALENDAR
========================= */

.custom-date-wrap {
  position: relative;
}

.date-button {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
}

.custom-calendar {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: 310px;
  z-index: 60;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.calendar-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-days button {
  height: 35px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.calendar-days button:hover {
  background: var(--surface-soft);
}

.calendar-days button.today {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-days button.selected {
  background: var(--accent);
  color: #fff;
}

.calendar-days button.other-month {
  color: var(--muted);
  opacity: .45;
}

.calendar-shortcuts {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.calendar-shortcuts button {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 8px;
  min-height: 34px;
  font-size: 12px;
  font-weight: 750;
}


/* =========================
   GROUP / PMR / BUDGET
========================= */

.group-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.counter button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.counter b {
  color: var(--text);
}

body.dark .counter {
  background: #202a30;
  border-color: #3a474f;
  color: var(--text);
}

body.dark .counter button {
  background: #2a363d;
  color: var(--text);
  border: 0;
}

body.dark .counter b {
  color: #f2f5f6;
}

.simple-pmr {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

body.dark .simple-pmr {
  background: #182126;
}

.simple-pmr label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}

.budget-field {
  grid-column: span 2;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.budget-mode {
  display: flex;
  gap: 4px;
}

.budget-mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.budget-mode-btn.active {
  background: var(--surface-soft);
  color: var(--text);
}

.range-value {
  margin-bottom: 6px;
  text-align: center;
}

.range-value strong {
  font-size: 18px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 24px;
}

.surprise-btn,
.secondary-btn {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.surprise-btn:hover,
.secondary-btn:hover {
  background: var(--surface-soft);
}

.full-width-btn {
  width: 100%;
}


/* =========================
   RESULTS
========================= */

.results-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 15px 20px 70px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}

.results-kicker {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.results-header h2,
.page-heading h1,
.page-heading h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -1.3px;
}

.results-header p,
.page-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.results-actions {
  display: flex;
  gap: 5px;
}

.view-btn,
.map-style-btn {
  min-height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 9px;
  padding: 0 12px;
  font-weight: 750;
}

.view-btn.active,
.map-style-btn.active {
  background: var(--surface-soft);
  color: var(--text);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.activity-card,
.travel-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 9px 30px rgba(20, 35, 42, .05);
}

.card-image {
  height: 175px;
  background: var(--surface-soft);
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 16px;
}

.card-type {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.card-title {
  margin: 5px 0 8px;
  font-size: 20px;
  line-height: 1.15;
}

.card-location {
  margin: -2px 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0;
}

.meta-chip {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-description {
  margin: 9px 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.card-action {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  min-height: 35px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 750;
}

.card-action:hover {
  background: var(--surface-soft);
}

.card-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.favorite-btn.active {
  color: #ef3e58;
}


/* =========================
   MAP
========================= */

#map {
  width: 100%;
  height: 550px;
}

.map-container {
  position: relative;
  min-height: 550px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.map-toolbar {
  position: absolute;
  z-index: 1000;
  top: 15px;
  left: 90px;
  display: flex;
  gap: 5px;
}

.map-placeholder {
  min-height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.map-placeholder span {
  display: block;
  font-size: 40px;
}

.map-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.map-placeholder p {
  margin: 5px 0 0;
}


/* =========================
   PAGES
========================= */

.site-page {
  display: none;
}

.site-page.active-page {
  display: block;
}

.page-container {
  max-width: 1120px;
  margin: auto;
  padding: 65px 20px 90px;
}

.narrow-page {
  max-width: 800px;
}

.page-heading {
  margin-bottom: 32px;
}

.page-heading-with-action {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.discover-card {
  min-height: 185px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 30px rgba(20, 35, 42, .04);
  transition: transform .18s ease, box-shadow .18s ease;
}

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

.discover-card span {
  margin-bottom: auto;
  font-size: 36px;
}

.discover-card strong {
  font-size: 19px;
}

.discover-card small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.discover-surprise {
  margin-top: 30px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.discover-surprise > div {
  display: flex;
  align-items: center;
  gap: 15px;
}

.discover-surprise > div > span {
  font-size: 32px;
}

.discover-surprise strong {
  font-size: 17px;
}

.discover-surprise p {
  margin: 3px 0 0;
  color: var(--muted);
}

.saved-content {
  display: grid;
  gap: 13px;
}

.saved-item {
  padding: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.saved-item-main {
  min-width: 0;
}

.saved-item-title {
  margin: 0;
  font-size: 17px;
}

.saved-item-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.saved-item-actions {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.empty-state {
  padding: 55px 25px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.empty-state span {
  display: block;
  margin-bottom: 10px;
  font-size: 38px;
}

.empty-state strong {
  font-size: 18px;
}

.empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
}

.info-card {
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.info-card h2 {
  margin-top: 0;
}

.info-card p {
  color: var(--muted);
  line-height: 1.7;
}


/* =========================
   MODALS
========================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 15, .62);
  backdrop-filter: blur(5px);
}

.modal-box {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .25);
}

.detail-modal-box {
  width: min(100%, 760px);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
}

.modal-icon {
  font-size: 35px;
  margin-bottom: 8px;
}

.modal-box h2 {
  margin: 0 0 7px;
  font-size: 28px;
  letter-spacing: -.8px;
}

.modal-subtitle {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
}

.account-view {
  padding-top: 5px;
}

.account-divider {
  position: relative;
  margin: 20px 0;
  text-align: center;
}

.account-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

.account-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.text-btn {
  display: block;
  margin: 13px auto 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 750;
}

.account-optional {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 17px;
}

.dashboard-stat {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  text-align: center;
}

.dashboard-stat strong {
  display: block;
  font-size: 25px;
}

.dashboard-stat span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.dashboard-item {
  width: 100%;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.dashboard-item:hover {
  background: var(--surface-soft);
}

.dashboard-item > span {
  font-size: 22px;
}

.dashboard-item strong,
.dashboard-item small {
  display: block;
}

.dashboard-item small {
  margin-top: 3px;
  color: var(--muted);
}


/* =========================
   DETAIL
========================= */

.detail-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 20px;
}

.detail-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-title {
  margin: 5px 0 10px;
  font-size: 32px;
  letter-spacing: -1px;
}

.detail-description {
  color: var(--muted);
  line-height: 1.65;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.detail-info {
  padding: 13px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.detail-info strong {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-source {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}


/* =========================
   TOAST
========================= */

.toast {
  position: fixed;
  z-index: 500;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  padding: 12px 16px;
  background: #172126;
  color: #fff;
  border-radius: 11px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .22);
  font-size: 13px;
  font-weight: 700;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 950px) {
  .topbar {
    padding: 0 18px;
    gap: 12px;
  }

  .main-nav {
    overflow-x: auto;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-field {
    grid-column: span 2;
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .topbar {
    min-height: auto;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
  }

  .nav-link {
    white-space: nowrap;
  }

  .hero {
    padding: 52px 17px 45px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .hero p {
    font-size: 16px;
  }

  .search-section {
    padding: 0 12px 40px;
  }

  .search-form {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .budget-field {
    grid-column: auto;
  }

  .group-controls {
    grid-template-columns: 1fr;
  }

  .search-actions {
    flex-direction: column-reverse;
  }

  .search-actions button {
    width: 100%;
  }

  .custom-calendar {
    width: min(310px, calc(100vw - 50px));
  }

  .results-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .discover-grid {
    grid-template-columns: 1fr;
  }

  .discover-surprise {
    flex-direction: column;
    align-items: stretch;
  }

  .discover-surprise button {
    width: 100%;
  }

  .page-heading-with-action {
    flex-direction: column;
    align-items: stretch;
  }

  .saved-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-item-actions {
    width: 100%;
  }

  .saved-item-actions button {
    flex: 1;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .modal-box {
    padding: 22px;
  }
}

/* Crédit photo (obligatoire pour les photos DATAtourisme) */
.image-credit {
  position: absolute;
  right: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-credit {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.warning-chip {
  color: #9a4b00;
  background: #fff3e0;
}

body.dark .warning-chip {
  color: #ffc58a;
  background: #3a2a18;
}

/* Fiche détaillée */
.fiche-extra {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0;
}

.fiche-section h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.fiche-section p {
  margin: 0 0 4px;
}

.fiche-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fiche-note,
.fiche-muted {
  color: var(--muted);
  font-size: 13px;
}

.fiche-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: #9a4b00;
  background: #fff3e0;
}

body.dark .fiche-warning {
  color: #ffc58a;
  background: #3a2a18;
}

.fiche-photos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.fiche-photos figure {
  margin: 0;
  flex: 0 0 auto;
  width: 200px;
}

.fiche-photos img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.fiche-photos figcaption {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fiche-chips,
.line-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fiche-chips span {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 13px;
}

.fiche-transports {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line-chip {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.fiche-sources {
  font-size: 13px;
}

.selectable {
  user-select: all;
}

/* Voyages : résumé de la destination */
.travel-overview {
  grid-column: 1 / -1;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.travel-overview h3,
.travel-overview p {
  margin: 0;
}

.travel-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


/* Fiche : tracé d'un itinéraire */
.fiche-map {
  height: 260px;
  margin: 8px 0 4px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}


/* Pied de page */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  padding: 26px 18px 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--text);
}

.info-card a {
  color: var(--accent-dark);
  font-weight: 600;
}

body.dark .info-card a {
  color: var(--accent);
}


/* Suggestions d'adresse : rien d'affiché tant qu'il n'y a rien à proposer, et la liste reste sous son champ */
.location-suggestions:empty,
.search-suggestions:empty {
  display: none;
}

.field:has(> .location-suggestions) {
  position: relative;
}


/* Formulaire simplifié : filtres avancés repliés derrière « Plus de filtres » */
.filters-collapsed .advanced-filter {
  display: none;
}

.more-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 14px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
}

.more-filters-btn:hover {
  text-decoration: underline;
}

body.dark .more-filters-btn {
  color: var(--accent);
}

/* Carte sans photo : le nom du lieu dans l'espace de la photo (au lieu d'un grand carré blanc). */
.card-image .map-placeholder {
  min-height: 0;
  height: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--surface-soft), rgba(255, 107, 53, 0.14));
}

.card-image .map-placeholder span {
  font-size: 30px;
}

.card-image .map-placeholder strong {
  font-size: 16px;
  line-height: 1.3;
}

/* Lieu sans photo : vue du ciel IGN centrée sur le lieu, avec un repère au centre. */
.card-image .aerial-image {
  position: absolute;
  inset: 0;
}

.aerial-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -85%);
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.card-image.aerial-failed .aerial-image,
.card-image.aerial-failed .aerial-pin,
.card-image.aerial-failed .aerial-credit {
  display: none;
}

.detail-aerial {
  position: relative;
  margin-bottom: 20px;
}

.detail-aerial .detail-image {
  margin-bottom: 0;
}

.detail-aerial .aerial-pin {
  top: 130px;
  font-size: 34px;
}

/* Raisons sous chaque carte (« Catégorie recherchée », « Très proche »…) : petites pastilles espacées. */
.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
}

.match-reason {
  padding: 4px 8px;
  border-radius: 7px;
  background: #e8f6ee;
  color: #146c43;
  font-size: 12px;
  font-weight: 700;
}

body.dark .match-reason {
  background: rgba(32, 164, 100, .18);
  color: #7ee0ab;
}

/* Formulaires de recherche : textes centrés (demande du 29 sept.). Les listes de suggestions restent alignées à gauche. */
.search-form .natural-search label,
.search-form .field label,
.search-form .field-label {
  text-align: center;
}

.search-form .natural-search input,
.search-form .field input,
.search-form .field select {
  text-align: center;
  text-align-last: center;
}

.search-form .date-button {
  justify-content: center;
  gap: 10px;
}

.search-form .field-label-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.search-form .simple-pmr label {
  justify-content: center;
}

.search-form .more-filters-btn {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Budget (seul sur sa ligne quand « Plus de filtres » est ouvert) : sur toute la largeur du formulaire, curseur compris. */
@media (min-width: 951px) {
  #activityForm .budget-field,
  #travelForm .budget-field {
    grid-column: 1 / -1;
  }
}

/* Curseur du budget : pas de cadre autour quand on le bouge (demande du 29 sept.) ; au clavier, le contour de
   repérage reste pour savoir où l'on est. */
.field input[type="range"],
.field input[type="range"]:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.field input[type="range"]:focus:not(:focus-visible) {
  outline: none;
}

/* Montant du budget : on peut aussi le taper au clavier (demande du 29 sept.) ; il ressemble au texte, souligné en
   pointillé pour montrer qu'on peut cliquer dessus. */
.range-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.search-form .field .budget-amount {
  width: 4ch;
  min-height: 0;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px dashed var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  cursor: text;
}

.search-form .field .budget-amount:hover,
.search-form .field .budget-amount:focus {
  border-bottom: 2px solid var(--accent);
  box-shadow: none;
  outline: none;
}

/* Case « Accessible en fauteuil roulant » : toute la zone grise est cliquable, case plus grande, zone colorée quand
   elle est cochée (demande du 29 sept.). */
.simple-pmr {
  padding: 0;
}

.search-form .simple-pmr label {
  min-height: 48px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
}

.simple-pmr input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.simple-pmr:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 107, 53, .08);
}

/* Formulaires de recherche : écriture plus grande (demande du 29 sept.). */
.mode-tab {
  font-size: 18px;
}

.search-form .natural-search label,
.search-form .field label,
.search-form .field-label {
  font-size: 15px;
}

.search-form .natural-search input,
.search-form .field input,
.search-form .field select,
.search-form .date-button,
.search-form .simple-pmr label,
.search-form .more-filters-btn,
.search-form .search-actions button {
  font-size: 17px;
}

.search-form .budget-mode-btn {
  font-size: 13px;
}

.search-form .field .budget-amount,
.search-form .range-value strong {
  font-size: 22px;
}

/* Langues : bouton drapeau à côté du mode jour/nuit, liste des 5 langues (demande du 29 sept.). */
.lang-menu {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.lang-flag {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.lang-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 120;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lang-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.lang-list button:hover,
.lang-list button[aria-current="true"] {
  background: var(--surface-soft);
}

/* Page dans une autre langue : cachée le temps de la traduire (au plus 1,5 s), pour ne pas voir le français passer. */
.i18n-wait body {
  visibility: hidden;
  animation: i18n-show 0s 1.5s forwards;
}

@keyframes i18n-show {
  to {
    visibility: visible;
  }
}

/* Liste des langues centrée sous le bouton drapeau, juste assez large pour son contenu (demande du 29 sept.). */
.lang-list {
  left: 50%;
  right: auto;
  min-width: 0;
  width: max-content;
  transform: translateX(-50%);
}

.lang-list button {
  padding: 10px 16px;
}

/* Onglet Connexion : compte e-mail + mot de passe (demande du 29 sept.). */
.account-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.account-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.account-switch-btn {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.account-switch-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

.account-form {
  display: grid;
  gap: 8px;
}

.account-form label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.account-form input[type="email"],
.account-form input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.account-form input[type="email"]:focus,
.account-form input[type="password"]:focus {
  border-color: rgba(255, 107, 53, .65);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, .08);
  outline: none;
}

.account-form button[type="submit"] {
  margin-top: 10px;
  font-size: 17px;
}

.account-form .account-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.account-check input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.account-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.account-line {
  margin: 0;
  font-size: 17px;
}

.account-more summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.account-more[open] summary {
  margin-bottom: 6px;
}

.danger-btn {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #c62828;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

#accountLogoutBtn {
  justify-self: start;
}

/* Menu du haut : icône et nom séparés ; sur tablette et téléphone, les 4 onglets tiennent sans défiler, l'icône
   au-dessus du nom. */
.nav-icon {
  margin-right: 5px;
}

@media (max-width: 1020px) {
  .main-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }

  .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }

  .nav-icon {
    margin-right: 0;
    font-size: 19px;
  }
}

/* Bouton « Mon compte » en haut à droite, avant la langue (demande du 29 sept.). */
.top-actions .account-btn {
  order: -1;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

body:has(#page-account.active-page) .top-actions .account-btn {
  border-color: var(--accent);
  color: var(--accent);
}

/* Tablette étroite : les onglets passent sous le nom du site et les boutons. */
@media (max-width: 760px) {
  .topbar {
    min-height: auto;
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
  }
}

/* Téléphone : le nom du site et les 3 boutons restent sur une ligne. */
@media (max-width: 650px) {
  .brand {
    font-size: 19px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .account-btn {
    min-height: 38px;
    padding: 0 9px;
    font-size: 13px;
  }

  .top-actions .lang-btn {
    gap: 5px;
    padding: 0 8px;
  }

  .top-actions .lang-btn,
  .top-actions .theme-toggle {
    min-height: 38px;
  }

  .top-actions .theme-toggle {
    width: 38px;
  }
}

/* Petits téléphones (360-375 px de large) : le drapeau seul pour la langue. */
@media (max-width: 389px) {
  .top-actions .lang-btn span {
    display: none;
  }
}

/* Onglet choisi en orange, comme « Mon compte » sur sa page (demande du 29 sept.). Orange plus foncé en mode jour,
   pour qu'il se lise bien sur fond clair. */
.main-nav .nav-link.active,
body:has(#page-account.active-page) .top-actions .account-btn {
  color: var(--accent-dark);
  background: rgba(255, 107, 53, .12);
}

body.dark .main-nav .nav-link.active,
body.dark:has(#page-account.active-page) .top-actions .account-btn {
  color: var(--accent);
}

/* Pied de page toujours en bas de l'écran, même quand la page est courte (demande du 29 sept.). */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body > main {
  flex: 1 0 auto;
}

/* Menu jour/nuit (demande du 29 sept.) : comme l'appareil, lever et coucher du soleil, jour, nuit. Même allure que
   la liste des langues, mais calée sur le bord droit (le bouton est tout à droite). */
.theme-menu {
  position: relative;
}

.theme-list {
  left: auto;
  right: 0;
  transform: none;
}

.theme-group {
  margin: 8px 16px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.theme-icon {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.theme-label {
  display: flex;
  flex-direction: column;
}

.theme-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.theme-label small:empty {
  display: none;
}

.theme-list button[aria-checked="true"] {
  color: var(--accent-dark);
  background: rgba(255, 107, 53, .12);
}

body.dark .theme-list button[aria-checked="true"] {
  color: var(--accent);
}

/* Compte, suite (29 sept.) : messages durables, liens discrets, boutons côte à côte. */
.account-notice {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 107, 53, .1);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.account-notice p {
  margin: 0 0 6px;
}

#accountMessage {
  margin-bottom: 18px;
}

.account-link {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

body.dark .account-link {
  color: var(--accent);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

a.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Le lien « Télécharger mes données » a l'allure d'un bouton, pas d'un lien orange. */
.account-actions a.secondary-btn,
body.dark .account-actions a.secondary-btn {
  color: var(--text);
}

/* Abonnement (à venir) dans « Mon compte » : la formule et ce que l'abonnement apportera. */
.plan-box {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px dashed var(--accent);
  border-radius: 14px;
  background: rgba(255, 107, 53, .06);
}

.plan-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--text) !important;
  font-size: 18px;
  font-weight: 800;
}

.plan-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.plan-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.plan-list li {
  display: flex;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.plan-notify {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}

.plan-notify input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

/* Menu « Mon compte » (demande du 30 sept.) : connecté, le bouton du haut ouvre un petit menu, de la même allure que
   la liste des langues, centré sous le bouton. Déconnecté, le bouton s'appelle « Connexion », sans flèche. */
.top-actions .account-menu {
  position: relative;
  order: -1;
}

/* Flèche bien visible (demande du 30 sept.), tournée vers le haut quand le menu est ouvert. */
.account-caret {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  vertical-align: -4px;
  transition: transform .2s ease;
}

.account-btn[aria-haspopup] .account-caret {
  display: inline-block;
}

.account-btn[aria-expanded="true"] .account-caret {
  transform: rotate(180deg);
}

/* Adresse pas encore confirmée : un point orange sur le bouton, et une ligne en tête du menu. */
.account-btn.account-warn::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.account-list {
  min-width: 240px;
  max-width: min(320px, calc(100vw - 28px));
}

/* Ligne « Confirme ton adresse e-mail » en orange, comme le point du bouton. */
#accountMenuVerify {
  color: var(--accent-dark);
}

body.dark #accountMenuVerify {
  color: var(--accent);
}

.account-list-email {
  margin: 0 16px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.account-list-sep {
  margin: 6px 4px;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Téléphone : le menu prend la largeur de l'écran, sous la première ligne (le bouton n'est pas au bord droit). */
@media (max-width: 650px) {
  .top-actions .account-menu {
    position: static;
  }

  .account-list {
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    transform: none;
  }
}

/* Petits téléphones : flèche un peu plus serrée, pour que les 3 boutons tiennent à côté du nom du site. */
@media (max-width: 389px) {
  .top-actions .account-btn {
    padding: 0 7px;
  }

  .account-caret {
    width: 15px;
    height: 15px;
    margin-left: 3px;
    vertical-align: -3px;
  }
}

/* Onglet Voyage (demande du 30 sept.) : programme jour par jour, comment y aller, où dormir. */
@media (min-width: 951px) {
  .voyage-budget {
    grid-column: span 2;
  }
}

.voyage-block {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voyage-block h3 {
  margin: 0;
  font-size: 19px;
}

.voyage-block p {
  margin: 0;
  line-height: 1.5;
}

.voyage-slot {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.voyage-when {
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.voyage-list {
  display: grid;
  gap: 8px;
}

.voyage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.voyage-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  font-size: 26px;
}

.voyage-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voyage-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.voyage-text strong {
  font-size: 15px;
  line-height: 1.3;
}

.voyage-text span {
  color: var(--muted);
  font-size: 13px;
}

.voyage-credit {
  color: var(--muted);
  font-size: 11px;
}

.voyage-actions {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

.voyage-free,
.voyage-hint {
  color: var(--muted);
}

.voyage-free {
  padding: 14px 0;
  font-style: italic;
}

.voyage-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (min-width: 951px) {
  .work-where {
    grid-column: span 2;
  }
}

.voyage-text .work-open {
  color: var(--green);
  font-weight: 700;
}

.voyage-text .work-closed {
  color: #d9534f;
  font-weight: 700;
}

/* Quatre onglets sur téléphone : deux par ligne. */
@media (max-width: 650px) {
  .mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 7px;
  }

  .mode-tab {
    min-height: 44px;
    padding: 0 4px;
    font-size: 15px;
  }

  .voyage-block {
    padding: 14px;
  }

  .voyage-slot {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .voyage-when {
    padding-top: 0;
  }

  .voyage-item {
    flex-wrap: wrap;
  }

  .voyage-thumb {
    width: 60px;
    height: 50px;
  }

  .voyage-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Les 4 formulaires rangés pareil (30 sept.) : Travail n'a plus de case sur deux colonnes. */
.work-where {
  grid-column: auto;
}

/* « 🔁 Autre idée » et « 🔗 Partager » (Voyage et Travail, 30 sept.) */
.voyage-slot-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.voyage-swap {
  min-height: 34px;
  padding: 0 11px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.voyage-swap:hover {
  background: var(--surface-soft);
}

.voyage-share {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--accent);
  color: var(--accent);
  font-size: 14px;
}

.voyage-share-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.voyage-item.voyage-new {
  animation: voyageNew 0.5s ease-out;
}

@keyframes voyageNew {
  from {
    opacity: 0.2;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .voyage-item.voyage-new {
    animation: none;
  }
}

@media (max-width: 650px) {
  .voyage-slot-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Onglets : une ligne sous chaque nom pour dire tout de suite à quoi il sert. */
.mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
}

.mode-tab-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

@media (max-width: 650px) {
  .mode-tab {
    min-height: 60px;
  }

  .mode-tab-hint {
    font-size: 12px;
  }
}

@media (max-width: 389px) {
  .mode-tab-hint {
    font-size: 11.5px;
  }
}

/* « 📶 Wi-Fi » (Travail, Voyage, cartes) */
.voyage-text .voyage-wifi,
.wifi-chip {
  width: fit-content;
  color: #2f7de1;
  font-weight: 750;
}

.voyage-text .voyage-wifi {
  font-size: 12px;
}

/* Menu du haut allégé (demande du 30 sept.) : Favoris seul, à droite, à côté du compte ; le logo ramène à l'accueil. */
.main-nav {
  justify-content: flex-end;
}

@media (max-width: 1020px) {
  .main-nav {
    display: flex;
  }

  .main-nav .nav-link {
    flex-direction: row;
    padding: 8px 10px;
    font-size: 15px;
  }

  .main-nav .nav-icon {
    margin-right: 5px;
    font-size: 16px;
  }
}

/* Tablette étroite : Favoris sur la même ligne que le nom du site et les boutons. */
@media (max-width: 760px) {
  .main-nav {
    order: 0;
    flex: none;
    flex-basis: auto;
    margin-left: auto;
  }
}

/* Téléphone : pas la place pour le cœur à côté du compte, de la langue et du mode nuit ; la ligne du haut reste comme
   avant, et « Favoris » est dans le menu du compte (connecté ou non). */
@media (max-width: 650px) {
  .main-nav {
    display: none;
  }
}

/* « Reprendre » : les 3 dernières recherches de l'onglet, sous les onglets (défilent sur téléphone). */
.recent-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 18px 28px 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.recent-searches::-webkit-scrollbar {
  display: none;
}

.recent-title {
  flex: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.recent-chip,
.mood-chip {
  flex: none;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.recent-chip:hover,
.mood-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.recent-all {
  flex: none;
  padding: 7px 4px;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

body.dark .recent-all {
  color: var(--accent);
}

/* (même marge que le formulaire en dessous) */
@media (max-width: 650px) {
  .recent-searches {
    padding: 14px 18px 0;
  }
}

/* Activités : « Envie de » (ambiances), sur deux lignes au plus sur ordinateur, qui défilent sur téléphone. */
.mood-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: -4px 0 14px;
}

.mood-title {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.mood-chip {
  padding: 6px 11px;
  font-size: 13.5px;
}

@media (max-width: 650px) {
  .mood-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mood-chips::-webkit-scrollbar {
    display: none;
  }

  .mood-title {
    flex: none;
  }
}

/* Météo (1er oct.) : bandeau au-dessus des idées, étiquette sur les cartes, ligne du jour dans Voyage. */
.weather-banner {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 11px;
}

.weather-icon {
  font-size: 30px;
  line-height: 1;
}

.weather-main strong {
  display: block;
  font-size: 15.5px;
}

.weather-main div span {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
}

.weather-banner p {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 650;
}

.weather-banner small {
  color: var(--muted);
  font-size: 11.5px;
}

.weather-banner.weather-pluie,
.weather-banner.weather-neige {
  background: #eef5ff;
  border-color: #c9dcf5;
}

.weather-banner.weather-beau {
  background: #fff8e6;
  border-color: #f0dca0;
}

.weather-banner.weather-chaud {
  background: #fff1ea;
  border-color: #f3c9b3;
}

body.dark .weather-banner.weather-pluie,
body.dark .weather-banner.weather-neige {
  background: #16263a;
  border-color: #294463;
}

body.dark .weather-banner.weather-beau {
  background: #2c2714;
  border-color: #53471f;
}

body.dark .weather-banner.weather-chaud {
  background: #33211a;
  border-color: #5a3627;
}

.weather-chip {
  color: #1d5fa8;
  background: #eaf2fd;
}

body.dark .weather-chip {
  color: #9cc6ff;
  background: #182a40;
}

.voyage-weather {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
}

/* Météo, « Le mieux avec ce temps » : 3 idées de la recherche qui conviennent au temps prévu. */
.weather-picks {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.weather-picks > strong {
  font-size: 14px;
}

.weather-picks ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.weather-pick {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.weather-pick:hover,
.weather-pick:focus-visible {
  border-color: var(--primary);
}

.weather-pick-icon {
  font-size: 22px;
  line-height: 1;
}

.weather-pick-text {
  display: grid;
  min-width: 0;
}

.weather-pick-text b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-pick-text small {
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 760px) {
  .weather-picks ol {
    grid-template-columns: 1fr;
  }
}

/* Pages /sorties/… et /lieu/… : titre long écrit plus petit ; bloc écrit par le serveur (idées de la ville, ou la
   fiche), lisible sans JavaScript. */
.hero h1.hero-titre-long {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -1.6px;
}

.page-serveur {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.page-serveur[hidden] {
  display: none;
}

.page-serveur-inner {
  padding: 24px 26px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.page-serveur h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -.6px;
}

.page-serveur p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.page-serveur-liste {
  margin: 16px 0 10px;
  padding: 0;
  list-style: none;
  columns: 2 300px;
  column-gap: 32px;
}

.page-serveur-liste li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  break-inside: avoid;
}

.page-serveur-liste a {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.page-serveur-liste a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.page-serveur-liste span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.page-serveur-voir a,
.page-serveur p a {
  color: var(--accent-dark);
  font-weight: 650;
  text-underline-offset: 2px;
}

/* Accueil (lot 7) : quatre photos d'idées sous le grand titre. */
.hero-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  margin: 34px auto 0;
}

.hero-photos[hidden] {
  display: none;
}

.hero-photos a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  box-shadow: 0 10px 30px rgba(20, 35, 42, .12);
  color: #fff;
  text-align: left;
  text-decoration: none;
}

.hero-photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.hero-photos a:hover img {
  transform: scale(1.04);
}

.hero-photos span {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  font-size: 12px;
  line-height: 1.3;
}

.hero-photos b {
  display: block;
  font-size: 13.5px;
}

.hero-photos small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

/* Grandes villes, sous le formulaire ; cachées dès qu'une recherche s'affiche. */
.home-villes {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

#resultsSection:not(.hidden) ~ .home-villes {
  display: none;
}

.home-villes h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -.5px;
}

.home-villes-liste,
.ou-chercher-choix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-villes-liste a,
.ou-chercher-choix button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.home-villes-liste a:hover,
.ou-chercher-choix button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Sans lieu : « Où veux-tu chercher ? ». */
.ou-chercher {
  grid-column: 1 / -1;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.ou-chercher h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.ou-chercher p {
  margin: 0 0 14px;
  color: var(--muted);
}

.ou-chercher .ou-chercher-autre {
  margin: 14px 0 0;
  font-size: 14px;
}

.ou-chercher-choix .ou-moi {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.ou-chercher-choix .ou-moi:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Une idée à la fois. */
.idee-seule {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
  gap: 14px;
}

.idee-seule-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.idee-toutes {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
}

@media (max-width: 640px) {
  .hero-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }
}

/* Onglets : survolé, un onglet ne doit pas avoir l'air ouvert (seul l'onglet ouvert a son fond et son trait orange). */
.mode-tab:hover:not(.active) {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--border);
}

.hero-photos.hero-photos-vide {
  display: none;
}

/* Modifier le site (propriétaire). */
.reglages {
  padding-bottom: 130px;
}

.reglages-bloc {
  margin-bottom: 18px;
}

.reglages-bloc h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.reglages-bloc label {
  display: block;
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 750;
}

.reglages-bloc input[type="text"],
.reglages-bloc textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.reglages-bloc textarea {
  resize: vertical;
}

.info-card .reglages-aide {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.5;
}

.reglages-champ {
  position: relative;
}

.reglages-mini {
  min-width: 30px;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 750;
}

.reglages-mini:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.reglages-mini:disabled {
  opacity: .35;
}

.reglages-retirer:hover:not(:disabled) {
  border-color: #d9534f;
  color: #d9534f;
}

.reglages-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reglages-photo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.reglages-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.info-card .reglages-photo p {
  flex: 1;
  margin: 0;
  padding: 8px 9px 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.reglages-photo b {
  display: block;
  color: var(--text);
  font-size: 13.5px;
}

.reglages-photo small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
}

.reglages-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 9px 9px;
}

.reglages-photo-actions .reglages-retirer {
  margin-left: auto;
}

.reglages-photo-ajout {
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 170px;
  border-style: dashed;
  color: var(--muted);
  font-weight: 750;
}

.reglages-photo-ajout span {
  font-size: 30px;
  line-height: 1;
}

.reglages-photo-ajout:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.reglages-choix {
  margin-top: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.reglages-resultats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 520px;
  margin-top: 12px;
  overflow-y: auto;
}

.reglages-choix-photo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.reglages-choix-photo:hover {
  border-color: var(--accent);
}

.reglages-choix-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.reglages-choix-photo span {
  padding: 7px 8px 0;
  line-height: 1.3;
}

.reglages-choix-photo b {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.reglages-choix-photo small {
  padding: 2px 8px 8px;
  font-size: 11px;
}

.reglages-villes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.reglages-ville {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 650;
}

.reglages-ville .reglages-mini {
  min-width: 26px;
  min-height: 26px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
}

.reglages-onglet {
  display: grid;
  grid-template-columns: 30px 1fr 1fr auto;
  align-items: end;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.reglages-onglet:last-child {
  border-bottom: 0;
}

.reglages-onglet label {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.reglages-onglet input {
  margin-top: 4px;
}

.reglages-onglet-rang {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 850;
}

.reglages-onglet:first-child .reglages-onglet-rang {
  background: var(--accent);
  color: #fff;
}

.reglages-onglet-ordre {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
}

.reglages-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.reglages-version small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}

.reglages-mini-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

#reglagesOrigine {
  margin-top: 14px;
}

.reglages-barre {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(760px, calc(100% - 24px));
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.reglages-barre #reglagesEtat {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.reglages-barre.reglages-a-enregistrer #reglagesEtat {
  color: var(--accent-dark);
}

.reglages-barre button:disabled {
  opacity: .45;
  transform: none;
}

.site-page:not(.active-page) .reglages-barre {
  display: none;
}

/* Les messages passent au-dessus de la barre du bas. */
body:has(#page-reglages.active-page) .toast {
  bottom: 100px;
}

@media (max-width: 650px) {
  .reglages-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reglages-onglet {
    grid-template-columns: 30px 1fr auto;
  }

  .reglages-onglet label:nth-of-type(2) {
    grid-column: 2 / 3;
  }

  .reglages-barre {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .reglages-barre #reglagesEtat {
    flex-basis: 100%;
    font-size: 13px;
    text-align: center;
  }

  .reglages-barre button {
    flex: 1;
    min-height: 44px;
    padding: 0 6px;
    font-size: 14px;
    white-space: nowrap;
  }

  .reglages-barre .reglages-emoji {
    display: none;
  }
}

/* Lot 8 : ouvert maintenant, à ne pas manquer. */
.meta-chip.open-chip {
  border-color: rgba(32, 164, 100, .35);
  background: rgba(32, 164, 100, .1);
  color: #13804c;
}

.meta-chip.soon-chip {
  border-color: rgba(233, 91, 41, .35);
  background: rgba(255, 107, 53, .08);
  color: var(--accent-dark);
}

.meta-chip.landmark-chip {
  border-color: rgba(214, 160, 20, .45);
  background: rgba(240, 190, 40, .14);
  color: #8a6400;
}

body.dark .meta-chip.open-chip {
  color: #5fd39a;
}

body.dark .meta-chip.landmark-chip {
  color: #f2c94c;
}

body.dark .meta-chip.soon-chip {
  color: #ff9a6b;
}

/* « Favoris » encadré comme les trois autres boutons du haut, à la même distance (demande du 2 oct.) : 9 px, comme
   entre les autres boutons (l'écart du haut de page est de 28 px, puis de 12 px sous 950 px de large). */
.main-nav {
  margin-right: -19px;
}

@media (max-width: 950px) {
  .main-nav {
    margin-right: -3px;
  }
}

.main-nav .nav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.main-nav .nav-link:hover {
  background: var(--surface-soft);
}

.main-nav .nav-link.active {
  border-color: var(--accent);
}

/* Haut de page un peu plus serré (3 oct.) : le formulaire de recherche arrive plus vite à l'écran, sans perdre d'air. */
.hero {
  padding: 54px 20px 46px;
}

.hero h1 {
  margin: 16px 0 10px;
}

.hero p {
  margin-bottom: 22px;
}

.hero-photos {
  margin-top: 26px;
}

@media (max-width: 650px) {
  .hero {
    padding: 38px 17px 32px;
  }

  .hero-photos {
    margin-top: 20px;
  }
}

/* Accueil : « Ce week-end » (4 oct.), une rangée d'événements avec photo, qui défile sur le côté. */
.home-weekend {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 34px;
  text-align: left;
}

#resultsSection:not(.hidden) ~ .home-weekend {
  display: none;
}

.home-weekend[hidden] {
  display: none;
}

.home-weekend-titre {
  margin: 0 0 10px;
  font-size: 17px;
}

.home-weekend-liste {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

.home-weekend-carte {
  flex: 0 0 210px;
  scroll-snap-align: start;
  color: var(--text);
  text-decoration: none;
}

.home-weekend-photo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  box-shadow: 0 10px 30px rgba(20, 35, 42, .12);
}

.home-weekend-icone {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface-soft), var(--surface));
  font-size: 42px;
}

.home-weekend-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.home-weekend-carte:hover img {
  transform: scale(1.04);
}

.home-weekend-photo .image-credit {
  font-size: 10px;
}

.home-weekend-carte b {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-weekend-carte small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .home-weekend-carte {
    flex-basis: 170px;
  }
}

/* Haut de page encore un peu plus serré (4 oct.) : la recherche remonte, l'air reste. */
.hero {
  padding: 40px 20px 32px;
}

.hero h1 {
  margin: 12px 0 8px;
}

.hero p {
  margin-bottom: 18px;
}

.hero-photos {
  margin-top: 20px;
}

/* « Compris : » au-dessus des résultats (4 oct.) : ce que la phrase a rempli, même rangé dans « Plus de filtres ». */
.results-compris {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.results-compris span {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.results-compris span:first-child {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
}

/* Téléphone (4 oct.) : la recherche visible dès l'arrivée, sans rien retirer. Les quatre photos en une rangée qui défile
   sur le côté (au lieu de deux rangées de 250 px), la ligne « Photos … libres de droits » dessous ; les quatre onglets
   sur une ligne, sans leur phrase d'aide ; un peu moins d'air au-dessus du titre. Ordinateur et tablette : inchangés. */
@media (max-width: 640px) {
  .hero {
    padding: 20px 16px 18px;
  }

  .hero h1 {
    margin: 4px 0 6px;
  }

  .hero p {
    margin-bottom: 12px;
  }

  .hero-photos {
    grid-template-columns: none;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    gap: 6px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    margin: 14px -16px 0;
    padding: 0 16px 2px;
  }

  .hero-photos a {
    grid-row: 1;
    scroll-snap-align: start;
  }

  .hero-photos small {
    grid-row: 2;
    grid-column: 1 / 5;
    /* La ligne des crédits reste dans l'écran (360 à 414 px), sur deux lignes s'il le faut. */
    max-width: calc(100vw - 32px);
    text-align: left;
  }

  .mode-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 5px;
  }

  .mode-tab {
    min-height: 46px;
    padding: 6px 2px;
    font-size: 13px;
    line-height: 1.15;
  }

  .mode-tab-hint {
    display: none;
  }
}

/* Téléphone à petit écran (700 px de haut ou moins, 4 oct.) : la recherche remonte d'environ 60 px. Un peu moins d'air,
   le titre sur une ligne, un bouton un peu plus bas de plafond ; rien n'est retiré, les photos gardent leur taille. */
@media (max-width: 640px) and (max-height: 700px) {
  .hero {
    padding-top: 12px;
  }

  .france-badge {
    padding: 5px 11px;
    font-size: 13px;
  }

  .hero h1 {
    margin: 2px 0 4px;
    font-size: min(34px, 8.8vw);
    text-wrap: balance;
  }

  .hero p {
    margin-bottom: 8px;
  }

  .hero-cta {
    min-height: 40px;
  }

  .hero-photos {
    margin-top: 10px;
  }
}

/* =========================================================
   ONGLET « C'EST OÙ ? » (12 oct.)
   ========================================================= */

/* Cinq onglets sur téléphone : deux par ligne, le cinquième sur toute la largeur. */
@media (max-width: 650px) {
  .mode-tab[data-mode="where"] {
    grid-column: 1 / -1;
  }
}

.where-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.where-buttons .search-btn,
.where-buttons .where-around {
  flex: 1 1 200px;
}

.where-results {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.where-empty {
  margin: 0;
  color: var(--muted);
}

.where-card {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.where-aerial {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  background: var(--surface-soft);
}

.where-body {
  padding: 14px 16px;
}

.where-title {
  margin: 0 0 4px;
  font-size: 19px;
}

.where-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.where-actions {
  flex-wrap: wrap;
}

.where-around-title {
  margin: 12px 0 4px;
  font-weight: 800;
  font-size: 14px;
}

.where-around-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.where-around-list a {
  color: var(--text);
}

@media (max-width: 650px) {
  .where-card {
    grid-template-columns: 1fr;
  }

  .where-aerial {
    height: 160px;
  }
}

.where-actions a.card-action {
  text-decoration: none;
}


/* =========================================================
   FOND ANIMÉ (14 oct.)
   Derrière la page : deux taches de couleur et un motif propres à l'onglet choisi (C'est où ? : épingles ;
   Activités : étincelles ; Où dormir : lune et étoiles ; Voyage : avion ; Travail : immeubles). Le motif dérive
   lentement et, comme les taches, glisse moins vite que la page quand on défile (--fond-y1 / --fond-y2, posés par
   script.js). Rien ne bouge si l'appareil demande moins d'animations.
   ========================================================= */

.fond-anime {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .25s ease;
}

.fond-anime.fond-change {
  opacity: 0;
}

.fond-taches,
.fond-motif {
  position: absolute;
  inset: -10% -10% -30%;
  will-change: transform;
}

.fond-taches {
  background:
    radial-gradient(circle at 15% 18%, var(--fond-a), transparent 38%),
    radial-gradient(circle at 85% 50%, var(--fond-b), transparent 34%),
    radial-gradient(circle at 30% 92%, var(--fond-b), transparent 30%);
  transform: translate3d(0, var(--fond-y1, 0px), 0);
}

.fond-motif {
  transform: translate3d(0, var(--fond-y2, 0px), 0);
}

.fond-motif::before {
  content: "";
  position: absolute;
  inset: -200px;
  background-image: var(--fond-dessin);
  background-size: 180px 180px;
  opacity: var(--fond-force, .22);
  animation: fond-derive 90s linear infinite;
}

body.dark .fond-motif::before {
  opacity: var(--fond-force-nuit, .3);
}

@keyframes fond-derive {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(180px, 180px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fond-motif::before {
    animation: none;
  }

  .fond-anime {
    transition: none;
  }
}

/* Téléphone : motif plus discret. */
@media (max-width: 650px) {
  .fond-motif::before {
    --fond-force: .16;
    --fond-force-nuit: .22;
  }
}

.fond-anime,
.fond-anime[data-onglet="activity"] {
  --fond-a: rgba(255, 107, 53, .13);
  --fond-b: rgba(255, 79, 139, .09);
  --fond-dessin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='%23ff6b35'><path d='M40 20l4 12 12 4-12 4-4 12-4-12-12-4 12-4z'/><circle cx='100' cy='40' r='3'/><circle cx='50' cy='130' r='4'/></g><g fill='%23ff4f8b'><path d='M130 90l3 8 8 3-8 3-3 8-3-8-8-3 8-3z'/><circle cx='150' cy='150' r='2.5'/></g></svg>");
}

.fond-anime[data-onglet="where"] {
  --fond-a: rgba(255, 107, 53, .12);
  --fond-b: rgba(20, 184, 166, .10);
  --fond-dessin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='none' stroke='%23ff6b35' stroke-width='2'><path d='M40 30c-8 0-14 6-14 14 0 10 14 24 14 24s14-14 14-24c0-8-6-14-14-14z'/><circle cx='40' cy='44' r='4'/><path d='M130 110c-6 0-11 5-11 11 0 8 11 19 11 19s11-11 11-19c0-6-5-11-11-11z'/></g><path d='M54 74q30 20 60 10t50 30' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-dasharray='3 7'/></svg>");
}

.fond-anime[data-onglet="travel"] {
  --fond-a: rgba(91, 108, 255, .13);
  --fond-b: rgba(168, 85, 247, .09);
  --fond-dessin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='%235b6cff'><path d='M60 30a22 22 0 1 0 22 30 18 18 0 1 1-22-30z'/><path d='M130 40l2 6 6 2-6 2-2 6-2-6-6-2 6-2z'/><path d='M100 120l1.5 4.5 4.5 1.5-4.5 1.5-1.5 4.5-1.5-4.5-4.5-1.5 4.5-1.5z'/><circle cx='150' cy='120' r='2.5'/><circle cx='40' cy='140' r='2'/></g></svg>");
}

.fond-anime[data-onglet="voyage"] {
  --fond-a: rgba(14, 165, 233, .13);
  --fond-b: rgba(20, 184, 166, .09);
  --fond-dessin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><path d='M20 150Q90 40 160 70' fill='none' stroke='%230ea5e9' stroke-width='2' stroke-dasharray='4 8'/><path d='M150 60l18 8-18 8 4-8z' fill='%230ea5e9'/><circle cx='20' cy='150' r='4' fill='%23ff6b35'/></svg>");
}

.fond-anime[data-onglet="work"] {
  --fond-a: rgba(20, 184, 166, .12);
  --fond-b: rgba(100, 116, 139, .10);
  --fond-dessin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='none' stroke='%2314b8a6' stroke-width='2'><path d='M20 160V110h20v50M50 160V80h24v80M84 160V120h18v40M112 160V95h22v65M144 160V125h18v35'/><path d='M56 92h4M66 92h4M56 104h4M66 104h4M118 108h4M126 108h4'/></g></svg>");
}

/* Devise des prix (14 oct.) : bouton de la même allure que celui de la langue (symbole et code de la monnaie), liste
   comme le menu jour/nuit, calée sur le bord droit du bouton. Sur téléphone, le symbole seul. */
.currency-menu {
  position: relative;
}

.currency-btn .currency-symbol {
  font-weight: 800;
}

.currency-list {
  min-width: 250px;
}

.currency-list .theme-icon {
  width: 34px;
  font-weight: 800;
}

.currency-note {
  max-width: 250px;
  margin: 8px 16px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.currency-note[hidden] {
  display: none;
}

/* Rappel du budget dans la devise du visiteur, à côté du montant en euros (« ≈ 51 £ »). */
.range-value .budget-devise {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.range-value .budget-devise[hidden] {
  display: none;
}

/* Prix dans une seconde monnaie (16 oct.) : après le prix en euros, plus discret (« 29 € · ≈ 25 £ ») ; passe à la
   ligne d'un seul bloc quand la place manque (pastille d'une carte sur téléphone). */
.prix-autre {
  display: inline-block;
  color: var(--muted);
  font-size: .92em;
  font-weight: 600;
  white-space: nowrap;
}

.results-compris .prix-autre {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
}

/* Téléphone : pas la place d'un bouton de plus à côté du nom du site ; les devises sont dans la liste du bouton
   drapeau, sous les langues (script.js), et cette liste prend la largeur de l'écran comme le menu du compte. */
.lang-currency {
  display: none;
}

.lang-list [data-currency][aria-checked="true"] {
  color: var(--accent-dark);
  background: rgba(255, 107, 53, .12);
}

body.dark .lang-list [data-currency][aria-checked="true"] {
  color: var(--accent);
}

@media (max-width: 650px) {
  .top-actions .currency-menu {
    display: none;
  }

  .lang-currency {
    display: block;
  }

  .top-actions .lang-menu {
    position: static;
  }

  .top-actions .lang-menu .lang-list {
    left: 14px;
    right: 14px;
    width: auto;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    transform: none;
  }

  .lang-currency .theme-icon {
    width: 34px;
    font-weight: 800;
  }

  .lang-currency .currency-note {
    max-width: none;
  }
}
