/* Genealis, site vitrine. Polices auto-hébergées (licence OFL), aucune ressource externe. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
}

:root {
  /* Palette dérivée du vert du logo (#11a182). Le vert du logo sert aux aplats et aux tracés ;
     les textes et les boutons utilisent des verts plus foncés, pour un contraste AA. */
  --marque: #11a182;
  --vert: #0a7d64;
  --vert-fonce: #075746;
  --encre: #102822;
  --graphite: #4a5e5a;
  --calque: #eff5f4;
  --plaque: #f8fbfb;
  --lavis: #d6ebe6;
  --erreur: #7a4b00;
  --trait: rgba(16, 40, 34, 0.28);

  --titre: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --texte: "Source Serif 4", Georgia, "Times New Roman", serif;

  --marge: clamp(1.25rem, 4vw, 3rem);
  --largeur: 72rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  border-top: 4px solid var(--marque);
  background: var(--calque);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

.evitement {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--encre);
  color: var(--calque);
}
.evitement:focus {
  top: 1rem;
}

.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: var(--marge);
}

/* En-tête */

.entete__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.4rem;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--titre);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.marque__signe {
  width: 2.6rem;
  height: auto;
}

.entete__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--titre);
  font-size: 1rem;
  font-weight: 500;
}

.entete__lien {
  text-decoration: none;
}
.entete__lien:hover {
  text-decoration: underline;
}

/* Boutons et liens d'action */

.bouton {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border: 0;
  border-radius: 0.3rem;
  background: var(--vert);
  color: #fff;
  font-family: var(--titre);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover {
  background: var(--vert-fonce);
}
.bouton:disabled {
  opacity: 0.6;
  cursor: progress;
}
.bouton--petit {
  padding: 0.55rem 1rem;
  font-size: 0.98rem;
}

.lien-action {
  font-family: var(--titre);
  font-weight: 600;
}

/* Première partie */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem);
}

.hero__titre {
  margin: 0 0 1.5rem;
  max-width: 14em;
  font-family: var(--titre);
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.028em;
}

.chapeau {
  max-width: 33rem;
  margin: 0 0 2rem;
  font-size: 1.25rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin: 0 0 1.25rem;
}

.note {
  max-width: 33rem;
  margin: 0;
  color: var(--graphite);
  font-size: 1rem;
  line-height: 1.55;
}

/* Planche : l'exemple de dévolution */

.plan {
  margin: 0;
  border: 1px solid var(--trait);
  background: var(--plaque);
}

.plan__dessin {
  width: 100%;
  height: auto;
  padding: 1.1rem 1.1rem 0.5rem;
}

.plan__legende {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1.1rem 1rem;
  border-top: 1px solid var(--trait);
  color: var(--graphite);
  font-size: 0.95rem;
  line-height: 1.5;
}

.plan__legende strong {
  color: var(--encre);
  font-family: var(--titre);
  font-size: 1rem;
  font-weight: 600;
}

