/* ASTERIA — design système Apple, mode sombre : San Francisco, noir, surfaces élevées, bleu. */
:root {
  --fond: #000000;
  --gris-doux: #1c1c1e;
  --gris-bulle: #2c2c2e;
  --texte: #f5f5f7;
  --texte-2: #86868b;
  --bleu: #0a84ff;
  --bleu-vif: #3395ff;
  --hairline: #424245;
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--fond); scroll-behavior: smooth; }
body {
  font-family: var(--sf);
  background: var(--fond);
  color: var(--texte);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(10, 132, 255, 0.35); }

/* ---------- entête ---------- */
header.entete {
  text-align: center;
  padding: calc(58px + env(safe-area-inset-top)) 20px 0;
}
.marque {
  font-weight: 700;
  font-size: clamp(48px, 9vw, 88px);
  line-height: 1.03;
  letter-spacing: -0.028em;
}
.devise {
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 400;
  color: var(--texte-2);
  letter-spacing: -0.012em;
  margin-top: 8px;
}

/* ---------- dégradés et fond ---------- */
.texte-degrade {
  background: linear-gradient(94deg, #0a84ff 8%, #bf5af2 52%, #ff375f 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.orbes { position: fixed; inset: -10% -10% auto; height: 130vh; z-index: -1; pointer-events: none; overflow: hidden; }
.orbe { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.orbe-1 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(10, 132, 255, 0.4), transparent 66%); top: -160px; left: -140px; }
.orbe-2 { width: 660px; height: 660px; background: radial-gradient(circle, rgba(191, 90, 242, 0.3), transparent 66%); top: 16%; right: -240px; }
.orbe-3 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(255, 55, 95, 0.22), transparent 66%); top: 68%; left: -120px; }

/* ---------- profils (bouton discret) ---------- */
.btn-profils {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
  font-family: var(--sf); font-size: 18px; letter-spacing: 0.06em;
  color: var(--texte-2);
  background: var(--gris-doux);
  border: 0; border-radius: 980px;
  padding: 4px 14px 8px;
  cursor: pointer;
}
.btn-profils:hover { color: var(--texte); background: var(--gris-bulle); }
header.entete { position: relative; }
.hero-actions { display: flex; justify-content: center; gap: 14px; padding: 26px 0 4px; }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--bleu); outline-offset: 2px;
}

