/* Pisorum Fiducia — feuille de style unique du site */

@font-face {
  font-family: "Pisorum Capitales";
  src: url("fonts/pisorum-capitales.woff?v=38f8dde2") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --pierre: #ecece8;   /* fond : pierre calcaire claire */
  --encre: #1f2a33;    /* texte : encre bleu ardoise */
  --gris: #5b666f;     /* texte secondaire */
  --trait: #c8ccc6;    /* filets */
  --pois: #6f9138;     /* le pois : seule touche de couleur */

  --capitales: "Pisorum Capitales", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pierre: #161c21;
    --encre: #e4e5e0;
    --gris: #9aa3aa;
    --trait: #333d45;
    --pois: #a3c266;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--pierre);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1rem;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--trait);
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--pois);
  outline-offset: 4px;
  border-radius: 2px;
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Le nom, composé comme une inscription ---------- */

.inscription {
  margin: 0;
  font-family: var(--capitales);
  font-weight: 400;
  font-size: clamp(1.25rem, 6vw, 3.5rem);
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
}

/* Le point séparateur des inscriptions latines : ici, un pois. */
.pois {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin: 0 0.18em 0 0.04em;
  border-radius: 50%;
  background: var(--pois);
  vertical-align: 0.3em;
}

/* ---------- Accueil ---------- */

.accueil {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem 3rem;
  text-align: center;
}

/* compense l'interlettrage après la dernière lettre, pour un centrage optique exact */
.accueil .inscription { margin-bottom: 1.4rem; padding-left: 0.14em; }

.devise {
  margin: 0 0 3rem;
  color: var(--gris);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ---------- Secteurs : devise latine, détail au survol ou au toucher ---------- */

.secteurs {
  position: relative;
  margin: -1.6rem 0 4rem;
  color: var(--gris);
  font-family: var(--capitales);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  white-space: nowrap;
}
.secteurs .sep {
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin: 0 0.7em;
  border-radius: 50%;
  background: var(--pois);
  vertical-align: 0.2em;
  opacity: 0.8;
}
.secteur {
  cursor: default;
  border-radius: 2px;
  outline-offset: 4px;
  transition: color 0.3s ease;
}
.secteur:hover,
.secteur:focus { color: var(--encre); outline: none; }
.secteur:focus-visible { outline: 1px solid var(--pois); }

/* Le détail s'affiche sous la ligne entière, sans rien décaler. */
.secteur .detail {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 50%;
  width: min(92vw, 34rem);
  transform: translateX(-50%);
  font-family: var(--texte);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  line-height: 1.45;
  white-space: normal;
  color: var(--gris);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.secteur:hover .detail,
.secteur:focus .detail { opacity: 1; visibility: visible; }

@media (max-width: 30rem) {
  .secteurs { font-size: 0.72rem; letter-spacing: 0.14em; }
  .secteurs .sep { margin: 0 0.5em; }
}
@media (prefers-reduced-motion: reduce) {
  .secteur, .secteur .detail { transition: none; }
}

.contact { font-size: 1rem; }

@media (prefers-reduced-motion: no-preference) {
  .accueil .pois { animation: germe 900ms 250ms cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes germe {
    from { transform: scale(0); }
    to { transform: scale(1); }
  }
}

/* ---------- Pied de page ---------- */

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--trait);
  color: var(--gris);
  font-size: 0.8125rem;
}
.pied p { margin: 0; }

.pied-droite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.75rem;
}

/* ---------- Choix de la langue : la langue courante, les autres au clic ---------- */

.langue { position: relative; }

.langue summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.1rem;
  border-radius: 2px;
  color: var(--encre);
  cursor: pointer;
  list-style: none;
}
.langue summary::-webkit-details-marker { display: none; }
.langue summary::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  margin: -0.15rem 0 0 0.1rem;
  border-right: 1px solid var(--gris);
  border-bottom: 1px solid var(--gris);
  transform: rotate(45deg);
}
.langue[open] summary::after {
  margin-top: 0.2rem;
  transform: rotate(-135deg);
}
.langue summary:focus-visible {
  outline: 2px solid var(--pois);
  outline-offset: 2px;
}

.langue ul {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: var(--pierre);
  border: 1px solid var(--trait);
  border-radius: 3px;
}
.langue ul a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
}
.langue ul a:hover { color: var(--encre); }

.langue img {
  display: block;
  width: 1.2rem;
  height: 0.8rem;
  border-radius: 1px;
  box-shadow: 0 0 0 1px var(--trait);
}

@media (min-width: 40rem) {
  .pied { padding: 1.25rem 2rem; }
}
@media (max-width: 30rem) {
  .pied { justify-content: center; text-align: center; }
}

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

.entete {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--trait);
}
@media (min-width: 40rem) {
  .entete { padding: 1.5rem 2rem; }
}
.entete a { text-decoration: none; }

/* En-tête et pied restent visibles pendant le défilement des pages longues,
   sauf sur les écrans trop bas (téléphone à l'horizontale) où ils mangeraient le texte. */
@media (min-height: 32rem) {
  .entete,
  .pied {
    position: sticky;
    z-index: 1;
    background: var(--pierre);
  }
  .entete { top: 0; }
  .pied { bottom: 0; }
}
.entete .inscription { font-size: 1.125rem; }

.texte {
  flex: 1;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

.texte h1 {
  margin: 0 0 2rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.texte h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.texte p { margin: 0 0 0.75rem; }

.texte dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1.5rem;
}
.texte dt { color: var(--gris); }
.texte dd { margin: 0; }

@media (max-width: 30rem) {
  .texte dl { grid-template-columns: 1fr; gap: 0; }
  .texte dd { margin-bottom: 0.6rem; }
}
