/* Palette seule : #EA5823, #214C9B, #ffffff, #000000. */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #214C9B;
  --orange: #EA5823;
  --blue: #214C9B;
  --line: #214C9B;
  --button-bg: #EA5823;
  --button-fg: #ffffff;
  --input-bg: #ffffff;
  --input-fg: #214C9B;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --orange: #EA5823;
  --blue: #214C9B;
  --line: #EA5823;
  --button-bg: #EA5823;
  --button-fg: #ffffff;
  --input-bg: #000000;
  --input-fg: #ffffff;
}

html[data-theme="auto"] {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #214C9B;
  --orange: #EA5823;
  --blue: #214C9B;
  --line: #214C9B;
  --button-bg: #EA5823;
  --button-fg: #ffffff;
  --input-bg: #ffffff;
  --input-fg: #214C9B;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --bg: #000000;
    --fg: #ffffff;
    --line: #EA5823;
    --input-bg: #000000;
    --input-fg: #ffffff;
  }

  html[data-theme="auto"] .logo-clair {
    display: none;
  }

  html[data-theme="auto"] .logo-fonce {
    display: block;
  }

  html[data-theme="auto"] .themes a {
    color: #EA5823;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  transform: translateY(-200%);
  background: #EA5823;
  color: #ffffff;
  padding: 0.4rem 0.7rem;
}

.skip:focus {
  transform: none;
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
  max-width: 52rem;
  margin: 0 auto;
}

.brand {
  display: inline-block;
  max-width: 100%;
}

.logo {
  display: block;
  width: min(100%, 26rem);
  height: auto;
}

.logo-fonce {
  display: none;
}

html[data-theme="dark"] .logo-clair {
  display: none;
}

html[data-theme="dark"] .logo-fonce {
  display: block;
}

.themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.themes a {
  color: #214C9B;
  font-weight: 700;
}

html[data-theme="dark"] .themes a {
  color: #EA5823;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

h1 {
  margin: 0 0 0.75rem;
  color: #EA5823;
  font-size: 1.8rem;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #EA5823;
  outline-offset: 2px;
}

fieldset {
  border: 2px solid var(--line);
  margin: 0 0 1.25rem;
  padding: 1rem;
}

legend {
  color: #EA5823;
  font-weight: 700;
  padding: 0 0.35rem;
}

label {
  display: block;
  margin: 0.6rem 0 0.3rem;
  font-weight: 700;
}

input,
textarea {
  display: block;
  width: 100%;
  margin: 0 0 0.4rem;
  padding: 0.65rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--input-bg);
  color: var(--input-fg);
  font: inherit;
}

button {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  border: 0;
  background: var(--button-bg);
  color: var(--button-fg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--bg);
  color: #EA5823;
  box-shadow: inset 0 0 0 2px #EA5823;
}

button.secondary {
  background: var(--bg);
  color: var(--fg);
  box-shadow: inset 0 0 0 2px var(--line);
}

button.secondary:hover {
  background: #EA5823;
  color: #ffffff;
  box-shadow: none;
}

.note {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #EA5823;
}

.help,
.intro {
  margin-top: 0.4rem;
}

footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

footer p {
  margin: 0;
  color: #214C9B;
  font-weight: 700;
}

html[data-theme="dark"] footer p {
  color: #EA5823;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] footer p {
    color: #EA5823;
  }
}

@media (max-width: 36rem) {
  h1 {
    font-size: 1.5rem;
  }

  button {
    width: 100%;
  }
}
