:root {
  --charcoal: #1c2118;
  --bone: #f3f0e6;
  --olive: #6b7340;
  --sand: #c4a574;
  --ink: #1a1c16;
  --serif: "Spectral", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --gouttiere: max(1rem, calc((100% - 70rem) / 2));
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
}

body.has-cookie {
  padding-bottom: 12rem;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus {
  outline: none;
}

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

::selection {
  background: var(--sand);
  color: var(--charcoal);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  z-index: 80;
  background: var(--sand);
  color: var(--charcoal);
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  padding: 0.7rem 1rem;
}

.skip:focus,
.skip:focus-visible {
  transform: translateY(0.6rem);
  outline: 3px solid var(--charcoal);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  background: var(--bone);
  color: var(--ink);
  padding: 0.85rem clamp(0.75rem, 2vw, 1.4rem);
  border-bottom: 4px solid var(--sand);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-left: auto;
}

.nav a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.05rem;
  border-bottom: 2px solid transparent;
}

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

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(26 28 22 / 0.25);
  background: var(--bone);
  color: var(--charcoal);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--charcoal);
}

.cadre {
  width: min(70rem, calc(100% - 2rem));
  margin-inline: auto;
}

.surtitre {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.surtitre-sable {
  color: var(--sand);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 3.2vw + 1rem, 4.5rem);
  color: var(--bone);
}

h2 {
  font-size: clamp(1.8rem, 2vw + 1rem, 3rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.7rem);
  margin-bottom: 0.4rem;
}

.chapeau,
.suite {
  max-width: 44rem;
  margin-bottom: 1.5rem;
}

.bande {
  padding: 4.2rem 0 3.5rem;
}

.bande-serree {
  padding-top: 1rem;
}

.ecran {
  padding: 0.7rem clamp(0.75rem, 2vw, 1.4rem) 0.85rem;
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 1.05fr);
  grid-template-rows: 1fr 1fr auto;
  gap: 0.75rem;
  min-height: calc(100svh - 5.2rem);
}

body.has-cookie .bento {
  min-height: calc(100svh - 4.8rem - 8rem);
}

