/* =========================================================
   Carnot Annecy – Feuille de styles principale
   ========================================================= */

/* ── Variables ── */
:root {
  --color-bg:        #FAFAF8;
  --color-surface:   #FFFFFF;
  --color-text:      #1A1A1A;
  --color-muted:     #6B7280;
  --color-border:    #E5E7EB;
  --color-accent:    #2D7D78;
  --color-accent-lt: #EAF4F3;
  --color-accent-hv: #226260;
  --color-overlay:   rgba(0,0,0,.55);
  --radius:          12px;
  --radius-sm:       8px;
  --shadow:          0 2px 16px rgba(0,0,0,.08);
  --shadow-lg:       0 8px 40px rgba(0,0,0,.14);
  --font:            'Inter', system-ui, -apple-system, sans-serif;
  --max-w:           1160px;
  --header-h:        68px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Utilitaires ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section--alt { background: var(--color-surface); }
.section--accent { background: var(--color-accent-lt); }

/* ── Typographie ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: .5rem; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-accent); margin-bottom: .25rem; }

.eyebrow {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: .5rem;
}

/* ── Header / Nav ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.site-logo {
  font-size: 1.15rem; font-weight: 700; color: var(--color-text);
  line-height: 1.1;
}
.site-logo span { display: block; font-size: .75rem; font-weight: 400; color: var(--color-muted); }
.site-nav { display: flex; gap: 2rem; align-items: center; }
.site-nav a {
  font-size: .9rem; font-weight: 500; color: var(--color-text);
  transition: color .2s;
}
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }
.nav-cta {
  background: var(--color-accent);
  color: #fff !important;
  padding: .5rem 1.25rem;
  border-radius: 100px;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--color-accent-hv) !important; }

/* burger */
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: .5rem; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: .3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Galerie hero ── */
#photos { margin-top: var(--header-h); }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 300px 300px;
  gap: 4px;
  background: #000;
}
.gallery-grid__main {
  grid-row: 1 / 3;
}
.gallery-grid__item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.gallery-grid__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-grid__item:hover img { transform: scale(1.04); }

.gallery-btn {
  position: absolute; bottom: 1.25rem; right: 1.25rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  padding: .45rem 1rem;
  border-radius: 100px;
  font-size: .85rem; font-weight: 600; color: var(--color-text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background .2s;
}
.gallery-btn:hover { background: #fff; }

/* ── Hero info ── */
.apt-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.apt-header__inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem;
  flex-wrap: wrap;
}
.apt-header__meta { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-top: .75rem; }
.apt-header__meta span {
  font-size: .9rem; color: var(--color-muted);
  display: flex; align-items: center; gap: .3rem;
}
.apt-header__meta span::before { content: '·'; opacity: .4; }
.apt-header__meta span:first-child::before { display: none; }
.apt-header__actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.btn-airbnb {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: 100px;
  font-size: .875rem; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.btn-airbnb:hover { border-color: var(--color-accent); background: var(--color-accent-lt); text-decoration: none; }
.btn-contact-hero {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.5rem;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 100px;
  font-size: .875rem; font-weight: 600;
  transition: background .2s;
}
.btn-contact-hero:hover { background: var(--color-accent-hv); text-decoration: none; }

/* ── Deux colonnes (contenu + sticky sidebar) ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

/* ── Highlights ── */
.highlights {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 1.75rem 0;
}
.highlight-item { display: flex; gap: 1rem; align-items: center; }
.highlight-icon { font-size: 1.5rem; flex-shrink: 0; }
.highlight-item strong { display: block; }
.highlight-item small { color: var(--color-muted); font-size: .85rem; }

/* ── Description ── */
.description-text {
  font-size: 1rem; line-height: 1.8; color: #374151;
  white-space: pre-line;
}

/* ── Grille des pièces ── */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.room-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.room-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.room-card__icon { font-size: 2rem; margin-bottom: .75rem; }
.room-card__title { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; }
.room-card__text {
  font-size: .875rem; color: var(--color-muted); line-height: 1.8;
  white-space: pre-line;
}

/* ── Équipements ── */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
  margin-top: 1.5rem;
}
.amenity-item {
  display: flex; align-items: center; gap: .5rem;
  font-size: .9rem; color: #374151;
}
.amenity-item::before {
  content: '✓';
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-accent-lt);
  color: var(--color-accent);
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Carte / localisation ── */
.map-embed {
  width: 100%; height: 380px;
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}
.location-points {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.location-point {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex; gap: .75rem; align-items: center;
}
.location-point__icon { font-size: 1.5rem; flex-shrink: 0; }
.location-point__text small { display: block; color: var(--color-muted); font-size: .8rem; }

/* ── Sidebar sticky ── */
.apt-sidebar { position: sticky; top: calc(var(--header-h) + 2rem); }
.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.sidebar-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; border-bottom: 1px solid var(--color-border); padding-bottom: 1rem; }
.sidebar-infos { display: flex; flex-direction: column; gap: .75rem; }
.sidebar-info-row { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.sidebar-info-row__label { color: var(--color-muted); }
.sidebar-info-row__value { font-weight: 600; text-align: right; }
.sidebar-separator { border: none; border-top: 1px solid var(--color-border); margin: 1rem 0; }
.btn-contact-sidebar {
  display: block; width: 100%; text-align: center;
  background: var(--color-accent);
  color: #fff !important;
  padding: .9rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem;
  transition: background .2s;
  margin-top: 1.25rem;
}
.btn-contact-sidebar:hover { background: var(--color-accent-hv); text-decoration: none; }

/* ── Section infos pratiques ── */
.info-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.info-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.info-box__label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-accent); font-weight: 600; margin-bottom: .5rem; }
.info-box__val { font-size: 1.1rem; font-weight: 700; }
.info-box__note { font-size: .85rem; color: var(--color-muted); margin-top: .25rem; }

