/* Noveling Life · corrections de l'audit design et justification (1er déc. 2026), chargées après roles.css. */

:root{--ease-out:cubic-bezier(0.23,1,0.32,1);--track:#cfc6b8}

/* 1. Mode nuit : des surfaces distinctes (avant : 1,02 à 1,04:1 entre elles) */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#1f211d;--paper-2:#2d2f29;--atelier:#262822;--line:#41443d;--track:#4a4d45;
    --night:#0f110e;--night-2:#393b34;
  }
}
:root[data-theme="dark"]{
  --paper:#1f211d;--paper-2:#2d2f29;--atelier:#262822;--line:#41443d;--track:#4a4d45;
  --night:#0f110e;--night-2:#393b34;
}

/* 2. Retour visuel à la pression */
.btn,.menu-toggle,.type-tools button,.language-switcher a{transition:background-color .18s,border-color .18s,color .18s,transform 160ms var(--ease-out)}
.btn:active,.menu-toggle:active,.type-tools button:active:not(:disabled),.language-switcher a:active{transform:scale(0.97)}

/* 3. Survol des boutons réservé à la souris (évite l'état « collé » au toucher) */
.btn:hover{transform:none}
@media (hover:hover) and (pointer:fine){.btn:hover{transform:translateY(-1px)}.btn:active{transform:translateY(0) scale(0.97)}}

/* 4. Soulignement du menu animé en transform plutôt qu'en « right » */
.main-nav a:not(.nav-cta):after{right:0;transform:scaleX(0);transform-origin:left;transition:transform 180ms var(--ease-out)}
.main-nav a:hover:after{right:0;transform:scaleX(1)}

/* 5. Barres d'avancement : plus courtes et plus franches */
.fill{animation-duration:600ms;animation-timing-function:var(--ease-out)}

/* 6. Pas de fondu isolé de la vue lecture au changement de thème */
.reading-view{transition:none}

/* 7. Numéro décoratif « 01 » masqué sur mobile (il chevauchait la ligne de méta) */
@media (max-width:780px){.story-feature:after{display:none}}

/* 8. Mouvement réduit : garder les fondus de couleur, retirer les déplacements */
@media (prefers-reduced-motion:reduce){
  *,*:before,*:after{transition-property:color,background-color,border-color,opacity!important;transition-duration:.18s!important}
  .btn:hover,.btn:active,.menu-toggle:active,.type-tools button:active,.language-switcher a:active{transform:none}
}

/* 11. Prose on wide screens. Verse and manually aligned blocks retain their layout. */
@media (min-width:781px){
  :is(.prose:not(.nl-poetry) > p,.prose:not(.nl-poetry) > blockquote > p,.prose:not(.nl-poetry) > ul > li,.prose:not(.nl-poetry) > ol > li):not(.opening,.nl-verse,.wp-block-verse,[class*="has-text-align"],[style*="text-align"]):not(:has(br,.nl-verse,.wp-block-verse)):not(:is(.nl-verse,.wp-block-verse,[class*="has-text-align"],[style*="text-align"]) *),
  .page-layout.author-page > .prose:not(.nl-poetry) > p[style*="justify"]:not(.nl-verse,.wp-block-verse):not(:has(br,.nl-verse,.wp-block-verse)){
    text-align:justify!important;hyphens:auto;hyphenate-limit-chars:7 3 3;text-wrap:pretty
  }
}
.prose.nl-poetry,.prose .nl-verse,.prose .wp-block-verse{hyphens:manual}
.prose .wp-block-verse{white-space:pre-wrap;overflow-wrap:break-word}
@media (max-width:780px){
  .prose:not(.nl-poetry) > p[style*="justify"]:not(.nl-verse,.wp-block-verse){text-align:start!important;hyphens:manual}
}

/* 9. Barre de lecture : transform plutôt que width (pas de recalcul de mise en page au défilement) */
.read-progress{width:100%!important;transform:scaleX(0);transform-origin:left}

/* 10. Barres d'avancement : le remplissage démarre quand elles entrent à l'écran */
.js .fill{animation-play-state:paused}
.js .fill.in{animation-play-state:running}
