/* debacker.ca — feuille commune (accueil public et espace famille) */

:root {
  --fond: #d9cec1;        /* taupe clair : fond des pages */
  --titre-fond: #f5f0e8;  /* beige : en-tête et bandeau de titre */
  --papier: #f5f0e8;      /* beige : petits éléments à l'intérieur des cartes */
  --papier-2: #ece4d6;
  --carte: #fffdf9;
  --encre: #1c2a33;
  --encre-douce: #4a5a64;
  --discret: #646c71;   /* assez contrasté sur le fond taupe */
  --filet: rgba(28, 42, 51, 0.14);
  --or: #a7834e;
  --montreal: #8c3b2e;   /* brique du Vieux-Montréal */
  --paris: #4d5f73;      /* zinc des toits */
  --arcachon: #2f7a7a;   /* eaux du Bassin */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rayon: 14px;
  --gouttiere: clamp(16px, 4vw, 56px);
  --largeur: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

.surtitre {
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--or);
  margin: 0 0 18px;
}

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; border: 1px solid var(--encre);
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  background: transparent; transition: background .2s, color .2s, transform .2s;
}
.bouton:hover { transform: translateY(-1px); }
.bouton-plein { background: var(--encre); color: var(--papier); }
.bouton-plein:hover { background: #2b3f4c; }

/* ---------- En-tête ---------- */

.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gouttiere);
  color: #fff;
  transition: background .35s, color .35s, padding .35s, box-shadow .35s;
}
.entete.compact {
  background: rgba(245, 240, 232, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--encre);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 1px 0 var(--filet);
}
.monogramme { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.monogramme-d {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid currentColor; font: italic 500 22px/1 var(--serif);
}
.monogramme-texte { font: 500 22px/1 var(--serif); letter-spacing: 0.04em; }
.nav-lieux { display: flex; gap: 34px; }
.nav-lieux a { text-decoration: none; font-size: 14px; letter-spacing: 0.08em; opacity: .85; }
.nav-lieux a:hover { opacity: 1; }
.bouton-famille {
  font: 500 14px/1 var(--sans); text-decoration: none; padding: 11px 20px;
  border: 1px solid currentColor; border-radius: 999px; white-space: nowrap;
  transition: background .2s, color .2s;
}
.bouton-famille:hover { background: #fff; color: var(--encre); }
.entete.compact .bouton-famille:hover { background: var(--encre); color: var(--papier); }

/* ---------- Hero ---------- */

.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; color: #fff; background: #1c2a33; }
.hero-diapos, .hero-diapo { position: absolute; inset: 0; margin: 0; }
.hero-diapo { opacity: 0; transition: opacity 1.6s ease; }
.hero-diapo.active { opacity: 1; }
.hero-diapo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 9s ease-out; }
.hero-diapo.active img { transform: scale(1); }
.hero-voile {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 22, 28, .55) 0%, rgba(14, 22, 28, .2) 45%, rgba(14, 22, 28, 0) 70%),
    linear-gradient(180deg, rgba(14, 22, 28, .5) 0%, rgba(14, 22, 28, .05) 28%, rgba(14, 22, 28, .15) 50%, rgba(14, 22, 28, .75) 100%);
}
.hero-contenu {
  position: absolute; left: var(--gouttiere); right: var(--gouttiere); bottom: clamp(120px, 20vh, 200px);
  max-width: 900px;
}
.hero .surtitre { color: #e8d3ae; }
.hero h1 { font-size: clamp(44px, 7.4vw, 104px); font-weight: 400; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.hero h1 em { color: #f0dfc2; }
.hero-texte { max-width: 520px; font-size: clamp(16px, 1.4vw, 19px); margin: 26px 0 0; opacity: .92; }
.hero-pied {
  position: absolute; left: var(--gouttiere); right: var(--gouttiere); bottom: 34px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.hero-reperes { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; }
.hero-reperes button {
  position: relative; background: none; border: 0; padding: 14px 0 0; cursor: pointer; color: #fff;
  width: clamp(80px, 12vw, 150px); text-align: left; font-size: 13px; letter-spacing: .06em; opacity: .6;
}
.hero-reperes button::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, .35);
}
.hero-reperes button::after {
  content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 0; background: #fff;
}
.hero-reperes button.active { opacity: 1; }
.hero-reperes button.active::after { animation: progression 7s linear forwards; }
.hero.pause .hero-reperes button.active::after { animation-play-state: paused; }
@keyframes progression { to { width: 100%; } }
.defiler { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; opacity: .85; white-space: nowrap; }
.defiler span { display: inline-block; animation: flotter 2.4s ease-in-out infinite; }
@keyframes flotter { 50% { transform: translateY(5px); } }

/* ---------- Introduction ---------- */

.intro { max-width: var(--largeur); margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--gouttiere) clamp(60px, 8vw, 110px); }
.intro-grille { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.intro-lettrine { font: italic 400 clamp(32px, 3.6vw, 50px)/1.15 var(--serif); margin: 0; color: var(--encre); }
.intro-texte p { margin: 0 0 1.1em; color: var(--encre-douce); font-size: 18px; }
.intro-chiffres {
  display: flex; gap: clamp(28px, 7vw, 110px); list-style: none; padding: 48px 0 0; margin: clamp(48px, 7vw, 90px) 0 0;
  border-top: 1px solid var(--filet);
}
.intro-chiffres li { display: flex; align-items: baseline; gap: 12px; }
.intro-chiffres strong { font: 400 clamp(46px, 5vw, 68px)/1 var(--serif); color: var(--or); }
.intro-chiffres span { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--discret); }

/* ---------- Lieux ---------- */

.lieu { --accent: var(--encre); max-width: var(--largeur); margin: 0 auto; padding: clamp(50px, 8vw, 110px) var(--gouttiere); }
.lieu-montreal { --accent: var(--montreal); }
.lieu-paris { --accent: var(--paris); }
.lieu-arcachon { --accent: var(--arcachon); }
.lieu-entete { display: flex; align-items: flex-end; gap: clamp(18px, 3vw, 36px); margin-bottom: clamp(28px, 4vw, 48px); }
.lieu-numero {
  font: italic 400 clamp(64px, 9vw, 130px)/0.8 var(--serif); color: var(--accent); opacity: .9;
}
.lieu-coord { margin: 0 0 8px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--discret); }
.lieu h2 { font-size: clamp(42px, 6vw, 82px); font-weight: 400; }
.lieu-mosaique {
  display: grid; gap: clamp(10px, 1.4vw, 18px);
  grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, clamp(180px, 28vw, 380px));
}
.lieu:nth-of-type(even) .lieu-mosaique { grid-template-columns: 1fr 2fr; }
.lieu:nth-of-type(even) .tuile-1 { grid-column: 2; }
.lieu:nth-of-type(even) .tuile-2, .lieu:nth-of-type(even) .tuile-3 { grid-column: 1; grid-row: auto; }
.tuile { position: relative; margin: 0; overflow: hidden; border-radius: var(--rayon); background: var(--papier-2); }
.tuile-1 { grid-row: 1 / span 2; }
.tuile-bouton { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tuile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.tuile:hover img { transform: scale(1.04); }
.tuile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px;
  background: linear-gradient(transparent, rgba(10, 16, 20, .6)); color: #fff; font-size: 13px;
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; pointer-events: none;
}
.tuile:hover figcaption, .tuile:focus-within figcaption { opacity: 1; transform: none; }
.lieu-texte {
  position: relative; z-index: 1;
  max-width: 640px; margin: clamp(26px, 4vw, 44px) 0 0; padding-left: 22px;
  border-left: 2px solid var(--accent); color: var(--encre-douce); font-size: 18px;
}
.lieu:nth-of-type(even) .lieu-texte { margin-left: auto; }

