@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/polices/lexend.woff2) format("woff2");
}

/* Typographie et hiérarchie de l'app Pavillon : Lexend, titres en demi-gras serrés, texte à 17,
   petit texte à 15, jamais d'italique ; boutons arrondis à 16, cartes à 20. Couleurs neutres. */
:root {
  color-scheme: light;
  --fond: #f4f4f5;
  --carte: #ffffff;
  --fg1: #13151a;
  --fg2: #4c5057;
  --fg3: #7b828d;
  --bord: #e4e4e7;
  --survol: #f4f4f5;
  --police: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --marge: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--fond);
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--fg1);
  font-family: var(--police);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--fg1);
  outline-offset: 2px;
  border-radius: 12px;
}

::selection {
  background: var(--fg1);
  color: #fff;
}

/* Une seule page, la carte au centre */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  padding: max(env(safe-area-inset-top), var(--marge)) var(--marge) max(env(safe-area-inset-bottom), 16px);
}

.carte {
  align-self: center;
  width: 100%;
  max-width: 560px;
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(19, 21, 26, 0.05), 0 6px 16px rgba(19, 21, 26, 0.05);
  padding: clamp(24px, 6vw, 40px);
}

/* En-tête de la carte */
.identite {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--fg1);
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
}
.identite strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.006em;
}
.identite div > span {
  display: block;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--fg2);
  line-height: 1.4;
}

/* Le titre d'écran de Pavillon, agrandi pour une page : demi-gras, serré */
h1 {
  margin: 32px 0 0;
  font-size: clamp(2rem, 6.4vw, 2.625rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.chapeau {
  margin: 14px 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--fg2);
}

/* Boutons de l'app : rounded-xl, primaire plein, secondaire bordé */
.boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.bouton:active {
  transform: scale(0.98);
}
.bouton svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.bouton.primaire {
  background: var(--fg1);
  color: #fff;
}
.bouton.primaire:hover {
  background: #2a2d35;
}
.bouton.secondaire {
  border: 1px solid var(--bord);
  color: var(--fg1);
}
.bouton.secondaire:hover {
  background: var(--survol);
  border-color: #d4d4d8;
}

/* Fiche : libellés en text-xs, valeurs en text-sm semibold */
.fiche {
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--bord);
}
.fiche div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bord);
}
.fiche div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.fiche dt {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--fg2);
}
.fiche dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}
.fiche dd a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Pied */
.bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding-top: 20px;
  font-size: 0.8125rem;
  color: var(--fg3);
}
.bas a:hover {
  color: var(--fg1);
}

/* Mentions légales : un volet qui s'ouvre par-dessus, sans JavaScript (:target) */
.feuille {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  pointer-events: none;
}
.feuille:target,
.feuille.ouverte {
  visibility: visible;
  pointer-events: auto;
}
.voile {
  position: absolute;
  inset: 0;
  background: rgba(19, 21, 26, 0.32);
  opacity: 0;
  transition: opacity 0.3s;
}
.feuille:target .voile,
.feuille.ouverte .voile {
  opacity: 1;
}
.panneau {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--carte);
  padding: 24px clamp(20px, 5vw, 40px) 40px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1);
  box-shadow: -12px 0 40px rgba(19, 21, 26, 0.12);
}
.feuille:target .panneau,
.feuille.ouverte .panneau {
  transform: none;
}
.panneau-haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.fermer {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--bord);
  transition: background-color 0.2s;
}
.fermer:hover {
  background: var(--survol);
}
.fermer svg {
  width: 12px;
  height: 12px;
}
.panneau h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.panneau h3 {
  margin: 24px 0 6px;
  font-size: 0.875rem;
  font-weight: 600;
}
.panneau p {
  margin: 0 0 4px;
  font-size: 0.875rem;
  color: var(--fg2);
}
.panneau p a {
  color: var(--fg1);
  text-decoration: underline;
  text-decoration-color: var(--bord);
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 480px) {
  .carte {
    padding: 24px 22px;
  }
  h1 {
    margin-top: 24px;
  }
  .boutons {
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 22px;
  }
  .bouton {
    flex: 1 1 auto;
    padding: 0 12px;
  }
  .fiche {
    margin-top: 24px;
  }
  .bas {
    padding-top: 14px;
  }
}
@media (max-width: 340px) {
  .boutons {
    flex-wrap: wrap;
  }
  .bouton {
    flex: 1 1 100%;
  }
}
