/* Hesyo, site des guides. Aucune ressource externe. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400-48e3bd2213.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter-700-085863a3e3.woff2") format("woff2");
}

:root {
  --vert: #0e4142;
  --brun: #744726;
  --fond: #fbf8f2;
  --sable: #efe4d2;
  --texte: #1f2a2a;
  --discret: #5a5349;
  --filet: #d9ccb6;
  --rayon: 0.75rem;
  --colonne: 42rem;
  --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

a {
  color: var(--vert);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}
a:hover {
  color: var(--brun);
}

:focus-visible {
  outline: 3px solid var(--brun);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--vert);
  color: var(--fond);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--rayon) var(--rayon);
  z-index: 10;
}
.skip:focus {
  top: 0;
}

/* En-tête et pied de page */
.bandeau,
.pied {
  width: 100%;
  max-width: calc(var(--colonne) + 3rem);
  margin: 0 auto;
  padding: 0 1rem;
}
.bandeau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--filet);
}
.marque {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--vert);
  text-decoration: none;
}
.bandeau nav a {
  font-weight: 700;
  font-size: 0.95rem;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--colonne) + 3rem);
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

.pied {
  border-top: 1px solid var(--filet);
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--discret);
}
.pied ul {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.pied a {
  color: var(--vert);
}
.signature {
  margin: 0;
  font-weight: 700;
  color: var(--vert);
}

/* Titres */
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}
h1,
.sous-titre {
  text-wrap: balance;
}
h1 {
  color: var(--vert);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
h2 {
  color: var(--vert);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--sable);
}
h3 {
  color: var(--brun);
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
}
p {
  margin: 0 0 1rem;
}

/* Texte justifié. La coupure des mots en français évite les grands blancs
   entre les mots sur un écran de téléphone. */
main p,
main li {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
main a {
  -webkit-hyphens: manual;
  hyphens: manual;
}
/* Les blocs centrés restent centrés. */
.couverture p,
.fin p,
.page-introuvable p,
figure p {
  text-align: center;
}

/* Accueil */
.accueil {
  display: grid;
  gap: 1.5rem;
}
.accueil-mascotte {
  display: flex;
  justify-content: center;
}
.accueil-mascotte img {
  width: 9rem;
  height: auto;
}
.chapeau {
  font-size: 1.15rem;
  max-width: 38rem;
}

/* Formulaire */
.cadre {
  background: var(--sable);
  border-radius: var(--rayon);
  padding: 1.25rem;
}
.access-form {
  display: grid;
  gap: 1rem;
}
.access-form .champ label,
.access-form .case label {
  font-weight: 400;
}
.access-form .champ label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.access-form input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--vert);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--texte);
}
.access-form .case {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.access-form .case input {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.2rem 0 0;
  accent-color: var(--vert);
}
.form-info {
  margin: 0;
  font-size: 0.95rem;
  color: var(--discret);
}
.bouton,
.access-form button,
.copy-btn {
  font: inherit;
  font-weight: 700;
  background: var(--vert);
  color: var(--fond);
  border: 2px solid var(--vert);
  border-radius: 0.5rem;
  padding: 0.7rem 1.25rem;
  min-height: 2.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.bouton:hover,
.access-form button:hover,
.copy-btn:hover {
  background: var(--brun);
  border-color: var(--brun);
  color: var(--fond);
}
.access-form button[disabled] {
  opacity: 0.7;
  cursor: progress;
}
.form-status {
  margin: 0;
  min-height: 1.5em;
  font-weight: 700;
  color: var(--vert);
}
.form-status:empty {
  min-height: 0;
  margin-top: -1rem;
}
.form-status.erreur {
  color: #8a2b14;
}

/* Barrière d'accès : sans accès, seul le formulaire se voit. */
.guide {
  display: none;
}
html.access .guide {
  display: block;
}
html.access .barriere,
html.access .sans-acces {
  display: none;
}
.avec-acces {
  display: none;
}
html.access .avec-acces {
  display: block;
}

/* Liste des guides */
.liste-guides {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.liste-guides li {
  background: var(--sable);
  border-radius: var(--rayon);
  padding: 1rem 1.25rem;
}
.liste-guides a {
  font-weight: 700;
  font-size: 1.1rem;
}
.liste-guides p {
  margin: 0.35rem 0 0;
}

/* Guide */
.couverture {
  text-align: center;
  padding: 0.5rem 0 1.5rem;
  border-bottom: 2px solid var(--sable);
}
.couverture img {
  border: 0;
  border-radius: 0;
  background: none;
  width: 12.5rem;
  max-width: 55%;
  height: auto;
  margin: 0 auto 0.75rem;
  display: block;
}
.surtitre {
  margin: 0 0 0.5rem;
  color: var(--brun);
  font-weight: 700;
  letter-spacing: 0.12em;
}
.couverture h1 {
  margin-bottom: 0.75rem;
}
.sous-titre {
  margin: 0 auto;
  max-width: 34rem;
  font-size: 1.1rem;
}

.guide p.accent {
  color: var(--vert);
  font-weight: 700;
  background: var(--sable);
  border-radius: var(--rayon);
  padding: 0.9rem 1.1rem;
}
.guide ul,
.guide ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
.guide li {
  margin: 0 0 0.45rem;
  padding-left: 0.2rem;
}
.guide li::marker {
  color: var(--brun);
  font-weight: 700;
}
.guide li > ul,
.guide li > ol {
  margin-top: 0.5rem;
}
.guide li > figure {
  margin-left: 0;
}

figure {
  margin: 1.25rem auto;
  text-align: center;
}
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--filet);
  background: #fff;
}
figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--discret);
}

.fin {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--sable);
  text-align: center;
}
.fin p {
  margin-bottom: 0.5rem;
}

.liens-guide {
  margin-top: 2rem;
  background: var(--sable);
  border-radius: var(--rayon);
  padding: 1.25rem;
}
.liens-guide h2 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
}
.liens-guide h2 + p {
  margin-top: 0.75rem;
}
.liens-guide ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Textes à copier */
.copybox {
  background: var(--sable);
  border-radius: var(--rayon);
  padding: 1rem 1.1rem 1.1rem;
  margin: 1rem 0 1.25rem;
}
.copybar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.copy-status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--vert);
  flex: 1 1 14rem;
}
.copy-status:empty {
  flex: 0 0 0;
}
.copy-status.erreur {
  color: #8a2b14;
}
pre.copytext {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--fond);
  border: 1px solid var(--filet);
  border-radius: 0.5rem;
  font-family: var(--police);
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre.copytext.mono {
  max-height: 32rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
}
.ct-h {
  color: var(--vert);
  font-weight: 700;
}
.consigne h3 {
  margin-top: 1.5rem;
}
details > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--vert);
  padding: 0.4rem 0;
  margin-bottom: 0.5rem;
}
details > summary:hover {
  color: var(--brun);
}

/* Pages juridiques */
.juridique h2 {
  margin-top: 2rem;
}
.juridique ol {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.juridique ol li {
  margin: 0 0 0.75rem;
}
.juridique ol li p {
  margin: 0.25rem 0 0;
}

.page-introuvable {
  text-align: center;
  padding: 3rem 0;
}

@media (min-width: 40rem) {
  body {
    font-size: 1.125rem;
  }
  main {
    padding-top: 2.5rem;
  }
  .cadre {
    padding: 1.75rem;
  }
  .accueil-mascotte img {
    width: 11rem;
  }
}

@media print {
  .bandeau,
  .pied,
  .copy-btn {
    display: none;
  }
}

.hors-ecran {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}
