/* Villas Calvi Corse
   Direction : chaux blanche des façades, bleu profond du golfe, vert gris du maquis, granit de Balagne.
   Mise en page : grandes photos pleine largeur, texte sur une colonne étroite, fiches techniques en tableau. */
:root {
  --chaux: #fbfaf7;
  --granit: #efe9df;
  --encre: #1c2a33;
  --encre-douce: #4f5d66;
  --golfe: #0e4a6b;
  --golfe-clair: #dceaf1;
  --maquis: #5d6b4f;
  --trait: #d8d1c4;
  --alerte: #9a3b22;
  --ok: #2f6b3a;
  --f-titre: "Young Serif", Georgia, "Times New Roman", serif;
  --f-texte: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gouttiere-g: max(16px, env(safe-area-inset-left, 0px));
  --gouttiere-d: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--chaux);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--golfe); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--golfe); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--f-titre); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.etiquette {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--maquis); font-weight: 600;
}
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: var(--gouttiere-g); padding-right: var(--gouttiere-d);
}
.etroit { max-width: 68ch; }

/* En-tête */
.entete {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--chaux) 94%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--trait);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 30; background: var(--chaux);
}
.entete .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.marque { font-family: var(--f-titre); font-size: 1.25rem; color: var(--encre); text-decoration: none; }
.marque span { color: var(--golfe); }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: var(--encre); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--golfe); }
.nav .bouton-nav { background: var(--golfe); color: #fff; padding: 4px 12px; border-radius: 3px; border: 0; }

/* Grande photo d'ouverture */
.ouverture { position: relative; color: #fff; background: var(--encre); }
.ouverture img { width: 100%; height: clamp(360px, 62vh, 640px); object-fit: cover; opacity: .9; }
.ouverture .legende {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(10, 25, 35, .78));
  padding-block: 64px 28px;
}
.ouverture .legende .wrap { display: grid; gap: 10px; }
.ouverture .etiquette { color: #e7efe0; }
.ouverture p.sous { font-size: 1.1rem; max-width: 60ch; }

section { padding-block: 64px; }
section + section { border-top: 1px solid var(--trait); }
.fond-granit { background: var(--granit); }
.entete-section { display: grid; gap: 10px; margin-bottom: 32px; }

/* Les deux villas */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.carte-villa { display: grid; gap: 14px; align-content: start; }
.carte-villa img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.carte-villa .chiffres { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--encre-douce); font-size: .95rem; }
.carte-villa .chiffres b { color: var(--encre); font-weight: 600; }
.lien-fleche { font-weight: 600; text-decoration: none; }
.lien-fleche::after { content: " →"; }

/* Fiche technique */
.fiche { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 820px) { .fiche { grid-template-columns: minmax(0, 1fr); } }
.fiche .texte { display: grid; gap: 16px; }
.tableau-fiche { width: 100%; border-collapse: collapse; font-size: .97rem; }
.tableau-fiche th, .tableau-fiche td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau-fiche th { font-weight: 600; width: 42%; padding-right: 12px; color: var(--encre-douce); }
.liste-points { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }

/* Galerie */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.galerie button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .2s; }
.galerie button:hover img { opacity: .85; }
.galerie .large { grid-column: span 2; }
@media (max-width: 600px) { .galerie .large { grid-column: auto; } }
.visionneuse {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 16, 22, .94);
  display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 48px) var(--gouttiere-d) calc(env(safe-area-inset-bottom, 0px) + 48px) var(--gouttiere-g);
}
.visionneuse { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.visionneuse img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  max-height: calc(100vh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  object-fit: contain; justify-self: center; align-self: center;
}
.visionneuse button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.visionneuse .fermer { top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 10px); }
.visionneuse .prec { left: calc(env(safe-area-inset-left, 0px) + 10px); top: 50%; }
.visionneuse .suiv { right: calc(env(safe-area-inset-right, 0px) + 10px); top: 50%; }

