/*
 * Soclyse : même famille visuelle que Vigie et Paraphe. Une page blanche, de l'encre, une grille de points.
 * Le rouge n'apparaît que dans le signe de Vigie, dont il est le signal.
 */
@font-face {
  font-family: 'Familjen Grotesk';
  src: url(/fonts/familjen-grotesk-latin-wght-normal.woff2) format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --sunk: #f3f3f0;
  --ink: #16181d;
  --ink-2: #5d6068;
  --ink-3: #6b6e76;
  --line: #e6e6e3;
  --hot: #d7261e;
  --largeur: 1080px;
  --marge: clamp(16px, 4vw, 40px);
  color-scheme: light;
  font-family: 'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Clair par défaut, comme Vigie et Paraphe : sombre seulement sur choix (« Sombre », ou « Auto » sur un système
   sombre), appliqué par theme.js. */
:root[data-theme='dark'] {
  --paper: #121315;
  --sunk: #222428;
  --ink: #eeeeea;
  --ink-2: #b3b5ba;
  --ink-3: #989aa0;
  --line: #2c2e32;
  --hot: #ff5a4f;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] {
    --paper: #121315;
    --sunk: #222428;
    --ink: #eeeeea;
    --ink-2: #b3b5ba;
    --ink-3: #989aa0;
    --line: #2c2e32;
    --hot: #ff5a4f;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: var(--ink);
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.evitement {
  position: absolute;
  left: -9999px;
}

.evitement:focus {
  left: var(--marge);
  top: 8px;
  padding: 6px 10px;
  background: var(--paper);
}

/* ---------- En-tête et pied ---------- */
.tete,
main,
.pied {
  max-width: var(--largeur);
  margin: 0 auto;
  padding-left: var(--marge);
  padding-right: var(--marge);
}

.tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.marque {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.tete nav {
  display: flex;
  gap: 20px;
}

.tete nav a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
}

.tete nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
}

/* Choix du thème, comme dans le pied de page de Paraphe ; caché sans script. */
.theme {
  display: inline-flex;
  order: 2;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.theme[hidden] {
  display: none;
}

.theme button {
  min-height: 32px;
  padding: 3px 12px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.theme button + button {
  border-left: 1px solid var(--line);
}

.theme button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.pied nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.9rem;
}

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

/* ---------- Une ---------- */
main {
  padding-top: 40px;
  padding-bottom: 72px;
}

.une h1 {
  max-width: 12em;
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.chapeau {
  max-width: 36em;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 1.2rem;
  line-height: 1.45;
}

/* La recherche commune : un seul champ, une question par site. */
.pont {
  max-width: 760px;
  margin-top: 36px;
}

.pont label {
  display: block;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.pont input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
}

.pont input::placeholder {
  color: var(--ink-3);
}

.pont input:focus {
  outline: none;
  border-bottom-width: 3px;
}

.pont-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pont button {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.pont button span {
  color: var(--ink-3);
  font-size: 0.88rem;
  font-weight: 500;
}

.pont button:hover {
  background: var(--ink);
  color: var(--paper);
}

.pont button:hover span {
  color: var(--paper);
}

/* ---------- Les deux sites ---------- */
.sites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 48px 72px;
  margin-top: 80px;
}

.site {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}

.signe {
  width: 64px;
  height: 64px;
  margin: -6px 0 0 -8px;
}

.signe circle {
  fill: var(--ink);
}

.signe .signal {
  fill: var(--hot);
}

.signe .trait {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.site h2 a {
  text-decoration: none;
}

.question {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.site p:not(.question) {
  max-width: 34em;
  color: var(--ink-2);
}

.site .source {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.ouvrir {
  font-weight: 600;
}

/* ---------- Principes ---------- */
.principes {
  margin-top: 72px;
}

.principes h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.principes ul {
  max-width: 44em;
  margin: 12px 0 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
}

.principes li {
  margin-bottom: 6px;
}

/* ---------- Pages simples ---------- */
.prose {
  max-width: 44rem;
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.prose h2 {
  margin-top: 32px;
  font-size: 1.2rem;
  font-weight: 600;
}

.prose p {
  margin-top: 10px;
  color: var(--ink-2);
}
