/* ═══════════════════════════════════════════════════════════
   les-gobeil.ca — page d'annonce
   Palette « Fleuve & Nouvelle-France » : nuit fluviale, or
   patiné, vert-de-gris. Typographie Garamond.
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/ebgaramond-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/ebgaramond-latin-italic.woff2') format('woff2');
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-latin.woff2') format('woff2');
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  --nuit:        #0a1620;
  --nuit-2:      #0c1b26;
  --nuit-3:      #102432;
  --fleuve:      #12303f;
  --vert-gris:   #6f9d95;
  --or:          #c9a55f;
  --or-clair:    #e8d3a0;
  --or-sourd:    #8d7743;
  --ivoire:      #ece4d4;
  --brume:       #9aadb6;
  --brume-2:     #6d838e;

  --titre:  'Cormorant Garamond', 'EB Garamond', ui-serif, Georgia, serif;
  --texte:  'EB Garamond', ui-serif, Georgia, 'Times New Roman', serif;

  --marge:  clamp(1.25rem, 5vw, 3rem);
  --mesure: 68ch;
  --lent:   1.1s cubic-bezier(.16, .84, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--ivoire);
  font-family: var(--texte);
  font-size: clamp(1.05rem, .55vw + .95rem, 1.22rem);
  line-height: 1.72;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(201, 165, 95, .3); color: #fff; }

a { color: var(--or-clair); text-decoration-color: rgba(201, 165, 95, .45); text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--or); }

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 3px;
  border-radius: 2px;
}

.saut {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--or);
  color: var(--nuit);
  padding: .6rem 1rem;
  z-index: 99;
}
.saut:focus { left: .5rem; top: .5rem; }

/* ─────────── Fond de carte ─────────── */

.carte {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.carte svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.06) translate3d(0, calc(var(--derive, 0) * -1px), 0);
  transition: transform 1.4s cubic-bezier(.2, .8, .3, 1);
}

.graticule {
  fill: none;
  stroke: #4e7f8c;
  stroke-width: .6;
  opacity: .13;
}
.rhumb {
  fill: none;
  stroke: #7fb0b3;
  stroke-width: .45;
  opacity: .085;
}
.fleuve > path:first-child { opacity: .34; }
.fleuve .rive {
  fill: none;
  stroke: #56939b;
  stroke-width: 1;
  opacity: .26;
}
/* La rose a son propre mouvement : elle remonte beaucoup plus vite que
   le reste de la carte, et finit en haut du cadre au bas de la page.
   --rose-y est posé par app.js ; les unités sont celles du viewBox. */
.rose {
  transform: translate(var(--rose-x, 0px), calc(var(--rose-y, 0) * -1px));
  transition: transform .25s cubic-bezier(.2, .8, .3, 1);
}

/* Sur écran étroit, le cadrage « slice » rogne le côté droit et la rose
   sortait complètement du champ : on la ramène dans la vue. */
@media (max-width: 820px) {
  .rose { --rose-x: -430px; }
}

.rose .cercle {
  fill: none;
  stroke: var(--or-sourd);
  stroke-width: .7;
  opacity: .26;
}
.rose .facette-clair { fill: var(--or); opacity: .11; }
.rose .facette-ombre { fill: #4a7f8a; opacity: .11; }
.rose .fleur { fill: var(--or-clair); opacity: .38; }

.grain {
  position: absolute;
  inset: -20%;
  opacity: .42;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 30%, rgba(6, 14, 20, .72) 100%),
    linear-gradient(to bottom, rgba(10, 22, 32, .35) 0%, transparent 22%, transparent 62%, rgba(8, 17, 24, .8) 100%);
}

/* ─────────── Mise en page ─────────── */

.dedans {
  width: min(100% - var(--marge) * 2, 1120px);
  margin-inline: auto;
}
.dedans.etroit { width: min(100% - var(--marge) * 2, 680px); }

section { padding-block: clamp(4.5rem, 11vh, 8.5rem); }

.chapeau {
  margin: 0 0 .9rem;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--or);
  opacity: .82;
}
.titre-2 {
  margin: 0 0 1.5rem;
  font-family: var(--titre);
  font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: .005em;
  color: #fff;
}
.intro {
  margin: 0 0 3rem;
  max-width: 58ch;
  color: var(--brume);
}

/* ─────────── Hero ─────────── */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(4rem, 12vh, 7rem) var(--marge) clamp(3rem, 8vh, 5rem);
  text-align: center;
}
.hero-in { width: 100%; max-width: 44rem; }

.surtitre {
  margin: 0 0 clamp(1.1rem, 3vh, 1.8rem);
  font-size: clamp(.68rem, 1.5vw, .78rem);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--vert-gris);
  padding-left: .42em;
  overflow-wrap: anywhere;
}

