/**
 * Style de la Page Recommandations Google Maps
 * Inspiration : photos.ana.sh (Grille dense bord à bord, panneau latéral filtre tags/villes)
 * Charte éditoriale : Noir profond, accents dorés Maps, typographie éditoriale
 */

:root {
  --bg-reco-body: #06090c;
  --bg-reco-panel: #0b0f14;
  --bg-reco-card: #11161d;
  --border-reco: rgba(255, 255, 255, 0.08);
  --border-reco-hover: rgba(255, 255, 255, 0.22);
  --accent-gold: #f59e0b;
  --text-reco-main: #f8fafc;
  --text-reco-muted: #94a3b8;
  --font-serif: "Newsreader", "Playfair Display", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

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

body.reco-page-body {
  background: var(--bg-reco-body);
  color: var(--text-reco-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Scrollbar Signature Verte V2 (Laxou Craft)
   Toujours visible sur le cote droit, fluide, sans doublon
   ========================================================================== */
.scroll-progress-container {
  position: fixed;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 99999;
  cursor: pointer;
  pointer-events: auto;
  transition: width 0.2s ease, background 0.2s ease;
}

.scroll-progress-container:hover {
  width: 9px;
  background: rgba(255, 255, 255, 0.14);
}

.scroll-progress-fill {
  width: 100%;
  min-height: 48px;
  height: 48px;
  background: linear-gradient(180deg, #6ee7b7 0%, #10b981 50%, #064e3b 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  transition: height 0.05s ease-out, box-shadow 0.2s ease;
}

.scroll-progress-container:hover .scroll-progress-fill {
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Masquer completement la barre de defilement native du navigateur pour eviter tout doublon */
html, body, * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Header épuré style photos.ana.sh */
.reco-nav-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(6, 9, 12, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-reco);
}

.reco-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reco-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-reco-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-reco);
  transition: all 0.2s ease;
}

.reco-back-link:hover {
  color: #ffffff;
  border-color: var(--border-reco-hover);
  background: rgba(255, 255, 255, 0.08);
}

.reco-brand-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: #cbd5e1;
  text-transform: uppercase;
}

.reco-brand-title strong {
  color: #ffffff;
}

.reco-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reco-count-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Layout 2 Colonnes style photos.ana.sh */
.reco-main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  min-height: calc(100vh - 54px);
}

/* Colonne Principale : Grille Photos */
.reco-gallery-container {
  padding: 24px;
}

.reco-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Carte Photo Recommandation */
.reco-photo-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-reco-card);
  border: 1px solid var(--border-reco);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.3s ease;
}

.reco-photo-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-reco-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.reco-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reco-photo-card:hover .reco-card-img {
  transform: scale(1.04);
}

.reco-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.3) 45%, transparent 80%);
  pointer-events: none;
}

.reco-card-badge-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 15, 20, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.reco-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.reco-card-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.reco-card-city {
  color: var(--accent-gold);
  font-weight: 500;
}

.reco-card-sep {
  opacity: 0.5;
}

.reco-card-cat {
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reco-card-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

/* Colonne Latérale Droite : Filtres et Profil */
.reco-sidebar {
  background: var(--bg-reco-panel);
  border-left: 1px solid var(--border-reco);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 54px;
  height: calc(100vh - 54px);
  overflow-y: auto;
}

.reco-sidebar-profile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-reco);
}

.reco-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reco-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.reco-profile-meta h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.reco-profile-meta p {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-gold);
}

.reco-profile-bio {
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
  font-style: italic;
}

.reco-stats-pill-row {
  display: flex;
  gap: 8px;
}

.reco-stat-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-reco);
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.reco-stat-badge strong {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffffff;
}

.reco-stat-badge span {
  font-size: 8.5px;
  color: var(--text-reco-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections de Filtres (style tags Ana) */
.reco-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reco-filter-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-reco-muted);
}

.reco-tags-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reco-tag-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-reco);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reco-tag-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: var(--border-reco-hover);
}

.reco-tag-btn.active {
  background: #f8fafc;
  color: #06090c;
  font-weight: 700;
  border-color: #ffffff;
}

.reco-tag-count {
  opacity: 0.6;
  font-size: 9px;
}

/* Modale d'Inspection Détaillée (Click sur une photo) */
.reco-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.reco-modal-overlay.active {
  display: flex;
}

.reco-modal-card {
  background: #0f141c;
  border: 1px solid var(--border-reco-hover);
  border-radius: 14px;
  max-width: 780px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  max-height: 90vh;
}

.reco-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.reco-modal-close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

/* Carrousel Multi-Photos dans la Modale */
.reco-modal-carousel-container {
  position: relative;
  width: 100%;
  height: 380px;
  background: #000000;
  overflow: hidden;
  user-select: none;
}

.reco-modal-slides-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reco-modal-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}

.reco-modal-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reco-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.reco-carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.reco-carousel-prev {
  left: 14px;
}

.reco-carousel-next {
  right: 14px;
}

.reco-carousel-arrow.hidden {
  display: none;
}

.reco-carousel-footer {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 5;
}

.reco-carousel-dots {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.reco-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  padding: 0;
}

.reco-carousel-dot.active {
  background: #ffffff;
  width: 22px;
  border-radius: 4px;
}

.reco-carousel-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.reco-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.reco-modal-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reco-modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: #ffffff;
}

.reco-modal-address {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-reco-muted);
}

.reco-modal-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
}

.reco-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-reco);
}

.reco-modal-btn-maps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  color: #06090c;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.reco-modal-btn-maps:hover {
  transform: translateY(-2px);
}

/* Responsive Mobile */
@media (max-width: 900px) {
  .reco-main-layout {
    grid-template-columns: 1fr;
  }

  .reco-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border-reco);
  }

  .reco-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