/* ---------- Appel espace famille ---------- */

.famille-appel { padding: clamp(60px, 9vw, 130px) var(--gouttiere) clamp(80px, 10vw, 150px); }
.famille-carte {
  position: relative; max-width: 980px; margin: 0 auto; padding: clamp(40px, 7vw, 90px);
  background: var(--encre); color: var(--papier); border-radius: 26px; overflow: hidden; text-align: center;
}
.famille-carte::before {
  content: "D"; position: absolute; right: -30px; bottom: -110px; font: italic 400 420px/1 var(--serif);
  color: rgba(255, 255, 255, .04); pointer-events: none;
}
.famille-carte h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 400; }
.famille-carte h2 em { color: #e8d3ae; }
.famille-carte p { max-width: 560px; margin: 24px auto 0; color: rgba(245, 240, 232, .8); }
.famille-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 36px; }
.famille-carte .bouton-plein { background: var(--papier); color: var(--encre); border-color: var(--papier); }
.famille-carte .bouton-plein:hover { background: #fff; }
.famille-note { font-size: 14px; color: rgba(245, 240, 232, .6); }

/* ---------- Pied de page ---------- */

.pied { text-align: center; padding: 50px var(--gouttiere) 60px; border-top: 1px solid var(--filet); color: var(--discret); font-size: 14px; }
.pied p { margin: 4px 0; }
.pied-marque { font: 500 26px/1.2 var(--serif); color: var(--encre); }
.pied-marque span { color: var(--or); }
.pied-credit { font-size: 12px; margin-top: 16px !important; }

/* ---------- Visionneuse (photos en grand) ---------- */

.visionneuse {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(10, 15, 19, .94); padding: 24px;
  animation: apparaitre .25s ease;
}
.visionneuse[hidden] { display: none; }
.visionneuse figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.visionneuse img { max-width: min(1600px, 100%); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.visionneuse figcaption { color: rgba(255, 255, 255, .8); font-size: 14px; text-align: center; }
.visionneuse-fermer, .visionneuse-nav {
  position: absolute; background: rgba(255, 255, 255, .08); border: 0; color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1;
}
.visionneuse-fermer { top: 18px; right: 18px; }
.visionneuse-nav { top: 50%; transform: translateY(-50%); }
.visionneuse-nav.precedent { left: 18px; }
.visionneuse-nav.suivant { right: 18px; }
.visionneuse-fermer:hover, .visionneuse-nav:hover { background: rgba(255, 255, 255, .18); }
@keyframes apparaitre { from { opacity: 0; } }

/* ---------- Apparition au défilement ---------- */

.js .revele { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .revele.vu { opacity: 1; transform: none; }

/* ---------- Petits écrans ---------- */

@media (max-width: 820px) {
  .nav-lieux { display: none; }
  .intro-grille { grid-template-columns: 1fr; }
  .lieu-mosaique, .lieu:nth-of-type(even) .lieu-mosaique {
    grid-template-columns: 1fr 1fr; grid-template-rows: 62vw 40vw; max-height: none;
  }
  .tuile-1, .lieu:nth-of-type(even) .tuile-1 { grid-column: 1 / span 2; grid-row: 1; }
  .tuile-2, .tuile-3, .lieu:nth-of-type(even) .tuile-2, .lieu:nth-of-type(even) .tuile-3 { grid-column: auto; grid-row: 2; }
  .tuile figcaption { opacity: 1; transform: none; font-size: 12px; padding: 28px 12px 10px; }
  .tuile-2 figcaption, .tuile-3 figcaption { display: none; }
  .hero-reperes button span { display: none; }
  .hero-reperes button { width: 46px; }
  .intro-chiffres { gap: 26px; }
}
@media (max-width: 480px) {
  .monogramme-texte { display: none; }
  .intro-chiffres { justify-content: space-between; }
  .intro-chiffres li { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Version du site et copyright, en bas de chaque page */
.pied-version { margin-top: 18px !important; font-size: 12px; color: var(--discret); letter-spacing: .02em; }