.titre {
  margin: 0;
  font-family: var(--titre);
  font-weight: 300;
  font-size: clamp(3.2rem, 13vw, 8rem);
  line-height: .92;
  letter-spacing: .01em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .28em;
  background: linear-gradient(168deg, #fbf3e2 6%, var(--or-clair) 38%, var(--or) 66%, #a2854a 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.titre .mot { display: block; }

.ornement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: clamp(1.1rem, 2.6vh, 1.7rem) auto clamp(1rem, 2.2vh, 1.5rem);
  max-width: 22rem;
  color: var(--or);
}
.ornement .filet {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201, 165, 95, .55), transparent);
}

.devise {
  margin: 0 0 1.15rem;
  font-family: var(--titre);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.25rem, 3.1vw, 1.85rem);
  line-height: 1.4;
  color: var(--ivoire);
  opacity: .92;
}

.dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem .9rem;
  margin: 0 0 clamp(1.7rem, 4vh, 2.4rem);
  font-size: .82rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--brume);
  opacity: .78;
  padding-left: .32em;
}
.dates i { font-style: normal; opacity: .5; letter-spacing: 0; }

.statut {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: .68rem;
  margin: 0;
  padding: .55rem 1.4rem .55rem 1.15rem;
  border: 1px solid rgba(201, 165, 95, .28);
  border-radius: 999px;
  background: rgba(12, 27, 38, .55);
  backdrop-filter: blur(6px);
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--or-clair);
}
.lueur {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--or);
  box-shadow: 0 0 0 0 rgba(201, 165, 95, .6);
  animation: phare 3.4s ease-out infinite;
}
@keyframes phare {
  0%       { box-shadow: 0 0 0 0 rgba(201, 165, 95, .55); }
  60%, 100%{ box-shadow: 0 0 0 11px rgba(201, 165, 95, 0); }
}

.descendre {
  display: flex;
  width: fit-content;
  margin: clamp(1.8rem, 5vh, 3rem) auto 0;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brume);
  text-decoration: none;
}
.descendre svg { animation: flotte 2.8s ease-in-out infinite; }
.descendre:hover { color: var(--or-clair); }
@keyframes flotte {
  0%, 100% { transform: translateY(-2px); opacity: .55; }
  50%      { transform: translateY(3px);  opacity: 1; }
}

/* ─────────── Salles ─────────── */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.salle {
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border: 1px solid rgba(122, 160, 172, .16);
  border-radius: 3px;
  background: linear-gradient(168deg, rgba(18, 42, 56, .58), rgba(9, 20, 29, .5));
  backdrop-filter: blur(3px);
  transition: border-color .5s ease, transform .5s ease, background .5s ease;
}
.salle:hover {
  border-color: rgba(201, 165, 95, .34);
  background: linear-gradient(168deg, rgba(22, 50, 66, .62), rgba(10, 23, 33, .55));
  transform: translateY(-3px);
}
.jeton {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(201, 165, 95, .3);
  border-radius: 50%;
  color: var(--or);
}
.salle h3 {
  margin: 0 0 .7rem;
  font-family: var(--titre);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: .01em;
  color: #fff;
}
.salle p {
  margin: 0;
  font-size: .97em;
  color: var(--brume);
}

/* ─────────── Frise ─────────── */

.temps { position: relative; }

.frise {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.frise li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 2.5rem 1fr;
  align-items: baseline;
  gap: 0 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(122, 160, 172, .13);
}
.frise li:last-child { border-bottom: 1px solid rgba(122, 160, 172, .13); }

.frise .an {
  font-family: var(--titre);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 400;
  color: var(--or-clair);
  letter-spacing: .02em;
  white-space: nowrap;
}
.frise .an sup { font-size: .55em; }

.frise .pastille {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 9px;
  height: 9px;
  border: 1px solid var(--or);
  border-radius: 50%;
  background: var(--nuit);
}
.frise .pastille::before,
.frise .pastille::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 1.6rem;
  background: rgba(201, 165, 95, .3);
}
.frise .pastille::before { bottom: 100%; margin-bottom: 4px; }
.frise .pastille::after  { top: 100%;    margin-top: 4px; }
.frise li:first-child .pastille::before,
.frise li:last-child  .pastille::after { display: none; }

.frise p {
  margin: 0;
  color: var(--brume);
  font-size: 1em;
}

@media (max-width: 640px) {
  .frise li {
    grid-template-columns: 1.5rem 1fr;
    gap: 0 .9rem;
  }
  .frise .an { grid-column: 2; margin-bottom: .3rem; }
  .frise .pastille { grid-row: 1 / 3; grid-column: 1; align-self: start; margin-top: .7rem; }
  .frise p { grid-column: 2; }
}

