/* ==========================================================================
   Hôtel La Sterne — feuille de styles
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */
:root {
  /* Couleurs de marque (accent et ligne de flottaison sont personnalisables) */
  --accent: #FFC92B;
  --waterline: #A8322A;

  --navy: #14284B;
  --navy-dark: #0B1A33;
  --navy-light: #24406B;
  --navy-line: #3A5580;
  --navy-border: #4A6690;
  --sand: #F3F5F6;
  --white: #FFFFFF;
  --mist: #DCE3EA;
  --rule: #C3CDD8;
  --ink-muted: #3E4F63;
  --ink-soft: #C9D4E3;
  --field-border: #6B7C90;
  --focus: #FFC92B;
  --error: #B3261E;

  --font-body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;

  --container: 1328px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-space: clamp(56px, 8vw, 96px);
  --title-size: clamp(36px, 5vw, 64px);
}

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

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--sand);
}

a {
  color: var(--navy);
}

/* :where() garde une spécificité nulle : les liens stylés par classe conservent leur couleur */
a:where(:hover) {
  color: var(--navy-dark);
}

a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

address {
  font-style: normal;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Layout ------------------------------------------------------------------ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.container--tight {
  padding-inline: clamp(12px, 5vw, 64px);
}

.section {
  padding-block: var(--section-space);
}

.section--white {
  background: var(--white);
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

/* Typographie partagée ---------------------------------------------------- */
.section-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--title-size);
  line-height: 1;
}

.section-title--spaced {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Boutons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}

.btn--accent {
  background: var(--accent);
  color: var(--navy);
}

.btn--navy {
  background: var(--navy);
  color: var(--white);
}

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 16px;
}

.btn--lg {
  min-height: 52px;
  padding: 0 28px;
  font-size: 18px;
}

/* Emplacement photo ------------------------------------------------------- */
.placeholder {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: 14px;
  background: var(--mist);
  font-size: 14px;
  color: var(--ink-muted);
}

/* En-tête / hero ---------------------------------------------------------- */
.hero {
  background: var(--navy);
  color: var(--white);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding-block: 12px;
}

.brand {
  padding: 8px 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--white);
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0 26px;
}

.main-nav a {
  padding: 13px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar__lang {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
}

.hero__stage {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 46vw, 720px);
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 60%;
}

/* Voile marine : garde le texte lisible sur le ciel clair de la photo */
.hero__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(20, 40, 75, .9) 0%, rgba(20, 40, 75, .75) 40%, rgba(20, 40, 75, .15) 75%, rgba(20, 40, 75, 0) 100%);
}

.hero__body {
  width: 100%;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: calc(clamp(48px, 6vw, 72px) + 28px);
}

.hero__text {
  max-width: 640px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
}

/* Logo et nom forment un bloc de même largeur : « LA STERNE » mesure ~3,92em */
.hero__lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2em;
  font-size: clamp(44px, 4.6vw, 66px);
}

.hero__sterne {
  display: block;
  width: 3.92em;
  height: auto;
  aspect-ratio: 1080 / 488;
}

/* Le contour se trace, puis le logo se remplit (propriétés héritées par <use>) */
.hero__sterne use {
  fill: currentColor;
  fill-opacity: 0;
  stroke: currentColor;
  stroke-width: 6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    trace 2.2s cubic-bezier(.4, 0, .2, 1) .3s forwards,
    fill-in .6s ease-out 2.2s forwards;
}

.hero__name {
  display: block;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0.01em;
}

.hero__tagline {
  display: block;
  margin-top: 18px;
  font-weight: 700;
  font-size: clamp(18px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: 0.1em;
}

.hero__intro {
  max-width: 32em;
  margin: 28px 0 0;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: 28px;
}

.hero__phone {
  padding: 12px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
}

/* Houle animée, posée sur le bas de la photo */
.swell {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  overflow: hidden;
}

.swell__wave {
  display: block;
  width: 200%;
  height: 28px;
  fill: var(--sand);
  animation: swell 16s linear infinite;
}

/* Réservation ------------------------------------------------------------- */
.booking {
  padding: clamp(16px, 3vw, 28px) 0;
  background: var(--waterline);
}

.booking__card {
  margin: 0;
  padding: clamp(18px, 2.4vw, 28px) clamp(16px, 2.4vw, 32px);
  background: var(--white);
}

.booking__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  margin-bottom: 16px;
}

.booking__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
}

.booking__perks {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
}

