/* ==========================================================================
   Démo — Salicorne, bistrot marin (restaurant fictif)
   ========================================================================== */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/playfair-display-latin-wght-italic.woff2") format("woff2");
}

:root {
  --green-900: #10241f;
  --green-800: #16302b;
  --green-700: #21443c;
  --sand: #f5efe4;
  --sand-2: #ebe1cf;
  --paper: #fbf8f2;
  --terracotta: #c8553d;
  --terracotta-text: #a3402a;
  --ink: #1d2522;
  --muted: #56605b;
  --line: #ddd2bf;
  --radius: 6px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--sans);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--terracotta-text);
  text-underline-offset: 3px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--sand);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font: 600 0.95rem/1.2 var(--sans);
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: #b04631;
  color: #fff;
}

.btn--primary:hover {
  background: #933a27;
  color: #fff;
}

.btn--light {
  border-color: rgba(245, 239, 228, 0.7);
  color: var(--sand);
}

.btn--light:hover {
  background: var(--sand);
  color: var(--green-900);
}

/* ---------- En-tête ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-900);
  color: var(--sand);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}

.logo {
  margin-right: auto;
  color: var(--sand);
  text-decoration: none;
  line-height: 1;
}

.logo strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 500;
}

.logo small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav ul {
  display: flex;
  gap: 0.25rem;
}

.nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--sand);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.lang {
  display: inline-flex;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.lang a,
.lang span {
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  line-height: 1;
  text-decoration: none;
}

.lang span {
  background: var(--sand);
  color: var(--green-900);
}

.lang a {
  border: 1px solid rgba(245, 239, 228, 0.4);
  color: var(--sand);
}

.lang a:hover {
  border-color: var(--sand);
}

.header .btn {
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
}

.header :focus-visible {
  outline-color: var(--sand);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 239, 228, 0.4);
  border-radius: var(--radius);
  background: transparent;
  color: var(--sand);
  cursor: pointer;
}

.nav-toggle svg {
  width: 1.4rem;
  height: 1.4rem;
}

@media (max-width: 58rem) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--green-900);
    border-top: 1px solid rgba(245, 239, 228, 0.15);
  }

  .js .nav.is-open {
    display: block;
  }

  .js .nav ul {
    flex-direction: column;
  }

  .js .nav a {
    padding: 0.85rem 0;
    font-size: 1.1rem;
  }

  html:not(.js) .header__inner {
    flex-wrap: wrap;
    padding-block: 0.5rem;
  }
}

@media (max-width: 30rem) {
  .header .btn--primary,
  .header .logo small {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(88vh, 46rem);
  padding-block: 6rem clamp(3rem, 8vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(200, 85, 61, 0.45), transparent 55%),
    linear-gradient(180deg, var(--green-700), var(--green-900));
  color: var(--sand);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 36, 31, 0.35) 0%, rgba(16, 36, 31, 0.55) 45%, rgba(16, 36, 31, 0.92) 100%);
}

.img-failed img {
  display: none;
}

.hero__content {
  position: relative;
  max-width: 44rem;
}

.hero__kicker {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 em {
  font-style: italic;
  color: #f0b7a4;
}

.hero__lead {
  max-width: 34rem;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: 0.95rem;
}

.hero__facts li::before {
  content: "✦ ";
  color: #f0b7a4;
}

.hero :focus-visible {
  outline-color: var(--sand);
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

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

.section--dark {
  background: var(--green-800);
  color: var(--sand);
}

.section__head {
  max-width: 40rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

.section__head p {
  color: var(--muted);
  font-size: 1.1rem;
}

.section--dark .section__head p {
  color: rgba(245, 239, 228, 0.8);
}

.kicker {
  margin-bottom: 0.75rem;
  color: var(--terracotta-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section--dark .kicker {
  color: #f0b7a4;
}

/* ---------- Présentation ---------- */

.story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.story__text p {
  color: var(--muted);
}

.story__text p:first-of-type {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.5;
}

.signature {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--ink) !important;
}

.story__art {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--green-800);
  overflow: hidden;
}

.story__art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 52rem) {
  .story {
    grid-template-columns: 1fr;
  }

  .story__art {
    max-width: 18rem;
    margin-inline: auto;
  }
}

