/* ======================================================================
   Site personnel — Christophe Quézel-Ambrunaz
   Feuille de styles commune
   ====================================================================== */

/* ----- Polices auto-hébergées (conformité RGPD) ----- */

/* EB Garamond */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/eb-garamond-v32-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/eb-garamond-v32-latin_latin-ext-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/eb-garamond-v32-latin_latin-ext-500.woff2') format('woff2');
}

/* Inter */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
}

/* ----- Tokens ----- */
:root {
  --fg:           #1a1a1a;
  --fg-secondary: #5a5a5a;
  --fg-muted:     #8a8a8a;
  --bg:           #fafaf7;
  --accent:       #1a2840;
  --rule:         #e0ddd5;

  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --measure: 38rem;   /* largeur maximale de contenu */
}

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

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

body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Mise en page principale ----- */
.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

@media (min-width: 768px) {
  .shell { padding: 5rem 2rem 6rem; }
}

/* ----- Navigation ----- */
.site-nav {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--fg-secondary);
  text-decoration: none;
  transition: color 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--fg);
}

.site-nav a[aria-current="page"] {
  color: var(--fg);
}

/* ----- Titres ----- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.25;
}

h1 { font-size: 1.8rem;  margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 3rem 0 1rem; font-weight: 500; }
h3 { font-size: 1.1rem;  margin: 2rem 0 0.5rem; font-weight: 500; }

/* ----- Bloc d'introduction ----- */
.intro { margin-bottom: 4.5rem; }

.intro__title {
  font-size: 1.8rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
  letter-spacing: 0.005em;
}

.intro__subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-secondary);
  margin: 0;
}

/* ----- Prose ----- */
p, li {
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.05em;
  transition: opacity 150ms ease;
}

a:hover,
a:focus { opacity: 0.65; }

/* ----- Liste des univers / projets ----- */
.univers { margin: 4rem 0; }

.univers__item {
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}

.univers__item:last-child {
  border-bottom: 1px solid var(--rule);
}

.univers__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: 0.005em;
}

.univers__title a {
  color: var(--fg);
  text-decoration: none;
}

.univers__title a:hover,
.univers__title a:focus {
  color: var(--accent);
  opacity: 1;
}

.univers__desc {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* ----- Ressources annexes ----- */
.outils { margin: 4.5rem 0 0; }

.outils h2 {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 1.5rem;
}

.outils__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.outils__list li {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--fg-secondary);
}

.outils__list a { color: var(--fg); }

/* ======================================================================
   Pages secondaires (univers, ressources)
   ====================================================================== */

.page-title {
  font-size: 1.8rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
  letter-spacing: 0.005em;
}

.lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  font-weight: 400;
  color: var(--fg-secondary);
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

.meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin: 0 0 3.5rem;
  text-transform: uppercase;
}

.meta span + span::before {
  content: "·";
  margin: 0 0.6rem;
  color: var(--fg-muted);
}

/* Liste de spécifications (dl à deux colonnes) */
dl.spec {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0;
  margin: 2rem 0;
}

dl.spec dt,
dl.spec dd {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

dl.spec dt {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-right: 1.5rem;
}

dl.spec dd {
  font-size: 0.98rem;
  color: var(--fg-secondary);
}

@media (max-width: 600px) {
  dl.spec {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dl.spec dt {
    padding-bottom: 0.2rem;
    border-bottom: none;
  }
  dl.spec dd {
    padding-top: 0.2rem;
    padding-bottom: 0.9rem;
  }
}

/* Tableau de configuration matérielle */
table.config {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 2.25rem;
  font-size: 0.95rem;
  border-top: 1px solid var(--rule);
}

table.config thead th {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: left;
  padding: 0.75rem 0.9rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: bottom;
}

table.config tbody th {
  font-family: var(--serif);
  font-weight: 500;
  text-align: left;
  padding: 0.85rem 0.9rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
}

table.config tbody td {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--fg-secondary);
  padding: 0.85rem 0.9rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

table.config thead th:last-child,
table.config tbody th:last-child,
table.config tbody td:last-child {
  padding-right: 0;
}

@media (max-width: 600px) {
  table.config {
    font-size: 0.88rem;
  }
  table.config thead th,
  table.config tbody th,
  table.config tbody td {
    padding: 0.55rem 0.5rem 0.55rem 0;
  }
}

/* Bouton de téléchargement — plat, rectangulaire, bordure 1px */
.btn-download {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg);
  text-decoration: none;
  padding: 0.9rem 1.75rem;
  border: 1px solid var(--fg);
  background: transparent;
  transition: background 150ms ease, color 150ms ease;
  margin-top: 1rem;
}

.btn-download:hover,
.btn-download:focus {
  background: var(--fg);
  color: var(--bg);
  opacity: 1;
}

/* Mention discrète accolée à un bouton (version, taille de fichier, etc.) */
.meta-inline {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin-left: 0.85rem;
}

/* Encart de réserve ou de note latérale */
.note {
  margin: 3rem 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--rule);
  font-size: 0.98rem;
  color: var(--fg-secondary);
}

.note__label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 0.6rem;
}

.note p { margin-bottom: 0.8rem; }
.note p:last-child { margin-bottom: 0; }

/* Code inline (noms de fichiers, commandes courtes) */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.88em;
  color: var(--fg);
  background: rgba(26, 26, 26, 0.05);
  padding: 0.1em 0.4em;
}

/* ----- Pied de page ----- */
.site-footer {
  margin-top: 6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.site-footer p {
  font-size: 0.78rem;
  margin: 0 0 0.4rem;
}

.site-footer a {
  color: var(--fg-secondary);
  text-decoration: none;
}

.site-footer a:hover { color: var(--fg); }
