/* Art et Thé : DA « Échelle d'infusion ». CSS statique pur, aucune dépendance.
   Ratio visuel : 70 % céladon, 20 % aplats de liqueur, 10 % encre (pied de page). */
:root {
  --celadon: #E6EBE3;
  --celadon-fonce: #D5DDD1;
  --encre: #26302B;
  --encre-douce: #46504A;
  --matcha: #5E7A3C;
  --oolong: #B9772A;
  --samovar: #8E2F22;
  --chai: #6B4A33;
  /* Variantes sûres pour le TEXTE sur céladon (AA vérifié par scripts/contraste.py) */
  --t-japon: #46602A;
  --t-chine: #7A4E10;
  --t-russie: #8E2F22;
  --t-inde: #6B4A33;
  --t-arts: #6B4A33;
  --t-infuser: #26302B;
  /* Le pinyin (ǎ ǐ ǒ ǔ) manque à Newsreader et à Marcellus : Noto Serif SC prend le relais avant Georgia */
  --f-titre: var(--f-marcellus), var(--f-noto-sc), Georgia, serif;
  --f-texte: var(--f-newsreader), var(--f-noto-sc), Georgia, 'Times New Roman', serif;
  --col: 760px;
  --large: 1160px;
  --liq: var(--chai);
  --liq-t: var(--t-arts);
}
.rub-japon { --liq: var(--matcha); --liq-t: var(--t-japon); }
.rub-chine { --liq: var(--oolong); --liq-t: var(--t-chine); }
.rub-russie { --liq: var(--samovar); --liq-t: var(--t-russie); }
.rub-inde { --liq: var(--chai); --liq-t: var(--t-inde); }
.rub-arts { --liq: var(--chai); --liq-t: var(--t-arts); }
.rub-infuser { --liq: var(--encre); --liq-t: var(--t-infuser); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--celadon); color: var(--encre); font-family: var(--f-texte); font-size: 18px; line-height: 1.65; font-synthesis: none; text-rendering: optimizeLegibility; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--encre); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--liq-t); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--encre); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Écritures d'origine : polices dédiées, secours système vérifiés */
[lang^="ja"] { font-family: var(--f-noto-jp); }
[lang^="zh"] { font-family: var(--f-noto-sc); }
[lang^="ru"] { font-family: var(--f-newsreader), Georgia, "Times New Roman", "Noto Serif", serif; }
[lang^="hi"] { font-family: "Nirmala UI", "Noto Serif Devanagari", "Kohinoor Devanagari", "Mangal", var(--f-newsreader); }
i[lang$="-Latn"] { font-family: var(--f-texte); }

/* Titres : Marcellus, capitales et bas de casse, jamais en capitales espacées */
h1, h2, h3, h4 { font-family: var(--f-titre); font-weight: 400; line-height: 1.2; letter-spacing: 0; text-wrap: balance; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 1.95rem); margin-top: 2.2em; }
h3 { font-size: 1.3rem; margin-top: 1.8em; }
p { margin: 0 0 1.15rem; }

.container { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 20px; }
.container--read { max-width: calc(var(--col) + 40px); }

