/* ============================================
   Chez les Hurtubise · Guide d'accueil
   Feuille de style partagée
   ============================================ */

:root {
  --cream: #faf6f0;
  --warm-white: #fdfaf5;
  --terracotta: #c77b55;
  --terracotta-dark: #a85f3d;
  --olive: #6b7a4f;
  --charcoal: #3a342e;
  --soft-brown: #8b7355;
  --border: #e8dfd3;
  --highlight: #fdf1e2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--charcoal);
}

a { color: var(--terracotta-dark); }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  position: sticky;
  top: 0;
  background: rgba(253, 250, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 2rem;
}

nav {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--terracotta-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--terracotta);
}

/* Sélecteur de langue : 3 boutons FR · EN · IT */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
}

.lang-opt {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--soft-brown);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 0.3rem 0.7rem;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
}

.lang-opt:last-child {
  border-right: none;
}

.lang-opt:hover {
  background: var(--highlight);
  color: var(--terracotta-dark);
}

.lang-opt.active {
  background: var(--terracotta);
  color: #fff;
}

/* ============================================
   HERO & PAGE HEADER
   ============================================ */

.hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.hero .eyebrow,
.page-header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  color: var(--terracotta);
  margin-bottom: 1.5rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero p.lead {
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0 auto;
  color: var(--soft-brown);
}

.welcome-intro {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem 1rem;
  text-align: left;
  color: var(--charcoal);
  font-size: 1.02rem;
  line-height: 1.75;
}

.welcome-intro p {
  margin: 0 0 1.1rem;
}

.welcome-intro p.welcome-opener {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--terracotta);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.welcome-intro .family-list,
.note-box {
  background: var(--warm-white);
  border-left: 3px solid var(--terracotta);
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.4rem;
  border-radius: 4px;
}

.note-box {
  max-width: 680px;
  margin: 1.2rem auto 0;
  color: var(--charcoal);
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
}

.note-box p {
  margin: 0;
}

/* Small gallery (e.g. local poubelles) */
.mini-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.mini-gallery figure {
  margin: 0;
  text-align: center;
}

.mini-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--warm-white);
}

.mini-gallery figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--soft-brown);
  font-style: italic;
}

@media (max-width: 640px) {
  .mini-gallery { grid-template-columns: 1fr; }
}

/* Galerie d'étapes (pour les vidéos numérotées) */
.step-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.step-gallery figure {
  margin: 0;
  text-align: center;
  position: relative;
}

.step-gallery video,
.step-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  display: block;
  cursor: pointer;
}

.step-gallery .step-num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}

.step-gallery figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--soft-brown);
  font-style: italic;
}

@media (max-width: 640px) {
  .step-gallery { grid-template-columns: 1fr; }
}

.card-figure {
  margin: 0 0 1rem;
  text-align: center;
}

.card-figure img {
  max-width: 100%;
  height: auto;
  max-height: 320px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--warm-white);
}

.card-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--soft-brown);
  font-style: italic;
}

/* Légende colorée sous une image (ex. plan de stationnement) */
.map-legend {
  list-style: none;
  padding: 0.9rem 1.1rem;
  margin: 0 0 0.6rem;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--charcoal);
}

.map-legend li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.25rem 0;
}