.bento-lead {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  background: var(--charcoal);
  color: var(--bone);
  padding: clamp(1.2rem, 2.5vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: 0;
  min-height: 22rem;
}

.bento-lead p {
  max-width: 38rem;
  color: var(--bone);
}

.lead-bas {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.coupe {
  width: 4.75rem;
  height: 0.35rem;
  border: 0;
  background: var(--sand);
  margin: 1rem 0 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.bento-photo {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
  min-width: 0;
  min-height: 0;
  background: var(--charcoal);
  display: grid;
  grid-template-rows: 1fr auto;
}

.bento-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.bento-photo figcaption,
.duo figcaption,
.galerie figcaption {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.35;
}

.bento-photo figcaption {
  color: var(--bone);
  padding: 0.6rem 0.75rem 0.7rem;
}

.note {
  background: var(--bone);
  color: var(--ink);
  border: 1px solid rgb(26 28 22 / 0.18);
  border-top: 4px solid var(--olive);
  padding: 1rem 1rem 1.15rem;
  min-width: 0;
}

.note-horizon { grid-column: 1; grid-row: 3; }
.note-contrainte { grid-column: 2; grid-row: 3; }
.note-sortie { grid-column: 3; grid-row: 3; }

.note h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.note p {
  font-size: 1rem;
}

.lectures,
.pas-liste {
  list-style: none;
  padding: 0;
}

.lecture,
.pas {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.4rem 1.4rem;
  align-items: start;
}

.lecture {
  padding: 1.45rem 0.4rem;
  border-top: 1px solid rgb(26 28 22 / 0.16);
}

.lecture:last-child {
  border-bottom: 1px solid rgb(26 28 22 / 0.16);
}

.lecture:hover {
  background: rgb(196 165 116 / 0.22);
}

.index {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  line-height: 0.9;
  color: var(--olive);
}

.intro-pas {
  padding-bottom: 1.2rem;
}

.pas {
  padding: 1.7rem var(--gouttiere);
  border-top: 1px solid rgb(26 28 22 / 0.16);
  background: var(--bone);
}

.pas:nth-child(2) {
  background: var(--sand);
  color: var(--charcoal);
  border-top-color: transparent;
}

.pas:nth-child(2) .index {
  color: var(--charcoal);
}

.pas:nth-child(2) h3,
.pas:nth-child(2) p {
  color: var(--charcoal);
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.duo figure {
  margin: 0;
  background: var(--charcoal);
  min-width: 0;
}

.duo img {
  width: 100%;
  aspect-ratio: 1360 / 1040;
  object-fit: cover;
}

.duo figcaption {
  color: var(--bone);
  padding: 0.65rem 0.75rem 0.8rem;
}

.suite {
  margin-bottom: 0;
}

.limites {
  background: var(--charcoal);
  color: var(--bone);
  padding: 4.2rem 0;
}

.limites h2,
.limites .chapeau-os,
.ecrire h2,
.ecrire .chapeau-os,
.pied,
.pied p {
  color: var(--bone);
}

.liste-limites {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  display: grid;
  gap: 0.7rem;
}

.liste-limites li {
  padding-left: 1rem;
  border-left: 3px solid var(--sand);
}

.galerie {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 var(--gouttiere) 0.4rem;
}

.galerie figure {
  margin: 0;
  min-width: 0;
  background: var(--bone);
  border-top: 4px solid var(--olive);
}

.galerie img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--bone);
}

.galerie figcaption {
  color: var(--ink);
  padding: 0.55rem 0.45rem 0.75rem;
}

.faq details {
  border-top: 1px solid rgb(26 28 22 / 0.18);
  padding: 0.35rem 0 0.9rem;
}

.faq details:last-child {
  border-bottom: 1px solid rgb(26 28 22 / 0.18);
}

.faq summary {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "+";
  font-family: var(--sans);
  font-weight: 800;
  color: var(--ink);
  flex: none;
  width: 1.2rem;
}

.faq details[open] summary::before {
  content: "–";
}

.faq details p {
  padding: 0 0 0.4rem 1.9rem;
  max-width: 42rem;
}

.ecrire {
  background: var(--charcoal);
  color: var(--bone);
  padding: 4.2rem 0 4.6rem;
}

.panneau {
  background: var(--bone);
  color: var(--ink);
  border: 2px solid var(--olive);
  outline: 1px solid var(--olive);
  outline-offset: 6px;
  padding: clamp(1.1rem, 2.5vw, 2rem);
  margin-top: 0.35rem;
}

.champ {
  margin-bottom: 0.95rem;
}

.champ label {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  background: var(--bone);
  color: var(--ink);
  border: 1px solid rgb(26 28 22 / 0.35);
  padding: 0.7rem 0.75rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #1c2118 50%),
    linear-gradient(135deg, #1c2118 50%, transparent 50%);
  background-position:
    calc(100% - 1.15rem) 55%,
    calc(100% - 0.75rem) 55%;
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  background: var(--sand);
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.erreur {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--charcoal);
  background: var(--sand);
  padding: 0.25rem 0.45rem;
  margin-top: 0.35rem;
}

.erreur:empty {
  display: none;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.65rem;
  align-items: start;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--charcoal);
}

.check label {
  margin: 0;
}

.check .erreur {
  grid-column: 1 / -1;
}

.statut {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
  margin: 0.9rem 0;
}

.resume {
  margin-top: 1.3rem;
}

.resume[hidden] {
  display: none;
}

.resume-texte {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: var(--charcoal);
  color: var(--bone);
  padding: 1rem;
  margin-bottom: 0.8rem;
}

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 0;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
}

.bouton-sable {
  background: var(--sand);
  color: var(--charcoal);
}

.bouton-sable:hover {
  filter: brightness(0.96);
}

.bouton-os {
  background: var(--bone);
  color: var(--charcoal);
}

.bouton-os:hover {
  filter: brightness(0.97);
}

.bouton-sable:focus-visible,
.bouton-os:focus-visible {
  outline-color: var(--charcoal);
}

.bouton-texte {
  background: transparent;
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  padding-inline: 0;
  margin-bottom: 0.4rem;
}

.pied {
  background: var(--charcoal);
  color: var(--bone);
  padding: 2.4rem 0 2.6rem;
}

.pied-grille {
  display: grid;
  gap: 1.1rem;
}

.wordmark-pied {
  color: var(--bone);
  margin-bottom: 0.35rem;
}

.pied-liens {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.pied-liens button,
.bouton-lien {
  background: transparent;
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  border: 0;
  padding: 0.35rem 0;
  min-height: 2.75rem;
}

.copie {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
}

.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  background: var(--charcoal);
  color: var(--bone);
  padding: 0.9rem var(--gouttiere);
  border-top: 4px solid var(--sand);
}

.cookie[hidden] {
  display: none;
}

.cookie p {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  max-width: 40rem;
  color: var(--bone);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

dialog {
  border: 2px solid var(--olive);
  background: var(--bone);
  color: var(--ink);
  width: min(40rem, calc(100% - 2rem));
  max-height: min(85vh, 42rem);
  padding: 0;
  overflow: auto;
}

dialog::backdrop {
  background: rgb(28 33 24 / 0.72);
}

.dialogue-corps {
  padding: clamp(1.1rem, 3vw, 1.7rem);
}

.dialogue-corps h2 {
  color: var(--ink);
  margin-bottom: 0.8rem;
}

.dialogue-corps p {
  margin-bottom: 0.85rem;
}

.dialogue-corps .bouton {
  margin-top: 0.4rem;
}

@media (max-width: 980px) {
  .bento,
  body.has-cookie .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .bento-lead {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 0;
  }

  .bento-photo {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 18rem;
  }

  .bento-photo img {
    height: 18rem;
  }

  .note-horizon,
  .note-contrainte,
  .note-sortie {
    grid-row: auto;
  }

  .note-horizon { grid-column: 1; }
  .note-contrainte { grid-column: 2; }
  .note-sortie { grid-column: 1 / -1; }

  .galerie {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(13.5rem, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.8rem;
  }

  .galerie figure {
    scroll-snap-align: start;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 0.2rem 0 0.4rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgb(26 28 22 / 0.12);
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(0.38rem) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-0.38rem) rotate(-45deg);
  }

  .nav-toggle span {
    transition: transform 0.15s linear, opacity 0.15s linear;
  }
}

@media (max-width: 700px) {
  .duo {
    grid-template-columns: 1fr;
  }

  .lecture,
  .pas {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  body.has-cookie {
    padding-bottom: 16rem;
  }
}

@media (max-width: 560px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .note-horizon,
  .note-contrainte,
  .note-sortie {
    grid-column: 1;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .bouton {
    width: 100%;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .bouton {
    flex: 1 1 8rem;
  }
}

@media (max-width: 380px) {
  .wordmark {
    font-size: 1rem;
  }

  .site-header {
    padding-inline: 0.75rem;
  }

  .ecran {
    padding-inline: 0.75rem;
  }

  .panneau {
    outline-offset: 4px;
  }

  h1 {
    font-size: 1.85rem;
  }
}

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

  .nav-toggle span {
    transition: none;
  }
}

@media print {
  .cookie,
  .nav-toggle,
  .skip,
  .actions,
  .pied-liens {
    display: none;
  }

  .site-header {
    position: static;
  }

  body.has-cookie {
    padding-bottom: 0;
  }

  .bento,
  .limites,
  .ecrire,
  .pas:nth-child(2),
  .bento-lead {
    background: var(--bone);
    color: var(--ink);
  }

  h1,
  .bento-lead p,
  .limites h2,
  .limites p,
  .ecrire h2,
  .ecrire p {
    color: var(--ink);
  }
}
