/* ============================================================
   Style du site de Luc Legay — inspiré du thème WordPress
   « Twenty Nineteen » (version actuelle du site).
   Mobile-first : les règles de base valent pour le téléphone,
   les @media (min-width) agrandissent pour tablette/ordinateur.
   ============================================================ */

/* Les couleurs et polices sont définies une fois ici (variables CSS) */
:root {
  --rouge: #a80024;          /* couleur des liens et du menu */
  --rouge-fonce: #750019;    /* survol des liens */
  --texte: #111;
  --gris: #767676;           /* slogan, pied de page */
  --gris-clair: #e6e6e6;
  --police-titres: -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --police-texte: "Hoefler Text", Garamond, "Times New Roman", serif;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.125rem;       /* 18px sur mobile, 22px dès la tablette */
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--rouge); }
a:hover, a:focus { color: var(--rouge-fonce); text-decoration: none; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 2px; }

/* Lien « Aller au contenu » : invisible sauf au clavier (accessibilité) */
.lien-evitement {
  position: absolute; left: 8px; top: -100px;
  background: #fff; padding: .6em 1em; z-index: 10;
}
.lien-evitement:focus { top: 8px; }

/* ---------- En-tête ---------- */
.entete {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .5rem 1rem;
  padding: 1.5rem 1rem 0;
  max-width: 1200px; margin: 0 auto;
}
.logo { line-height: 0; }
.logo img { width: 56px; height: 56px; border-radius: 50%; }
.titre-site { margin: 0; font-family: var(--police-titres); font-size: 1.1rem; font-weight: 400; line-height: 1.2; }
.titre-site a { color: var(--texte); text-decoration: none; }
.titre-site a:hover { color: var(--rouge); }
.slogan { font-family: var(--police-texte); color: var(--gris); }

.entete nav { flex-basis: 100%; }
.entete nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.entete nav a {
  font-family: var(--police-titres); font-weight: 700; font-size: 1rem;
  text-decoration: none; color: var(--rouge);
}
.entete nav a:hover, .entete nav a[aria-current] { text-decoration: underline; }

/* ---------- Contenu ---------- */
main { padding: 1rem 1rem 3rem; max-width: 800px; margin: 0 auto; }

h1 {
  font-family: var(--police-titres); font-weight: 800;
  font-size: 2rem; line-height: 1.2; margin: 2rem 0 1.5rem;
}
/* petit trait au-dessus du titre, comme dans le thème d'origine */
h1::before { content: ""; display: block; width: 1.5rem; border-top: 1px solid var(--texte); margin-bottom: 1rem; }
/* sur l'accueil le titre est masqué visuellement mais lu par les lecteurs d'écran */
.titre-masque {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.titre-masque::before { display: none; }

h2, h3, h4 { font-family: var(--police-titres); line-height: 1.25; }
article p { margin: 0 0 1.4rem; }
article > p:first-of-type { margin-top: 0; }

.portrait { display: block; width: 100%; max-width: 404px; height: auto; margin: 0 0 1.5rem; }

/* Version anglaise : texte en gris, comme sur le site actuel */
.en { color: #4f4f4f; margin-top: 2rem; }

/* ---------- Commentaires (page Time machine) ---------- */
.commentaires { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--gris-clair); }
.commentaires h2 { font-size: 1.4rem; }
.liste-commentaires { list-style: none; margin: 0; padding: 0; }
.commentaire { padding: 1.25rem 0; border-top: 1px solid var(--gris-clair); font-size: 1rem; line-height: 1.6; }
.commentaire p { margin: 0 0 .75rem; }
.commentaire-meta { font-family: var(--police-titres); font-size: .9rem; }
.commentaire-meta time { color: var(--gris); margin-left: .5rem; font-weight: 400; }

/* ---------- Pied de page ---------- */
.pied { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem 2rem; font-family: var(--police-titres); font-size: .85rem; color: var(--gris); }
.pied a { color: var(--gris); }

/* ---------- Tablette et ordinateur ---------- */
@media (min-width: 768px) {
  body { font-size: 1.375rem; }
  .entete { padding: 2.5rem 2rem 0; flex-wrap: nowrap; }
  .entete nav { flex-basis: auto; margin-left: auto; }
  .logo img { width: 64px; height: 64px; }
  .titre-site { font-size: 1.5rem; }
  main { padding: 1.5rem 2rem 4rem; }
  h1 { font-size: 3rem; }
  .commentaire { font-size: 1.1rem; }
}

/* Respect des préférences de mouvement et d'impression */
@media print { .entete nav, .lien-evitement { display: none; } }