/* ─────────── Invitation & formulaire ─────────── */

.invitation .dedans { position: relative; }

.formulaire {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(122, 160, 172, .2);
  border-radius: 3px;
  background: linear-gradient(168deg, rgba(18, 42, 56, .6), rgba(9, 20, 29, .55));
  backdrop-filter: blur(4px);
}

.champs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.2rem;
}
.champ { margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.champ.pleine { grid-column: 1 / -1; }

.champ label,
.consentement label {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brume);
}
.champ .option { text-transform: none; letter-spacing: 0; opacity: .6; font-size: .95em; }

input[type=text],
input[type=email],
textarea {
  width: 100%;
  padding: .72rem .85rem;
  border: 1px solid rgba(122, 160, 172, .28);
  border-radius: 2px;
  background: rgba(6, 15, 22, .55);
  color: var(--ivoire);
  font-family: var(--texte);
  font-size: 1.02rem;
  line-height: 1.5;
  transition: border-color .3s ease, background .3s ease;
}
textarea { resize: vertical; min-height: 5rem; }

input::placeholder, textarea::placeholder { color: var(--brume-2); opacity: .65; }

input[type=text]:hover,
input[type=email]:hover,
textarea:hover { border-color: rgba(122, 160, 172, .45); }

input[type=text]:focus,
input[type=email]:focus,
textarea:focus {
  outline: none;
  border-color: var(--or);
  background: rgba(9, 21, 30, .75);
  box-shadow: 0 0 0 3px rgba(201, 165, 95, .13);
}
.champ.erreur input,
.champ.erreur textarea { border-color: #c2685c; }

/* piège à robots */
.rets {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consentement {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 1.6rem 0 0;
}
.consentement input {
  flex: none;
  margin-top: .3rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--or);
}
.consentement label {
  text-transform: none;
  letter-spacing: 0;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--brume);
}
.consentement.erreur label { color: #d98a7e; }

.bouton {
  margin-top: 1.7rem;
  width: 100%;
  padding: .95rem 1.5rem;
  border: 1px solid var(--or);
  border-radius: 2px;
  background: linear-gradient(168deg, rgba(201, 165, 95, .17), rgba(201, 165, 95, .06));
  color: var(--or-clair);
  font-family: var(--texte);
  font-size: .88rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .35s ease, color .35s ease, transform .2s ease;
}
.bouton:hover:not(:disabled) { background: var(--or); color: #14202a; }
.bouton:active:not(:disabled) { transform: translateY(1px); }
.bouton:disabled { opacity: .55; cursor: progress; }

.reponse {
  margin: 1.1rem 0 0;
  min-height: 1.4em;
  font-size: .97rem;
  color: var(--vert-gris);
}
.reponse.ok    { color: var(--or-clair); }
.reponse.pepin { color: #d98a7e; }

/* état « merci » */
.formulaire.envoye .champs,
.formulaire.envoye .consentement,
.formulaire.envoye .bouton { display: none; }
.formulaire.envoye .reponse {
  margin: 0;
  font-family: var(--titre);
  font-size: 1.5rem;
  line-height: 1.4;
  text-align: center;
}

.vie-privee {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(122, 160, 172, .16);
  font-size: .88rem;
  color: var(--brume-2);
}
.vie-privee summary {
  cursor: pointer;
  letter-spacing: .06em;
  color: var(--brume);
}
.vie-privee summary:hover { color: var(--or-clair); }
.vie-privee p { margin: .9rem 0 0; line-height: 1.65; }
.vie-privee strong { color: var(--brume); font-weight: 600; }

/* ─────────── Pied ─────────── */

.pied {
  padding: clamp(3rem, 8vh, 5rem) var(--marge) clamp(2.5rem, 6vh, 4rem);
  border-top: 1px solid rgba(122, 160, 172, .13);
  text-align: center;
}
.pied-marque {
  margin: 0 0 .8rem;
  font-family: var(--titre);
  font-size: 1.3rem;
  letter-spacing: .18em;
  color: var(--or);
}
.pied-note {
  margin: 0 auto .9rem;
  max-width: 40ch;
  font-size: .9rem;
  color: var(--brume-2);
}
.pied-contact { margin: 0; font-size: .9rem; }

/* ─────────── Entrée en scène ─────────── */

[data-lever] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--lent), transform var(--lent);
}
[data-lever].leve { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-lever] { opacity: 1; transform: none; transition: none; }
  .carte svg { transform: scale(1.06); transition: none; }
  .rose { transform: translate(var(--rose-x, 0px), 0); transition: none; }
  .lueur, .descendre svg { animation: none; }
  * { transition-duration: .01ms !important; }
}