/* ---------- Carte ---------- */

.menu-lunch {
  max-width: 40rem;
  margin: 0 auto 3rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
}

.menu-lunch strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.menu-lunch p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}

.menu h3 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-style: italic;
}

.dish {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--line);
}

.dish:last-child {
  border-bottom: 0;
}

.dish__top {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.dish__name {
  font-weight: 600;
}

.dish__top::after {
  content: "";
  flex: 1;
  order: 1;
  border-bottom: 1px dotted #b9ab92;
  transform: translateY(-4px);
}

.dish__price {
  order: 2;
  font-family: var(--serif);
  font-size: 1.1rem;
  white-space: nowrap;
}

.dish p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.veg {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border: 1px solid #5f7f5a;
  border-radius: 3px;
  color: #3f5f3a;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 2px;
}

.menu-note {
  margin: 2.5rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

/* ---------- Horaires ---------- */

.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

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

.hours caption {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  text-align: left;
}

.hours th,
.hours td {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(245, 239, 228, 0.18);
  text-align: left;
  vertical-align: top;
}

.hours th {
  font-weight: 600;
}

.hours td {
  text-align: right;
}

.hours .closed td {
  color: #f0b7a4;
}

.info h3 {
  font-size: 1.5rem;
}

.info address {
  font-style: normal;
}

.info a {
  color: var(--sand);
}

.info ul {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.info li {
  padding-left: 1.3rem;
  position: relative;
}

.info li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #f0b7a4;
  font-size: 0.8rem;
  top: 0.25em;
}

.section--dark :focus-visible {
  outline-color: var(--sand);
}

/* ---------- Galerie ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(9rem, 20vw, 15rem);
  gap: 0.75rem;
}

.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 30%, rgba(240, 183, 164, 0.35), transparent 60%),
    linear-gradient(135deg, var(--green-700), var(--green-900));
}

.gallery figure:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.gallery figure:nth-child(2) { grid-column: span 3; }
.gallery figure:nth-child(3) { grid-column: span 3; }
.gallery figure:nth-child(4) { grid-column: span 2; }
.gallery figure:nth-child(5) { grid-column: span 2; }
.gallery figure:nth-child(6) { grid-column: span 2; }

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery figure:hover img {
  transform: scale(1.04);
}

.gallery figcaption {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(16, 36, 31, 0.8);
  color: var(--sand);
  font-size: 0.82rem;
}

.gallery .img-failed figcaption {
  left: 50%;
  bottom: 50%;
  translate: -50% 50%;
  background: none;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 44rem) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery figure:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery figure:nth-child(1) {
    grid-column: span 2;
  }
}

.credit {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ---------- Réservation ---------- */

.booking {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.booking__intro p {
  color: var(--muted);
}

.booking__phone {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field .opt {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #b9ab92;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--terracotta);
  outline: 3px solid rgba(200, 85, 61, 0.25);
  outline-offset: 0;
}

.form__legal {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form .btn,
.form .form-status {
  grid-column: 1 / -1;
}

@media (max-width: 52rem) {
  .booking {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 30rem) {
  .form {
    grid-template-columns: 1fr;
  }
}

/* ---------- Pied de page ---------- */

.footer {
  padding-block: 3.5rem 2rem;
  background: var(--green-900);
  color: rgba(245, 239, 228, 0.82);
  font-size: 0.95rem;
}

.footer a {
  color: var(--sand);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2rem;
}

.footer h2 {
  margin-bottom: 0.75rem;
  color: var(--sand);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer .logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 239, 228, 0.15);
  font-size: 0.85rem;
}

.footer :focus-visible {
  outline-color: var(--sand);
}

/* ---------- Pages de contenu ---------- */

.legal {
  max-width: 46rem;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
}

.legal h2 {
  margin-top: 2.25rem;
  font-size: 1.5rem;
}

.legal ul {
  padding-left: 1.25rem;
  margin-bottom: 1em;
  list-style: disc;
}

.legal .note {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--terracotta);
  background: var(--sand);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .gallery figure:hover img {
    transform: none;
  }
}