/* Barre de champs : le fond gris dessine les séparateurs (gap de 1px) */
.booking__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) auto;
  gap: 1px;
  border: 1px solid var(--field-border);
  background: var(--field-border);
}

.booking__field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 10px 16px;
  background: var(--white);
}

.booking__field:focus-within {
  z-index: 1;
  box-shadow: inset 0 0 0 2px var(--navy);
}

.booking__field.is-invalid {
  box-shadow: inset 0 0 0 2px var(--error);
}

.booking__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.booking__field.is-invalid .booking__label {
  color: var(--error);
}

.booking__input {
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  color-scheme: light;
}

/* Le contour de focus est porté par le champ entier */
.booking__input:focus-visible {
  outline: none;
}

.booking__input::-webkit-date-and-time-value {
  text-align: left;
}

select.booking__input {
  appearance: none;
  padding-right: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314284B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center / 14px no-repeat;
  cursor: pointer;
}

.booking__submit {
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: 17px;
  cursor: pointer;
}

.booking__submit:hover {
  background: var(--navy-dark);
}

.booking__submit:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.booking__submit svg {
  flex: none;
  transition: transform .2s ease;
}

.booking__submit:hover svg {
  transform: translateX(3px);
}

.booking__status {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--ink-muted);
}

.booking__status.is-ready {
  font-weight: 600;
  color: var(--navy);
}

.booking__status.is-error {
  font-weight: 600;
  color: var(--error);
}

/* Marées ------------------------------------------------------------------ */
.tides__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 64px;
}

.tides__intro {
  flex: 1 1 320px;
  min-width: 0;
}

.tides__intro .lead {
  max-width: 28em;
}

.tides__data {
  flex: 2 1 520px;
  min-width: 0;
}

.tides__day {
  margin: 0 0 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Courbe en SVG étiré ; points et repère en HTML pour rester ronds */
.tides__chart {
  position: relative;
  height: 160px;
}

.tides__curve {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tides__water {
  fill: rgba(20, 40, 75, .08);
}

.tides__line {
  fill: none;
  stroke: var(--navy);
  stroke-width: 3;
}

.tides__point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 3px solid var(--sand);
  border-radius: 50%;
  background: var(--navy);
}

.tides__now {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  border-left: 2px dashed var(--waterline);
}

.tides__now span {
  position: absolute;
  bottom: 100%;
  left: 0;
  transform: translate(-50%, -6px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--waterline);
}

.tides__now.is-start span {
  transform: translate(-2px, -6px);
}

.tides__now.is-end span {
  transform: translate(calc(-100% + 2px), -6px);
}

.tides__axis {
  position: relative;
  height: 18px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

.tides__axis span {
  position: absolute;
  transform: translateX(-50%);
}

.tides__axis span:nth-child(1) { left: 0; transform: none; }
.tides__axis span:nth-child(2) { left: 25%; }
.tides__axis span:nth-child(3) { left: 50%; }
.tides__axis span:nth-child(4) { left: 75%; }
.tides__axis span:nth-child(5) { left: 100%; transform: translateX(-100%); }

.tides__times {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tides__label {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
}

.tides__time {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 34px);
}

/* Données périmées : seul le renvoi vers la source reste affiché */
.tides__data.is-unavailable :is(.tides__chart, .tides__axis, .tides__times) {
  display: none;
}

.tides__height {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.tides__coef {
  margin: 20px 0 0;
  font-size: 16px;
  color: var(--ink-muted);
}

.tides__source {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.tides__source a {
  color: inherit;
}

/* Chambres ---------------------------------------------------------------- */
.rooms .lead {
  max-width: 38em;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.rooms__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}

.room__name {
  margin: 16px 0 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.05;
}

.room__desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* Tarifs ------------------------------------------------------------------ */
.prices__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 72px;
}

.prices__intro {
  flex: 1 1 300px;
  min-width: 0;
}

.prices__intro .lead {
  max-width: 26em;
  margin-bottom: 28px;
  color: var(--ink-soft);
}

.prices__table-wrap {
  flex: 2 1 520px;
  min-width: 0;
}

.prices__table {
  width: 100%;
  border-collapse: collapse;
}

.prices__table thead th {
  padding: 0 0 12px;
  border-bottom: 2px solid var(--white);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: left;
}

.prices__table thead th + th {
  padding-left: 16px;
  text-align: right;
}

.prices__table tbody th,
.prices__table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--navy-line);
  font-family: var(--font-display);
}

.prices__table tbody th {
  padding-right: 16px;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  text-align: left;
}

.prices__pax {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Hors saison en blanc, saison en couleur d'accent */
.prices__table td {
  padding-left: 16px;
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1;
  color: var(--white);
  text-align: right;
  white-space: nowrap;
}

.prices__table td:last-child {
  color: var(--accent);
}

.prices__extras {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.prices__extras li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-line);
  font-size: 16px;
  color: var(--ink-soft);
}

.prices__extras li span:last-child {
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

/* Offres ------------------------------------------------------------------ */
.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 40px;
  padding: 24px 0;
  border-top: 2px solid var(--navy);
}

.offer:last-child {
  border-bottom: 2px solid var(--navy);
}

.offer__title {
  flex: 1 1 280px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
}

.offer__desc {
  flex: 2 1 340px;
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.offer__link {
  flex: 0 0 auto;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 700;
}

/* Venir ------------------------------------------------------------------- */
.access__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 72px;
}

.access__contact {
  flex: 1 1 320px;
  min-width: 0;
}

.access__address p {
  margin: 0 0 4px;
  font-size: 18px;
}

.access__address .access__street {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
}

.access__address p:last-child {
  margin-bottom: 28px;
}

.access__address a {
  display: inline-block;
  padding: 10px 0;
}

.facts {
  flex: 1 1 420px;
  min-width: 0;
  margin: 0;
}

.facts > div {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.facts > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
  color: var(--ink-muted);
}

/* Pied de page ------------------------------------------------------------ */
.footer {
  background: var(--navy);
  color: var(--ink-soft);
}

.footer a {
  color: var(--white);
  padding: 8px 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 64px;
  padding-top: clamp(48px, 6vw, 64px);
  padding-bottom: 40px;
}

.footer__brand {
  flex: 1 1 260px;
}

.footer__sterne {
  display: block;
  margin-bottom: 12px;
  fill: var(--white);
}

.footer__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--white);
}

