@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root{
  --bg: #000000; 
  --card: #0f0f0f;
  --text-on-dark: #ffffff;
  --card-text: #f5ede4;   /* crème chaude pour textes secondaires */
  --muted: #bfb1a6;       /* gris chaud */
  --accent: #cc3b2e;      /* rouge/tomate principal */
  --accent-600: rgba(204,59,46,0.52);
  --accent-100: rgba(204,59,46,0.08);
  --accent-warm: #d99a2b; /* ambre pour badges chaleureux */
  --radius: 12px;
  --max-width: 1100px;
  --focus: rgba(204,59,46,0.18);
  --border: rgba(255,255,255,0.06);
  --nav-height: 56px;
  --nav-prev-size: 56px;
  --nav-skip-height: 56px;
  --nav-gap: 12px;
  --nav-font-size: 0.95rem;
  --nav-icon-size: 20px;
}

/* reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family: "Roboto", sans-serif;
  background: var(--bg);
  color:var(--text-on-dark);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
}

/* === Dark UI overrides / hero layout === */
body {
  background: #060607; /* très sombre */
  color: #e8eef2;      /* texte principal clair */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ensure main container doesn't get a white bg */
.container {
  background: transparent;
  color: inherit;
  padding: 28px 16px;
}

/* Accent / muted colors for dark theme (fallbacks if :root not set) */
:root {
  --accent: #ff6b35;
  --muted: #9aa0a6;
  --border: rgba(255,255,255,0.06);
  --text-on-dark: #e8eef2;
}

/* Hero / illustration block like the screenshot */
.hero {
  text-align: center;
  padding: 28px 12px 6px;
  max-width: 780px;
  margin: 0 auto 18px;
}
.hero h1 {
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.05;
}
.hero .slogan {
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 600;
}

/* ronde illustration */
.hero_image {
  width: 220px;
  height: 220px;
  margin: 6px auto 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero_image img {
  width: 78%;
  height: auto;
  display: block;
}

/* Mock suggestion card (aesthetic only) */
.mock-suggestion {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex: 0 0 320px;
  min-width:240px;
}

.mock-card {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background-color: rgba(255,224,190,0.02); /* très subtil, sans gradient */
  border: 1px solid rgba(204,59,46,0.06);
  color: var(--text-on-dark);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.mock-card .title {
  font-weight:800;
  font-size:1.05rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  align-items: flex-start
}
.open-badge {
  background-color: rgba(217,154,43,0.12); /* léger ambre */
  color: #ffd27a;
  padding:4px 8px;
  border-radius:999px;
  font-weight:700;
  font-size:0.85rem;
  border:1px solid rgba(217,154,43,0.12);
}

/* Unknown / no data badge (yellow) */
.open-badge.unknown {
  background-color: rgba(255, 206, 84, 0.12);
  color: #ffcf5a;
  border-color: rgba(255, 206, 84, 0.12);
}

.mock-card .meta {
  color:var(--muted);
  font-size:0.95rem;
  margin-top:6px;
}

.muted { color:var(--muted); font-size:0.95rem; margin-top:8px; }

.chips { margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.chip {
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background-color: rgba(255,255,255,0.02); /* transparent neutre */
  color:var(--text-on-dark);
  font-weight:700;
  font-size:0.85rem;
  border:1px solid rgba(255,255,255,0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

/* variante réservation -> rouge transparent, texte blanc (pas de dégradé) */
.chip.reservation-yes {
  background-color: rgba(204,59,46,0.12); /* transparent rouge */
  color: #ffffff;
  border: 1px solid rgba(204,59,46,0.20);
  font-weight: 800;
  transition: background-color 160ms ease, transform 120ms ease;
}

.chip.reservation-yes:hover,
.chip.reservation-yes:focus {
  background-color: rgba(204,59,46,0.20);
  transform: translateY(-2px);
  outline: none;
}

/* variante "no reservation" -> neutre discret */
.chip.reservation-no {
  background-color: rgba(255,255,255,0.01);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.03);
  font-weight:700;
}

/* subtle warm tint on cards to read as food app */
.mock-card {
  background: linear-gradient(180deg, rgba(255,224,190,0.02), rgba(255,224,190,0.01));
  border: 1px solid rgba(204,59,46,0.06);
}

/* compact rating placed under meta */
.rating-inline {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
  color:var(--muted);
  font-weight:700;
  font-size:0.92rem;
}

.rating-inline .stars { display:inline-flex; gap:4px; line-height:1; }
.rating-inline .reviews-small {
  color:var(--muted);
  font-size:0.88rem;
  font-weight:700;
  opacity:0.95;
}


/* Buttons contrast for dark */
.btn, .nav-button {
  color: #fff;
}
.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

/* Ensure small controls (tags, chips) are adapted for dark */
.tag, .cuisine, .ambience, .distance-btn, .party-btn, .meal-btn {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  color: var(--text-on-dark);
}

/* layout */
.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:1.5rem;
}
/* navbar */
.navbar{
  background:transparent;
  position:sticky;
  top:0;
  z-index:30;
}

.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand{
  font-weight:800;
  color:var(--text-on-dark);
  text-decoration:none;
  font-size:1.05rem;
  letter-spacing:0.2px;
  opacity:0.95;
}

.nav-links{
  list-style:none;
  display:flex;
  gap:7px;
  align-items:center;
}

.nav-links a{
  text-decoration:none;
  color:var(--muted);
  font-weight:600;
  border-radius:999px;
  transition:color .12s ease, background .12s ease;
}

.nav-links a:hover,
.nav-links a:focus{
  color:var(--text-on-dark);
  outline:none;
}

.nav-links a:focus{ 
  box-shadow: 0 0 0 5px var(--focus); 
}

/* Actions et boutons */
.actions{
  display:flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap:12px;
  margin-top:2rem;
  margin-left: auto;
  margin-right: auto;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 24px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  cursor:pointer;
  border:1px solid transparent;
  transition: all .3s;
  font-size: 1.1rem;
}

.btn-primary{
  background:var(--accent);
  color: #fff;
}

.btn-primary:hover{
  background: var(--accent-600);
}

/* Budget selection styles */
.budget-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
  /* garde de l'espace en bas pour la barre fixe */
  padding-bottom: 120px;
}

.budget-display {
  font-size: 5rem;
  font-weight: 800;
  color: var(--text-on-dark);
  transition: all 0.3s ease;
  text-align: center;
}

.budget-euro {
  font-size: 3rem;
  opacity: 0.8;
}

.budget-message {
  font-size: 1.2rem;
  color: var(--muted);
  text-align: center;
  min-height: 3.6rem;
  margin: 0;
  padding: 0 1rem;
  font-weight: 600;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.slider-container {
  width: 100%;
  padding-bottom: 2rem;
  position: relative;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem; 
}

.budget-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: var(--border);
  outline: none;
  transition: background 0.2s;
}

.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(204,59,46,0.3);
  transition: all 0.2s;
}

.budget-slider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(204,59,46,0.3);
  transition: all 0.2s;
  border: none;
}

.budget-slider::-webkit-slider-thumb:hover,
.budget-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(204,59,46,0.4);
}

