/* =========================================================
   Chapitre VI — Référentiels
   Complète chapitre.css.
   ========================================================= */

/* section 1 */
.avec-image { display: block; flex: none; }
.avec-image::after { content: ""; display: block; clear: both; }
.avec-image .texte { margin: 0 0 calc(8 * var(--u)); }
.page .flottant { float: right; width: 40%; margin: calc(2 * var(--u)) 0 calc(6 * var(--u)) calc(16 * var(--u)); display: block; }
.page .flottant img, .page .observation img { display: block; width: 100%; height: auto; box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(0,0,0,.35); }
.page .flottant figcaption, .page .observation figcaption { font-size: calc(13 * var(--u)); line-height: 1.25; margin-top: calc(4 * var(--u)); color: var(--encre-douce); font-style: italic; }
.page .observation { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.page .observation img { flex: 1 1 0; min-height: 0; object-fit: contain; object-position: center top; box-shadow: none; }

/* l'animation */
.figure-anim { flex: 1 1 0; min-height: 0; gap: calc(6 * var(--u)); }
.figure-anim svg { flex: 1 1 0; min-height: 0; width: 100%; display: block; user-select: none; -webkit-user-select: none; }
.commandes { flex: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: calc(6 * var(--u)) calc(14 * var(--u)); font-family: var(--serif); font-size: calc(16 * var(--u)); color: var(--encre); }
.commandes label { display: flex; align-items: center; gap: calc(8 * var(--u)); font-style: italic; }
.commandes input[type="range"] { width: calc(170 * var(--u)); accent-color: #24467f; }
.commandes output { font-weight: 700; min-width: 9em; }
.commandes button { font: inherit; font-family: var(--capitales); font-size: calc(15 * var(--u)); letter-spacing: .05em; padding: calc(3 * var(--u)) calc(14 * var(--u)); cursor: pointer; color: var(--encre); background: transparent; border: 1px solid rgba(122,90,28,.6); border-radius: 999px; }
.commandes button:hover { background: rgba(214,180,108,.35); }
.bascule { display: inline-flex; }
.bascule button { border-radius: 0; }
.bascule button:first-child { border-radius: 999px 0 0 999px; }
.bascule button + button { border-radius: 0 999px 999px 0; border-left: none; }
.bascule button[aria-pressed="true"] { background: #24467f; color: #fbf6ea; border-color: #24467f; }

.ref-etoiles circle { fill: #e8eefc; opacity: .55; }
.zodiaque .anneau-signes { fill: none; stroke: rgba(214,180,108,.08); stroke-width: 40; }
.zodiaque .trait { fill: none; stroke: #8fa6c2; stroke-width: 1; stroke-opacity: .55; }
.zodiaque .trait.fin { stroke-opacity: .3; }
.zodiaque .signe { font: 22px "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols", serif; fill: #d6b46c; text-anchor: middle; }
.zodiaque .signe-oph path { fill: none; stroke: #d6b46c; stroke-width: 1.8; stroke-linecap: round; }
.zodiaque .mois { font: 600 14px var(--capitales); letter-spacing: .12em; fill: #c9d6e8; fill-opacity: .7; text-anchor: middle; dominant-baseline: central; }
.orbite { fill: none; stroke-width: 1.4; }
.o-terre { stroke: #5aa9e6; } .o-mars { stroke: #e0574a; stroke-dasharray: 3 3; } .o-lune { stroke: #b7bec7; stroke-opacity: .7; } .o-soleil { stroke: #ffd34d; stroke-dasharray: 4 4; }
.trace-mars { fill: none; stroke: #ff7a6b; stroke-width: .8; stroke-opacity: .8; stroke-linejoin: round; }
.visee { stroke-width: 1.4; stroke-dasharray: 6 4; }
.v-mars { stroke: #ff7a6b; } .v-soleil { stroke: #ffd34d; }
.repere { stroke: #fff; stroke-width: 1.5; } .r-mars { fill: #e0574a; } .r-soleil { fill: #ffd34d; }
.nom-repere { font: italic 700 15px var(--serif); fill: #ff6a5c; text-anchor: middle; paint-order: stroke; stroke: #0b1626; stroke-width: 3px; }
.deferent { fill: none; stroke: #7fc98a; stroke-width: 1.4; }
.epicycle { fill: none; stroke: #b48ae0; stroke-width: 1.4; }
.rayon-epi { stroke: #b48ae0; stroke-width: 1.6; }
.centre-epi { fill: #7fc98a; }
.cercle-int { fill: none; stroke: #ffd34d; stroke-opacity: .6; stroke-width: 1.2; stroke-dasharray: 2 3; }
.rayon-int { stroke: #ffd34d; stroke-width: 1.6; }
.a-soleil { fill: #ffe066; stroke: #ffb703; stroke-width: 1.5; }
.a-terre { fill: #3c8fd9; stroke: #cfe6ff; stroke-width: 1.2; }
.a-lune { fill: #b9bec5; }
.a-mars { fill: #e0574a; stroke: #ffc2b8; stroke-width: 1; }
.retro { font: italic 700 16px var(--serif); fill: #ff9a8c; text-anchor: middle; }
.legende-ref text { font: 13px var(--serif); fill: #c9d6e8; }

/* page de droite : options et explications */
.options { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: calc(6 * var(--u)); padding-right: calc(4 * var(--u)); }
.option { border: 1px solid #c8b48a; background: rgba(251,246,234,.75); padding: calc(5 * var(--u)) calc(12 * var(--u)); }
.option label { display: flex; align-items: center; gap: calc(8 * var(--u)); font-family: var(--serif); font-weight: 700; font-size: calc(17 * var(--u)); color: #24467f; cursor: pointer; }
.option input { accent-color: #24467f; width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.option .explication { margin: calc(3 * var(--u)) 0 calc(2 * var(--u)); font-size: calc(15.5 * var(--u)); line-height: 1.3; text-align: justify; color: var(--encre); }
.option .explication[hidden] { display: none; }

@media (max-width: 760px) {
  .figure-anim svg { flex: none; height: auto; }
  .page .flottant { float: none; width: 100%; margin: 0 0 8px; }
  .options { overflow: visible; }
}

/* --- les épitrochoïdes --- */
.reglages input[type="range"] { width: calc(110 * var(--u)) !important; }
.reglages output { min-width: 3em !important; font-variant-numeric: tabular-nums; }
.epi-fixe { fill: rgba(214,180,108,.12); stroke: #d6b46c; stroke-width: 1.5; }
.epi-roulant { fill: rgba(90,169,230,.12); stroke: #5aa9e6; stroke-width: 1.5; }
.epi-bras { stroke: #fbf6ea; stroke-width: 1.4; }
.epi-centre { fill: #5aa9e6; }
.epi-contact { fill: #d6b46c; }
.epi-point { fill: #e0574a; stroke: #ffc2b8; stroke-width: 1.2; }
.epi-trace { fill: none; stroke: #ff7a6b; stroke-width: .9; stroke-linejoin: round; }
.epi-info { font: italic 15px var(--serif); fill: #c9d6e8; }
.formule-epi { margin: 0; text-align: center; font-family: var(--serif); font-weight: 700; font-size: calc(19 * var(--u)); line-height: 1.35; color: #24467f; border: 1px solid #c8b48a; background: rgba(251,246,234,.75); padding: calc(6 * var(--u)) calc(10 * var(--u)); }
.formule-epi small { font-size: calc(15 * var(--u)); font-weight: 600; color: var(--encre-douce); }
.params { display: grid; grid-template-columns: auto 1fr; gap: calc(2 * var(--u)) calc(10 * var(--u)); margin: 0; font-size: calc(15.5 * var(--u)); line-height: 1.28; }
.params dt { font-weight: 700; font-style: italic; color: #24467f; }
.params dd { margin: 0; text-align: justify; }
.petit-texte { font-size: calc(15 * var(--u)) !important; line-height: 1.3 !important; }
.presets { display: flex; flex-wrap: wrap; gap: calc(5 * var(--u)) calc(6 * var(--u)); flex: none; }
.presets button { font: inherit; font-family: var(--capitales); font-size: calc(14 * var(--u)); padding: calc(2 * var(--u)) calc(11 * var(--u)); cursor: pointer; color: var(--encre); background: transparent; border: 1px solid rgba(122,90,28,.6); border-radius: 999px; }
.presets button:hover { background: rgba(214,180,108,.35); }
.presets button[aria-pressed="true"] { background: #24467f; color: #fbf6ea; border-color: #24467f; }
.note-preset { margin: 0; font-style: italic; font-size: calc(14.5 * var(--u)); color: var(--sepia); min-height: 2.6em; }
.nom-repere.soleil { fill: #ffd34d; }