/* En-tête */
.site-header { background: var(--celadon); border-bottom: 1px solid var(--celadon-fonce); }
.site-header__inner { max-width: var(--large); margin: 0 auto; padding: .8rem 20px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--encre); }
.brand:hover { color: var(--encre); }
.brand__mark { flex: none; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--f-titre); font-size: 1.7rem; }
.brand__sub { font-size: .95rem; color: var(--encre-douce); font-style: italic; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.site-nav a { text-decoration: none; display: block; padding: .35rem 0; }
.site-nav--haut a { font-size: .98rem; }
.site-nav--piliers { max-width: var(--large); margin: 0 auto; padding: 0 20px; }
.site-nav--piliers ul:first-child { padding: .15rem 0 .6rem; gap: .2rem 1.9rem; }
.site-nav--piliers li { border-top: 4px solid var(--liq); padding-top: .15rem; }
.site-nav--piliers a { font-family: var(--f-titre); font-size: 1.12rem; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav__mobile { display: none !important; }
.nav-toggle { display: none; font: inherit; font-family: var(--f-titre); background: transparent; color: var(--encre); border: 1px solid var(--encre); padding: .45rem .9rem; border-radius: 3px; cursor: pointer; }

/* Anti-distorsion (REGLE 14) */
.img-hero { width: 100%; aspect-ratio: 16 / 9; max-height: min(75vh, 44vw); overflow: hidden; background: var(--celadon-fonce); }
.img-card, .img-body { aspect-ratio: 3 / 2; overflow: hidden; background: var(--celadon-fonce); display: block; }
.img-portrait { aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; }
.img-hero img, .img-card img, .img-body img, .img-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.herofig { margin: 0; }
.herofig__cap { font-size: .9rem; color: var(--encre-douce); padding: .5rem 0 0; }
.fig { margin: 2rem 0; max-width: var(--col); }
.fig figcaption, .credit { font-size: .88rem; color: var(--encre-douce); line-height: 1.45; }
.fig figcaption { padding-top: .45rem; }

/* Signature : la bande d'infusion (4 plages, de la plus claire à la plus sombre) */
.bande { display: flex; width: 100%; }
.bande span { flex: 1; display: block; }
.bande span:nth-child(1) { background: color-mix(in srgb, var(--liq) 28%, var(--celadon)); }
.bande span:nth-child(2) { background: color-mix(in srgb, var(--liq) 52%, var(--celadon)); }
.bande span:nth-child(3) { background: color-mix(in srgb, var(--liq) 76%, var(--celadon)); }
.bande span:nth-child(4) { background: var(--liq); }
.bande--fine { height: 6px; }
.bande--haute { height: 14px; }
.bande--japon { --liq: var(--matcha); }
.bande--chine { --liq: var(--oolong); }
.bande--russie { --liq: var(--samovar); }
.bande--inde { --liq: var(--chai); }
.bande--arts { --liq: var(--chai); }
.bande--infuser { --liq: var(--encre); }
/* Une seule animation, à l'accueil : la bande infuse, plage après plage. Jamais sous prefers-reduced-motion. */
@keyframes infusion { from { background: var(--celadon); } }
@media (prefers-reduced-motion: no-preference) {
  .bande[data-anime="oui"] span { animation: infusion 1.1s ease-out backwards; }
  .bande[data-anime="oui"] span:nth-child(1) { animation-delay: .2s; }
  .bande[data-anime="oui"] span:nth-child(2) { animation-delay: .65s; }
  .bande[data-anime="oui"] span:nth-child(3) { animation-delay: 1.1s; }
  .bande[data-anime="oui"] span:nth-child(4) { animation-delay: 1.55s; }
}

/* Mot d'origine */
.motorigine { display: flex; align-items: center; gap: 1.1rem; margin: 0 0 1.1rem; }
.motorigine__ecr { font-size: clamp(2.6rem, 2rem + 3vw, 4rem); line-height: 1; color: var(--liq-t); white-space: nowrap; }
.motorigine__texte { display: flex; flex-direction: column; border-left: 4px solid var(--liq); padding-left: 1rem; line-height: 1.3; }
.motorigine__trans { font-size: 1.25rem; }
.motorigine__fr { font-size: .98rem; color: var(--encre-douce); }

/* Corps de page */
.page { padding-top: 1.2rem; padding-bottom: 4rem; }
.page__head { margin: 1rem 0 1.6rem; }
.page__meta { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; font-size: .95rem; color: var(--encre-douce); margin: 0; }
.page__cat { color: var(--liq-t); font-family: var(--f-titre); font-size: 1.05rem; }
.crumbs { font-size: .92rem; margin-bottom: .4rem; }
.crumbs .bande { width: 4.5rem; height: 6px; margin-bottom: .5rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem .6rem; }
.crumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--encre-douce); }
.chapeau { font-size: 1.22rem; color: var(--encre-douce); max-width: 36rem; }
.prose { max-width: var(--col); }
.prose > p, .prose > ul, .prose > ol { max-width: 35rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.8rem 0; padding: .3rem 0 .3rem 1.4rem; border-left: 4px solid var(--liq); font-style: italic; max-width: var(--col); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table:not(.carte-infusion) { width: 100%; border-collapse: collapse; font-size: .96rem; margin: 1.4rem 0; }
.prose th, .prose td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--celadon-fonce); vertical-align: top; }

