/* Evidentia — styles partagés, en complément de https://latex.vercel.app/style.css */

/* Sélecteur de thème clair/sombre, discret, en haut à droite */
.theme-switch {
  position: fixed;
  top: .75rem;
  right: .75rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.theme-switch__track {
  position: relative;
  width: 2.4rem;
  height: 1.3rem;
  border-radius: 1rem;
  background: rgba(128, 128, 128, .22);
  border: 1px solid rgba(128, 128, 128, .45);
  transition: background .15s ease;
}
.theme-switch__thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
  transform: translate(0, -50%);
  transition: transform .15s ease, opacity .15s ease;
}
.theme-switch:hover .theme-switch__thumb { opacity: .8; }
.theme-switch input:checked ~ .theme-switch__track {
  background: rgba(128, 128, 128, .4);
}
.theme-switch input:checked ~ .theme-switch__track .theme-switch__thumb {
  transform: translate(1.1rem, -50%);
  opacity: .9;
}
.theme-switch input:focus-visible ~ .theme-switch__track {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .theme-switch__track, .theme-switch__thumb { transition: none; }
}

/* Titre en petites capitales (le E reste une capitale pleine) */
h1 {
  margin-bottom: .3rem;
  font-variant-caps: small-caps;
}
.author {
  margin-top: 0;
  text-align: left;
}

/* Navigation entre les deux versions du site (clients / partenaires) */
.site-nav {
  margin: 0 0 2.5rem;
  font-size: .8rem;
}
.site-nav a[aria-current="page"] {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* Tableaux tarifaires */
table.grille {
  width: 100%;
}
table.grille th:last-child,
table.grille td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* Pied de page */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(128, 128, 128, .35);
  font-size: .8rem;
}

/* Portrait dans « Qui intervient » : vignette flottante, façon figure d'article */
.portrait {
  float: right;
  width: 8.5rem;
  margin: .3rem 0 1rem 1.5rem;
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(100%);
  border: 1px solid rgba(128, 128, 128, .35);
}
.portrait figcaption {
  margin-top: .4rem;
  font-size: .75rem;
  font-variant-caps: small-caps;
  text-align: center;
  opacity: .75;
}
/* Le bloc suivant ne doit pas passer à côté de la photo */
#positionnement { clear: both; }
@media (max-width: 30rem) {
  .portrait {
    float: none;
    width: 7rem;
    margin: 0 auto 1.25rem;
  }
}
