/* ============================================================
   v1n.fr — design global
   Colonne verticale, palette vin. Thème sombre par défaut,
   thème clair si le navigateur préfère un thème clair
   (@media prefers-color-scheme).
   ============================================================ */

:root {
  --texte: #fdf6f0;
  --texte-titre: #ffffff;
  --accent: #eec98f;
  --carte-fond: rgba(0, 0, 0, 0.22);
  --carte-bord: rgba(255, 255, 255, 0.12);
  --carte-ombre: rgba(0, 0, 0, 0.25);
  --bande-fond: rgba(0, 0, 0, 0.18);
  --filet: rgba(255, 255, 255, 0.14);
}

@media (prefers-color-scheme: light) {
  :root {
    --texte: #40141d;
    --texte-titre: #4a0e17;
    --accent: #8a1f2d;
    --carte-fond: #ffffff;
    --carte-bord: rgba(74, 14, 23, 0.10);
    --carte-ombre: rgba(74, 14, 23, 0.12);
    --bande-fond: rgba(74, 14, 23, 0.06);
    --filet: rgba(74, 14, 23, 0.14);
  }
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Ubuntu, "Helvetica Neue", sans-serif;
  font-weight: 300;
  line-height: 1.7;
  color: var(--texte);

  background: linear-gradient(175deg, #93222f 0%, #6d1522 55%, #4a0e17 100%)
    fixed;
}

@media (prefers-color-scheme: light) {
  body {
    background: linear-gradient(175deg, #faf1e8 0%, #f3dfcf 60%, #eecfba 100%)
      fixed;
  }
}

a,
a:visited {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ---------- en-tête ---------- */

body > header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--bande-fond);
}

body > header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--texte-titre);
}

body > header .anim {
  color: var(--texte);
  opacity: 0.85;
}

body > header a,
body > header a:hover {
  text-decoration: none;
}

body > header a:hover {
  opacity: 0.85;
}

/* ---------- colonne de contenu ---------- */

#principale {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* titre de page */

#entetePage {
  text-align: center;
  margin: 0 0 1.5rem;
}

#entetePage h1 {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

#entetePage h1 a {
  color: var(--texte-titre);
}

#entetePage h1 a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* cartes de contenu */

article {
  background: var(--carte-fond);
  border: 1px solid var(--carte-bord);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
  margin: 0 0 1.4rem;
  box-shadow: 0 10px 30px var(--carte-ombre);
}

article > header p.hdeuxdetails {
  text-align: right;
  font-size: 0.8rem;
  opacity: 0.65;
  margin-bottom: 0.8rem;
}

/* typographie des sections */

h2 {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 1.8rem 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--filet);
}

article h2:first-child,
section h2:first-child {
  margin-top: 0;
}

section + section {
  margin-top: 2.2rem;
}

h3 {
  color: var(--accent);
  font-size: 1.12rem;
  font-weight: 500;
  margin: 1.4rem 0 0.5rem;
}

h4 {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
  margin: 1.2rem 0 0.4rem;
}

p {
  margin: 0.65rem 0;
}

p:last-child {
  margin-bottom: 0;
}

/* accueil : colonne centrée + sources */

#infos {
  display: flex;
  flex-direction: column;
}

#sources {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.6;
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--filet);
}

/* page 404 */

#infos > div {
  text-align: center;
}

#infos > div:nth-child(2) {
  max-width: 420px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.2rem;

  background: var(--carte-fond);
  border: 1px solid var(--carte-bord);
  border-radius: 14px;
}

/* ---------- pied de page ---------- */

body > footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 1.6rem;
  padding: 1.1rem 1rem;
  font-size: 0.85rem;
  background: var(--bande-fond);
}

body > footer span {
  opacity: 0.7;
}

/* ---------- écrans étroits ---------- */

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  body > header {
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
  }

  #principale {
    padding: 1.4rem 1rem 2rem;
  }

  article {
    padding: 1.2rem 1.1rem;
    border-radius: 12px;
  }

  #entetePage h1 {
    font-size: 1.55rem;
  }
}
