/* Holidey — « Toit et fenêtre ».
   La maison du logo sert de système : l'arc du toit ouvre la page d'accueil,
   la fenêtre à quatre carreaux arrondis cadre les photos. Tout le reste reste
   calme : fond chaux froid, encre pour le texte, menthe pour agir. */

/* --- Tokens (thème daisyUI « light ») ----------------------------------- */
[data-theme="light"] {
  --ink: #0a262b;
  --mint: #bfeeb9;
  --leaf: #2e6b4e;
  --lime-wash: #f3f7f2;
  --mango: #e9973a;

  --color-base-100: #ffffff;
  --color-base-200: var(--lime-wash);
  --color-base-300: #dce6da;
  --color-base-content: var(--ink);
  --color-primary: var(--mint);
  --color-primary-content: var(--ink);
  --color-neutral: var(--ink);
  --color-neutral-content: #ffffff;
  --color-success: var(--leaf);
  --color-success-content: #ffffff;
  /* « En attente », avertissements : la mangue de la palette plutôt que le
     jaune par défaut de daisyUI. */
  --color-warning: var(--mango);
  --color-warning-content: var(--ink);

  /* Arrondis hiérarchisés : grands pour les photos et panneaux, moyens pour
     les champs, pleins pour les pastilles. */
  --radius-box: 1.25rem;
  --radius-field: 0.75rem;
  --radius-selector: 2rem;
}

body {
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.font-display,
h1, h2 {
  font-family: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, sans-serif;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

/* Titres de pied de page en casse normale plutôt qu'en capitales. */
.footer-title {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  opacity: 1;
  color: var(--ink);
}

/* --- Le toit : l'arc du H du logo, pleine largeur ------------------------ */
.roof {
  display: block;
  /* Les bouts arrondis dépassent du viewBox dans une colonne étroite. */
  overflow: visible;
  width: 100%;
  height: clamp(3rem, 7vw, 6rem);
  color: var(--ink);
}
.roof path {
  fill: none;
  stroke: currentColor;
  stroke-width: 18;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 640px) {
  .roof path { stroke-width: 12; }
}

/* --- La fenêtre : une photo vue à travers quatre carreaux ---------------- */
.window {
  --gap: 0.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--gap);
  aspect-ratio: 612 / 323;
}
.window > span {
  border-radius: 1rem;
  background-image: var(--photo);
  background-size: calc(200% + var(--gap)) calc(200% + var(--gap));
  background-repeat: no-repeat;
}
.window > span:nth-child(1) { background-position: 0 0; }
.window > span:nth-child(2) { background-position: 100% 0; }
.window > span:nth-child(3) { background-position: 0 100%; }
.window > span:nth-child(4) { background-position: 100% 100%; }

/* --- Barre de recherche ------------------------------------------------- */
.search-panel {
  background: #ffffff;
  border-radius: var(--radius-box);
  box-shadow: 0 1px 0 var(--color-base-300), 0 18px 40px -24px rgb(10 38 43 / 0.35);
}
.search-panel .fieldset-legend {
  font-weight: 600;
  font-size: 0.8125rem;
  padding-bottom: 0.25rem;
}

/* --- Cartes de logement : photo + texte, sans boîte ---------------------- */
.listing-photo {
  border-radius: var(--radius-box);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-base-300);
}
.listing-photo img {
  transition: transform 400ms ease;
}
.listing:hover .listing-photo img,
.listing:focus-within .listing-photo img {
  transform: scale(1.03);
}
.badge-360 {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem 0.2rem 0.5rem;
  border-radius: 2rem;
  background: rgb(255 255 255 / 0.92);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.badge-360::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--mango);
}

/* --- Fiche : galerie en fenêtre ----------------------------------------- */
.gallery {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr;
}
.gallery > * {
  position: relative;
  overflow: hidden;
  border-radius: 0.9rem;
  background: var(--color-base-300);
}
.gallery > :first-child { border-radius: var(--radius-box); aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-panes { display: none; }
@media (min-width: 768px) {
  .gallery { grid-template-columns: 3fr 2fr; aspect-ratio: 2.5 / 1; }
  .gallery > :first-child { aspect-ratio: auto; }
  .gallery-panes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.6rem;
    background: none;
    border-radius: 0;
  }
  .gallery-panes > * {
    position: relative;
    overflow: hidden;
    border-radius: 0.9rem;
    background: var(--color-base-300);
  }
}
.gallery button.pane-open {
  position: absolute;
  inset: 0;
  cursor: zoom-in;
}
.gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(10 38 43 / 0.55);
  color: #ffffff;
  font-weight: 600;
  pointer-events: none;
}

.star { color: var(--mango); }

@media (prefers-reduced-motion: reduce) {
  .listing-photo img { transition: none; }
  .listing:hover .listing-photo img { transform: none; }
}

/* --- Espace hôte : panneaux calmes, bordés plutôt qu'ombrés -------------- */
.panel {
  background: #ffffff;
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-box);
  box-shadow: none;
}
.panel .card-title {
  font-family: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.stats.panel .stat-value {
  font-family: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, sans-serif;
  font-weight: 800;
}

/* Fenêtre sans photo : la page d'erreur montre une maison où rien n'est là. */
.window-empty > span {
  background: var(--color-base-300);
}