.plan__trait {
  fill: none;
  stroke: var(--encre);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.plan__noeud {
  fill: var(--calque);
  stroke: var(--encre);
  stroke-width: 1.6;
}
.plan__ligne {
  fill: none;
  stroke: var(--encre);
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
}
.plan__parcelle {
  fill: url(#hachure);
  stroke: var(--encre);
  stroke-width: 1.6;
}
.plan__cloison {
  stroke: var(--encre);
  stroke-width: 1.6;
}
.plan__hachure {
  stroke: var(--marque);
  stroke-width: 1.4;
  opacity: 0.9;
}
.plan__plaque {
  fill: var(--plaque);
  stroke: var(--vert-fonce);
  stroke-width: 1;
}
.plan__nom {
  fill: var(--encre);
  font-family: var(--titre);
  font-size: 16px;
  font-weight: 600;
  text-anchor: middle;
}
.plan__nom--leger {
  font-weight: 400;
}
.plan__detail {
  fill: var(--graphite);
  font-family: var(--texte);
  font-size: 14px;
  text-anchor: middle;
}
.plan__fraction {
  fill: var(--vert-fonce);
  font-family: var(--titre);
  font-size: 30px;
  font-weight: 700;
  text-anchor: middle;
}
.plan__barre {
  stroke: var(--vert-fonce);
  stroke-width: 2;
}

/* L'unique moment animé de la page : le tracé de l'arbre, puis le partage. */
@media (prefers-reduced-motion: no-preference) {
  .plan__trait--anime {
    stroke-dasharray: 1;
    animation: tracer 0.7s ease-out both;
  }
  .plan__trait--b {
    animation-delay: 0.9s;
  }
  .plan__trait--c {
    animation-delay: 1.55s;
  }
  .plan__trait--a {
    animation-delay: 0.25s;
  }
  .plan__entree {
    animation: apparaitre 0.45s ease-out backwards;
  }
  .plan__entree--1 {
    animation-delay: 0.1s;
  }
  .plan__entree--2 {
    animation-delay: 0.85s;
  }
  .plan__entree--3 {
    animation-delay: 1.5s;
  }
  .plan__entree--4 {
    animation-delay: 2.15s;
    animation-duration: 0.7s;
  }
}

@keyframes tracer {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes apparaitre {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Rubriques : titre à gauche, contenu à droite */

.rubrique {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  background-image: linear-gradient(var(--trait), var(--trait));
  background-repeat: no-repeat;
  background-position: center top;
  background-size: calc(100% - 2 * var(--marge)) 1px;
}

.rubrique__titre h2,
.page__titre h2 {
  margin: 0 0 0.9rem;
  font-family: var(--titre);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.rubrique__titre p {
  max-width: 24rem;
  margin: 0;
  color: var(--graphite);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Le chemin : une ligne continue, des étapes posées dessus */

.chemin {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chemin__etape {
  position: relative;
  padding: 0 0 2.2rem 3rem;
}
.chemin__etape:last-child {
  padding-bottom: 0;
}

.chemin__etape::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38rem;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--calque);
}
.chemin__etape:last-child::before {
  border-color: var(--marque);
  background: var(--marque);
}

/* Le trait relie chaque point au suivant et s'arrête au dernier point. */
.chemin__etape::after {
  content: "";
  position: absolute;
  left: calc(0.6rem - 1px);
  top: 1.58rem;
  bottom: -0.38rem;
  width: 2px;
  background: var(--encre);
  opacity: 0.35;
}
.chemin__etape:last-child::after {
  display: none;
}

.chemin__etape h3 {
  margin: 0 0 0.3rem;
  font-family: var(--titre);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.chemin__etape p {
  max-width: 34rem;
  margin: 0;
}

/* Texte courant */

.texte {
  max-width: 38rem;
}
.texte p {
  margin: 0 0 1.1rem;
}
.signature {
  margin-top: 1.6rem;
  font-style: italic;
}

/* Bêta et formulaire */

.beta {
  background: var(--lavis);
}
.beta .rubrique {
  background-image: none;
}
.beta .rubrique__titre p {
  color: var(--encre);
}

.formulaire {
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
}

.champ {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.champ label,
.groupe legend {
  font-family: var(--titre);
  font-size: 1rem;
  font-weight: 600;
}

.aide {
  color: var(--graphite);
  font-weight: 400;
}
.beta .aide {
  color: #3a504b;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--encre);
  border-radius: 0.25rem;
  background: #fff;
  color: var(--encre);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.3;
}

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

.aide--bas {
  font-size: 0.95rem;
  line-height: 1.4;
}

.groupe {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.groupe legend {
  padding: 0;
  margin-bottom: 0.4rem;
}

.case {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1rem;
  line-height: 1.5;
}
.case input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--vert);
}

.piege {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.statut {
  margin: 0;
  font-family: var(--titre);
  font-weight: 600;
}
.statut:empty {
  display: none;
}
.statut--ok {
  color: var(--vert-fonce);
}
.statut--erreur {
  color: var(--erreur);
}

.sans-script {
  margin: 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--vert);
  background: #fff;
  font-size: 1rem;
}

/* Pages de texte (mentions légales, confidentialité) */

.page {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
}
.page h1 {
  margin: 0 0 0.6rem;
  font-family: var(--titre);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.page__maj {
  margin: 0 0 2.5rem;
  color: var(--graphite);
  font-size: 1rem;
}
.page__corps {
  max-width: 40rem;
}
.page__corps h2 {
  margin: 2.4rem 0 0.6rem;
  font-family: var(--titre);
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.page__corps p,
.page__corps ul {
  margin: 0 0 1rem;
}
.page__corps ul {
  padding-left: 1.3rem;
}
.page__corps li {
  margin-bottom: 0.35rem;
}

/* Pied de page */

.pied {
  border-top: 1px solid var(--trait);
  padding-block: 2rem 2.5rem;
  color: var(--graphite);
  font-size: 0.97rem;
  line-height: 1.6;
}
.pied__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 3rem;
}
.pied__logo {
  flex: none;
  width: 8rem;
  height: auto;
}
.pied p {
  flex: 1 1 20rem;
  max-width: 34rem;
  margin: 0;
}
.pied__liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Écrans étroits */

@media (max-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .plan {
    max-width: 32rem;
  }
  .rubrique {
    grid-template-columns: minmax(0, 1fr);
  }
  .rubrique__titre p {
    max-width: 36rem;
  }
}

@media (max-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }
  .entete__lien {
    display: none;
  }
  .chapeau {
    font-size: 1.125rem;
  }
  .entete__ligne {
    padding-block: 1.1rem;
  }
  .marque {
    font-size: 1.15rem;
  }
}

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