/* =========================================================
   Les Gîtes de Marie — socle : polices, jetons, typographie
   ========================================================= */

@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-var-italic.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
/* Texte courant : Mulish (05/10/2026, à la place de Jost 300, jugée trop
   fine par Marie). Variable 300-800, hébergée sur le site. */
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-var-latin.woff2') format('woff2');
  font-weight: 300 800;
  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+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: 'Mulish';
  src: url('../fonts/mulish-var-latin-ext.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Palette tirée des photos : chêne clair, bouclé crème, pierre, carreaux beiges */
  --creme: #faf7f1;
  --creme-2: #f3ece1;
  --sable: #e4d6be;
  --sable-clair: #efe5d3;
  /* Ambre assombri pour tenir le contraste AA en petit texte sur crème et sable. */
  --ambre: #875d2a;
  --ambre-fonce: #6f4c1d;
  --terre: #9c5b3e;
  --encre: #241e1a;
  --encre-douce: #4a423b;
  --brume: #6f665b;
  --filet: #e0d5c2;

  /* Accent redéfini par gîte — un seul jeton bascule toute la page */
  --accent: var(--ambre);
  --accent-fonce: var(--ambre-fonce);
  --accent-voile: #f2e7d7;

  /* Les aplats sont en encre, l'ambre reste un accent typographique :
     en grande surface il virait au moutarde. */
  --btn-fond: var(--encre);
  --btn-texte: var(--creme);
  --btn-fond-survol: #100d0b;

  --police-titre: 'Cormorant', 'Iowan Old Style', Georgia, serif;
  --police-texte: 'Mulish', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  /* Échelle fluide : tout se lit de 360 px à 1600 px */
  --t-xxl: clamp(3.2rem, 11vw, 7.5rem);
  --t-xl: clamp(2.6rem, 6.5vw, 4.6rem);
  --t-l: clamp(2rem, 4.2vw, 3rem);
  --t-m: clamp(1.4rem, 2.4vw, 1.85rem);
  --t-corps: clamp(1.0625rem, 1.05vw, 1.15rem);
  --t-heros: clamp(1.08rem, 1.5vw, 1.25rem);
  --t-petit: 0.9rem;
  --t-oeil: 0.78rem;

  /* Arrondis : le site doit respirer la chaleur, pas la rigueur. */
  --r-pill: 999px;
  --r-carte: 20px;
  --r-img: 14px;
  --r-champ: 10px;

  --ombre: 0 2px 10px rgba(36, 30, 26, 0.06);
  --ombre-haut: 0 14px 34px rgba(36, 30, 26, 0.13);
  --sortie: 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Icône calendrier en masque SVG : suit la couleur du texte, zéro requête. */
  --icone-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' d='M4 6.5h16v14H4zM4 10.5h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/svg%3E");

  --marge: clamp(1.25rem, 5vw, 5rem);
  --large: 1180px;
  --etroit: 680px;
  --section: clamp(4.5rem, 9vw, 8.5rem);

  --transition: 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-gite='chalet'] {
  /* Le chalet regarde le bassin : accent bleu-vert lac */
  --accent: #41605c;
  --accent-fonce: #324b48;
  --accent-voile: #e2eae7;
}

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

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

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre-douce);
  font-family: var(--police-texte);
  font-size: var(--t-corps);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--police-titre);
  font-weight: 600;
  color: var(--encre);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  /* Lignes équilibrées : pas de mot seul sur la dernière ligne d'un titre. */
  text-wrap: balance;
}

h1 { font-size: var(--t-xxl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-l); }
h4 { font-size: var(--t-m); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Sur fond encre, l'ambre et le bleu-vert tombent sous 3:1 : contour doré. */
.section--encre :focus-visible,
.carte-sombre :focus-visible,
.pied :focus-visible { outline-color: #e8b55c; }

/* Lien d'évitement : caché jusqu'au premier Tab. */
.evitement {
  position: absolute;
  left: var(--marge);
  top: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  border-radius: var(--r-pill);
  background: var(--encre);
  color: var(--creme);
  font-size: var(--t-petit);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.evitement:focus-visible { transform: none; outline-color: #e8b55c; }

/* --- Utilitaires ------------------------------------------------------- */

.enveloppe {
  width: 100%;
  max-width: var(--large);
  margin-inline: auto;
  padding-inline: var(--marge);
}

.etroit { max-width: var(--etroit); }

/* Paragraphes courants : on plafonne la longueur de ligne. */
.mesure p,
p.mesure { max-width: 62ch; }

.section { padding-block: var(--section); }
.section--apres-carte { padding-top: clamp(5.5rem, 10vw, 9.5rem); }
.section--sable { background: var(--creme-2); }
.section--encre { background: var(--encre); color: #cfc6b9; }
.section--encre h2,
.section--encre h3 { color: var(--creme); }

/* Sur-titre : capitales espacées, filet court en dessous */
.oeil {
  display: block;
  font-size: var(--t-oeil);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.oeil::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 1px;
  margin-top: 0.7rem;
  background: currentColor;
  opacity: 0.55;
}
.oeil--centre { text-align: center; }
.oeil--centre::after { margin-inline: auto; }

.chapo {
  font-family: var(--police-titre);
  font-size: var(--t-m);
  line-height: 1.45;
  color: var(--encre);
}

/* Un nom de lieu ne se coupe jamais à son trait d'union. */
.insecable { white-space: nowrap; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Boutons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0.85rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--police-texte);
  font-size: var(--t-petit);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--sortie), color var(--sortie),
              border-color var(--sortie), transform var(--sortie),
              box-shadow var(--sortie);
}
.btn .fleche {
  display: inline-block;
  transition: transform var(--sortie);
}

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--ombre-haut); }
  .btn:hover .fleche { transform: translateX(3px); }
}
.btn:active { transform: translateY(0); }

.btn--plein {
  background: var(--btn-fond);
  border-color: var(--btn-fond);
  color: var(--btn-texte);
}
.btn--plein:hover {
  background: var(--btn-fond-survol);
  border-color: var(--btn-fond-survol);
}

.btn--contour {
  background: transparent;
  border-color: currentColor;
  color: var(--encre);
}
.btn--contour:hover { background: var(--encre); border-color: var(--encre); color: var(--creme); }

/* Sur photo, on inverse : l'encre s'y noierait. */
.btn--clair {
  background: var(--creme);
  border-color: var(--creme);
  color: var(--encre);
}
.btn--clair:hover { background: #fff; border-color: #fff; }

.btn--fantome { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn--fantome:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }

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

/* Seulement si le JS tourne (classe posée dans <head>) : sans lui, le texte
   resterait invisible. */
.js .apparait {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.apparait.est-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .apparait { opacity: 1; transform: none; }
}