.map-legend .legend-swatch {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 3px;
  margin-top: 0.18rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.map-legend .legend-swatch.orange { background: #ec8b1f; }
.map-legend .legend-swatch.vert   { background: #5f9e4f; }

/* ============================================
   LIGHTBOX (agrandissement d'image au clic)
   ============================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 25, 20, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.open {
  display: flex;
  opacity: 1;
}

.lightbox-img,
.lightbox-video {
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #fff;
}

.lightbox-caption {
  margin-top: 1rem;
  color: var(--cream);
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
  max-width: 80vw;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(250, 246, 240, 0.1);
}

.welcome-intro .family-list p {
  margin: 0 0 0.6rem;
}

.welcome-intro .family-list p:last-child {
  margin-bottom: 0;
}

.welcome-intro p.welcome-signature {
  margin-top: 1.6rem;
  margin-bottom: 0.3rem;
  text-align: center;
  font-style: italic;
  color: var(--soft-brown);
}

.welcome-intro p.welcome-signoff {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--terracotta);
  margin-bottom: 0;
}

.page-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-header p.intro {
  color: var(--soft-brown);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
  flex: 1;
}

section.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
}

.section-title {
  margin-bottom: 2rem;
}

.section-title .eyebrow {
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.72rem;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
  display: block;
}

.section-title h2 {
  font-size: 2rem;
}

.section-title p.intro {
  margin-top: 0.8rem;
  color: var(--soft-brown);
  font-size: 1rem;
}

/* ============================================
   INFO CARDS
   ============================================ */

.info-card {
  background: var(--warm-white);
  padding: 1.5rem 1.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.info-card strong.label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.72rem;
  color: var(--terracotta);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.info-card .value {
  font-size: 1.05rem;
  color: var(--charcoal);
  font-weight: 400;
}

.info-card .value.mono {
  font-family: 'Courier New', monospace;
  background: var(--highlight);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  font-size: 1rem;
}

.info-card p.note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--soft-brown);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================
   HIGHLIGHT BOX
   ============================================ */

.highlight-box {
  background: var(--highlight);
  border-left: 3px solid var(--terracotta);
  padding: 1.2rem 1.5rem;
  border-radius: 4px;
  margin: 1.2rem 0;
}

.highlight-box p {
  font-size: 0.95rem;
  color: var(--charcoal);
}

/* ============================================
   STEP LIST
   ============================================ */

ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

ol.steps li {
  counter-increment: step;
  padding: 1rem 0 1rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

ol.steps li:last-child { border-bottom: none; }

ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  background: var(--terracotta);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ============================================
   TIPS LIST
   ============================================ */

ul.tips {
  list-style: none;
  padding: 0;
}

ul.tips li {
  padding: 0.9rem 0 0.9rem 1.8rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

ul.tips li:last-child { border-bottom: none; }

ul.tips li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--terracotta);
  top: 0.9rem;
}

ul.tips li strong {
  color: var(--charcoal);
  font-weight: 500;
}

ul.tips li span.meta {
  display: block;
  font-size: 0.85rem;
  color: var(--soft-brown);
  margin-top: 0.2rem;
}

/* ============================================
   SECTION CARDS (index page)
   ============================================ */

.section-cards {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.section-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  text-decoration: none;
  color: var(--charcoal);
  transition: all 0.3s ease;
  display: block;
}

.section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(58, 52, 46, 0.08);
  border-color: var(--terracotta);
}

.section-card .card-icon {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--terracotta);
  margin-bottom: 0.5rem;
}

.section-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.section-card p {
  font-size: 0.95rem;
  color: var(--soft-brown);
}

/* ============================================
   IMAGES
   ============================================ */

.img-wrap {
  margin: 1.5rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.img-wrap .caption {
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--soft-brown);
  background: var(--warm-white);
  font-style: italic;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e8c8a8, #c77b55 50%, #8b7355);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-white);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

/* ============================================
   EMERGENCY BOX
   ============================================ */

.emergency {
  background: var(--charcoal);
  color: var(--cream);
  padding: 2rem;
  border-radius: 6px;
  margin-top: 1rem;
}

.emergency h3 {
  color: var(--cream);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.emergency .contact-row {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(250, 246, 240, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.emergency .contact-row:last-child { border-bottom: none; }

.emergency .contact-row .name {
  font-weight: 500;
}

.emergency .contact-row .number {
  font-family: 'Courier New', monospace;
  color: #e8c8a8;
  text-decoration: none;
}

.emergency .contact-row a.number:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================================
   PAGE NAVIGATION (prev/next)
   ============================================ */

.page-nav {
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border);
}

.page-nav a {
  text-decoration: none;
  color: var(--charcoal);
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
  background: var(--warm-white);
  flex: 1;
  max-width: 45%;
}

.page-nav a:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}

.page-nav a .dir {
  display: block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.7rem;
  color: var(--terracotta);
  margin-bottom: 0.3rem;
}

.page-nav a .label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.page-nav a.next {
  text-align: right;
  margin-left: auto;
}

.page-nav a.prev { text-align: left; }

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--charcoal);
  color: var(--cream);
  padding: 3rem 2rem 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  max-width: 600px;
  margin: 0 auto 1rem;
  opacity: 0.9;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
}

footer .copyright {
  margin-top: 2rem;
  font-size: 0.78rem;
  opacity: 0.55;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

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

@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 1.5rem 2rem; }
  .page-header { padding: 2.5rem 1.5rem 1.5rem; }
  section.content { padding: 1.5rem 1.5rem 2rem; }
  .section-cards { padding: 1.5rem; gap: 1rem; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.82rem; }
  header { padding: 1rem 1.2rem; }
  .page-nav { padding: 1.5rem; flex-direction: column; }
  .page-nav a { max-width: 100%; }
}

/* ============================================
   FADE IN ANIMATION
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.7s, transform 0.7s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   GATE (portail d'accès — mot de passe)
   ============================================ */
#gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(160deg, #f6ecde 0%, #e7d4bb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: gate-fade 0.35s ease;
}

#gate-overlay.closing { opacity: 0; transition: opacity 0.2s ease; }

@keyframes gate-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#gate-overlay .gate-box {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(60, 40, 25, 0.2);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

#gate-overlay .gate-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.5rem;
}

#gate-overlay h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 0.6rem;
  color: var(--charcoal);
}

#gate-overlay p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--soft-brown);
  margin: 0 0 1.5rem;
}

#gate-overlay .gate-field {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

#gate-overlay input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
}

#gate-overlay input:focus {
  border-color: var(--terracotta);
}

#gate-overlay button {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.3rem;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

#gate-overlay button:hover {
  background: var(--terracotta-dark);
}

#gate-overlay #gate-error {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #c1440e;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.2s;
}

#gate-overlay #gate-error.show {
  opacity: 1;
}