.footer__baseline {
  margin: 8px 0 0;
  font-size: 16px;
}

.footer__address {
  flex: 1 1 260px;
  font-size: 16px;
  line-height: 1.6;
}

.footer__address p {
  margin: 0;
}

.footer__address .footer__phone {
  margin-top: 8px;
}

.footer__address a {
  display: inline-block;
}

.footer__nav {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 16px;
}

.footer__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 24px 0;
  list-style: none;
  border-top: 1px solid var(--navy-line);
}

.footer__labels li {
  padding: 6px 12px;
  border: 1px solid var(--navy-line);
  font-size: 14px;
  color: var(--ink-soft);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding: 12px 0 24px;
  border-top: 1px solid var(--navy-line);
  font-size: 14px;
}

.footer__legal p {
  margin: 0;
}

.footer__legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

/* Bandeau sable puis ligne de flottaison */
.footer__waterline {
  height: 36px;
  border-top: 8px solid var(--sand);
  background: var(--waterline);
}

/* Barre de réservation mobile --------------------------------------------- */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--navy);
  border-top: 1px solid var(--navy-line);
}

.mobile-bar .btn {
  justify-content: center;
  min-height: 50px;
  font-size: 16px;
}

.mobile-bar__call {
  flex: 1 1 0;
  border: 1px solid var(--white);
  color: var(--white);
}

.mobile-bar__book {
  flex: 2 1 0;
}

/* Animations -------------------------------------------------------------- */
@keyframes trace {
  to { stroke-dashoffset: 0; }
}

@keyframes fill-in {
  to { fill-opacity: 1; stroke-width: 0; }
}

@keyframes swell {
  to { transform: translateX(-50%); }
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1000px) {
  .rooms__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 76px;
  }

  .main-nav {
    order: 3;
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    white-space: nowrap;
  }

  /* Le texte occupe toute la largeur : voile plus uniforme */
  .hero__stage::before {
    background: linear-gradient(180deg, rgba(20, 40, 75, .88) 0%, rgba(20, 40, 75, .72) 65%, rgba(20, 40, 75, .5) 100%);
  }

  .hero__cta {
    flex: 1 1 100%;
    justify-content: center;
  }

  .booking__bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking__field--pax,
  .booking__submit {
    grid-column: 1 / -1;
  }

  .booking__submit {
    min-height: 56px;
  }

  .tides__chart {
    height: 110px;
  }

  .tides__times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }

  /* Les chambres deviennent un carrousel horizontal */
  .rooms__list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .room {
    scroll-snap-align: start;
  }

  .mobile-bar {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__sterne use {
    animation: none;
    fill-opacity: 1;
    stroke: none;
  }

  .swell__wave {
    animation: none;
  }
}
