/* ============================================================
   STYLE.CSS — Appartement Nice — Site vitrine location
   Les tokens CSS sont injectés dynamiquement depuis config/site.js
   via applyTheme() dans components.js.
   Breakpoint unique : 768px.
   ============================================================ */

:root {
  --color-primary: #0e7c86;
  --color-accent:  #e8a33d;
  --color-dark:    #0f2027;
  --color-bg:      #ffffff;
  --color-text:    #374151;
  --font-family:   'Inter', Arial, sans-serif;

  --color-bg-soft: #f6f8f9;
  --color-border:  #e5e7eb;
  --radius:        14px;
  --shadow:        0 8px 30px rgba(15, 32, 39, 0.08);
  --shadow-lg:     0 20px 60px rgba(15, 32, 39, 0.18);
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--color-dark); }

section { padding: 72px 0; }
.section-alt { background: var(--color-bg-soft); }

.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.section-head p { color: #6b7280; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,124,134,0.35); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: inherit; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-dark { background: var(--color-dark); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); }

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--color-dark); }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); }

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-list a { font-weight: 600; font-size: 0.95rem; color: var(--color-dark); }
.nav-list a:hover { color: var(--color-primary); }

.header-cta { white-space: nowrap; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-text);
}
.lang-switch span[data-lang] { opacity: 0.45; transition: opacity 0.15s ease, color 0.15s ease; }
.lang-switch span[data-lang].is-active { opacity: 1; color: var(--color-primary); }
.lang-switch .lang-sep { opacity: 0.3; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--color-dark); border-radius: 2px; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: linear-gradient(180deg, rgba(15,32,39,0.15) 0%, rgba(15,32,39,0.75) 100%),
              var(--hero-image, linear-gradient(135deg, #0e7c86, #0f2027)) center/cover no-repeat;
}
.hero-content { padding-top: 80px; padding-bottom: 60px; max-width: 720px; }
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 16px; }
.hero p.tagline { font-size: 1.15rem; color: rgba(255,255,255,0.9); margin-bottom: 28px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.25);
}
.hero-stat { display: flex; align-items: center; gap: 10px; }
.hero-stat svg { width: 22px; height: 22px; color: var(--color-accent); }
.hero-stat strong { display: block; font-size: 1rem; }
.hero-stat span { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* ── GALLERY ─────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}
.gallery-grid figure {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  position: relative;
}
.gallery-grid figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-more-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: rgba(15,32,39,0.62);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  transition: background 0.2s ease;
}
.gallery-grid figure:hover .gallery-more-overlay { background: rgba(15,32,39,0.75); }
.gallery-more-overlay span { font-size: 0.85rem; font-weight: 500; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,15,17,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 10px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 50%;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 22px; height: 22px; }
.lightbox-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.8); font-size: 0.85rem;
}

/* ── VIDEO ───────────────────────────────────────────────── */
.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.video-wrap video { width: 100%; display: block; max-height: 560px; }

/* ── DESCRIPTION ─────────────────────────────────────────── */
.description-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}
.description-grid p { color: #4b5563; margin-bottom: 16px; }
.capacity-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.capacity-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--color-dark); }
.capacity-list svg { width: 22px; height: 22px; color: var(--color-primary); flex-shrink: 0; }

/* ── AMENITIES ───────────────────────────────────────────── */
.amenities-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin-bottom: -8px;
  scrollbar-width: thin;
}
.amenity-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.amenity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.amenity-card svg { width: 30px; height: 30px; color: var(--color-primary); margin: 0 auto 12px; }
.amenity-card span { display: block; font-size: 0.9rem; font-weight: 600; color: var(--color-dark); }

/* ── MAP / LOCATION ──────────────────────────────────────── */
.location-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
}
.location-info { display: flex; flex-direction: column; gap: 18px; }
.location-item { display: flex; gap: 14px; align-items: flex-start; }
.location-item svg { width: 22px; height: 22px; color: var(--color-primary); flex-shrink: 0; margin-top: 2px; }
.map-frame {
  border: 0;
  width: 100%;
  height: 380px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── CONTACT / RESERVATION ──────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}
.contact-card {
  background: var(--color-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
}
.contact-card h3 { color: #fff; margin-bottom: 14px; }
.contact-card p { color: rgba(255,255,255,0.75); margin-bottom: 24px; }
.contact-card .contact-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 600; }
.contact-card svg { width: 20px; height: 20px; color: var(--color-accent); }
.config-whatsapp { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.config-whatsapp:hover { color: var(--color-accent); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--color-dark); }
.form-field input, .form-field textarea {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--color-text);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14,124,134,0.15);
}
.form-note { font-size: 0.8rem; color: #6b7280; margin-top: 8px; }
.form-success {
  display: none;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 14px 18px;
  border-radius: 10px;
  margin-top: 16px;
  font-weight: 600;
}
.form-success.is-visible { display: block; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer { background: var(--color-dark); color: rgba(255,255,255,0.85); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
.footer-brand p { color: rgba(255,255,255,0.7); margin: 12px 0 18px; max-width: 320px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 18px; height: 18px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-contact-item svg { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a:hover { color: #fff; }

/* ── COOKIE BANNER ───────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 520px; margin: 0 auto;
  background: var(--color-dark); color: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-lg);
  z-index: 500;
}
.cookie-banner p { font-size: 0.88rem; color: rgba(255,255,255,0.85); margin-bottom: 14px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { padding: 10px 18px; font-size: 0.85rem; }

/* ── LEGAL PAGES ─────────────────────────────────────────── */
.legal-page { padding: 60px 0 90px; }
.legal-page h1 { margin-bottom: 24px; }
.legal-page h2 { margin: 32px 0 12px; font-size: 1.2rem; }
.legal-page p, .legal-page li { color: #4b5563; margin-bottom: 10px; }

/* ── 404 ─────────────────────────────────────────────────── */
.error-page {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
}
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--color-primary); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: fixed;
    top: 64px; right: 16px; left: auto; bottom: auto;
    z-index: 99;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 200px;
    background: var(--color-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
    transform-origin: top right;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-list a { display: block; width: 100%; padding: 10px 12px; border-radius: 8px; color: #fff; }
  .nav-list a:hover { background: rgba(255,255,255,0.15); color: #fff; }
  .nav-list.is-open { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }
  .header-cta { display: none; }

  .hero { min-height: 78vh; }
  .hero-content { padding-top: 60px; padding-bottom: 40px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery-grid figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }

  .description-grid,
  .location-wrap,
  .contact-wrap { grid-template-columns: 1fr; }

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

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