/* Agrafo, feuille de style commune */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --papier: #f3f5f4;
  --feuille: #ffffff;
  --encre: #18222b;
  --graphite: #5b6670;
  --trait: #d7dddf;
  --sarcelle: #0f5c5c;
  --sarcelle-fonce: #0a4545;
  --ambre: #9a6408;
  --mesure: 34rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 900px) {
  body {
    font-size: 1.125rem;
  }
}

::selection {
  background: #cfe3e1;
}

a {
  color: var(--sarcelle);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sarcelle-fonce);
}

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

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.insecable {
  white-space: nowrap;
}

.evitement {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--feuille);
  color: var(--encre);
}

.evitement:focus {
  left: 1rem;
}

.conteneur {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

/* Filets alignés sur le texte, pas sur les marges */
.section,
.pied {
  position: relative;
}

.section::before,
.pied::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gouttiere);
  right: var(--gouttiere);
  height: 1px;
  background: var(--trait);
}

/* En-tête */

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

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--encre);
  text-decoration: none;
  font-size: 1.3125rem;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: 0.01em;
  line-height: 1;
}

.marque:hover {
  color: var(--encre);
}

.marque svg {
  width: 1.25rem;
  height: 1rem;
  flex: none;
}

.entete__lien {
  color: var(--encre);
  font-weight: 500;
  text-decoration: none;
}

.entete__lien:hover {
  color: var(--sarcelle);
  text-decoration: underline;
}

/* Titres */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 640;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.625rem);
  line-height: 1.03;
  font-stretch: 88%;
  letter-spacing: -0.012em;
}

h2 {
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  line-height: 1.15;
  font-stretch: 94%;
  letter-spacing: -0.006em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 620;
}

/* Une */

.une {
  display: grid;
  gap: 3.5rem;
  align-items: center;
  padding-block: clamp(2rem, 6vw, 5.5rem) clamp(3.5rem, 8vw, 7rem);
}

@media (min-width: 920px) {
  .une {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 4.5rem;
  }
}

.une h1 {
  margin-bottom: 1.5rem;
}

.chapo {
  max-width: var(--mesure);
  font-size: 1.125rem;
  line-height: 1.55;
}

@media (min-width: 900px) {
  .chapo {
    font-size: 1.25rem;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.bouton {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border-radius: 4px;
  background: var(--sarcelle);
  color: #ffffff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.bouton:hover {
  background: var(--sarcelle-fonce);
  color: #ffffff;
}

.lien-discret {
  color: var(--encre);
  text-decoration-color: var(--trait);
}

.lien-discret:hover {
  color: var(--encre);
  text-decoration-color: var(--sarcelle);
}

/* Relevé d'exemple */

.releve {
  margin: 0;
}

.feuille {
  position: relative;
  padding: 2.75rem 1.5rem 0.5rem;
  border: 1px solid var(--trait);
  border-radius: 2px;
  background: var(--feuille);
  box-shadow:
    0 1px 1px rgba(24, 34, 43, 0.04),
    0 22px 44px -28px rgba(24, 34, 43, 0.3);
}

.agrafe {
  position: absolute;
  top: 0.75rem;
  left: 0.5rem;
  width: 3.25rem;
  height: 0.75rem;
  transform: rotate(-30deg);
  filter: drop-shadow(0 1.5px 0.6px rgba(24, 34, 43, 0.25));
}

.feuille__entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1.5px solid var(--encre);
}

.feuille__titre {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.feuille__periode {
  margin: 0;
  color: var(--graphite);
  font-size: 0.875rem;
}

.lignes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ligne {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  row-gap: 0.3rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--trait);
  font-size: 0.9375rem;
  font-stretch: 80%;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.ligne:last-child {
  border-bottom: 0;
}

.ligne__date {
  color: var(--graphite);
}

.ligne__libelle {
  font-weight: 500;
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;
}

.ligne__montant {
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.ligne__statut {
  display: grid;
  grid-column: 2 / -1;
  font-size: 0.875rem;
  font-stretch: 100%;
}

.etat {
  grid-area: 1 / 1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.etat::before {
  content: "";
  flex: none;
  align-self: flex-start;
  margin-top: 0.275em;
}

.etat--manque {
  display: none;
  color: var(--graphite);
}

.etat--manque::before {
  width: 0.7rem;
  height: 0.7rem;
  border: 1.5px dashed var(--graphite);
  border-radius: 2px;
}

.etat--recu {
  color: var(--sarcelle);
  font-weight: 600;
}

.etat--recu::before {
  margin-top: 0.51em;
  width: 0.9rem;
  height: 0.28rem;
  border-radius: 999px;
  background: var(--sarcelle);
  transform: rotate(-22deg);
}

.etat--attente {
  color: var(--ambre);
  font-weight: 600;
}

.etat--attente::before {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--ambre);
  border-radius: 50%;
}

.citation {
  color: var(--graphite);
  font-weight: 400;
}

.releve figcaption {
  margin-top: 1rem;
  color: var(--graphite);
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: no-preference) {
  .etat--manque {
    display: flex;
    animation: sortir 0.3s ease-out var(--d) both;
  }

  .etat--final {
    animation: entrer 0.4s ease-out var(--d) both;
  }
}

@keyframes sortir {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes entrer {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Sections */

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section > h2 {
  margin-bottom: 2.5rem;
}

.engagements > h2 {
  margin-bottom: 0;
}

.etapes {
  display: grid;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

@media (min-width: 800px) {
  .etapes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }
}

.etape {
  padding-top: 1.25rem;
  border-top: 2px solid var(--encre);
  counter-increment: etape;
}

.etape::before {
  content: counter(etape);
  display: block;
  margin-bottom: 0.875rem;
  color: var(--sarcelle);
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 125%;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.etape h3 {
  margin-bottom: 0.5rem;
}

.etape p {
  margin: 0;
  color: var(--graphite);
}

.engagements {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .engagements {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

.liste-engagements {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--trait);
}

.liste-engagements li {
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--trait);
}

.contact {
  max-width: 40rem;
}

.contact h2 {
  margin-bottom: 1.5rem;
}

.contact p {
  font-size: 1.125rem;
}

@media (min-width: 900px) {
  .contact p {
    font-size: 1.25rem;
  }
}

/* Pied de page */

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 2rem 2.5rem;
  color: var(--graphite);
  font-size: 0.9375rem;
}

.pied p {
  margin: 0;
}

.pied nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.pied a {
  color: var(--graphite);
}

.pied a:hover {
  color: var(--encre);
}

/* Page confidentialité */

.document {
  max-width: 44rem;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}

.document h1 {
  font-size: clamp(2rem, 1.55rem + 1.8vw, 2.875rem);
  margin-bottom: 0.75rem;
}

.document .date {
  margin-bottom: 2.25rem;
  color: var(--graphite);
  font-size: 0.9375rem;
}

.document .intro {
  font-size: 1.125rem;
}

@media (min-width: 900px) {
  .document .intro {
    font-size: 1.25rem;
  }
}

.document h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.3125rem;
  font-stretch: 100%;
}

.document h2#mentions-legales {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--trait);
}

.mentions {
  margin: 0;
}

.mentions dt {
  font-weight: 600;
}

.mentions dd {
  margin: 0 0 1.25rem;
}
