/* La Tonnelle de Chanaz : mêmes couleurs et polices que le livret d'accueil */
/* Polices hébergées sur le site (sous-ensemble latin, licence SIL OFL) */
@font-face { font-family: 'Gloock'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/gloock.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/dmmono-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/dmmono-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --mist: #EDF1EE;      /* brume du lac */
  --table: #D6DFDB;
  --ink: #1D3440;       /* eau profonde */
  --lake: #3C6C76;      /* surface du lac */
  --reed: #7F8F5E;      /* roseaux */
  --twine: #BBA987;     /* ficelle de filet */
  --buoy: #B8452F;      /* flotteur rouge, avec parcimonie */
  --soft: #5A6E73;
  --display: "Gloock", Georgia, "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", Consolas, "Courier New", monospace;
  --rule: color-mix(in srgb, var(--twine) 55%, transparent);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--mist); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--lake); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.08; }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lake); }
.lead { font-size: 18px; }
.muted { color: var(--soft); }
.small { font-size: 14px; }
.coords { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }

.wave {
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='10' viewBox='0 0 36 10'%3E%3Cpath d='M0 5 Q9 0 18 5 T36 5' fill='none' stroke='%233C6C76' stroke-width='1.3'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 36px 10px; opacity: .7;
}
.wave.short { width: 108px; }
.center .wave { margin-inline: auto; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--mist) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { font-family: var(--display); font-size: 22px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--lake); }
.topbar nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 15px; }
.topbar nav a:not(.btn):hover { color: var(--lake); text-decoration: underline; text-underline-offset: 4px; }

.langs { display: inline-flex; gap: 8px; align-items: center; }
.langs a { display: block; line-height: 0; border-radius: 3px; opacity: .7; transition: opacity .15s, transform .15s; }
.langs a:hover { opacity: 1; transform: translateY(-1px); }
.langs a[aria-current] { opacity: 1; box-shadow: 0 0 0 2px var(--mist), 0 0 0 3px var(--lake); }
.langs img { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(29,52,64,.18); }
.lang-link { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); }
.lang-link img { border-radius: 2px; box-shadow: 0 0 0 1px rgba(29,52,64,.18); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 12px 22px;
  background: var(--ink); color: var(--mist);
  font-weight: 500; text-decoration: none; border: 1px solid var(--ink);
  transition: background .15s;
}
.btn:hover { background: var(--lake); border-color: var(--lake); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--mist); border-color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.center .actions { justify-content: center; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--buoy); outline-offset: 3px; }

/* ---------- Accueil ---------- */
/* L'accueil occupe exactement l'écran visible sous la barre du haut (--topbar-h mesurée par accueil.js) */
.hero { position: relative; display: grid; align-items: end; overflow: hidden;
  min-height: calc(100vh - var(--topbar-h, 64px));
  min-height: calc(100svh - var(--topbar-h, 64px)); }
.slides, .slides .track, .slides .slide { position: absolute; inset: 0; }
.slides .track { display: flex; transition: transform 1.2s cubic-bezier(.65,0,.35,1); will-change: transform; }
.slides .slide { position: relative; flex: 0 0 100%; height: 100%; }
.slides img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.slides .slide:first-child img, .slides .slide:last-child img { object-position: 38% center; }
.slides .dots { position: absolute; z-index: 2; padding: 6px 9px; border-radius: 999px; background: rgba(237,241,238,.72); right: clamp(16px, 4vw, 40px); bottom: clamp(16px, 3vw, 28px); display: flex; gap: 8px; }
.slides .dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--ink); background: transparent; cursor: pointer; opacity: .55; transition: background .2s, opacity .2s, transform .2s; }
.slides .dots button[aria-current="true"] { background: var(--ink); opacity: 1; transform: scale(1.2); }
.slides .dots button:hover { opacity: 1; }
/* Voile clair uniquement derrière le texte (le reste de la photo reste net) */
.hero-text::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -160px -160px -80px -300px;
  background: radial-gradient(closest-side, rgba(237,241,238,.92) 0%, rgba(237,241,238,.85) 62%, rgba(237,241,238,0) 100%); }
