:root {
  color-scheme: light;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #25251e;
  background: radial-gradient(ellipse at 85% 10%, #efdfc5, transparent 55%), #f9f3e7;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}

header,
main {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid #cbb89e;
  font-weight: 800;
  color: #263b33;
  letter-spacing: 0.04em;
}

.logo {
  width: 3rem;
  height: 3rem;
  flex: none;
}

.carte {
  position: relative;
  isolation: isolate;
  min-height: max(32rem, calc(100svh - 6.25rem));
}

.carte::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("assets/route-marchande.svg") center / 100% 100% no-repeat;
  opacity: 0.37;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 9vh, 7rem);
}

h1 {
  margin: 0;
  color: #263b33;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 46ch;
  line-height: 1.65;
  margin: 1.3rem 0 1.5rem;
}
label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

input,
button {
  min-height: 3rem;
  border-radius: 0.45rem;
  padding: 0.65rem 0.9rem;
  font: inherit;
}

input {
  flex: 1 1 12rem;
  min-width: 0;
  border: 1px solid #7d7165;
  background: #fffdf8;
  color: inherit;
}

.sujets {
  min-width: 0;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
}

.sujets legend {
  padding: 0;
  font-weight: 700;
}

.sujets label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.sujets input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin: 0;
  accent-color: #903e2b;
}

button {
  border: 1px solid transparent;
  background: #903e2b;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:not(:disabled):hover {
  background: #703021;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #25665e;
  outline-offset: 3px;
}
.note,
figcaption {
  color: #554c41;
  font-size: 0.9rem;
  line-height: 1.5;
}
.note {
  margin-bottom: 0;
}
figure {
  margin: 0;
  padding: clamp(0.65rem, 2vw, 1rem);
  border: 1px solid #cbb89e;
  border-radius: 1.35rem;
  background-color: #efdfc5;
  background-image: repeating-conic-gradient(
    from 45deg,
    #a77c4d25 0% 25%,
    transparent 0% 50%
  );
  background-size: 1rem 1rem;
}
figcaption {
  margin-top: 0.65rem;
  padding: 0.15rem 0.4rem;
  width: fit-content;
  border-radius: 0.2rem;
  background: #f9f3e7;
}

.video {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #263b33;
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.inscription-etat {
  display: grid;
}

.inscription-etat > * {
  grid-area: 1 / 1;
  align-self: start;
}

#inscription[inert] {
  visibility: hidden;
}

#confirmation {
  margin: 0;
  font-weight: 700;
}

dialog {
  width: min(100% - 2rem, 34rem);
  max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 4vw, 1.75rem);
  border: 1px solid #cbb89e;
  border-radius: 1rem;
  background: #f9f3e7;
  color: inherit;
}

dialog h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

dialog::backdrop {
  background: #263b3366;
}

.passer {
  background: transparent;
  color: #703021;
}

button.passer:hover {
  background: #efdfc5;
}

@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: apparition 220ms ease-out both;
  }

  @keyframes apparition {
    from { opacity: 0; transform: translateY(0.5rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 48rem) {
  main {
    grid-template-columns: 1fr;
  }

  .carte::before {
    background-size: auto 100%;
    background-position: 59% center;
    opacity: 0.22;
  }
}
.accord {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 400;
}

.accord input {
  flex: none;
  min-height: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  padding: 0;
  accent-color: #903e2b;
}

.erreur {
  color: #842e1e;
}