/* Tarifs */
.defile { overflow-x: auto; }
.tarifs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 520px; }
.tarifs th, .tarifs td { padding: 10px 12px; border-bottom: 1px solid var(--trait); text-align: left; }
.tarifs thead th { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); font-weight: 600; border-bottom: 2px solid var(--encre); }
.tarifs td.prix { text-align: right; white-space: nowrap; }
.tarifs thead th.prix { text-align: right; }
.tarifs tr.haute td { background: var(--golfe-clair); }
.note { font-size: .9rem; color: var(--encre-douce); }

/* Calculateur */
.calcul { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .calcul { grid-template-columns: minmax(0, 1fr); } }
.formulaire { display: grid; gap: 16px; }
.ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.champ { display: grid; gap: 5px; }
.champ label, .champ legend { font-size: .88rem; font-weight: 600; }
.champ input, .champ select, .champ textarea {
  font: inherit; font-size: 1rem; padding: 10px 11px; border: 1px solid #b9b1a3; border-radius: 3px;
  background: #fff; color: var(--encre); width: 100%;
}
fieldset { border: 1px solid var(--trait); padding: 12px 14px 14px; margin: 0; border-radius: 3px; display: grid; gap: 10px; }
.choix { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: .95rem; }
.choix label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.kits[hidden] { display: none; }
.recap { background: #fff; border: 1px solid var(--trait); padding: 22px; border-radius: 3px; display: grid; gap: 14px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); }
.recap h3 { font-size: 1.15rem; }
.recap table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .97rem; }
.recap td { padding: 7px 0; border-bottom: 1px solid var(--granit); }
.recap td:last-child { text-align: right; white-space: nowrap; }
.recap tr.total td { font-weight: 700; border-bottom: 2px solid var(--encre); font-size: 1.05rem; }
.recap tr.sous td { color: var(--encre-douce); font-size: .9rem; }
.message { padding: 10px 12px; border-left: 3px solid; font-size: .95rem; }
.message.erreur { border-color: var(--alerte); background: #f8ece7; color: #5c2414; }
.message.info { border-color: var(--golfe); background: var(--golfe-clair); }
.message.ok { border-color: var(--ok); background: #e7f1e7; }
.bouton {
  font: inherit; font-weight: 600; background: var(--golfe); color: #fff; border: 0;
  padding: 12px 20px; border-radius: 3px; cursor: pointer; justify-self: start;
}
.bouton:hover { background: #0a3a55; }
.bouton.secondaire { background: transparent; color: var(--golfe); border: 1px solid var(--golfe); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
pre.demande { white-space: pre-wrap; background: var(--granit); padding: 14px; font-size: .9rem; border-radius: 3px; margin: 0; }

/* Calendrier */
.calendrier { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.mois h4 { margin: 0 0 6px; font-family: var(--f-titre); font-weight: 400; font-size: 1rem; text-transform: capitalize; }
.mois table { width: 100%; border-collapse: collapse; font-size: .82rem; text-align: center; font-variant-numeric: tabular-nums; }
.mois th { font-weight: 600; color: var(--encre-douce); padding: 3px 0; }
.mois td { padding: 5px 0; }
.mois td.pris { background: #e3d9cb; color: #8a7f70; text-decoration: line-through; }
.mois td.samedi { font-weight: 700; }
.legende-cal { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; color: var(--encre-douce); }
.pastille { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; border: 1px solid var(--trait); }

/* Conditions */
.conditions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 40px; }
.conditions div { display: grid; gap: 6px; align-content: start; }

/* Environs */
.environs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 820px) { .environs { grid-template-columns: minmax(0, 1fr); } }
.environs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.distances { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.distances td { padding: 8px 0; border-bottom: 1px solid var(--trait); }
.distances td:last-child { text-align: right; color: var(--encre-douce); }

/* Pied de page */
.pied { background: var(--encre); color: #d7dee2; padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: .93rem; }
.pied .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.pied a { color: #fff; }
.pied h3 { color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.selectionnable { user-select: all; }
