/* CoteDOpale.fr — piste A2 « Fin de journée » */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #1E2A30;
  --ink-soft: #3A3632;
  --muted: #5A5148;
  --bg: #FCFAF6;
  --sky: #F3E6D8;
  --sand-1: #F1ECE4;
  --sand-2: #EDE5DA;
  --sand-3: #E6DED2;
  --accent: #2F6E6A;
  --accent-dark: #1F4F4C;
  --sun: #F2C99B;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2 { font-family: var(--serif); font-weight: 400; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête */
.site-header { position: relative; z-index: 2; }
.page-home .site-header { position: absolute; top: 0; left: 0; right: 0; }
.header-in { display: flex; align-items: center; gap: 16px 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { margin-right: auto; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 30px; line-height: 1; }
.brand-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.main-nav > a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.main-nav > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,.6); border-radius: 999px; padding: 3px; }
.page-inner .site-header { background: var(--sky); }
.lang-switch a { padding: 6px 10px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; }
.lang-switch a.on { background: var(--ink); color: var(--bg); font-weight: 600; }

/* Bandeau d'accueil */
.hero { position: relative; overflow: hidden; background: var(--sky); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; padding-top: 112px; padding-bottom: 72px; }
.hero h1 { margin: 0; max-width: 600px; font-size: clamp(38px, 5vw, 58px); line-height: 1.02; }
.hero-intro { margin: 14px 0 24px; max-width: 500px; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.search { display: flex; align-items: center; gap: 8px; max-width: 620px; background: #fff; padding: 8px; border-radius: 999px; box-shadow: 0 10px 30px rgba(30,42,48,.12); }
.search input { flex: 1 1 auto; min-width: 0; min-height: 52px; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--ink); padding: 0 20px; background: transparent; border-radius: 999px; }
.search input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; }
.search button:hover { background: var(--accent-dark); }

/* Types d'hébergement */
.types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 56px; padding-bottom: 16px; }
.type-tile { min-height: 64px; gap: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-radius: 12px; background: var(--sand-1); text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 26px; }
.type-tile:hover { background: var(--sand-2); color: var(--ink); }

