/* Palette chaleureuse, contraste élevé (WCAG AA), lisible pour un public senior */
:root {
  --papier: #faf6ef;
  --papier-2: #f1ebe0;
  --encre: #1f2a27;
  --encre-douce: #4a5752;
  --vert: #2f5d50;
  --vert-fonce: #1f4237;
  --ambre: #e4a23a;
  --ligne: #ddd3c3;
  --rayon: 14px;
  /* Polices : aucune n'est téléchargée (cf. page Confidentialité). Fraunces et Atkinson
     ne s'appliquent que si elles sont installées sur l'appareil ; sinon Georgia / Segoe UI.
     Pour les imposer, héberger les fichiers dans le site (jamais via Google Fonts). */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 1.125rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vert); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: 6px; }

.conteneur { width: min(1120px, 92vw); margin-inline: auto; }
.lien-evitement { position: absolute; left: -999px; }
.lien-evitement:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }

/* En-tête */
.entete { border-bottom: 1px solid var(--ligne); background: var(--papier); position: sticky; top: 0; z-index: 5; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.marque { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--encre); text-decoration: none; }
.marque svg { flex: none; }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a { color: var(--encre-douce); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--vert); }

/* Héros */
.heros { padding-block: clamp(3rem, 8vw, 6rem); }
.heros .conteneur { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.surtitre { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 700; color: var(--vert); margin: 0 0 1rem; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin: 0 0 1.2rem; letter-spacing: -.01em; }
h1 em { font-style: italic; color: var(--vert); }
.heros p.intro { font-size: 1.25rem; color: var(--encre-douce); max-width: 34ch; margin: 0 0 2rem; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .8rem 1.5rem; border-radius: 999px;
  font: 700 1.05rem var(--sans); text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s, background .15s;
}
.bouton:hover { transform: translateY(-1px); }
.bouton-plein { background: var(--vert); color: #fff; }
.bouton-plein:hover { background: var(--vert-fonce); }
.bouton-contour { border-color: var(--vert); color: var(--vert); background: transparent; }
.bouton-amazon { background: var(--ambre); color: #1b1b1b; width: 100%; }
.bouton-amazon:hover { background: #d1902a; }

/* Pile de carnets décorative */
.pile { position: relative; height: 380px; }
.pile .livre { position: absolute; width: 210px; }
.pile .livre:nth-child(1) { left: 0; top: 40px; transform: rotate(-8deg); }
.pile .livre:nth-child(2) { left: 32%; top: 0; transform: rotate(3deg); z-index: 2; }
.pile .livre:nth-child(3) { right: 0; top: 70px; transform: rotate(10deg); }

/* Couverture générée */
.livre {
  aspect-ratio: 2 / 3; border-radius: 4px 12px 12px 4px; color: #fff;
  padding: 1.2rem 1rem 1rem 1.4rem; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 8px 0 0 rgba(0,0,0,.18), 0 18px 30px -12px rgba(31,42,39,.45);
  position: relative; overflow: hidden;
}
.livre::after { content: ""; position: absolute; inset: auto -30% -35% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.1); }
.livre .l-coll { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.livre .l-titre { font-family: var(--serif); font-size: 1.25rem; line-height: 1.15; font-weight: 600; }
.livre .l-pied { font-size: .7rem; opacity: .85; }
.livre.image { padding: 0; background: none !important; }
.livre.image img { width: 100%; height: 100%; object-fit: cover; }

/* Bandeau de confiance */
.confiance { background: var(--vert); color: #fff; }
.confiance ul { list-style: none; margin: 0; padding: 1.4rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.confiance li { display: flex; gap: .6rem; align-items: center; font-weight: 600; }
.confiance svg { flex: none; }

/* Sections */
section { padding-block: clamp(3rem, 7vw, 5rem); }
/* Les liens du menu (#carnets, #faq…) ne doivent pas glisser sous l'en-tête fixe */
section[id] { scroll-margin-top: 4rem; }
.titre-section { max-width: 40rem; margin-bottom: 2.2rem; }
.titre-section h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin: 0 0 .6rem; }
.titre-section p { color: var(--encre-douce); margin: 0; }

.filtres { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filtres button {
  min-height: 44px; padding: .5rem 1.1rem; border-radius: 999px; border: 2px solid var(--ligne);
  background: #fff; font: 600 1rem var(--sans); color: var(--encre); cursor: pointer;
}
.filtres button[aria-pressed="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.6rem; }
.carte {
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem;
}
.carte .livre { width: 62%; margin: .4rem auto .6rem; }
.carte h3 { font-size: 1.35rem; margin: 0; }
.carte .sous { color: var(--encre-douce); margin: 0; font-size: 1rem; }
.carte .meta { font-size: .9rem; color: var(--encre-douce); }
.carte ul { margin: 0; padding-left: 1.2rem; font-size: 1rem; }
.carte .bas { margin-top: auto; }
.carte .via { margin: .55rem 0 0; font-size: .85rem; color: var(--encre-douce); text-align: center; }
.carte .collection { margin: 0 0 -.6rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--vert); }

/* Comment ça marche */
.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; counter-reset: e; }
.etape { background: var(--papier-2); border-radius: var(--rayon); padding: 1.6rem; }
.etape::before { counter-increment: e; content: counter(e); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--vert); color: #fff; font: 700 1.2rem var(--serif); margin-bottom: 1rem; }
.etape h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.etape p { margin: 0; color: var(--encre-douce); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--ligne); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--vert); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--encre-douce); margin: .8rem 0 0; max-width: 65ch; }

/* Avertissement santé */
.avertissement { background: #fff7e8; border: 1px solid #efd5a5; border-radius: var(--rayon); padding: 1.2rem 1.4rem; font-size: 1rem; }

/* Pied de page */
.pied { background: var(--encre); color: #d8dfdc; padding-block: 3rem 2rem; font-size: 1rem; }
.pied a { color: #fff; }
.pied .colonnes { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.pied h2 { color: #fff; margin: 0 0 .8rem; font-size: 1.15rem; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pied .legal { border-top: 1px solid #3a4743; padding-top: 1.4rem; font-size: .9rem; color: #aab5b1; }

/* Lien vers la page dédiée, dans les cartes de l'accueil */
.carte h3 a { color: inherit; text-decoration: none; }
.carte h3 a:hover { text-decoration: underline; }
.carte .detail { font-weight: 700; font-size: 1rem; }

/* Page dédiée d'un carnet */
.fil-ariane { padding-top: 1.4rem; font-size: .95rem; color: var(--encre-douce); }
.fil-ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.fil-ariane li + li::before { content: "›"; margin-right: .4rem; }
.fiche { display: grid; grid-template-columns: .75fr 1.25fr; gap: 3rem; align-items: start; padding-block: 2rem 3rem; }
.couverture-fiche { margin: 0; }
.couverture-fiche .livre { width: min(100%, 340px); margin-inline: auto; }
.couverture-fiche figcaption { margin-top: 1rem; text-align: center; font-size: .9rem; color: var(--encre-douce); }
.sommaire { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.1rem 1.4rem; margin-bottom: 1rem; }
.sommaire p { margin: 0 0 .4rem; font-weight: 700; }
.sommaire ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .2rem; }
.bloc h2[id], .bloc[id] { scroll-margin-top: 5rem; }
.sources { font-size: .95rem; color: var(--encre-douce); margin-top: 1.4rem; }
.fiche h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.fiche .sous { font-size: 1.2rem; color: var(--encre-douce); font-weight: 600; }
.fiche .achat { max-width: 380px; margin-top: 1.8rem; }
.fiche .meta { font-size: .95rem; color: var(--encre-douce); margin: 0 0 .7rem; }
.fiche .via { margin: .55rem 0 0; font-size: .9rem; color: var(--encre-douce); text-align: center; }
.bloc { padding-block: 2.6rem; border-top: 1px solid var(--ligne); }
.bloc h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1.2rem; }
.liste-contenu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.liste-contenu li { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.2rem 1.3rem; color: var(--encre-douce); }
.liste-contenu strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--encre); margin-bottom: .3rem; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.autres-carnets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.6rem; }
.autres-carnets a { display: flex; flex-direction: column; gap: .3rem; color: var(--encre); text-decoration: none; font-weight: 700; }
.autres-carnets a:hover span:last-child { text-decoration: underline; }
.autres-carnets img { width: 140px; margin-bottom: .6rem; border-radius: 4px 10px 10px 4px; box-shadow: 0 12px 22px -12px rgba(31,42,39,.45); }
.autres-carnets .collection { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--vert); }

/* Rubrique Conseils */
.grille-conseils { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.carte-conseil { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.carte-conseil h2, .carte-conseil h3 { font-size: 1.3rem; margin: 0; }
.carte-conseil h2 a, .carte-conseil h3 a { color: var(--encre); text-decoration: none; }
.carte-conseil h2 a:hover, .carte-conseil h3 a:hover { text-decoration: underline; }
.carte-conseil p { margin: 0; color: var(--encre-douce); font-size: 1rem; }
.carte-conseil .detail { margin-top: auto; font-weight: 700; font-size: 1rem; }
.date-conseil { font-size: .9rem; color: var(--encre-douce); }
.tous-conseils { margin: 1.6rem 0 0; font-weight: 700; }
.entete-conseils { padding-top: 1.6rem; max-width: 46rem; }
.entete-conseils h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.article { max-width: 800px; }
.article article { padding-bottom: 1rem; }
.entete-article { padding-top: 1.6rem; }
.entete-article h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: .6rem; }
.article h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 2.4rem 0 .8rem; scroll-margin-top: 5rem; }
.article h3 { font-size: 1.25rem; margin: 1.6rem 0 .4rem; }
.article li { margin-bottom: .35rem; }
.article .sommaire { margin: 1.6rem 0; }
.article .faq details p { max-width: none; }
.tableau { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 1rem 0; background: #fff; }
.tableau th, .tableau td { border: 1px solid var(--ligne); padding: .6rem .7rem; text-align: left; vertical-align: top; }
.tableau th { background: var(--papier-2); }
.tableau-defilant { overflow-x: auto; }
.encadre { background: #eef4f1; border-left: 5px solid var(--vert); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.encart-carnet { display: grid; grid-template-columns: 120px 1fr; gap: 1.4rem; align-items: center; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.4rem; margin: 2.4rem 0 1rem; }
.encart-carnet img { border-radius: 4px 10px 10px 4px; box-shadow: 0 12px 22px -12px rgba(31,42,39,.45); }
.encart-carnet p { margin: .2rem 0; }
.encart-carnet .surtitre { margin: 0; }
.titre-encart { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.titre-encart a { color: var(--encre); }
.actions-encart { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: .8rem !important; }
.lien-amazon { font-weight: 700; }
.sources-article ol { font-size: 1rem; color: var(--encre-douce); }
.article .avertissement { margin-top: 2rem; }

/* Fiches à imprimer et auteur */
.carte-fiche { border-color: var(--vert); box-shadow: inset 0 4px 0 var(--vert); }
.telechargements { display: grid; gap: .8rem; margin: 1.6rem 0; }
.telechargement { display: flex; gap: 1rem; align-items: center; background: #fff; border: 2px solid var(--vert); border-radius: var(--rayon); padding: 1rem 1.2rem; color: var(--encre); text-decoration: none; }
.telechargement:hover { background: #eef4f1; }
.telechargement .format { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--vert); color: #fff; font-weight: 700; }
.telechargement strong { display: block; font-size: 1.1rem; }
.telechargement span span { color: var(--encre-douce); font-size: .95rem; }
.auteur { margin: .2rem 0 .8rem; color: var(--encre-douce); font-size: 1rem; }
.date-conseil a { color: var(--vert); }
.apercu-fiche { margin: 1.2rem 0 1.8rem; }
.apercu-fiche img { border: 1px solid var(--ligne); border-radius: 8px; box-shadow: 0 10px 24px -14px rgba(31,42,39,.45); }
.apercu-fiche figcaption { margin-top: .6rem; font-size: .95rem; color: var(--encre-douce); }

/* Pages légales */
.page-legale { padding-block: 3rem 5rem; max-width: 760px; }
.page-legale h1 { font-size: 2.4rem; }
.page-legale h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.a-completer { background: #fff1c7; padding: 0 .3rem; border-radius: 4px; }

@media (max-width: 860px) {
  .heros .conteneur { grid-template-columns: 1fr; }
  .pile { height: 270px; width: min(100%, 300px); margin-inline: auto; }
  .pile .livre { width: 42%; }
  .confiance ul { grid-template-columns: 1fr 1fr; }
  .etapes { grid-template-columns: 1fr; }
  .pied .colonnes { grid-template-columns: 1fr; }
  .fiche, .deux-colonnes { grid-template-columns: 1fr; gap: 2rem; }
  .fiche { padding-top: 1.2rem; }
  .couverture-fiche .livre { width: min(48%, 190px); }
  .encart-carnet { grid-template-columns: 1fr; }
  .encart-carnet img { width: 110px; }
  .nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
