/* Nunito latin-ext (SIL Open Font License) */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Nunito latin (SIL Open Font License) */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/nunito-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fredoka latin-ext (SIL Open Font License) : titres */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/fredoka-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fredoka latin (SIL Open Font License) : titres */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/fredoka-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --text: #2b2420;
  --muted: #6b5f57;
  --primary: #b44c1c;
  --primary-dark: #9a4016;
  --accent: #2f7d6d;
  --border: #eadfd3;
  --soft: #fbefe2;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(60, 35, 20, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; }

a { color: var(--primary-dark); }

h1, h2, h3 { line-height: 1.25; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }


/* ---------- Navigation ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }
.logo { font-weight: 900; font-size: 1.3rem; text-decoration: none; color: var(--text); }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--soft); color: var(--primary-dark); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px 16px;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-soft { background: var(--soft); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.center { text-align: center; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }

.hero {
  padding: 80px 0 64px;
  background: radial-gradient(circle at 85% 20%, #ffe0c7 0, transparent 45%),
              radial-gradient(circle at 10% 90%, #d6efe8 0, transparent 40%);
}
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-emoji { font-size: clamp(5rem, 14vw, 9rem); text-align: center; line-height: 1.1; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-emoji { order: -1; } }

.page-hero { padding: 56px 0 32px; }
.breadcrumb { font-size: .9rem; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--primary);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary-dark); }
.btn-outline:hover { color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .15s; }
.card-link:hover { transform: translateY(-3px); }
.card .icon { font-size: 2.4rem; display: block; margin-bottom: 8px; }

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  margin: 0 4px 6px 0;
}
.tag.green { background: #dcf1ea; color: #1e5f52; }
.tag.red { background: #fde2e0; color: #a3271c; }

/* ---------- Catalogue des méthodes ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 26px;
}
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-group strong { margin-right: 4px; font-size: .9rem; }
.filter-group button {
  border: 1px solid var(--border); background: var(--bg); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; font: inherit; font-size: .9rem;
}
.filter-group button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
#method-search {
  flex: 1; min-width: 200px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--border); font: inherit;
}
#method-count { font-weight: 800; color: var(--muted); }

.method h3 { display: flex; gap: 10px; align-items: center; }
.method details { margin-top: 10px; }
.method summary { cursor: pointer; font-weight: 800; color: var(--primary-dark); }
.method ol, .method ul { padding-left: 1.2em; }
.method .gear { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: .95rem; }

/* ---------- Produits ---------- */
.product { display: flex; flex-direction: column; }
.product .icon { font-size: 2.6rem; }
.product p { flex: 1; }
.product .why { font-size: .92rem; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step; position: relative; padding: 0 0 18px 52px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

.callout {
  border-left: 5px solid var(--accent);
  background: #eaf6f2;
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}
.callout.warn { border-color: #c9442f; background: #fdeeec; }

.toc { columns: 2; gap: 30px; padding-left: 1.2em; }
@media (max-width: 600px) { .toc { columns: 1; } }

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--soft); }
.table-wrap { overflow-x: auto; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { font-weight: 800; cursor: pointer; }

/* ---------- Pied de page ---------- */
.site-footer { background: #2b2420; color: #e9ddd1; padding: 48px 0 28px; font-size: .95rem; }
.site-footer a { color: #ffd2b5; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid #4a3f38; margin-top: 30px; padding-top: 18px; font-size: .85rem; color: #bfb1a5; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Articles ---------- */
.article { max-width: 760px; }
.article h2 { margin-top: 1.6em; }
.article .meta { color: var(--muted); font-size: .92rem; }
.info-box {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin: 22px 0; box-shadow: var(--shadow);
}
.info-box .icon { font-size: 2.2rem; }
.info-box div { flex: 1; min-width: 200px; }
.info-box p { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- Langues et boutique ---------- */
.lang-switch { display: flex; gap: 2px; margin-left: auto; margin-right: 8px; }
.lang-switch a {
  text-decoration: none; color: var(--muted); font-weight: 800; font-size: .85rem;
  padding: 6px 8px; border-radius: 8px;
}
.lang-switch a[aria-current="true"] { background: var(--soft); color: var(--primary-dark); }
@media (min-width: 821px) { .lang-switch { order: 2; margin-left: 12px; margin-right: 0; } .nav-links { order: 1; margin-left: auto; } }

/* Texte réservé aux lecteurs d'écran */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Articles : sommaire, progression, à lire aussi ---------- */
.lecture { position: fixed; left: 0; top: 0; height: 4px; width: 100%; background: var(--primary); transform-origin: left; transform: scaleX(0); z-index: 20; }
.toc-art { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin: 22px 0; }
.toc-art summary { font-weight: 900; cursor: pointer; }
.toc-art ol { margin: 10px 0 0; padding-left: 1.3em; }
.toc-art li { margin: 4px 0; }
.toc-art a { text-decoration: none; }
.toc-art a:hover { text-decoration: underline; }
.article h2 { scroll-margin-top: 80px; }
.lire-aussi { padding-top: 10px; }
.lire-aussi .card p { color: var(--muted); font-size: .95rem; }

/* ---------- Outils : calculateur et quiz ---------- */
.outil { max-width: 680px; }
.outil form { display: grid; gap: 18px; }
.outil label { font-weight: 800; display: block; margin-bottom: 6px; }
.outil input[type=number], .outil select { font: inherit; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; width: 100%; }
.choix-espece { display: flex; gap: 10px; flex-wrap: wrap; }
.choix-espece label { flex: 1; min-width: 130px; margin: 0; }
.choix-espece input { position: absolute; opacity: 0; }
.choix-espece span { display: block; text-align: center; padding: 14px; border: 2px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; font-size: 1.1rem; }
.choix-espece input:checked + span { border-color: var(--primary); background: var(--soft); }
.choix-espece input:focus-visible + span { outline: 3px solid var(--accent); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.resultat { margin-top: 26px; }
.age-gros { font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 900; color: var(--primary-dark); line-height: 1.1; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.quiz-zone h2 { margin-top: 10px; }
.quiz-etape { color: var(--muted); font-weight: 800; margin: 0 0 8px; }
.quiz-barre { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.quiz-barre i { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.quiz-options { display: grid; gap: 10px; margin-top: 14px; }
.quiz-choix { font: inherit; font-weight: 800; text-align: left; padding: 15px 18px; border: 2px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; color: var(--text); }
.quiz-choix:hover, .quiz-choix:focus-visible { border-color: var(--primary); background: var(--soft); }
.quiz-retour { margin-top: 14px; background: none; border: 0; font: inherit; color: var(--primary-dark); cursor: pointer; font-weight: 800; padding: 6px 0; }
.quiz-zone ul { padding-left: 1.2em; }

/* ---------- Illustrations ---------- */
.illu { margin: 18px 0 24px; }
.illu img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); background: #fffaf3; }
.illu figcaption { font-size: .92rem; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.45; }
.card .illu { margin: 12px 0 16px; }
.hero-illu { text-align: center; }
.hero-illu img { width: 100%; max-width: 460px; height: auto; }
@media (max-width: 820px) { .hero-illu { order: -1; } .hero-illu img { max-width: 300px; } }
.card .icon .card-img { display:block; width:100%; height:auto; border-radius:14px; background:#fffaf3; border:1px solid var(--border); }
.card .icon:has(.card-img) { margin-bottom: 14px; }
.card .icon .card-img:not([src*="portrait"]) { aspect-ratio: 12 / 5; object-fit: contain; }
.sources li { margin-bottom: 8px; font-size: .95rem; }
.btn-recherche { background: none; border: 1px solid var(--border); border-radius: 12px; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; margin-right: 8px; flex-shrink: 0; }
.btn-recherche:hover { background: var(--soft); color: var(--primary-dark); }
@media (min-width: 821px) { .btn-recherche { order: 3; margin: 0 0 0 10px; } }
.recherche { position: fixed; inset: 0; background: rgba(43, 36, 32, .45); z-index: 1000; display: flex; justify-content: center; align-items: flex-start; padding: 70px 14px 14px; }
.recherche[hidden] { display: none; }
.recherche-boite { background: #fffaf3; width: 100%; max-width: 640px; border-radius: 20px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.recherche-ligne { display: flex; gap: 8px; }
.recherche-ligne input { flex: 1; font: inherit; font-size: 1.05rem; padding: 12px 16px; border-radius: 999px; border: 2px solid var(--primary); outline: none; background: #fff; min-width: 0; }
.recherche-fermer { background: none; border: 0; font-size: 1.3rem; cursor: pointer; padding: 0 8px; color: var(--muted); }
.recherche-info { margin: 10px 4px 4px; font-size: .9rem; color: var(--muted); }
.recherche-resultats { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.recherche-resultats a { display: block; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--text); }
.recherche-resultats a:hover, .recherche-resultats a:focus { background: var(--soft); }
.recherche-resultats strong { display: block; color: var(--primary-dark); margin-bottom: 2px; }
.recherche-resultats span { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.recherche-ouverte { overflow: hidden; }
.recherche-ligne input::-webkit-search-cancel-button { display: none; }
.logo { white-space: nowrap; }
@media (max-width: 420px) {
  .logo { font-size: 1.12rem; }
  .lang-switch { margin-right: 4px; }
  .lang-switch a { padding-left: 6px; padding-right: 6px; }
  .btn-recherche { width: 38px; height: 38px; margin-right: 6px; }
}

/* Partage */
.partage { margin: 36px 0 8px; padding: 18px 20px; background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius); }
.partage-titre { margin: 0 0 10px; font-weight: 800; color: var(--text); }
.partage-liens { display: flex; flex-wrap: wrap; gap: 8px; }
.partage-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--text); font: inherit; font-size: .92rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.partage-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.partage-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 14px; line-height: 1; background: var(--muted); }
.partage-whatsapp .partage-ic { background: #25d366; }
.partage-facebook .partage-ic { background: #1877f2; font-family: Arial, sans-serif; }
.partage-pinterest .partage-ic { background: #e60023; font-family: Georgia, serif; }
.partage-x .partage-ic { background: #111; }
.partage-mail .partage-ic { background: var(--accent); }
.partage-natif .partage-ic, .partage-copier .partage-ic { background: var(--primary); }
.partage-copier .partage-ic { background: var(--soft); }


/* Performance : les sections sous la ligne de flottaison ne sont calculées qu'à l'approche de l'écran */
main > section ~ section { content-visibility: auto; contain-intrinsic-size: auto 900px; }
/* Liens seuls sur leur ligne : zone de clic d'au moins 24 px (accessibilité) */
.container > p > a:only-child { display: inline-block; padding-block: 3px; }

/* Page « Peut-il manger… ? » */
.filtre-aliments { margin: 22px 0 18px; }
.filtre-aliments input { width: 100%; font: inherit; padding: 13px 16px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); }
.filtre-aliments input:focus { outline: none; border-color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font: inherit; font-size: .92rem; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; min-height: 44px; }
.chip.actif { border-color: var(--primary); background: var(--soft); color: var(--primary-dark); }
.aliment h3 { margin: 0 0 8px; font-size: 1.1rem; }
.aliment p { margin: 6px 0 0; }
.aliment.cible { box-shadow: 0 0 0 3px var(--primary); }
.verdicts { display: flex; flex-wrap: wrap; gap: 6px; }
.v { display: inline-block; font-size: .85rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.v-oui { background: #dcf1ea; color: #1e5f52; }
.v-modere { background: #fff1d6; color: #8a5300; }
.v-non { background: #fde2e0; color: #a3271c; }
.noms-chips { margin-top: 18px; }
.noms-chips .chip { font-size: 1.05rem; }
tr.actuelle td { background: var(--soft); font-weight: 800; }
/* Programme chiot et budget */
.progression { margin: 22px 0 10px; }
.barre-prog { height: 12px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 8px 0 12px; }
.barre-prog span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.jours { list-style: none; padding: 0; display: grid; gap: 10px; }
.jour { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.jour label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 400; margin: 0; }
.jour input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.jour p { margin: 6px 0 0 32px; font-size: .95rem; color: var(--muted); }
.jour.fait { background: #eef8f4; border-color: #b9e0d2; }
#calc-budget fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0 0; }
#calc-budget legend { font-weight: 800; padding: 0 6px; }
.poste { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: center; margin: 8px 0; }
.poste label { font-weight: 600; margin: 0; }
.poste input { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; width: 100%; }
.budget-total { margin-top: 18px; padding: 16px; background: var(--soft); border-radius: var(--radius); }
.budget-total p { margin: 4px 0; }
.budget-total strong { font-size: 1.2rem; color: var(--primary-dark); }
/* Vidéos TikTok intégrées aux articles */
.video-tiktok { max-width: 270px; margin: 20px auto 26px; text-align: center; }
.video-tiktok video { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 18px; background: #2b2420; box-shadow: var(--shadow); }
.video-tiktok figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
/* Fiches gratuites */
.fiche img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; }

.checklist{list-style:none;padding-left:0}
.checklist li{margin:6px 0}
/* Calculateur du coût de la litière */
#calcul-litiere { background: var(--soft); border-radius: var(--radius); padding: 16px; margin: 18px 0 24px; }
#calcul-litiere .calc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#calcul-litiere h3 { margin: 0 0 8px; font-size: 1.05rem; }
#calcul-litiere label { display: block; font-weight: 600; margin: 0 0 8px; font-size: .95rem; }
#calcul-litiere input { display: block; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; width: 100%; margin-top: 4px; background: #fff; }
#calcul-litiere .calc-res { margin: 6px 0 0; min-height: 1.4em; }
#calcul-litiere .calc-res strong { font-size: 1.2rem; color: var(--primary-dark); }
#calcul-litiere .calc-verdict { margin: 12px 0 0; font-weight: 700; }
@media (max-width: 480px) { #calcul-litiere .calc-cols { grid-template-columns: 1fr; } }

/* =========================================================
   Design 2026 : polices, motion design, mode sombre, favoris
   ========================================================= */
:root { --font-titre: "Fredoka", "Nunito", system-ui, sans-serif; --ease: cubic-bezier(.2, .7, .2, 1); }
h1, h2, h3, .logo, .btn, .nav-links a, .tag, .partage-titre { font-family: var(--font-titre); }
h1, h2, h3 { font-weight: 600; letter-spacing: .005em; }
h1 { font-weight: 700; }
.logo { font-weight: 700; letter-spacing: .01em; }
.btn { font-weight: 600; letter-spacing: .02em; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.article p, .article li { line-height: 1.75; }

/* Mode sombre */
[data-theme="dark"] {
  --bg: #1b1613; --surface: #252019; --text: #f2e9e1; --muted: #c9b9ab; --primary: #e0753f; --primary-dark: #ffa070;
  --accent: #4fb39c; --border: #3c322b; --soft: #2f2722; --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
[data-theme="dark"] .hero { background: radial-gradient(circle at 85% 20%, #4a2a18 0, transparent 45%), radial-gradient(circle at 10% 90%, #183a33 0, transparent 40%); }
[data-theme="dark"] .tag.green { background: #183a33; color: #8fdcc8; }
[data-theme="dark"] .tag.red { background: #4a1f1b; color: #ffb3aa; }
[data-theme="dark"] .card-img, [data-theme="dark"] .hero-illu img, [data-theme="dark"] .fiche img { filter: brightness(.92); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #1f1a16; color: var(--text); }
[data-theme="dark"] .jour.fait { background: #1d3530; border-color: #2c5a4f; }
[data-theme="dark"] #calcul-litiere input { background: #1f1a16; }
[data-theme="dark"] table th { background: var(--soft); }

/* Boutons de l'en-tête (thème) */
.nav-outils { display: flex; align-items: center; gap: 6px; }
.btn-theme { background: none; border: 1px solid var(--border); border-radius: 999px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; color: var(--text); transition: transform .4s var(--ease), background .2s; }
.btn-theme:hover { background: var(--soft); transform: rotate(25deg); }

/* Logo : patte qui bouge */
.logo { display: inline-block; transition: transform .3s var(--ease); }
.logo:hover { transform: rotate(-4deg) scale(1.04); }

/* Cartes : relief au survol */
.card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card-link:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(60, 35, 20, .14); border-color: #e7c7aa; }
.card-link .icon, .card-link .card-img { transition: transform .5s var(--ease); }
.card-link:hover .icon { transform: scale(1.08) rotate(-3deg); }
.card-link:hover .card-img { transform: scale(1.04); }
.card .icon { overflow: hidden; border-radius: 10px; }

/* Boutons : reflet lumineux */
.btn { position: relative; overflow: hidden; transition: background .2s, transform .25s var(--ease), box-shadow .25s; }
.btn::after { content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(180, 76, 28, .25); }
.btn:hover::after { animation: reflet .8s var(--ease); }
@keyframes reflet { to { left: 130%; } }

/* Héros : formes qui flottent */
.hero { position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; pointer-events: none; }
.hero::before { width: 220px; height: 220px; background: #ffd2b5; top: -60px; right: 8%; animation: flotte 9s ease-in-out infinite; }
.hero::after { width: 160px; height: 160px; background: #c9ebe1; bottom: -40px; left: 4%; animation: flotte 11s ease-in-out infinite reverse; }
[data-theme="dark"] .hero::before { background: #5a3420; } [data-theme="dark"] .hero::after { background: #1f4a40; }
.hero .container { position: relative; z-index: 1; }
.hero-illu img { animation: respire 6s ease-in-out infinite; }
@keyframes flotte { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18px, 22px) scale(1.06); } }
@keyframes respire { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Titres d'articles : soulignement dessiné */
.page-hero h1 { position: relative; }
.article h2 { position: relative; padding-bottom: 6px; }
.article h2::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 56px; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: left; transition: transform .8s var(--ease) .1s; }
.js-motion .article h2.reveal::after { transform: scaleX(0); }
.js-motion .article h2.reveal.vu::after { transform: scaleX(1); }

/* Apparition au défilement */
.js-motion .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delai, 0s); }
.js-motion .reveal.vu { opacity: 1; transform: none; }

/* Chiffres clés de l'accueil */
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; padding: 8px 0; }
.chiffres div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 10px; box-shadow: var(--shadow); }
.chiffres strong { display: block; font-family: var(--font-titre); font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--primary); line-height: 1.1; }
.chiffres span { color: var(--muted); font-weight: 700; font-size: .95rem; }
@media (max-width: 640px) { .chiffres { grid-template-columns: repeat(2, 1fr); } }

/* Bouton retour en haut */
.haut { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 1.3rem; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); z-index: 20; }
.haut.visible { opacity: 1; transform: none; pointer-events: auto; }
.haut:hover { transform: translateY(-3px); }

/* Favoris */
.btn-favori { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: 999px; padding: 8px 16px; cursor: pointer; margin: 4px 0 18px; transition: border-color .2s, transform .25s var(--ease); }
.btn-favori:hover { border-color: var(--primary); transform: translateY(-1px); }
.btn-favori .coeur { display: inline-block; transition: transform .35s var(--ease); }
.btn-favori[aria-pressed="true"] { border-color: var(--primary); color: var(--primary-dark); }
.btn-favori[aria-pressed="true"] .coeur { animation: battement .5s var(--ease); }
@keyframes battement { 30% { transform: scale(1.45); } 60% { transform: scale(.9); } }
.liste-favoris { list-style: none; padding: 0; display: grid; gap: 12px; }
.liste-favoris li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.liste-favoris a { font-weight: 700; }
.liste-favoris button { border: 0; background: none; cursor: pointer; font-size: 1.1rem; color: var(--muted); }

/* Photos */
.photo { margin: 0 0 24px; }
.photo img { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.photo figcaption a { color: var(--muted); }
.card .icon .card-photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-motion .reveal { opacity: 1; transform: none; }
}
/* Mode sombre : blocs à fond clair */
[data-theme="dark"] .callout { background: #18302b; }
[data-theme="dark"] .callout.warn { background: #3a1f1b; }
[data-theme="dark"] .choix-espece span, [data-theme="dark"] .quiz-choix, [data-theme="dark"] .outil input[type=number], [data-theme="dark"] .outil select { background: var(--surface); color: var(--text); }
[data-theme="dark"] .illu img, [data-theme="dark"] .card .icon .card-img { background: #f6efe6; }
[data-theme="dark"] .recherche-boite { background: var(--bg); }
[data-theme="dark"] .recherche-ligne input { background: var(--surface); color: var(--text); }
[data-theme="dark"] .v-oui { background: #183a33; color: #8fdcc8; }
[data-theme="dark"] .v-modere { background: #3d2e12; color: #ffd27a; }
[data-theme="dark"] .v-non { background: #4a1f1b; color: #ffb3aa; }
[data-theme="dark"] .card-link:hover { border-color: #6b4a33; }
[data-theme="dark"] .btn-outline:hover { color: #1b1613; }

/* Coach 5 minutes */
.coach-form { display: grid; gap: 18px; }
.coach-form input[type=text] { font: inherit; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; width: 100%; }
.coach-label { font-weight: 800; display: block; margin-bottom: 6px; }
.coach-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; margin: 12px 0; }
.coach-chiffres div { background: var(--soft); border-radius: var(--radius); padding: 12px 6px; }
.coach-chiffres strong { display: block; font-family: var(--font-titre); font-size: 1.5rem; color: var(--primary-dark); line-height: 1.2; }
.coach-chiffres span { display: block; color: var(--muted); font-weight: 700; font-size: .85rem; line-height: 1.3; }
.coach-semaine { display: flex; justify-content: space-between; gap: 6px; margin: 0 0 18px; }
.coach-semaine span { flex: 1; max-width: 44px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--border); color: var(--muted); font-weight: 800; font-size: .85rem; }
.coach-semaine span.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.coach-semaine span.auj:not(.ok) { border-color: var(--primary); border-style: dashed; }
.coach-seance { border-top: 1px solid var(--border); padding-top: 18px; }
.coach-seance ol { padding-left: 1.3em; }
.coach-seance li { margin-bottom: 8px; }
.coach-astuce { background: var(--soft); border-radius: var(--radius); padding: 12px 14px; }
.coach-minuteur { text-align: center; margin: 20px 0 6px; }
.coach-minuteur .btn-row { justify-content: center; margin-top: 16px; }
.coach-temps { font-family: var(--font-titre); font-size: clamp(3rem, 14vw, 4.6rem); font-weight: 700; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.coach-fin, .coach-etoile { font-weight: 800; color: var(--accent); }
.coach-etoile { font-size: 1.15rem; }
.coach-zone h3 { margin-top: 28px; }
.coach-parcours { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.coach-parcours li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; }
.coach-parcours li.attente { color: var(--muted); }
.coach-parcours li.encours { border-color: var(--primary); font-weight: 800; }
.coach-parcours li.acquis { background: #eef8f4; border-color: #b9e0d2; }
.coach-pastilles { display: flex; gap: 4px; flex: none; }
.coach-pastilles i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.coach-pastilles i.on { background: var(--accent); }
[data-theme="dark"] .coach-parcours li.acquis { background: #1d3530; border-color: #2c5a4f; }
[data-theme="dark"] .coach-form input[type=text] { background: #1f1a16; color: var(--text); }
/* Glossaire */
.gloss-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.gloss-nav a { display: inline-block; min-width: 2.2em; text-align: center; padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; font-weight: 800; background: var(--surface); }
.glossaire { margin: 0; }
.gloss-lettre { margin-top: 28px; }
.gloss-terme { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; scroll-margin-top: 90px; }
.gloss-terme dt { font-weight: 900; font-size: 1.05rem; scroll-margin-top: 90px; }
.gloss-terme dd { margin: 6px 0 0; }
.gloss-terme:target, .gloss-terme:has(dt:target) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.coach-zone { min-height: 290px; }
@media (max-width: 600px) { .coach-zone { min-height: 335px; } }