.hero-text { position: relative; z-index: 1; padding: 0 clamp(20px, 6vw, 72px) clamp(32px, 6vw, 64px); display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.hero .eyebrow { color: var(--ink); font-weight: 500; background: color-mix(in srgb, var(--mist) 85%, transparent); align-self: flex-start; padding: 4px 10px; }
.hero h1 { font-size: clamp(44px, 7vw, 80px); line-height: 1; }
.hero h1 span:not(.l1) { display: block; font-size: .6em; color: var(--lake); margin-top: 6px; }

/* ---------- Sections ---------- */
.block { padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 48px); }
.block-alt { background: color-mix(in srgb, var(--table) 55%, var(--mist)); }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.narrow { max-width: 720px; }
.wrap.narrow { margin-inline: auto; }
.center { text-align: center; align-items: center; }
.head { display: flex; flex-direction: column; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: color-mix(in srgb, var(--mist) 55%, white); border: 1px solid var(--rule); padding: 24px; display: flex; flex-direction: column; gap: 14px; }

ul.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.list li { position: relative; padding-left: 20px; }
ul.list li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 9px; height: 1.5px; background: var(--reed); border-radius: 1px; }

.callout { background: color-mix(in srgb, var(--reed) 14%, var(--mist)); padding: 18px 22px; border-left: 3px solid var(--reed); }
.callout b { font-weight: 600; }

/* ---------- Galerie ---------- */
.room { display: flex; flex-direction: column; gap: 12px; }
.room h3 { font-size: 20px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--table); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }

/* Visionneuse */
#visionneuse { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
#visionneuse::backdrop { background: rgba(29,52,64,.94); }
#visionneuse[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
#visionneuse img { max-width: min(94vw, 1800px); max-height: 84vh; object-fit: contain; }
#visionneuse .legende { color: var(--mist); font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-align: center; padding-inline: 16px; }
#visionneuse button { position: absolute; background: rgba(237,241,238,.12); color: var(--mist); border: 0; font-size: 34px; line-height: 1; width: 52px; height: 52px; cursor: pointer; border-radius: 50%; }
#visionneuse button:hover { background: rgba(237,241,238,.25); }
#visionneuse .fermer { top: 14px; right: 14px; font-size: 30px; }
#visionneuse .prec { left: 14px; top: 50%; transform: translateY(-50%); }
#visionneuse .suiv { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Accès ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.tag { margin: 0; border: 1px solid var(--twine); background: color-mix(in srgb, var(--mist) 60%, white); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; align-items: baseline; }
.tag dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.tag dd { margin: 0; }
.map { display: flex; flex-direction: column; gap: 8px; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--twine); display: block; }

/* ---------- Réserver ---------- */
.cta { background: var(--ink); color: var(--mist); }
.cta h2, .cta .lead { color: var(--mist); }
.cta .eyebrow { color: color-mix(in srgb, var(--mist) 75%, var(--lake)); }
.cta .wave { filter: brightness(2.4); }
.cta .btn { background: var(--mist); color: var(--ink); border-color: var(--mist); }
.cta .btn:hover { background: white; }
.cta .btn-ghost { background: transparent; color: var(--mist); }
.cta .btn-ghost:hover { background: var(--mist); color: var(--ink); }
.cta .wrap { gap: 22px; }

.footer { padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 4px; color: var(--soft); font-size: 14px; border-top: 1px solid var(--rule); }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  .topbar { flex-direction: column; gap: 6px; padding-block: 10px; }
  .topbar nav { justify-content: center; gap: 2px 14px; }
  .topbar nav a:not(.btn) { font-size: 14px; }
  html { scroll-padding-top: 110px; }
  .split { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  #visionneuse .prec, #visionneuse .suiv { top: auto; bottom: 18px; transform: none; }
  .tag { grid-template-columns: 1fr; gap: 2px; }
  .tag dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Apparition du titre (accueil) ----------
   La photo s'affiche d'abord ; puis chaque ligne du texte se dévoile de gauche à droite, l'une après l'autre. */
@keyframes devoiler {
  from { clip-path: inset(0 100% 0 0); opacity: 0; transform: translateY(6px); }
  to   { clip-path: inset(0 0 0 0);   opacity: 1; transform: none; }
}
@keyframes apparaitre { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow, .hero h1 span { animation: devoiler 1.1s cubic-bezier(.22,.7,.2,1) both; }
  .hero .eyebrow  { animation-delay: .5s; }
  .hero h1 .l1    { display: inline-block; animation-delay: .8s; }
  .hero h1 span:not(.l1) { animation-delay: 1.15s; }
  .hero .lead     { animation: apparaitre .9s ease-out 1.6s both; }
  .hero .actions, .hero .coords { animation: apparaitre .9s ease-out 1.9s both; }
}
