/* joodo.dev — feuille de style du site.
   Palette et typographie reprises des manuels Joolan, pour que le passage
   du site au manuel ne provoque aucune rupture visuelle. */

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

:root {
  --texte:      #1f2933;
  --titre:      #102a43;
  --attenue:    #627d98;
  --lien:       #0b6bcb;
  --fond:       #ffffff;
  --fond-doux:  #f0f4f8;
  --bord:       #d9e2ec;
  --bord-clair: #e4e7eb;
  --accent:     #0b6bcb;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.65;
  color: var(--texte); background: var(--fond);
  -webkit-text-size-adjust: 100%;
}

.contenu { max-width: 52rem; margin-inline: auto; padding: 0 1.5rem; }

a { color: var(--lien); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- barre de navigation ---------- */

.site-nav {
  border-bottom: 1px solid var(--bord-clair);
  background: var(--fond);
  position: sticky; top: 0; z-index: 10;
}
.site-nav .contenu {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding-block: .9rem; flex-wrap: wrap;
}
.site-nav .marque {
  font-weight: 700; font-size: 1.05rem; color: var(--titre);
  letter-spacing: -.01em; margin-right: auto;
}
.site-nav .marque:hover { text-decoration: none; }
.site-nav a { color: var(--attenue); font-size: .93rem; }
.site-nav a.actif { color: var(--titre); font-weight: 600; }

/* ---------- bandeau d'accueil ---------- */

.hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--bord-clair); }
.hero h1 {
  font-size: 3rem; line-height: 1.1; margin: 0 0 .6rem;
  color: var(--titre); letter-spacing: -.02em;
}
.hero .accroche { font-size: 1.25rem; color: var(--attenue); margin: 0 0 1.6rem; }
.hero .boutons { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.bouton {
  display: inline-block; padding: .6rem 1.2rem; border-radius: 6px;
  font-size: .95rem; font-weight: 600; border: 1px solid var(--accent);
}
.bouton-plein { background: var(--accent); color: #fff; }
.bouton-plein:hover { background: #0959a8; text-decoration: none; }
.bouton-vide { color: var(--accent); background: transparent; }
.bouton-vide:hover { background: var(--fond-doux); text-decoration: none; }

/* ---------- corps de page ---------- */

h2 {
  font-size: 1.45rem; font-weight: 600; color: var(--titre); line-height: 1.25;
  margin: 3rem 0 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--bord-clair);
}
h3 { font-size: 1.15rem; font-weight: 600; color: var(--titre); margin: 2rem 0 .6rem; }
p { margin: .8rem 0; }
ul, ol { margin: .8rem 0; padding-left: 1.6rem; }
li { margin: .3rem 0; }
hr { border: 0; border-top: 1px solid var(--bord-clair); margin: 2.5rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--fond-doux); padding: .12em .38em;
  border-radius: 3px; color: #243b53;
}
pre {
  background: var(--fond-doux); border: 1px solid var(--bord); border-radius: 6px;
  padding: 1rem; overflow-x: auto; line-height: 1.5; margin: 1.2rem 0;
}
pre code { background: none; padding: 0; font-size: .85rem; color: inherit; }

table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 1.2rem 0; }
th, td { border: 1px solid var(--bord); padding: .5rem .7rem; text-align: left; vertical-align: top; }
th { background: var(--fond-doux); font-weight: 600; color: #243b53; }
tbody tr:nth-child(even) { background: #fafcfe; }
.tableau { overflow-x: auto; }

/* ---------- grille de points clés ---------- */

.cartes {
  display: grid; gap: 1.2rem; margin: 1.5rem 0;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.carte {
  border: 1px solid var(--bord); border-radius: 8px; padding: 1.1rem 1.2rem;
  background: var(--fond);
}
.carte h3 { margin: 0 0 .4rem; font-size: 1.02rem; }
.carte p { margin: 0; font-size: .93rem; color: var(--texte); }

/* ---------- encadré ---------- */

.note {
  margin: 1.4rem 0; padding: .85rem 1.1rem;
  background: #fffbeb; border-left: 4px solid #f0b429; border-radius: 0 4px 4px 0;
}
.note p { margin: .3rem 0; }
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

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

.site-pied {
  margin-top: 4rem; padding: 2rem 0 3rem;
  border-top: 1px solid var(--bord-clair);
  color: var(--attenue); font-size: .9rem;
}
.site-pied p { margin: .3rem 0; }

/* ---------- thème sombre ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --texte:      #cbd6e2;
    --titre:      #e8eef5;
    --attenue:    #8fa3b8;
    --lien:       #6cb2f5;
    --fond:       #10151b;
    --fond-doux:  #1b232c;
    --bord:       #2b3742;
    --bord-clair: #26313d;
    --accent:     #4a95e0;
  }
  code { color: #d3e0ee; }
  th { color: #dbe6f0; }
  tbody tr:nth-child(even) { background: #151c24; }
  .bouton-plein { color: #0d1319; }
  .bouton-plein:hover { background: #6cb2f5; }
  .note { background: #2a2417; border-left-color: #c99a2e; }
}

/* ---------- petits écrans ---------- */

@media (max-width: 34rem) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero .accroche { font-size: 1.1rem; }
}