.budget-slider::-moz-range-thumb:hover,
.budget-slider::-moz-range-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(204,59,46,0.4);
}

.budget-slider::-webkit-slider-runnable-track {
  border-radius: 5px;
}

/* Colored track styling */
.slider-track {
  position: absolute;
  height: 12px;
  border-radius: 5px;
  background: var(--accent);
  bottom: calc(2rem + 3px);
  left: 0;
  pointer-events: none;
}

.nav-buttons {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: var(--nav-gap);
  z-index: 999;
  align-items: center;
  pointer-events: auto;
  box-sizing: border-box;
  height: var(--nav-height);
}

/* shared button baseline for nav */
.nav-button, .btn {
  height: var(--nav-height);
  font-size: var(--nav-font-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 0 14px;
}

/* Previous : circular icon, compact */
.nav-buttons .btn-previous.icon-only {
  width: var(--nav-prev-size);
  height: var(--nav-prev-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  color: var(--muted);
  flex: 0 0 auto;
  transition: background .12s ease, color .12s ease, transform .08s ease;
}
.nav-buttons .btn-previous.icon-only i { font-size: var(--nav-icon-size); line-height:1; }

/* Skip : compact ghost */
.nav-buttons #btnSkip {
  min-width: 120px;
  height: var(--nav-skip-height);
  padding: 0 12px;
  border-radius: 12px;
  font-weight:700;
  color: var(--muted);
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.03);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Next : full-width CTA */
.nav-buttons .btn-primary {
  flex: 1 1 auto;
  min-height: var(--nav-height);
  height: var(--nav-height);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(204,59,46,0.20);
  font-weight:900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Prevent background from changing on click/focus while keeping a visible focus ring for keyboard users */
.nav-buttons .btn-primary:active,
.nav-buttons .btn-primary:focus {
  background: var(--accent);
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(204,59,46,0.20);
  outline: none;
}

/* keyboard-only visible focus ring */
.nav-buttons .btn-primary:focus-visible {
  box-shadow: 0 0 0 6px var(--focus), 0 8px 22px rgba(204,59,46,0.20);
  background: var(--accent);
}

/* small screens: keep Skip visible but slightly reduced */
@media (max-width:420px) {
  :root { --nav-prev-size: 52px; --nav-skip-height: 52px; --nav-height: 52px; }
  .nav-buttons { bottom: 14px; padding: 0 12px; }
  .nav-button, .btn { height: var(--nav-skip-height); font-size: 0.9rem; }
}
  
/* Tags, chips et badges */
.tag {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 120ms ease;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background-color: rgba(255,255,255,0.02);
  color: var(--text-on-dark);
}

.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background-color: rgba(255,255,255,0.02);
  color: var(--text-on-dark);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.chip:hover {
  transform: translateY(-2px);
  background-color: rgba(255,255,255,0.04);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Scroll styling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }
  .btn {
    padding: 10px 18px;
    font-size: 1rem;
  }
}

/* optional: emoji fallback visibility (if icon font missing) */
.icon-fallback { display: inline-block; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero_image, .feature { transition: none; }
}

/* remove mobile tap highlight and prevent native active bg changes */
button, .btn, .nav-button {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* ensure primary CTA keeps same background on active/focus (override UA styles) */
.btn-primary,
.nav-buttons .btn-primary {
  background: var(--accent);
  color: #fff;
  transition: transform .06s ease, box-shadow .12s ease;
}

/* strong override so mobile browsers don't flash a different bg on touch */
.btn-primary:active,
.btn-primary:focus,
.nav-buttons .btn-primary:active,
.nav-buttons .btn-primary:focus {
  background: var(--accent) !important;
  box-shadow: 0 8px 22px rgba(204,59,46,0.20) !important;
  transform: translateY(0) !important;
  outline: none;
}

/* Android/older browsers inner focus reset */
.btn-primary::-moz-focus-inner { border: 0; padding: 0; }


/* Footer */
.footer {
    margin-top: 8rem;
    padding: 3rem 1rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 0 0 220px;
    min-width: 160px;
    text-align: left;
}

.footer-tagline {
    color: var(--muted);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 140px;
}

.footer-group h3 {
    color: var(--text-on-dark);
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.footer-group a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.footer-group a:hover {
    color: var(--text-on-dark);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Tablet: stack and center content */
@media (max-width: 900px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-brand {
    flex: 0 0 auto;
    min-width: 0;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 1.25rem;
  }

  .footer-group { min-width: 140px; align-items: center; }
}

/* Mobile: grid for links, compact spacing */
@media (max-width: 520px) {
  .footer {
    padding: 2rem 0 1rem;
  }

  .footer-content {
    gap: 1rem;
    padding: 0 1rem;
  }
  .container{
    padding: 1rem;
  }
  .quick-visuals{
    padding: 0rem !important;
  }
  .footer-links {
    width: 100%;
    display: grid;
    gap: 0rem;
    justify-items: center;
    align-items: start;
    flex: 0;
  }
  .cards-track {
    padding: 0px;
  }
  .explanation{
    margin-top: 1rem;
  }
  .hero{
    padding: 0px;
  }
  .hero .lead{
    width: 100%;
  }
  .footer-group {
    align-items: center;
    min-width: 0;
    padding: 0.25rem 0;
    margin-top: 1rem;
  }

  .footer-group a {
    font-size: 0.9rem;
  }

  .footer-bottom {
    font-size: 0.88rem;
    padding-top: 1rem;
  }
}

/* Micro polish: ensure links are easy to tap on touch devices */
.footer-group a {
  display: inline-block;
  padding: 6px 4px;
  border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
}
.footer-group a:active,
.footer-group a:hover,
.footer-group a:focus {
  background: rgba(255,255,255,0.02);
  color: var(--text-on-dark);
}

/* card media styles */
.card-media {
  width: 100%;
  height: 140px;
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: block;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
  border-bottom: 1px solid rgba(255,255,255,0.02);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* body of card */
.card-body {
  padding: 12px 14px;
}

/* compact variant to match the screenshot proportions */
.card-item.compact { max-width: 420px; margin: 0 auto; }
.bookmark:hover, .bookmark:focus { color: var(--text-on-dark); outline: none; }

/* small meta styling */
.meta.small { font-size: 0.9rem; color: var(--muted); margin-top:4px; }

/* fine-tune rating layout */
.rating-inline .reviews-small { display:inline-flex; align-items:center; gap:8px; color:var(--muted); font-weight:800; }

/* ensure chips wrap nicely under the media */
.chips { margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }

/* responsive: reduce media height on small screens */
@media (max-width:420px){
  .card-media { height: 110px; }
  .card-item.compact { max-width: 100%; }
}

/* bouton itinéraire (remplace ancien bookmark) */
.route {
  background: transparent;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, color .18s ease, transform .12s ease;
  text-decoration: none;
}
.route i { font-size: 18px; line-height:1; color: inherit; }

/* hover / focus */
.route:hover { transform: translateY(-2px); color: var(--text-on-dark); }
.route:focus { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Petite carte intégrée (dark) */
.detail-map { width:100%; height:220px; border-radius:10px; overflow:hidden; margin-top:12px; border:1px solid rgba(255,255,255,0.04); background:#0b0b0b; box-shadow: inset 0 1px 0 rgba(255,255,255,0.02); }
/* Leaflet default markers are okay; ensure popups fit dark theme */
.leaflet-popup-content-wrapper { background: #111; color: #fff; border-radius:8px; }
.leaflet-popup-tip { background: #111; }

/* Fix double-scroll on mobile: ensure only .page scrolls and inner blocks don't create nested scrollbars */
@media (max-width: 900px) {
  /* Prevent inner scroll from "bubbling" to body / other containers */
  .page {
    overscroll-behavior: contain; /* modern browsers: don't propagate overscroll to the viewport */
    -webkit-overflow-scrolling: touch; /* smooth inertial scrolling on iOS */
    touch-action: pan-y; /* allow vertical pan only */
  }

  /* Ensure hours area doesn't create its own scroll region (leave scrolling to .page) */
  .hours-grid,
  .hours-simple,
  .hours-row,
  .hours-list,
  .time-ranges {
    overflow: visible !important;
    max-height: none !important;
  }

  /* If an inner list must be scrollable, prefer a single explicit scroll container sized to avoid nested scrolling */
  .hours-simple-scroll {
    max-height: calc(100vh - 180px); /* fallback: allow a single scroll area with sensible max height */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Defensive: prevent body from scrolling when .page is the intended scroller */
html, body {
  height: 100%;
  overscroll-behavior-y: none; /* avoid the page "bounce" from propagating behind fixed nav on supported browsers */
}
