/* Dossier familial — fondations : fontes, jetons de couleur, page de connexion.
   Direction : papier de registre. Encre bleu-nuit, réglure Seyès très pâle,
   composition en Latin Modern — la même fonte que le PDF exporté. */

@font-face { font-family: 'LM Roman'; src: url('/commun/fonts/lmroman10-regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'LM Roman'; src: url('/commun/fonts/lmroman10-italic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'LM Roman'; src: url('/commun/fonts/lmroman10-bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'LM Roman'; src: url('/commun/fonts/lmroman10-bolditalic.otf') format('opentype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'LM Sans'; src: url('/commun/fonts/lmsans10-regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'LM Sans'; src: url('/commun/fonts/lmsans10-bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'LM Mono'; src: url('/commun/fonts/lmmono10-regular.otf') format('opentype'); font-weight: 400; font-display: block; }
@font-face { font-family: 'LM Mono'; src: url('/commun/fonts/lmmonolt10-bold.otf') format('opentype'); font-weight: 700; font-display: block; }

:root {
  --encre: #16233a;
  --encre-doux: #3b4e6b;
  --encre-pale: #7286a4;
  --papier: #ffffff;
  --bureau: #e9edf6;
  --cachet: #a6262f;
  --registre: #2c6a52;
  --filet: rgba(22, 35, 58, 0.14);
  --filet-fort: rgba(22, 35, 58, 0.28);
  --seyes-fort: rgba(62, 96, 168, 0.10);
  --seyes-doux: rgba(62, 96, 168, 0.055);
  --survol: #f2f5fc;

  --doc: 'LM Roman', 'Iowan Old Style', Georgia, serif;
  --etiquette: 'LM Sans', system-ui, sans-serif;
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'LM Mono', ui-monospace, 'DejaVu Sans Mono', monospace;

  --pas: 4px;
  --rayon: 6px;
  --ombre-page: 0 1px 2px rgba(22, 35, 58, 0.10), 0 12px 32px -12px rgba(22, 35, 58, 0.22);
  --transition: 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

/* L'attribut hidden doit toujours l'emporter sur les display de nos classes. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--encre);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Le bureau : réglure de cahier, très pâle. */
.reglure {
  background-color: var(--bureau);
  background-image:
    repeating-linear-gradient(to bottom, var(--seyes-fort) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to right, var(--seyes-doux) 0 1px, transparent 1px 24px);
}

.etiquette {
  font-family: var(--etiquette);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--encre-pale);
}

:where(button, input, a):focus-visible {
  outline: 2px solid var(--cachet);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- connexion */
.seuil {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dossier {
  position: relative;
  width: min(420px, 100%);
  background: var(--papier);
  border: 1px solid var(--filet);
  border-radius: 3px;
  box-shadow: var(--ombre-page);
  padding: 40px 40px 34px;
}

/* L'onglet du dossier : le même objet que le volet Claude du site. */
.dossier::before {
  content: 'ACCÈS PRIVÉ';
  position: absolute;
  top: -25px;
  right: 26px;
  padding: 5px 14px 6px;
  background: var(--papier);
  border: 1px solid var(--filet);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-family: var(--etiquette);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--encre-pale);
}

.dossier h1 {
  margin: 0 0 2px;
  font-family: var(--doc);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dossier .sous {
  margin: 0 0 26px;
  font-family: var(--doc);
  font-size: 15px;
  font-style: italic;
  color: var(--encre-doux);
}

.dossier hr {
  border: none;
  border-top: 1px solid var(--filet);
  margin: 0 0 24px;
}

.champ { margin-bottom: 16px; }

.champ label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--etiquette);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--encre-pale);
}

.champ input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--ui);
  font-size: 15px;
  color: var(--encre);
  background: #fcfdff;
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon);
}

.champ input:focus {
  border-color: var(--encre-doux);
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 96, 168, 0.12);
}

.entrer {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--encre);
  border: 1px solid var(--encre);
  border-radius: var(--rayon);
  cursor: pointer;
  transition: background var(--transition);
}

.entrer:hover { background: #0f1a2c; }
.entrer[disabled] { opacity: 0.55; cursor: default; }

.avis {
  min-height: 20px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--cachet);
}

.pied {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--filet);
  font-family: var(--etiquette);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--encre-pale);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
