/* WiT? · Wiki et index (C11). S'appuie sur les variables et les classes de fiche.css. */
.btn-retour { display: inline-flex; align-items: center; gap: 6px; font: 600 1rem/1.2 "Barlow Condensed", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); text-decoration: none; border: 1.5px solid var(--accent); border-radius: 999px; padding: 6px 14px; background: var(--surface); width: fit-content; }
.btn-retour:hover, .btn-retour:focus-visible { background: var(--accent); color: var(--accent-ink); }
.wp-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.wp-barre .btn-retour { margin: 0; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin: 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; }
a.card { text-decoration: none; }
a.card:hover, a.card:focus-visible { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.card h2 { font-size: 1.45rem; }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); }
.card .go { margin-top: auto; padding-top: 8px; font-family: var(--font-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; color: var(--accent); }
.prevues { margin: 6px 0 0; padding-left: 1.1em; font-size: .95rem; }
.prevues li { margin: 2px 0; color: var(--muted); }
.prevues li a { color: var(--accent); font-weight: 600; }
.prevues li.fait::marker { content: "✓ "; color: var(--good); }
.compte { font-family: var(--font-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; color: var(--muted); }

/* Chapitre */
.chap-tete { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { font-family: var(--font-label); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: .85rem; color: var(--ink); text-decoration: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--surface); }
.chips a:hover, .chips a:focus-visible { border-color: var(--accent); color: var(--accent); }
.wentree { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.wentree > h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.wentree p, .wentree li { max-width: 70ch; }
.wentree p { margin: 0; }
.bref { border-left: 4px solid var(--accent); padding: 6px 0 6px 14px; display: flex; flex-direction: column; gap: 4px; }
.bref p { font-size: 1.08rem; }
.bloc { display: flex; flex-direction: column; gap: 10px; }
.bloc h3 { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; color: var(--accent); }
:root[data-texte="doux"] .bloc h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 1.4rem; color: var(--accent); }
.bloc ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.tl .st p b { font-weight: 700; }
.quand { font-family: var(--font-label); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: .82rem; color: var(--muted); }
.wfig { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.wgrid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.wfig.deux .wgrid, .wfig.saisons .wgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.wfig.quatre .wgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); max-width: 760px; }
.wfig.trois .wgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.wfig.cycle .wgrid, .wfig.une .wgrid { max-width: 640px; }
.wfig.deux .wgrid { max-width: 620px; }
.wtab { border-collapse: collapse; background: var(--surface); border: 2px solid var(--ink); font-size: .95rem; min-width: min(100%, 420px); }
.wtab th, .wtab td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.wtab thead th { font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
.wtab tbody th { font-weight: 600; }
.coup { display: grid; gap: 0; border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); }
.coup div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.coup div:last-child { border-bottom: 0; }
.coup dt { font-family: var(--font-label); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .9rem; color: var(--accent); }
.coup dd { margin: 0; }
@media (max-width: 560px) { .coup div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.voir { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
a.mot { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a.mot:hover, a.mot:focus-visible { color: var(--accent); }
.cible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
.mots-ch { display: grid; gap: 10px; margin: 0; }
.mots-ch > div { background: var(--surface); border: 2px solid var(--ink); border-radius: 4px; padding: 10px 14px; scroll-margin-top: 16px; }
.mots-ch dt { font-weight: 700; font-size: 1.08rem; }
.mots-ch dd { margin: 4px 0 0; max-width: 70ch; }
.mots-ch .plus { margin-top: 4px; font-size: .92rem; color: var(--muted); }
.mots-ch .plus a, .src a, .lien-def { color: var(--accent); }
.avenir { color: var(--muted); }
.pied-chap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 32px; }

/* Index de A à Z */
.lettres { display: flex; flex-wrap: wrap; gap: 4px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.lettres a, .lettres span { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; font-family: var(--font-label); font-weight: 700; font-size: 1rem; border-radius: 4px; text-decoration: none; }
.lettres a { color: var(--ink); border: 1.5px solid var(--line); background: var(--surface); }
.lettres a:hover, .lettres a:focus-visible { border-color: var(--accent); color: var(--accent); }
.lettres span { color: var(--line); }
.chercher { width: 100%; max-width: 420px; font: inherit; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); color: var(--ink); }
.groupe { scroll-margin-top: 64px; margin-top: 18px; }
.groupe > h2 { font-size: 2rem; border-bottom: 3px solid var(--ink); padding-bottom: 2px; }
.index { list-style: none; margin: 0; padding: 0; }
.index > li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; scroll-margin-top: 64px; }
.index h3 { font-size: 1.12rem; }
.index p { margin: 0; }
.lien-def { font-weight: 600; }
.fiches { font-size: .95rem; }
.fiches a { color: var(--accent); }
.fiches details summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 2px; }
.index li.renvoi { flex-direction: row; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.index li.renvoi b { color: var(--ink); }
.index li.renvoi a { color: var(--accent); }
@media (max-width: 560px) { .lettres { position: static; gap: 3px; } .lettres a, .lettres span { min-width: 1.75rem; height: 1.75rem; font-size: .95rem; } }

/* Arbre pays › région › sous-région (chapitre des cépages) */
.bloc ul.arbre { padding-left: 0; list-style: none; gap: 6px; }
.bloc ul.arbre ul { padding-left: 1.1em; margin: 4px 0 2px; border-left: 2px solid var(--line); list-style: none; gap: 2px; }
.bloc ul.arbre > li { font-weight: 700; }
.bloc ul.arbre > li > ul > li { font-weight: 600; }
.bloc ul.arbre > li > ul > li > ul > li { font-weight: 400; }

/* Arômes et saveurs selon le climat (pages cépages) : couleurs des classes de chaleur de la page de classement */
.climats { display: grid; gap: 10px; margin: 10px 0 6px; }
.climat { background: var(--surface); border: 2px solid var(--ink); border-left: 8px solid var(--dot); border-radius: 4px; padding: 10px 14px; }
.climat .ck { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font: 700 1.05rem/1.2 var(--font-label, "Barlow Condensed"), system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.climat .ck .cq { font-weight: 500; text-transform: none; color: var(--muted); }
.climat .pt { width: .8em; height: .8em; border-radius: 50%; background: var(--dot); flex: none; }
.climat dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.climat dt { font-weight: 700; font-size: .92rem; }
.climat dd { margin: 0; }
@media (max-width: 520px) { .climat dl { grid-template-columns: 1fr; } .climat dd { margin-bottom: 4px; } }
.k-frais { --dot: var(--winter); } .k-tempere { --dot: var(--leaf); } .k-chaud { --dot: var(--summer); }

/* Arbre dépliable du xérès (31/10) : trait plein = obligatoire, pointillés = facultatif, fond lavé = type de vin */
.wfig.xeres .wgrid { max-width: 560px; }
.deplier { display: grid; gap: 6px; margin-top: 8px; }
.deplier details.dp { border-left: 3px solid var(--d-encre2); padding: 2px 0 2px 10px; }
.deplier details.dp.f { border-left-style: dashed; }
.deplier details.dp.br { border-left-width: 5px; }
.deplier details.dp.br > summary { font-size: 1.08em; }
.deplier details.dp > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 4px 0; font-weight: 600; list-style-position: outside; }
.deplier details.dp.t > summary .dp-t { background: color-mix(in srgb, var(--d-ciel-chaud) 45%, transparent); padding: 0 6px; border-radius: 3px; }
.deplier .dp-k { font: 600 .72rem/1.2 var(--font-ui, system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--d-encre2); }
.deplier details.dp.f > summary .dp-k { font-style: italic; }
.deplier .dp-c { padding-left: 4px; display: grid; gap: 6px; }
.deplier .dp-c > p { margin: 0 0 4px; }
.deplier .dp-e { font-weight: 600; }
.deplier .dp-a, .deplier .dp-r, .tl .st p.apport { margin: 0 0 4px; padding: 4px 8px; border-radius: 3px; background: color-mix(in srgb, var(--d-pre) 16%, transparent); }
.deplier .dp-r { background: color-mix(in srgb, var(--d-ciel-chaud) 30%, transparent); }
.tl .st p.apport { margin-top: 4px; font-size: .95em; }
.deplier .dp-w, .tl .st p.pourquoi { margin: 0 0 4px; padding: 4px 8px; border-left: 3px solid var(--d-encre2); font-size: .95em; }
.deplier details.dp.f > .dp-c > .dp-w, .tl .st p.pourquoi.f { border-left-style: dashed; }