/* ---------- navigation : contrôle segmenté ---------- */
nav.onglets {
  position: sticky; top: calc(10px + env(safe-area-inset-top)); z-index: 30;
  display: flex; justify-content: center;
  padding: 22px 16px 6px;
}
.onglets-fond { display: contents; }
nav.onglets::before { content: none; }
nav.onglets { gap: 0; }
.onglet {
  font-family: var(--sf);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.006em;
  color: var(--texte);
  background: transparent;
  border: 0;
  border-radius: 980px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
}
nav.onglets { background: transparent; }
nav.onglets > .onglet { position: relative; }
nav.onglets {
  --segment-bg: rgba(28, 28, 30, 0.82);
}
nav.onglets > .onglet:first-child { margin-left: 0; }
.onglet { margin: 0 1px; background: var(--segment-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.onglet:first-child { border-radius: 980px 0 0 980px; padding-left: 22px; }
.onglet:last-child { border-radius: 0 980px 980px 0; padding-right: 22px; }
.onglet-actif { background: var(--texte); color: #000; border-radius: 980px !important; }

/* ---------- mobile : barre d'onglets en bas, tout sous le pouce ---------- */
@media (max-width: 719px) {
  header.entete { padding-top: calc(30px + env(safe-area-inset-top)); }
  nav.onglets {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
  .onglet, .onglet:first-child, .onglet:last-child {
    border-radius: 12px; margin: 0 3px; padding: 11px 4px;
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    font-size: 12.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .onglet-actif { background: var(--texte); color: #000; }
  main { padding-bottom: 170px; }
  footer.pied { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .lecteur {
    bottom: calc(78px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 20px);
    padding: 7px 10px;
  }
  .lect-titre { display: none; }
  .inter-cadre { margin-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .visite-carte { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .carte { padding: 30px 0 6px; }
  .roue-cadre { padding: 10px; border-radius: 20px; }
  .btn-profils { top: calc(10px + env(safe-area-inset-top)); right: 12px; }
}

/* ---------- panneaux ---------- */
main { max-width: 920px; margin: 0 auto; padding: 30px 22px 100px; }
.panneau { display: none; }
.panneau-actif { display: block; animation: apparait 0.45s cubic-bezier(0.25, 0.1, 0.25, 1); }
@keyframes apparait { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .panneau-actif { animation: none; } }

.carte { padding: 40px 0 8px; }
.carte-titre {
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin-bottom: 8px;
}
.carte-sous { color: var(--texte-2); font-size: 14px; margin-bottom: 18px; }

/* ---------- roue ---------- */
.roue-cadre { max-width: 640px; margin: 20px auto 0; background: var(--gris-doux); border-radius: 28px; padding: 18px; }
.roue { width: 100%; height: auto; display: block; }
.roue-fond { fill: var(--gris-doux); }
.roue-cercle { fill: none; stroke: rgba(245, 245, 247, 0.5); stroke-width: 1; }
.roue-cercle-fin { fill: none; stroke: rgba(245, 245, 247, 0.14); }
.tick { stroke: rgba(245, 245, 247, 0.28); stroke-width: 0.5; }
.tick-fort { stroke: rgba(245, 245, 247, 0.5); stroke-width: 0.9; }
.roue-sep-signe { stroke: rgba(245, 245, 247, 0.35); stroke-width: 0.7; }
.glyphe-signe { font-size: 24px; fill: var(--texte); }
.glyphe-signe, .glyphe-planete, .glyphe-point, .glyphe-natal, .glyphe-transit, .cell-glyphe {
  font-family: "Apple Symbols", "Noto Sans Symbols", "Segoe UI Symbol", var(--sf);
}
.roue-cuspide { stroke: rgba(245, 245, 247, 0.26); stroke-width: 0.6; }
.roue-cuspide-angle { stroke: var(--texte); stroke-width: 1.3; }
.num-maison { fill: var(--texte-2); font-family: var(--sf); font-size: 11.5px; }
.etiquette-angle { fill: var(--texte); font-family: var(--sf); font-size: 13px; font-weight: 600; }
.glyphe-planete { fill: var(--texte); font-size: 26px; }
.glyphe-point { fill: var(--texte-2); font-size: 22px; }
.glyphe-natal { fill: var(--texte); font-size: 23px; }
.glyphe-transit { fill: var(--bleu); font-size: 23px; }
.degre-planete { fill: var(--texte-2); font-family: var(--sf); font-size: 10.5px; }
.tick-planete { stroke: var(--texte); stroke-width: 1.3; }
.fil-planete { stroke: rgba(245, 245, 247, 0.2); stroke-width: 0.5; }
.halo-corps { fill: transparent; }
.corps { cursor: pointer; }
.corps:hover .halo-corps, .corps:focus .halo-corps { fill: rgba(10, 132, 255, 0.2); }
.corps-estompe { opacity: 0.22; }
.ligne-aspect { stroke: rgba(245, 245, 247, 0.5); }
.ligne-aspect.asp-l-dynamique { stroke: rgba(10, 132, 255, 0.75); }
.centre-ligne { fill: var(--texte); font-family: var(--sf); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
#roue-detail { max-width: 640px; margin: 16px auto 0; min-height: 20px; }
.detail-titre { font-weight: 600; font-size: 19px; letter-spacing: -0.014em; }
.detail-sabian { color: var(--texte-2); font-size: 14px; margin: 6px 0; }
.detail-aspects { list-style: none; font-size: 13.5px; color: var(--texte-2); columns: 2; column-gap: 30px; margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .detail-aspects { columns: 1; } }

.identite-ligne { text-align: center; font-weight: 600; font-size: clamp(19px, 3.2vw, 24px); letter-spacing: -0.016em; }
.identite-sous { text-align: center; color: var(--texte-2); font-size: 13px; margin-top: 4px; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th {
  font-weight: 600; color: var(--texte-2);
  text-align: left; font-size: 12px;
  border-bottom: 1px solid var(--hairline);
}
th, td { padding: 10px 12px 10px 0; vertical-align: baseline; }
.cell-glyphe { font-size: 18px; width: 34px; }
.cell-dignite { color: var(--texte-2); font-size: 12.5px; }
.cell-retro { color: var(--bleu); }
.tables-theme { display: grid; grid-template-columns: 1.2fr 1fr; gap: 52px; margin-top: 8px; align-items: start; }
@media (max-width: 760px) { .tables-theme { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- dominantes ---------- */
.dominantes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 4px; }
@media (max-width: 760px) { .dominantes { grid-template-columns: 1fr; gap: 24px; } }
.dom-titre { font-size: 12px; font-weight: 600; color: var(--texte-2); margin-bottom: 12px; }
.dom-ligne { display: grid; grid-template-columns: 88px 1fr 30px; align-items: center; gap: 12px; margin: 9px 0; font-size: 14px; }
.dom-barre { height: 6px; background: var(--gris-bulle); border-radius: 3px; overflow: hidden; }
.dom-rempli { height: 100%; border-radius: 3px; background: var(--texte); }
.dom-val { text-align: right; font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.dom-synthese { margin-top: 22px; display: grid; gap: 10px; font-size: 15.5px; max-width: 640px; }

/* ---------- blocs ---------- */
.aspect-bloc {
  background: var(--gris-doux);
  border-radius: 18px;
  padding: 18px 22px;
  margin: 12px 0;
  max-width: 700px;
}
.aspect-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.aspect-nom { font-weight: 600; font-size: 17px; letter-spacing: -0.014em; }
.aspect-meta { font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.aspect-bloc p { margin-top: 6px; font-size: 15px; }
.sabian-bloc { background: var(--gris-doux); border-radius: 18px; padding: 18px 22px; margin: 12px 0; max-width: 700px; }
.sabian-titre { font-size: 12.5px; font-weight: 600; color: var(--texte-2); margin-bottom: 4px; }

/* ---------- oracle : bulles iMessage ---------- */
.oracle-cadre { display: flex; flex-direction: column; height: min(66dvh, 660px); }
#oracle-flux { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 2px 16px; }
.msg { max-width: 78%; font-size: 15.5px; line-height: 1.4; padding: 10px 16px; border-radius: 20px; }
.msg-oracle { align-self: flex-start; background: var(--gris-bulle); color: var(--texte); border-bottom-left-radius: 6px; }
.msg-moi { align-self: flex-end; background: var(--bleu); color: #fff; border-bottom-right-radius: 6px; }
.msg-attente { color: var(--texte-2); letter-spacing: 0.14em; }
#oracle-form { display: flex; gap: 10px; margin-top: 14px; }
#oracle-champ {
  flex: 1; font-family: var(--sf); font-size: 16px;
  background: var(--gris-doux); color: var(--texte);
  border: 0; border-radius: 980px;
  padding: 12px 20px;
  min-width: 0;
}
#oracle-champ::placeholder { color: var(--texte-2); }
#oracle-champ:focus { outline: 2px solid var(--bleu); outline-offset: -1px; }
#oracle-form button {
  font-family: var(--sf); font-size: 15px; font-weight: 500;
  background: var(--bleu); color: #fff;
  border: 0; border-radius: 980px; padding: 12px 22px; cursor: pointer;
}
#oracle-form button:hover { background: var(--bleu-vif); }

/* ---------- guide ---------- */
.guide-section { background: var(--gris-doux); border-radius: 18px; margin: 12px 0; }
.guide-titre {
  font-weight: 600; font-size: 17px; letter-spacing: -0.014em;
  padding: 17px 22px; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.guide-titre::-webkit-details-marker { display: none; }
.guide-titre::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--texte-2); }
details[open] > .guide-titre::after { content: "−"; }
.guide-corps { padding: 0 22px 20px; font-size: 15px; max-width: 720px; }
.guide-corps h3 { font-weight: 600; font-size: 16px; letter-spacing: -0.012em; margin: 16px 0 6px; }
.guide-corps p { margin: 8px 0; }
.guide-corps ul { margin: 8px 0 8px 20px; }
.guide-corps table { margin: 12px 0; font-size: 13.5px; }

/* ---------- écran d'accueil ---------- */
#accueil[hidden] { display: none; }
#accueil {
  position: fixed; inset: 0; z-index: 96;
  background: var(--fond);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
  padding: 24px;
}
.accueil-cadre { width: min(600px, 94vw); padding: 30px 0; }
.accueil-marque { display: block; font-size: clamp(44px, 9vw, 72px); line-height: 1.05; letter-spacing: -0.028em; margin-bottom: 10px; }
.accueil-titre {
  font-weight: 700;
  font-size: clamp(24px, 4.6vw, 34px); line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 22px;
}
.accueil-points { display: grid; gap: 14px; }
.accueil-points p { font-size: 15.5px; color: var(--texte-2); }
.accueil-points strong { color: var(--texte); font-weight: 600; }
.accueil-note { font-size: 13px; color: var(--texte-2); margin-top: 20px; }
.accueil-boutons { display: flex; align-items: center; gap: 24px; margin-top: 26px; }

/* ---------- parcours d'entrée ---------- */
#intake[hidden] { display: none; }
#intake {
  position: fixed; inset: 0; z-index: 100;
  background: var(--fond);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
}
body.intake-ouvert { overflow: hidden; }
.intake-cadre { width: min(560px, 90vw); padding: 40px 0; }
.intake-marque { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.intake-etape { font-size: 12.5px; font-weight: 600; color: var(--texte-2); margin: 42px 0 8px; font-variant-numeric: tabular-nums; }
.intake-question {
  font-weight: 700;
  font-size: clamp(30px, 6vw, 46px); line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.intake-aide { color: var(--texte-2); font-size: 16px; max-width: 440px; margin-bottom: 26px; }
.intake-input {
  display: block; width: 100%;
  font-family: var(--sf); font-size: 19px;
  background: var(--gris-doux); color: var(--texte);
  border: 0; border-radius: 14px;
  padding: 15px 18px;
  margin: 8px 0 4px;
}
.intake-input:focus { outline: 2px solid var(--bleu); outline-offset: -1px; }
#intake-oreille[hidden] { display: none; }
.oreille-alerte { color: #ff9f0a; animation: none; }
.intake-oreille { font-size: 12.5px; color: #30d158; margin-top: 18px; animation: pulse-oreille 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .intake-oreille { animation: none; } }
.intake-recap { list-style: none; font-size: 17px; display: grid; gap: 10px; margin: 12px 0 6px; }
.intake-recap li { background: var(--gris-doux); border-radius: 14px; padding: 13px 18px; }
.intake-boutons { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; }
.btn-plein {
  font-family: var(--sf); font-size: 16px; font-weight: 500;
  background: var(--bleu); color: #fff;
  border: 0; border-radius: 980px; padding: 13px 28px; cursor: pointer;
}
.btn-plein:hover { background: var(--bleu-vif); }
.btn-discret {
  font-family: var(--sf); font-size: 15px; font-weight: 500;
  background: transparent; color: var(--bleu); border: 0; padding: 6px 0; cursor: pointer;
}
.btn-discret:hover { text-decoration: underline; }

/* ---------- votre histoire ---------- */
.chapitre { padding: 66px 0 4px; max-width: 700px; margin: 0 auto; }
.chapitre { opacity: 0; transform: translateY(14px); transition: opacity 0.65s ease, transform 0.65s ease; }
.chap-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .chapitre { opacity: 1; transform: none; transition: none; } }
.chap-num { font-size: 13px; font-weight: 600; color: var(--bleu); font-variant-numeric: tabular-nums; }
.chap-titre {
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px); line-height: 1.08;
  letter-spacing: -0.024em;
  margin: 8px 0 14px;
}
.chap-clef { color: var(--texte-2); font-size: 16px; max-width: 640px; margin-bottom: 16px; }
.chap-donnee {
  display: inline-block;
  background: var(--gris-doux);
  border-radius: 980px;
  padding: 7px 16px;
  font-size: 13.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 14px;
}
.chap-texte { font-size: 16.5px; margin: 12px 0; max-width: 680px; }
.chap-note { font-size: 13px; color: var(--texte-2); margin-top: 14px; }
.chap-reperes { font-size: 12.5px; color: var(--texte-2); margin-top: 14px; max-width: 660px; }
.chap-ouverture { text-align: center; padding-top: 28px; max-width: 780px; }
.ouverture-titre {
  font-weight: 700;
  font-size: clamp(32px, 6vw, 52px); line-height: 1.06;
  letter-spacing: -0.026em;
}
.ouverture-date { font-size: 14px; color: var(--texte-2); margin: 10px 0 4px; }
.chap-ouverture .chap-clef { margin: 18px auto 0; text-align: center; }
.ouverture-grands { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-top: 16px; }
.roue-histoire { max-width: 560px; margin-top: 26px; }
.clin { font-size: 13.5px; color: var(--texte-2); margin-top: 10px; }
.chapitre .btn-plein { margin-top: 6px; }
.chapitre .dominantes { margin: 10px 0 18px; }

/* ---------- réglages ---------- */
.reglages { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; padding: 24px 0 0; }
.reglage { font-size: 13px; font-weight: 500; color: var(--texte-2); display: flex; align-items: center; gap: 8px; }
.reglage select { font-family: var(--sf); font-size: 13px; font-weight: 500; color: var(--texte); background: var(--gris-doux); border: 0; border-radius: 980px; padding: 6px 14px; cursor: pointer; appearance: none; -webkit-appearance: none; }
.reglage input[type="checkbox"] { accent-color: var(--bleu); width: 15px; height: 15px; }
.champ-case { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: 15px; color: var(--texte); }
.champ-case input { width: 16px; height: 16px; accent-color: var(--bleu); }
.champ { display: block; margin: 14px 0; font-size: 13px; font-weight: 500; color: var(--texte-2); }
.champ input {
  display: block; width: 100%; margin-top: 6px;
  font-family: var(--sf); font-size: 16px; color: var(--texte);
  background: var(--gris-doux);
  border: 0; border-radius: 12px;
  padding: 11px 15px;
}
.champ input:focus { outline: 2px solid var(--bleu); outline-offset: -1px; }
.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-erreur { color: #ff453a; font-size: 14px; min-height: 20px; margin-top: 12px; }
details.avance summary { color: var(--bleu); font-size: 14px; font-weight: 500; cursor: pointer; margin: 16px 0 4px; list-style: none; }
details.avance summary::-webkit-details-marker { display: none; }

footer.pied {
  text-align: center; color: var(--texte-2); font-size: 12px;
  padding: 44px 20px calc(40px + env(safe-area-inset-bottom));
}

/* ---------- lecteur de narration ---------- */
.lecteur {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: flex; align-items: center; gap: 4px;
  background: rgba(28, 28, 30, 0.78);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-radius: 980px;
  padding: 8px 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  max-width: min(92vw, 560px);
}
.lecteur[hidden] { display: none; }
.lecteur button {
  font-family: var(--sf); font-size: 16px;
  color: var(--texte); background: transparent; border: 0;
  border-radius: 980px; padding: 8px 10px; cursor: pointer;
}
.lecteur button:hover { background: rgba(245, 245, 247, 0.12); }
.lect-titre { font-size: 13.5px; font-weight: 600; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.lect-oreille { font-size: 11.5px; color: #30d158; white-space: nowrap; padding-right: 6px; animation: pulse-oreille 1.6s ease-in-out infinite; }
@keyframes pulse-oreille { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lect-oreille { animation: none; } }

/* ---------- interlude : la voix répond ---------- */
#interlude[hidden] { display: none; }
#interlude {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
}
.inter-cadre {
  width: min(560px, 100%);
  background: rgba(28, 28, 30, 0.96);
  border-radius: 24px;
  padding: 22px 22px calc(18px + env(safe-area-inset-bottom));
  margin-bottom: 74px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.inter-titre { font-weight: 700; font-size: 19px; letter-spacing: -0.018em; margin-bottom: 12px; }
.inter-flux { display: flex; flex-direction: column; gap: 8px; max-height: 38dvh; overflow-y: auto; padding-bottom: 8px; }
#inter-form { display: flex; gap: 8px; margin-top: 10px; }
#inter-champ {
  flex: 1; font-family: var(--sf); font-size: 15px;
  background: var(--gris-bulle); color: var(--texte);
  border: 0; border-radius: 980px; padding: 10px 16px; min-width: 0;
}
#inter-champ::placeholder { color: var(--texte-2); }
#inter-form button {
  font-family: var(--sf); font-size: 14px; font-weight: 500;
  background: var(--bleu); color: #fff; border: 0; border-radius: 980px;
  padding: 10px 18px; cursor: pointer;
}
#inter-reprendre { margin-top: 12px; }

/* ---------- profils (panneau) ---------- */
dialog#sheet-profils {
  background: rgba(28, 28, 30, 0.97);
  color: var(--texte);
  border: 0; border-radius: 24px;
  padding: 26px 24px;
  width: min(440px, 92vw);
  margin: auto;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}
dialog#sheet-profils::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
.sheet-titre { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-bottom: 16px; }
.sheet-liste { display: grid; gap: 8px; margin-bottom: 18px; }
.sheet-profil {
  font-family: var(--sf); font-size: 15px; text-align: left;
  color: var(--texte); background: var(--gris-bulle);
  border: 0; border-radius: 14px; padding: 13px 16px; cursor: pointer;
}
.sheet-profil:hover { background: #3a3a3c; }
.sheet-profil-actif { outline: 2px solid var(--bleu); outline-offset: -2px; }
.sheet-actions { display: grid; gap: 10px; justify-items: start; margin-bottom: 8px; }
.btn-danger { color: #ff453a; }
#sheet-fermer { margin-top: 6px; color: var(--texte-2); }

/* ---------- chapitres : tête et lecture ---------- */
.chap-tete { display: flex; align-items: center; gap: 12px; }
.btn-lire {
  font-family: var(--sf); font-size: 11px;
  color: var(--texte); background: var(--gris-doux);
  border: 0; border-radius: 980px; padding: 5px 11px; cursor: pointer;
}
.btn-lire:hover { background: var(--gris-bulle); }
.chapitre.chap-lu { border-radius: 24px; box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.35); padding-left: 22px; padding-right: 22px; }

/* ---------- volume ---------- */
#lect-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 84px; height: 4px;
  background: rgba(245, 245, 247, 0.25);
  border-radius: 2px;
  margin: 0 6px;
  cursor: pointer;
}
#lect-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
#lect-volume::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }

/* ---------- choix d'entrée ---------- */
.intake-choix { display: grid; gap: 12px; margin-top: 8px; }
.intake-option {
  font-family: var(--sf); font-size: 18px; font-weight: 500; text-align: left;
  color: var(--texte); background: var(--gris-doux);
  border: 0; border-radius: 16px; padding: 18px 20px; cursor: pointer;
}
.intake-option:hover { background: var(--gris-bulle); }
.intake-option-active { outline: 2px solid var(--bleu); outline-offset: -2px; }

/* ---------- visite guidée ---------- */
#visite[hidden] { display: none; }
#visite { position: fixed; inset: 0; z-index: 90; }
.visite-spot {
  position: fixed;
  left: 50%; top: 38%; width: 0; height: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.78);
  outline: 2px solid rgba(10, 132, 255, 0.9);
  outline-offset: 2px;
  transition: all 0.65s cubic-bezier(0.3, 0.8, 0.3, 1);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .visite-spot { transition: none; } }
.visite-carte {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 32px));
  background: rgba(28, 28, 30, 0.97);
  border-radius: 22px;
  padding: 20px 22px 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.visite-carte-haut { bottom: auto; top: calc(26px + env(safe-area-inset-top)); }
.visite-num { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.visite-titre { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin: 4px 0 6px; }
.visite-texte { font-size: 14.5px; color: var(--texte); }
.visite-boutons { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.lecteur-demo { z-index: 95; }
body.visite-ouverte { overflow: hidden; }

/* ---------- impression ---------- */
@media print {
  body { font-size: 11pt; }
  nav.onglets, .barre-profil, footer.pied, #oracle-form { display: none !important; }
  .panneau { display: block !important; }
  #oracle { display: none !important; }
  .chapitre { break-inside: avoid; }
}
