/* Page des 24 runes : une liste en pierres (trois familles de huit, chaque carte cliquable) ou en tableau, puis la fiche
   ouverte par-dessus la page par assets/js/runes.js. Habillage « crème et blé ». */

.oracle { padding: 0 14px 24px; }
.crumbs { display: flex; gap: 8px; padding-top: 24px; color: var(--soft); font-size: .88rem; }
.oracle .hero { padding-top: 6px; }

/* ---------- La liste : titre, choix de la vue, puis les pierres ou le tableau ---------- */
.pick { margin-top: 26px; scroll-margin-top: 14px; }
.pick__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.pick__head h2 { margin: 0; color: var(--green); font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.switch { display: inline-flex; gap: 4px; padding: 5px; border: 3px solid #e9d8a8; border-radius: 999px; background: linear-gradient(#fffdf6, #fbeec9); box-shadow: 0 0 0 2px #a3854a, 0 14px 24px -16px rgba(80, 48, 5, .7); }
.switch button { display: inline-flex; align-items: center; gap: 9px; padding: 9px 20px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: 700 .92rem var(--font-sans); cursor: pointer; transition: background-color .2s, color .2s; }
.switch button:hover { background: #fff; }
.switch button[aria-selected="true"] { background: radial-gradient(ellipse at 50% 20%, #3d7447, #1f4a2a 60%, #102d18); color: #fff5da; }
.switch button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 599.98px) { .pick__head { justify-content: center; text-align: center; } .switch button { padding: 8px 15px; font-size: .85rem; } }
.view__title { margin: 30px 0 12px; color: var(--green); text-align: center; }
.oracle.is-enhanced .view__title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* une famille de huit runes par panneau, chacune sa couleur */
.aett--1 { --band: #f8e5b6; --soft-band: #fcf1d6; --edge: #c99a46; }
.aett--2 { --band: #dfe6cd; --soft-band: #eef2e3; --edge: #7d9b6a; }
.aett--3 { --band: #f2d9c4; --soft-band: #faeadd; --edge: #b4764c; }
.aett { margin-top: 16px; padding: 16px 8px 8px; border: 2px solid var(--edge); border-radius: 28px; background: linear-gradient(var(--band), var(--soft-band)); box-shadow: var(--shadow); }
.aett__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; margin-bottom: 12px; }
.aett__head h3 { margin: 0; color: var(--green); font-size: 1.35rem; }
.aett__head p { margin: 0; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: var(--soft); font-size: .8rem; font-weight: 600; }
@media (min-width: 640px) { .aett { padding: 18px 18px 18px; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.tiles li { display: grid; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px 12px; border: 2px solid transparent; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-align: center; text-decoration: none; transition: translate .2s ease, border-color .2s, background-color .2s; }
/* pastille « + » : la carte s'ouvre */
.tile::after { content: "+"; position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #f6ead0; color: var(--green); font-size: 1.05rem; line-height: 1; transition: background-color .2s, color .2s; }
.tile .stone { width: 70%; max-width: 92px; transition: scale .3s cubic-bezier(.2, 1.4, .4, 1), rotate .3s ease, filter .3s; }
.tile strong { color: var(--green); font-family: var(--font-serif); font-size: 1.2rem; font-weight: 400; line-height: 1.25; }
.tile small { color: var(--soft); font-size: .78rem; line-height: 1.35; }
.tile:hover, .tile:focus-visible { translate: 0 -5px; border-color: var(--gold); background: #fffaec; color: var(--ink); }
.tile:hover::after, .tile:focus-visible::after { background: var(--green); color: #fbeed0; }
.tile:hover .stone { scale: 1.12; rotate: -8deg; filter: drop-shadow(0 0 12px rgba(255, 205, 80, .85)); }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tile:active { translate: 0 0; scale: .97; }
.tile.is-last { border-color: var(--green); }          /* la dernière rune lue */
@media (min-width: 640px) { .tiles { gap: 12px; } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 639.98px) {
	.tile { padding: 10px 1px 9px; border-radius: 15px; }
	.tile::after { right: 3px; top: 3px; width: 17px; height: 17px; font-size: .85rem; }
	.tile strong { font-size: .8rem; }
	.tile small { display: none; }
}
/* ---------- Fiche d'une rune ---------- */
.sheets { display: grid; gap: 20px; max-width: 860px; margin: 34px auto 0; }
.oracle.is-enhanced .sheets, .oracle.is-enhanced .sheet__back { display: none; }
.sheet { padding: clamp(20px, 3.6vw, 38px); scroll-margin-top: 14px; }
.sheets .sheet { border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.sheet__head { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; align-items: center; }
.sheet__head .ring { width: 170px; }
.sheet__head .eyebrow { padding-right: 40px; }
.sheet__head h3 { margin: 0 0 8px; color: var(--green); font-size: clamp(2.1rem, 6vw, 3rem); line-height: 1.1; }
.sheet__head h3 span { color: var(--accent); font-family: var(--font-rune); }
.sheet__keywords { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sheet__keywords li { padding: 3px 14px; border-radius: 999px; background: var(--green); color: #fbeed0; font-size: .84rem; font-weight: 600; }
.sheet__fixed { margin: 10px 0 0; color: var(--soft); font-size: .86rem; font-style: italic; }
.sheet__parts { display: grid; gap: 12px; margin-top: 22px; }
.sheet__part { padding: 14px 20px 16px; border-left: 5px solid var(--gold); border-radius: 16px; background: #fdf3da; }
.sheet__part--love { border-left-color: #b8455c; background: #fdecea; }
.sheet__part--spirit { border-left-color: #567a4f; background: #eff3e4; }
.sheet__part--advice { border-left-color: var(--green); background: #fffaec; box-shadow: inset 0 0 0 1px var(--parchment-edge); }
.sheet__part h4 { margin: 0 0 4px; color: var(--green); font: 400 1.2rem/1.3 var(--font-serif); }
.sheet__part p { margin: 0; text-wrap: pretty; }
.sheet__back { margin: 16px 0 0; text-align: center; }
/* sur grand écran, les quatre textes se lisent d'un seul coup d'œil */
@media (min-width: 760px) { .sheet__parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599.98px) {
	.sheet__head { grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; text-align: center; }
	.sheet__head .ring { width: 130px; }
	.sheet__head .eyebrow { padding: 0 28px; letter-spacing: .16em; }
	.sheet__keywords { justify-content: center; }
}

.sheet__full { margin: 18px 0 0; text-align: center; }

/* ---------- Tableau : une ligne par rune, la pierre et le nom mènent à sa page ---------- */
.oracle-table { overflow-x: auto; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.oracle-table table { width: 100%; border-collapse: collapse; font-size: .95rem; text-align: left; }
.oracle-table th, .oracle-table td { padding: 8px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.oracle-table thead th { padding-block: 12px; background: #fffaec; color: var(--green); font-family: var(--font-serif); font-weight: 400; }
.oracle-table__group th { padding: 7px 14px; border-left: 6px solid var(--edge); background: var(--band); color: var(--green); font: 400 1.1rem var(--font-serif); }
.oracle-table tbody th a { display: flex; align-items: center; gap: 10px; color: var(--green); font-family: var(--font-serif); font-size: 1.15rem; font-weight: 400; text-decoration: none; white-space: nowrap; }
.oracle-table tbody th a span { border-bottom: 2px solid var(--gold); }
.oracle-table tbody th a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.oracle-table .stone { width: 40px; max-width: none; transition: scale .25s cubic-bezier(.2, 1.4, .4, 1), rotate .25s ease; }
.oracle-table tbody tr:not(.oracle-table__group):hover { background: #fdf3da; }
.oracle-table tbody tr:hover .stone { scale: 1.14; rotate: -8deg; }
@media (max-width: 560px) { .oracle-table th, .oracle-table td { padding: 7px 6px; } .oracle-table table { font-size: .82rem; } .oracle-table tbody th a { gap: 5px; font-size: .95rem; } .oracle-table .stone { width: 28px; } }
@media (max-width: 479.98px) { .oracle-table thead th:nth-child(2), .oracle-table tbody td:nth-of-type(1) { display: none; } }

@media (max-width: 399.98px) { .oracle-table .stone { display: none; } .oracle-table table { font-size: .78rem; } .oracle-table__group th { padding-inline: 8px; } }

/* ---------- Comprendre les runes ---------- */
.learn__more { margin: 34px 0 0; text-align: center; }
.learn { max-width: 1160px; padding: 14px 14px 20px; }
.learn > h2 { margin-bottom: 52px; color: var(--green); font-size: clamp(1.5rem, 3.6vw, 2.1rem); text-align: center; }
.learn__cards { display: grid; gap: 52px 22px; }
@media (min-width: 800px) { .learn__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.learn__card { position: relative; padding: 52px clamp(18px, 3.4vw, 36px) 14px; border-top: 6px solid var(--tone); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.learn__card--history { --tone: #274670; --tone-light: #5d80ad; }
.learn__card--reversed { --tone: #4d3a63; --tone-light: #8a74a6; }
.learn__medal { position: absolute; left: 50%; top: -39px; display: grid; place-items: center; width: 72px; height: 72px; translate: -50% 0; border: 4px solid #e9d8a8; border-radius: 50%; background: radial-gradient(circle at 38% 30%, var(--tone-light), var(--tone)); box-shadow: 0 0 0 2px #a3854a; }
.learn__medal svg { width: 56%; height: 56%; fill: #fff6df; }
.learn__card h3 { margin: 0 0 12px; color: var(--green); font-size: 1.35rem; text-align: center; }
.learn__card p { margin: 0 0 .9em; text-wrap: pretty; }
/* ---------- Fenêtre de lecture ---------- */
html.is-reading { overflow: hidden; }
html { scrollbar-gutter: stable; }                     /* la page ne se décale pas quand le défilement est bloqué */
.reader { width: min(980px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); padding: 0; overflow: hidden; border: 3px solid #e9d8a8; border-radius: 30px; background: #fffdf6; box-shadow: 0 0 0 2px #a3854a, 0 30px 60px rgba(30, 16, 0, .55); color: var(--ink); }
.reader[open] { display: flex; animation: readerIn .35s cubic-bezier(.2, 1.2, .4, 1) both; }
.reader::backdrop { background: rgba(50, 30, 5, .6); }
.reader__box { position: relative; display: flex; flex-direction: column; width: 100%; min-height: 0; }
.reader__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.reader__body:focus { outline: none; }
.reader__close { position: absolute; right: 24px; top: 12px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0 0 4px; border: 2px solid #e9d8a8; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #a3854a; color: #fff5da; font: 400 1.8rem/1 var(--font-sans); cursor: pointer; }
.reader__nav { display: flex; flex: none; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 2px solid var(--line); background: linear-gradient(#fdf4dc, #f9e8bd); }
/* même style que les boutons des pages de runes (rune.css), en plus compact */
.reader__turn { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 280px; padding: 6px 10px; border: 3px solid #e9d8a8; border-radius: 999px; background: linear-gradient(120deg, #f6dd9f, #fcefcb); box-shadow: 0 0 0 2px #a3854a; color: var(--green); font: inherit; text-align: left; cursor: pointer; transition: filter .2s; }
.reader__turn--next { flex-direction: row-reverse; text-align: right; }
.reader__turn::before { content: ""; flex: none; width: 40px; height: 40px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4.5 7.5 12 15 19.5' fill='none' stroke='%23fff3d2' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 50% no-repeat, radial-gradient(circle at 40% 30%, #3d7447, #17361c); box-shadow: 0 0 0 2px #e9d8a8; }
.reader__turn--next::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4.5 16.5 12 9 19.5' fill='none' stroke='%23fff3d2' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), radial-gradient(circle at 40% 30%, #3d7447, #17361c); }
.reader__turn img { flex: none; width: 42px; height: auto; }
.reader__turn span { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.2; }
.reader__turn small { color: #7a4c10; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.reader__turn strong { overflow: hidden; font-family: var(--font-serif); font-size: 1.4rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.reader__turn:hover { filter: brightness(1.05); }
.reader__close:focus-visible, .reader__turn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.reader .sheet:not([hidden]) { animation: sheetIn .35s ease both; }
.reader .sheet[data-way="1"] { --from: 40px; }
.reader .sheet[data-way="-1"] { --from: -40px; }
@keyframes readerIn { from { opacity: 0; translate: 0 30px; scale: .94; } }
@keyframes sheetIn { from { opacity: 0; translate: var(--from, 0) 0; } }
.reader.is-reduced, .reader.is-reduced .sheet { animation: none !important; }
/* sur mobile, la fiche occupe tout l'écran */
@media (max-width: 599.98px) {
	.reader { width: 100%; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
	.reader__turn { gap: 6px; padding: 5px 7px; }
	.reader__turn::before { width: 30px; height: 30px; }
	.reader__turn img { width: 32px; }
	.reader__turn small { font-size: .66rem; letter-spacing: .02em; }
	.reader__turn strong { font-size: 1.15rem; }
}
@media (max-width: 399.98px) { .reader__turn img { display: none; } }   /* très petit écran : le nom garde sa taille */
/* écrans d'ordinateur peu hauts : fiche resserrée pour limiter le défilement */
@media (min-width: 760px) and (max-height: 900px) {
	.reader .sheet { padding: 18px 28px; }
	.reader .sheet__head { grid-template-columns: 112px minmax(0, 1fr); gap: 22px; }
	.reader .sheet__head .ring { width: 112px; }
	.reader .sheet__head h3 { margin-bottom: 4px; font-size: 2.1rem; }
	.reader .sheet__fixed { margin-top: 5px; }
	.reader .sheet__parts { gap: 10px; margin-top: 14px; }
	.reader .sheet__part { padding: 9px 16px 11px; font-size: .94rem; line-height: 1.5; }
	.reader .sheet__part h4 { font-size: 1.08rem; }
	.reader__nav { padding-block: 7px; }
}