/* ── Formulaire de contact ── */
#contact { background: var(--color-accent-lt); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-intro p { color: var(--color-muted); margin-bottom: 1rem; font-size: .95rem; }
.contact-detail { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; font-size: .9rem; }

.contact-form {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--color-text); }
.form-group label .req { color: var(--color-accent); }
.form-control {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  font-size: .95rem; font-family: var(--font);
  background: var(--color-bg);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(45,125,120,.15);
}
textarea.form-control { resize: vertical; min-height: 130px; }
.btn-submit {
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  padding: .9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  border: none;
  font-family: var(--font);
}
.btn-submit:hover { background: var(--color-accent-hv); }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; }

.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 1.25rem;
}
.alert--success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert--error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* ── Footer ── */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,.7);
  padding: 2.5rem 0;
  font-size: .875rem;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(255,255,255,.6); }
.footer-links a:hover { color: #fff; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox__inner { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox__img {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox__close {
  position: absolute; top: -2.5rem; right: 0;
  color: #fff; font-size: 1.75rem; cursor: pointer;
  line-height: 1; background: none; border: none;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  color: #fff; border: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__nav:hover { background: rgba(255,255,255,.3); }
.lightbox__prev { left: -3.5rem; }
.lightbox__next { right: -3.5rem; }
.lightbox__counter {
  position: absolute; bottom: -2.5rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .85rem;
}

/* ── Scroll to top ── */
#scroll-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  box-shadow: var(--shadow);
  z-index: 500;
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }
#scroll-top:hover { transform: translateY(-3px); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .apt-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-rows: 250px 250px; }
}

@media (max-width: 640px) {
  .site-nav { display: none; flex-direction: column; position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; padding: 1.5rem; border-bottom: 1px solid var(--color-border); gap: 1.25rem; }
  .site-nav.open { display: flex; }
  .menu-toggle { display: flex; }
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: 280px; }
  .gallery-grid .gallery-grid__item:not(.gallery-grid__main) { display: none; }
  .gallery-grid__main { grid-row: auto; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .lightbox__prev { left: .5rem; }
  .lightbox__next { right: .5rem; }
}