/* Blocs */
.block { padding-top: 40px; padding-bottom: 24px; }
.block h2 { margin: 0 0 22px; font-size: 38px; line-height: 1.1; }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.place { display: block; text-decoration: none; color: var(--ink); }
.place:hover { color: var(--ink); }
.place-photo { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--sky); }
.place-name { margin-top: 10px; font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.place:hover .place-name { text-decoration: underline; text-underline-offset: 4px; }
.place-count { font-size: 14px; color: var(--muted); }
.zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.zone { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 84px; padding: 14px 20px; border-radius: 12px; background: var(--sand-1); color: var(--ink); text-decoration: none; }
.zone:hover { background: var(--sand-2); color: var(--ink); }
.zone-name { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.zone-count { font-size: 14px; color: var(--muted); }
.h2-link { color: inherit; text-decoration: none; }
.h2-link:hover { color: inherit; text-decoration: underline; text-underline-offset: 5px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card { display: block; text-decoration: none; color: var(--ink); }
.card-photo { aspect-ratio: 3 / 2; border-radius: 12px; background: var(--sand-3); }
.card-type { margin-top: 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.card-name { margin-top: 4px; font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.card-place { margin-top: 4px; font-size: 14px; color: var(--muted); }
.notfound { padding-top: 60px; padding-bottom: 80px; }
.notfound h1 { font-size: 48px; line-height: 1.05; margin: 0 0 12px; }

/* Propriétaires et pied de page */
.owner-band { background: var(--ink); color: var(--bg); margin-top: 48px; }
.owner-in { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; padding-top: 52px; padding-bottom: 52px; }
.owner-in > div { flex: 1 1 420px; }
.owner-band h2 { margin: 0 0 12px; font-size: 36px; line-height: 1.1; }
.owner-band p { margin: 0; font-size: 17px; color: #D9D3CB; }
.btn-sun { min-height: 48px; display: inline-flex; align-items: center; padding: 0 24px; border-radius: 999px; background: var(--sun); color: var(--ink); text-decoration: none; font-weight: 600; }
.btn-sun:hover { background: #EDB97F; color: var(--ink); }
.site-footer { font-size: 14px; color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; padding-top: 32px; padding-bottom: 48px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-app { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.install-app { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; border: 1px solid var(--sand-3); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.install-app:hover { border-color: var(--ink); }
.install-app[hidden], .install-ios[hidden] { display: none; }
.install-ios { margin: 0; max-width: 340px; font-size: 13px; }
.offline-list { margin: 0 0 24px; padding-left: 20px; line-height: 1.9; }

@media (max-width: 1020px) {
  .header-in { flex-wrap: wrap; }
  .main-nav { order: 3; flex: 1 0 100%; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 0 24px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav > a { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.55); font-size: 14px; }
  .main-nav > a:hover { text-decoration: none; background: #fff; }
  .zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-in { padding-top: 140px; }
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .header-in { padding-top: 14px; padding-bottom: 14px; gap: 12px; }
  .main-nav { margin: 0 -20px; padding: 0 20px; }
  .brand-name { font-size: 26px; }
  .brand-kicker { display: none; }
  .lang-switch a { padding: 6px 9px; }

  /* Accueil : texte sur le ciel, paysage en bas, recherche au-dessus de l'horizon */
  .hero-art { top: auto; height: 170px; }
  .hero-in { padding-top: 124px; padding-bottom: 120px; }
  .hero h1 { font-size: 36px; }
  .hero-intro { margin: 10px 0 18px; font-size: 16px; }
  .search { padding: 6px; }
  .search input { min-height: 48px; padding: 0 14px; }
  .search button { min-height: 48px; width: 48px; padding: 0; }
  .search button span { display: none; }

  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 32px; }
  .type-tile { min-height: 56px; padding: 0 14px; font-size: 20px; line-height: 1.1; }
  .type-tile span[aria-hidden] { display: none; }

  .block { padding-top: 32px; }
  .block h2 { font-size: 30px; margin-bottom: 16px; }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .zones { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .zone { min-height: 0; flex-direction: row; justify-content: space-between; align-items: baseline; padding: 14px 16px; }
  .zone-name { font-size: 20px; }
  .zone-count { font-size: 13px; white-space: nowrap; }
  .place-name { margin-top: 8px; font-size: 21px; }
  .place-count { font-size: 13px; }

  .owner-band { margin-top: 32px; }
  .owner-in { padding-top: 40px; padding-bottom: 40px; gap: 22px; }
  .owner-band h2 { font-size: 30px; }
  .owner-band p { font-size: 16px; }
}

/* Pages de listes (commune, type) */
.list-head { padding-top: 28px; }
/* Petit bandeau des pages intérieures (paysage en bas, texte sur le ciel) */
.band { position: relative; overflow: hidden; background: var(--sky); padding-bottom: 104px; }
.band-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; display: block; }
.band .list-head { position: relative; z-index: 1; padding-top: 12px; }
.band .crumbs a { color: var(--ink-soft); }
.band .list-head { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 40px; }
.band .list-head > * { grid-column: 1; }
.band .list-head > .search { grid-column: 2; grid-row: 1 / span 5; align-self: end; margin-bottom: 4px; }
.search-sm { width: 100%; padding: 5px; box-shadow: 0 6px 20px rgba(30,42,48,.10); }
.search-sm input { min-height: 44px; padding: 0 16px; font-size: 16px; }
.search-sm button { width: 44px; min-height: 44px; padding: 0; }
.search-sm button span { display: none; }
.notfound-head p { font-size: 17px; }
.notfound-head h1 { margin-top: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.list-head h1 { margin: 18px 0 6px; font-size: clamp(38px, 5vw, 56px); line-height: 1.05; }
.list-count { margin: 0; color: var(--muted); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; background: var(--sand-1); color: var(--ink); text-decoration: none; font-size: 15px; }
.chip span { color: var(--muted); font-size: 13px; }
.chip:hover { background: var(--sand-2); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); }
.chip { white-space: nowrap; }
.chip.on span { color: #CFC7BC; }
.list-body { padding-top: 32px; }
.card-nophoto { position: relative; overflow: hidden; background: var(--sky); }
.card-nophoto img, .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-label { position: absolute; left: 14px; bottom: 10px; font-family: var(--serif); font-size: 22px; color: var(--ink-soft); }
.card:hover .card-name { text-decoration: underline; text-underline-offset: 4px; }
.empty { font-size: 17px; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--sand-3); font-size: 15px; }
.pager a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 500; }
.pager-n { color: var(--muted); }
.towns { list-style: none; margin: 0; padding: 0; columns: 4 200px; column-gap: 32px; }
.towns li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--sand-2); display: flex; justify-content: space-between; gap: 12px; }
.towns a { color: var(--ink); text-decoration: none; }
.towns a:hover { text-decoration: underline; text-underline-offset: 3px; }
.towns span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .list-head { padding-top: 16px; }
  .band { padding-bottom: 70px; }
  .band .list-head { grid-template-columns: minmax(0, 1fr); }
  .band .list-head > .search { grid-column: 1; grid-row: auto; margin: 14px 0 0; }
  .band-art { height: 82px; }
  .band .list-head { padding-top: 6px; }
  .list-head h1 { margin-top: 14px; font-size: 36px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 20px -20px 0; padding: 0 20px 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .list-body { padding-top: 22px; }
  .cards { gap: 20px; }
  .card-name { font-size: 24px; }
  /* Fiche sans photo : vignette à gauche, texte à droite */
  .card-compact { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: 1fr auto auto auto 1fr; column-gap: 14px; }
  .card-compact .card-photo { grid-row: 1 / -1; aspect-ratio: 1 / 1; border-radius: 10px; }
  .card-compact .card-type { grid-column: 2; grid-row: 2; }
  .card-compact .card-name { grid-column: 2; grid-row: 3; }
  .card-compact .card-place { grid-column: 2; grid-row: 4; }
  .card-compact .scene-label { display: none; }
  .card-compact .card-type { margin-top: 0; font-size: 11px; }
  .card-compact .card-name { font-size: 21px; margin-top: 2px; }
  .card-compact .card-place { margin-top: 2px; font-size: 13px; }
  .towns { columns: 2 140px; column-gap: 20px; }
  .pager { font-size: 14px; }
}

/* Visionneuse photos (reprise d'OuDormir) */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(8,10,12,.94); display: flex; align-items: center; justify-content: center;
  touch-action: pan-y; user-select: none; }
.lb[hidden] { display: none; }
.lb-img { max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); object-fit: contain; display: block; }
.lb button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px;
  padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lb button:hover { background: rgba(255,255,255,.25); filter: none; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-info { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #d9dee0; font-size: 14px; padding: 0 16px; }
.lb-info span + span::before { content: " · "; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } .lb-info { bottom: 22px; } .lb-img { max-height: calc(100vh - 150px); } }
body.lb-on { overflow: hidden; }

/* Fiche */
.l-types { margin: 18px 0 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.l-types a { text-decoration: none; }
.list-head h1.l-title { margin-top: 6px; }
.l-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 28px; }
.l-photo { position: relative; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: var(--sand-2); }
.l-photo > a { position: absolute; inset: 0; }
.l-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-count { position: absolute; right: 14px; bottom: 14px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.l-credit { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.l-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.l-thumbs a { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--sand-2); }
.l-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-text { margin-top: 28px; font-size: 17px; line-height: 1.65; color: var(--ink-soft); max-width: 68ch; }
.l-text p:first-child { font-size: 19px; color: var(--ink); }
.l-note { font-size: 14px; color: var(--muted); }
.l-source { margin-top: 28px; font-size: 14px; color: var(--muted); }
.l-side { position: sticky; top: 20px; }
.l-contact { background: var(--sand-1); border-radius: 14px; padding: 24px; }
.l-contact h2 { margin: 0 0 14px; font-size: 30px; }
.l-contact dl { margin: 0; }
.l-contact dl > div { padding: 10px 0; border-top: 1px solid var(--sand-3); }
.l-contact dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.l-contact dd { margin: 2px 0 0; font-size: 16px; }
.l-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.btn { min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 20px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; border: 1px solid var(--sand-3); }
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn.btn-main { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.btn-main:hover { background: var(--accent-dark); color: #fff; }
.l-map { display: inline-block; margin-top: 14px; font-size: 14px; }
.l-more { margin-top: 20px; }
.l-quick { display: none; }
@media (max-width: 760px) {
  .l-contact { padding: 20px; }
  .l-contact h2 { font-size: 26px; }
  .l-text { font-size: 16px; }
  .l-text p:first-child { font-size: 17px; }
}
@media (max-width: 900px) {
  .l-body { grid-template-columns: 1fr; gap: 28px; }
  .l-side { position: static; }
  .l-quick { display: flex; gap: 8px; margin-top: 12px; }
  .l-quick .btn { flex: 1 1 0; }
}

/* Publicité (emplacements manuels, toujours sous le contenu) */
.ad { margin: 36px 0 8px; min-height: 120px; }
.ad-label { margin-bottom: 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ad-row { grid-column: 1 / -1; }
.ad-row .ad { margin: 4px 0; }
.ad-side { margin-top: 20px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }  /* aucune annonce : pas de cadre vide */
@media (max-width: 900px) { .ad-side { display: none; } }
/* Pages légales */
.prose { max-width: 760px; font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.prose h2 { margin: 28px 0 8px; font-size: 28px; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