/* Info-bulle Terme : transcription en italique, écriture + traduction au survol ou au focus */
.terme { position: relative; display: inline; }
.terme__mot { text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: .22em; cursor: help; }
.terme__mot i { font-style: italic; }
.terme__tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); margin-left: var(--tip-dx, 0px); z-index: 30; width: max-content; max-width: 15rem; background: var(--encre); color: #fff; font-size: .9rem; line-height: 1.4; padding: .45rem .75rem; border-radius: 3px; font-style: normal; text-align: center; display: none; pointer-events: none; }
.terme__ecr { font-size: 1.15rem; margin-right: .3rem; }
.terme:hover .terme__tip, .terme:focus-within .terme__tip { display: block; }

/* Carte d'infusion */
.carte-infusion { width: 100%; max-width: 30rem; border-collapse: collapse; margin: 0 0 2rem; background: #F3F6F1; border-top: 6px solid var(--liq); font-size: 1rem; }
.carte-infusion caption { text-align: left; font-family: var(--f-titre); font-size: 1.15rem; padding: .7rem .9rem .3rem; caption-side: top; background: #F3F6F1; }
.carte-infusion th, .carte-infusion td { text-align: left; padding: .45rem .9rem; border-bottom: 1px solid var(--celadon-fonce); }
.carte-infusion th { font-weight: 600; width: 45%; }
.carte-infusion tfoot td { font-size: .9rem; color: var(--encre-douce); border: 0; }

.toc { background: #F3F6F1; border-left: 4px solid var(--liq); padding: 1rem 1.3rem; margin: 0 0 2rem; max-width: var(--col); }
.toc__titre { font-family: var(--f-titre); font-size: 1.15rem; margin: 0 0 .4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.faq { margin: 3rem 0 2rem; max-width: var(--col); }
.faq__item { border-top: 1px solid var(--celadon-fonce); padding: .8rem 0; }
.faq__item summary { cursor: pointer; font-family: var(--f-titre); font-size: 1.12rem; }
.faq__item p { margin: .6rem 0 0; }
.sources { margin: 2.5rem 0 0; max-width: var(--col); font-size: .95rem; }
.sources ul { padding-left: 1.2rem; }
.sources__verif { color: var(--encre-douce); }

/* Cards et blog */
.filtre { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.filtre__btn { text-decoration: none; padding: .4rem .9rem; border: 1px solid var(--encre); border-radius: 3px; font-family: var(--f-titre); font-size: 1rem; }
.filtre__btn[aria-current="page"] { background: var(--encre); color: #fff; }
.filtre__etat { min-height: 1.5rem; color: var(--encre-douce); }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem 1.6rem; }
.grille__item[hidden] { display: none; }
.card { background: #F3F6F1; display: flex; flex-direction: column; height: 100%; }
.card__corps { padding: 1rem 1.1rem 1.2rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-size: .92rem; color: var(--encre-douce); margin: 0 0 .4rem; }
.card__cat { font-family: var(--f-titre); font-size: 1.02rem; color: var(--liq-t); }
.card__titre { font-size: 1.28rem; margin: 0 0 .5rem; }
.card__titre a { text-decoration: none; }
.card__titre a:hover { text-decoration: underline; }
.card__extrait { font-size: .98rem; margin: 0 0 .6rem; }
.card__mot { margin: 0; font-size: 1.25rem; color: var(--encre-douce); }

/* Accueil */
.home-intro { padding: 1.6rem 0 .5rem; max-width: 46rem; }
.sec { padding: 2.2rem 0; }
.sec__titre { margin-top: 0; }
.piliers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.pilier { display: block; text-decoration: none; background: #F3F6F1; height: 100%; }
.pilier__corps { padding: .9rem 1rem 1.1rem; display: flex; gap: .9rem; align-items: center; }
.pilier__ecr { font-size: 2.3rem; line-height: 1; color: var(--liq-t); min-width: 2.6rem; }
.pilier__nom { font-family: var(--f-titre); font-size: 1.15rem; display: block; }
.pilier__fr { font-size: .92rem; color: var(--encre-douce); }
.pilier:hover .pilier__nom { text-decoration: underline; }

/* Pied de page : l'encre (10 %) */
.site-footer { background: var(--encre); color: #fff; margin-top: 3rem; padding: 2.6rem 0 1.4rem; font-size: .98rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer__marque { font-family: var(--f-titre); font-size: 1.6rem; margin: 0 0 .3rem; }
.site-footer__titre { font-family: var(--f-titre); font-size: 1.1rem; margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer__indep { color: #D5DDD1; max-width: 30rem; }
.site-footer__bas { border-top: 1px solid #46504A; margin-top: 1.8rem; padding-top: 1rem; color: #D5DDD1; font-size: .9rem; }

/* Formulaire de contact */
.contact { max-width: 36rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--f-titre); margin-bottom: .3rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid var(--encre); border-radius: 3px; background: #F7F9F5; color: var(--encre); }
.field--piege { position: absolute; left: -9999px; }
.btn { font: inherit; font-family: var(--f-titre); background: var(--encre); color: #fff; border: 0; padding: .7rem 1.4rem; border-radius: 3px; cursor: pointer; }
.btn:hover { background: var(--chai); }
.contact__etat { min-height: 1.5rem; margin-top: .8rem; }
.contact__etat[data-ok="1"] { color: var(--t-japon); }
.contact__etat[data-ok="0"] { color: var(--samovar); }


@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; }
  .site-nav--haut { display: none; }
  .nav-toggle { display: inline-block; }
  .site-nav--piliers { display: none; padding: 0 20px .8rem; }
  .site-nav--piliers.is-open { display: block; }
  .site-nav--piliers ul:first-child { flex-direction: column; gap: .2rem; padding: .3rem 0; }
  .site-nav--piliers li { border-top: 0; border-left: 5px solid var(--liq); padding: 0 0 0 .7rem; }
  .site-nav__mobile { display: flex !important; flex-direction: column; border-top: 1px solid var(--celadon-fonce); margin-top: .5rem; padding-top: .4rem; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .brand__name { font-size: 1.4rem; }
  .brand__sub { font-size: .85rem; }
  .motorigine { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .grille { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Prompt 02 : accueil, « Sur ce thème », citation d'indépendance */
.sec__suite { margin: 1.2rem 0 0; font-family: var(--f-titre); }
.memoire { border-top: 1px solid var(--celadon-fonce); }
.memoire p { max-width: 35rem; }
.surtheme { margin: 2.4rem 0 0; }
.surtheme ul { padding-left: 1.2rem; }
.surtheme__date { color: var(--encre-douce); font-size: .92rem; margin-left: .5rem; }
.filtre__n { font-size: .9rem; opacity: .85; }

.table-scroll { overflow-x: auto; max-width: 100%; margin: 1.4rem 0; }
.table-scroll table:not(.carte-infusion) { margin: 0; min-width: 30rem; }
.table-scroll:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

/* Prompt 02 : le recadrage du bandeau garde le sujet (mains, bol, verseuse) : ancrage vertical à 28 %, headroom conservé */
.img-hero img { object-position: center 28%; }

/* Classes de structure (marqueurs de gabarit, sans effet visuel propre) */
.terme__fr { font-style: normal; }
.card__img { display: block; }
.page--article { position: relative; }
.page--pilier { position: relative; }
