/* 16 Lenses — Le regard en plein écran (27/11). --c : couleur du personnage (posée par le lecteur). */
html.ri-on, html.ri-on body { overflow: hidden; }
.ri { position: fixed; inset: 0; z-index: 2000; background: #08070b; color: #f1eae2; font-family: Inter, system-ui, sans-serif; }
.ri-scene { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; }
.ri-ecran { position: absolute; inset: 0; overflow: hidden; background: #08070b; cursor: pointer; }
.ri-ecran.ri-interactif { cursor: default; }
.ri-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ri-bg.ri-flou { filter: blur(26px) brightness(.4); transform: scale(1.12); }
.ri-bg.ri-sombre { filter: brightness(.45) saturate(.8); }
.ri-iris-actif { opacity: 0; animation: ri-iris 1.2s ease .4s forwards; }
.ri-iris-plonge { opacity: 0; transform: scale(1.25); animation: ri-plonge 1.6s cubic-bezier(.5, 0, .2, 1) 1.9s forwards; }
.ri-reel-revient { opacity: 0; animation: ri-iris 1.2s ease .7s forwards; }
.ri-iris .ri-apres { animation-delay: 2.6s; }
@keyframes ri-plonge { to { opacity: 1; transform: scale(1); } }
.ri-ombre { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #08070b99 0%, transparent 20%, transparent 50%, #08070bee 100%); }
.ri-ombre.fort { background: linear-gradient(180deg, #08070bb0 0%, transparent 24%, #08070b55 52%, #08070bf2 100%); }
.ri-ombre.plein { background: #08070bb8; }
.ri-texte { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 clamp(20px, 6vw, 96px) clamp(44px, 9vh, 90px); max-width: 1100px; }
.ri-texte.ri-centre { top: 0; display: flex; flex-direction: column; justify-content: center; max-width: 900px; margin: auto; padding-top: 80px; }
.ri-sur { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 55%, #fff); }
.ri-t { margin: 0 0 16px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: clamp(44px, 7vw, 96px); line-height: 1; letter-spacing: -.02em; }
.ri-t2 { margin: 0 0 14px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.05; text-wrap: balance; }
.ri-fn { color: color-mix(in srgb, var(--c) 60%, #fff); }
.ri-ligne { margin: 0; max-width: 48ch; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.5; color: #ece4dc; text-shadow: 0 1px 16px #000a; text-wrap: pretty; }
.ri-question { margin: 18px 0 0; max-width: 52ch; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: #cfc4d3; border-left: 2px solid var(--c); padding-left: 14px; }
.ri-aide { margin: 26px 0 0; font-size: 13px; color: #b4a9b8; }
.ri-apres { opacity: 0; animation: ri-apparait .7s ease .9s forwards; }
.ri-peda { margin: 0; display: grid; gap: 12px; max-width: 60ch; }
.ri-peda div { padding-left: 14px; border-left: 2px solid var(--c); }
.ri-peda dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 55%, #fff); margin-bottom: 3px; }
.ri-peda dd { margin: 0; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.5; }

/* Panneaux (alliés, pourquoi, trois moteurs, moteur, fin, accès) */
.ri-panneau { position: absolute; z-index: 2; inset: 70px 0 0; overflow-y: auto; padding: 10px clamp(16px, 5vw, 60px) 60px; cursor: auto; user-select: text; -webkit-user-select: text; }
.ri-panneau main.wrap { padding-top: 0; background: none; }
.ri-panneau .stratege-stage { display: none; }
.ri-panneau h1:focus, .ri-panneau h2:focus, .ri-sur:focus { outline: none; }

/* Où je suis */
.ri-haut { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: 12px 64px 0 56px; pointer-events: none; }
.ri-segs { display: flex; gap: 5px; }
.ri-segs i { flex: 1; height: 3px; border-radius: 3px; background: #ffffff2e; overflow: hidden; }
.ri-segs b { display: block; height: 100%; background: color-mix(in srgb, var(--c) 70%, #fff); transition: width .4s ease; }
.ri-ou { margin: 10px 0 0; font-size: 13px; color: #d9cfd9; text-shadow: 0 1px 10px #000; }
.ri-ou strong { color: #fff; font-weight: 600; }
.ri-quitter, .ri-menu-btn { position: absolute; z-index: 6; top: 4px; width: 44px; height: 44px; display: grid; place-content: center; color: #f1eae2; background: none; border: 0; cursor: pointer; text-decoration: none; }
.ri-quitter { left: 6px; font-size: 30px; font-weight: 300; line-height: 1; }
.ri-menu-btn { right: 8px; gap: 5px; }
.ri-menu-btn span { display: block; width: 20px; height: 1.6px; background: currentColor; border-radius: 2px; }
.ri-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ri-fleche { display: none; }
@media (hover: hover) and (pointer: fine) {
  .ri-fleche { display: grid; place-items: center; position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); width: 56px; height: 100px; border: 0; background: none; color: #fff; font-size: 58px; font-weight: 200; cursor: pointer; opacity: 0; transition: opacity .3s; text-shadow: 0 0 16px #000; }
  .ri-fleche-g { left: 6px; } .ri-fleche-d { right: 6px; }
  .ri-fleches .ri-fleche:not(:disabled) { opacity: .75; }
  .ri-fleche:hover:not(:disabled), .ri-fleche:focus-visible { opacity: 1; }
  .ri-fleche:disabled { opacity: 0 !important; pointer-events: none; }
}

/* Menu en surimpression */
.ri-menu { position: absolute; inset: 0; z-index: 10; display: flex; justify-content: flex-end; background: #08070b88; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ri-menu[hidden] { display: none; }
.ri-menu-panneau { width: min(400px, 100%); height: 100%; overflow-y: auto; padding: 70px 30px 30px; background: linear-gradient(90deg, transparent, #08070bcc 20%); }
.ri-menu-qui { margin: 0 0 22px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; }
.ri-menu-etapes { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 2px; }
.ri-menu-etapes button { width: 100%; display: flex; gap: 14px; align-items: baseline; padding: 11px 0 11px 16px; border: 0; border-left: 2px solid #ffffff22; background: none; color: #bfb5c2; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
.ri-menu-etapes button span { font-size: 12px; color: #8d8392; }
.ri-menu-etapes button[aria-current] { color: #fff; border-left-color: var(--c); font-weight: 600; }
.ri-menu-etapes button:disabled { opacity: .4; cursor: default; }
.ri-menu-outils { display: grid; gap: 6px; border-top: 1px solid #ffffff22; padding-top: 16px; }
.ri-menu-outils a { color: #f1eae2; padding: 8px 0; }

/* Transitions : glissement doux ; entrée dans l'iris en cercle */
.ri-entre { animation: ri-entre .55s ease both; }
.ri-entre-arriere { animation: ri-entre-arriere .5s ease both; }
.ri-entre-iris { animation: ri-cercle .9s cubic-bezier(.6, 0, .2, 1) both; }
.ri-sort { animation: ri-sort .5s ease both; pointer-events: none; }
@keyframes ri-entre { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes ri-entre-arriere { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes ri-sort { to { opacity: 0; } }
@keyframes ri-cercle { from { clip-path: circle(0% at 50% 48%); } to { clip-path: circle(150% at 50% 48%); } }
@keyframes ri-apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ri-iris { to { opacity: 1; } }
@media (max-width: 700px) {
  .ri-texte { padding-bottom: 48px; }
  .ri-haut { padding-left: 50px; padding-right: 54px; }
  .ri-ou { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ri-ecran, .ri-ecran *, .ri-apres, .ri-iris-actif, .ri-iris-plonge, .ri-reel-revient { animation: none !important; opacity: 1 !important; transition: none !important; }
}

/* Lecture interactive (27/11) : on touche la cognition, l'effet de la fonction part de là, le texte se révèle. */
.ri-cache { opacity: 0; transform: translateY(8px); transition: opacity .6s ease .35s, transform .6s ease .35s; }
.ri-revele .ri-cache { opacity: 1; transform: none; }
.ri-consigne { margin: 14px 0 0; font-size: 14px; color: color-mix(in srgb, var(--c) 45%, #fff); animation: ri-respire 2.4s ease-in-out infinite; transition: opacity .3s; }
.ri-revele .ri-consigne { display: none; }
.ri-point { position: absolute; z-index: 3; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; pointer-events: none; opacity: 0;
  border: 1.5px solid color-mix(in srgb, var(--c) 50%, #fff); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); }
.ri-point.ri-pret { opacity: 1; animation: ri-point 2s ease-in-out infinite; }
.ri-revele .ri-point { opacity: 0 !important; animation: none; transition: opacity .3s; }
@keyframes ri-point { 0%, 100% { transform: scale(.85); } 50% { transform: scale(1.15); } }
@keyframes ri-respire { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* L'effet a la géométrie de la fonction (grammaire verrouillée) et la couleur du personnage. */
.ri-effet { position: absolute; z-index: 3; width: 0; height: 0; pointer-events: none; --fx: color-mix(in srgb, var(--c) 55%, #fff); }
.ri-effet i { position: absolute; left: 0; top: 0; display: block; border: 1.5px solid var(--fx); box-shadow: 0 0 18px var(--fx); opacity: 0; }
/* Ni : des anneaux qui convergent vers un point */
.ri-effet-Ni i { width: 260px; height: 260px; margin: -130px; border-radius: 50%; animation: fx-converge 1.3s cubic-bezier(.5, 0, .3, 1) forwards; }
.ri-effet-Ni i:nth-child(2) { animation-delay: .15s; } .ri-effet-Ni i:nth-child(3) { animation-delay: .3s; } .ri-effet-Ni i:nth-child(4) { animation-delay: .45s; }
@keyframes fx-converge { 0% { opacity: 0; transform: scale(1.4); } 25% { opacity: .9; } 100% { opacity: 0; transform: scale(0); } }
/* Ne : des rayons qui partent et se ramifient */
.ri-effet-Ne i { width: 2px; height: 120px; margin: -120px 0 0 -1px; border: 0; background: linear-gradient(to top, var(--fx), transparent); transform-origin: 50% 100%; animation: fx-ramifie 1.1s ease-out forwards; }
.ri-effet-Ne i:nth-child(1) { --a: 0deg; } .ri-effet-Ne i:nth-child(2) { --a: 52deg; animation-delay: .05s; } .ri-effet-Ne i:nth-child(3) { --a: 104deg; animation-delay: .1s; }
.ri-effet-Ne i:nth-child(4) { --a: 156deg; animation-delay: .15s; } .ri-effet-Ne i:nth-child(5) { --a: 208deg; animation-delay: .2s; } .ri-effet-Ne i:nth-child(6) { --a: 260deg; animation-delay: .25s; } .ri-effet-Ne i:nth-child(7) { --a: 312deg; animation-delay: .3s; }
@keyframes fx-ramifie { 0% { opacity: 0; transform: rotate(var(--a)) scaleY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) scaleY(1.6); } }
/* Si : un contour et son écho décalé (le présent superposé au vécu) */
.ri-effet-Si i { width: 150px; height: 110px; margin: -55px -75px; border-radius: 10px; animation: fx-echo 1.6s ease-out forwards; }
.ri-effet-Si i:nth-child(2) { animation-name: fx-echo2; animation-delay: .25s; border-style: dashed; }
@keyframes fx-echo { 0% { opacity: 0; transform: scale(.7); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes fx-echo2 { 0% { opacity: 0; transform: translate(0, 0); } 35% { opacity: .9; transform: translate(14px, -10px); } 70% { opacity: .9; transform: translate(0, 0); } 100% { opacity: 0; } }
/* Se : quatre coins qui se referment net sur le détail */
.ri-effet-Se i { width: 34px; height: 34px; border-width: 2.5px; animation: fx-cadre .7s steps(4, end) forwards; }
.ri-effet-Se i:nth-child(1) { margin: -90px 0 0 -90px; border-right: 0; border-bottom: 0; --dx: 50px; --dy: 50px; }
.ri-effet-Se i:nth-child(2) { margin: -90px 0 0 56px; border-left: 0; border-bottom: 0; --dx: -50px; --dy: 50px; }
.ri-effet-Se i:nth-child(3) { margin: 56px 0 0 -90px; border-right: 0; border-top: 0; --dx: 50px; --dy: -50px; }
.ri-effet-Se i:nth-child(4) { margin: 56px 0 0 56px; border-left: 0; border-top: 0; --dx: -50px; --dy: -50px; }
@keyframes fx-cadre { 0% { opacity: 1; transform: none; } 70% { opacity: 1; transform: translate(var(--dx), var(--dy)); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
/* Ti : des pièces séparées qui se rapprochent et s'emboîtent */
.ri-effet-Ti i { width: 40px; height: 40px; margin: -20px; border-radius: 4px; animation: fx-emboite 1.2s cubic-bezier(.6, 0, .2, 1) forwards; }
.ri-effet-Ti i:nth-child(1) { --dx: -70px; --dy: -40px; } .ri-effet-Ti i:nth-child(2) { --dx: 70px; --dy: -40px; } .ri-effet-Ti i:nth-child(3) { --dx: -70px; --dy: 40px; } .ri-effet-Ti i:nth-child(4) { --dx: 70px; --dy: 40px; }
@keyframes fx-emboite { 0% { opacity: 0; transform: translate(var(--dx), var(--dy)); } 30% { opacity: 1; } 75% { opacity: 1; transform: translate(calc(var(--dx) * .25), calc(var(--dy) * .25)); } 100% { opacity: 0; transform: translate(calc(var(--dx) * .25), calc(var(--dy) * .25)); } }
/* Te : des lignes qui s'ordonnent en cases vers un but */
.ri-effet-Te i { border: 0; background: var(--fx); animation: fx-trace .9s ease-out forwards; }
.ri-effet-Te i:nth-child(1), .ri-effet-Te i:nth-child(2) { width: 220px; height: 1.5px; margin: -30px 0 0 -110px; transform-origin: 0 50%; }
.ri-effet-Te i:nth-child(2) { margin-top: 30px; animation-delay: .12s; }
.ri-effet-Te i:nth-child(3), .ri-effet-Te i:nth-child(4) { width: 1.5px; height: 160px; margin: -80px 0 0 -40px; transform-origin: 50% 0; animation-name: fx-trace-v; animation-delay: .2s; }
.ri-effet-Te i:nth-child(4) { margin-left: 40px; animation-delay: .3s; }
@keyframes fx-trace { 0% { opacity: 1; transform: scaleX(0); } 60% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes fx-trace-v { 0% { opacity: 1; transform: scaleY(0); } 60% { opacity: 1; transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(1); } }
/* Fi : un battement unique, au centre (compte / ne compte pas) */
.ri-effet-Fi i { width: 90px; height: 90px; margin: -45px; border-radius: 50%; animation: fx-bat 1.4s ease-out forwards; }
.ri-effet-Fi i:nth-child(2) { animation-delay: .35s; }
@keyframes fx-bat { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.05); } 35% { transform: scale(.9); } 100% { opacity: 0; transform: scale(1.5); } }
/* Fe : des ondes qui s'étendent et se rejoignent */
.ri-effet-Fe i { width: 80px; height: 80px; margin: -40px; border-radius: 50%; animation: fx-onde 1.8s ease-out forwards; }
.ri-effet-Fe i:nth-child(2) { animation-delay: .3s; } .ri-effet-Fe i:nth-child(3) { animation-delay: .6s; }
@keyframes fx-onde { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(4); } }
@media (prefers-reduced-motion: reduce) { .ri-effet { display: none; } .ri-cache { transition: none; } .ri-point.ri-pret, .ri-consigne { animation: none; } }

/* L'extrait sur la page du personnage (27/11) : même scène que le regard, posée en grand dans la page. */
.ex-bloc { padding: 0 !important; background: none !important; border: 0 !important; }
.ex-tete { padding: 0 0 14px; }
.ex-tete h2 em { color: color-mix(in srgb, var(--c) 60%, #fff); }
.ri.ri-inline { position: relative; inset: auto; z-index: 1; width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 90px -40px var(--c), 0 0 0 1px #ffffff14; outline: none; }
.ri.ri-inline:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 70%, #fff); }
.ri-inline .ri-haut { padding: 12px 16px 0; }
.ri-inline .ri-texte { padding: 0 clamp(18px, 4vw, 56px) clamp(22px, 5%, 48px); }
.ri-inline .ri-texte.ri-centre { padding-top: 40px; }
.ri-inline .ri-t { font-size: clamp(34px, 5vw, 64px); }
.ri-inline .ri-t2 { font-size: clamp(24px, 3.2vw, 42px); }
.ri-inline .ri-ligne { font-size: clamp(15px, 1.4vw, 19px); }
.ex-reste { list-style: none; margin: 6px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; max-width: 640px; }
.ex-reste li { display: flex; gap: 10px; align-items: baseline; color: #e6dde6; font-size: 15px; }
.ex-reste span { font-size: 12px; color: color-mix(in srgb, var(--c) 55%, #fff); }
.ex-btn { align-self: flex-start; }
.ex-revoir { margin-top: 12px; align-self: flex-start; background: none; border: 0; color: #c9bfcb; text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
@media (max-width: 700px) {
  .ri.ri-inline { aspect-ratio: auto; height: 76vh; border-radius: 0; margin: 0 -16px; width: calc(100% + 32px); }
  .ex-reste { grid-template-columns: 1fr; }
}
