/* ==========================================================================
   Mot de l'auteur — couche « premium » : carte d'auteur, sommaire navigable, retour en haut.
   Complète les styles de base (pages.css) sans les remplacer.
   Jetons de texte lisibles sur les 100 thèmes : --c-gold-on-dark (panneaux sombres),
   --c-gold-text / --c-green-text / --c-link (surfaces claires).
   ========================================================================== */

/* ---------- Carte d'auteur (dans l'en-tête sombre) ---------- */
/* Centrée sur l'axe du titre : l'en-tête aligne son contenu au centre, mais un conteneur flex ignore text-align. */
.author-word .aw-card { display: flex; align-items: center; gap: 1.1rem; margin: 1.5rem auto 0; padding: 1rem 1.4rem; border: 1px solid rgba(200, 155, 94, .45); border-radius: var(--r-md); background: rgba(255, 255, 255, .06); backdrop-filter: blur(4px); width: fit-content; max-width: 100%; text-align: start; }
.author-word .aw-card-mark { flex: 0 0 auto; width: 58px; height: 58px; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid var(--c-gold); background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .16), rgba(0, 0, 0, .28)); color: var(--c-gold-on-dark, var(--c-gold)); font-family: var(--font-heading); font-size: 1.75rem; font-weight: 700; line-height: 1; }
.author-word .aw-card figcaption { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.author-word .aw-card-label { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--c-gold-on-dark, var(--c-gold)); }
.author-word .aw-card-name { font-family: var(--font-heading); font-size: 1.32rem; line-height: 1.15; color: #fff; }
.author-word .aw-card-kunya { font-size: .95rem; font-style: italic; color: var(--c-gold-light, var(--c-gold)); }
.author-word .aw-card-role { font-size: .84rem; color: rgba(255, 255, 255, .78); }
.author-word .aw-card-ar { font-family: var(--font-arabic); font-size: 1.02rem; color: var(--c-gold-light, var(--c-gold)); margin-top: .15rem; }

/* ---------- Sommaire navigable ---------- */
.author-word .aw-toc { margin: 1.4rem 0 .4rem; padding: 1rem 1.2rem; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-paper); box-shadow: var(--shadow-sm); }
.author-word .aw-toc-title { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--c-gold-text, var(--c-gold-deep)); margin-bottom: .7rem; }
.author-word .aw-toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .4rem; }
.author-word .aw-toc li { margin: 0; }
.author-word .aw-toc a { display: grid; grid-template-columns: 26px 18px 1fr; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: var(--r-sm); border: 1px solid transparent; color: var(--c-ink); font-size: .9rem; line-height: 1.25; transition: border-color var(--transition), background var(--transition); }
.author-word .aw-toc a:hover, .author-word .aw-toc a:focus-visible { border-color: var(--c-gold); background: var(--c-paper-2); color: var(--c-ink); }
.author-word .aw-toc .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--c-border); font-family: var(--font-heading); font-size: .8rem; font-weight: 700; color: var(--c-green-text, var(--c-green-deep)); background: var(--c-paper-2); }
.author-word .aw-toc a:hover .num { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.author-word .aw-toc .bi { color: var(--c-gold-text, var(--c-gold-deep)); font-size: 1rem; }
.author-word .aw-toc .txt { min-width: 0; }

/* Cible d'ancre : on dégage la hauteur de l'en-tête collant et on souligne brièvement la section visée */
.author-word .aw-section { scroll-margin-top: calc(var(--header-h, 64px) + 1.2rem); }
.author-word .aw-section:target { border-color: var(--c-gold); box-shadow: var(--shadow-gold); }

/* ---------- Signature : kunya ---------- */
.author-word .aw-sign-kunya { display: block; font-style: italic; font-size: 1rem; color: var(--c-gold-text, var(--c-gold-deep)); margin-top: -.1rem; }

/* ---------- Retour en haut ---------- */
.author-word .aw-top { display: inline-flex; align-items: center; gap: .3rem; margin-top: 1.1rem; font-size: .85rem; font-weight: 600; color: var(--c-gold-on-dark, var(--c-gold)); border-bottom: 1px solid transparent; }
.author-word .aw-top:hover { border-bottom-color: currentColor; color: var(--c-gold-on-dark, var(--c-gold)); }
.author-word .aw-top .bi { font-size: 1.3rem; }

/* ---------- Adaptations ---------- */
@media (max-width: 767.98px) {
  .author-word .aw-card { flex-direction: column; align-items: flex-start; gap: .7rem; padding: .8rem .9rem; }
  .author-word .aw-toc ol { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .author-word .aw-toc a { transition: none; } }
[dir="rtl"] .author-word .aw-card-label, [dir="rtl"] .author-word .aw-toc-title { letter-spacing: 0; }

/* ---------- Texte sur deux colonnes (grand écran) : plus d’espace vide à droite ---------- */
.author-word .aw-section p.aw-lead,
.author-word .aw-prose p { max-width: none; }
@media (min-width: 992px) {
  .author-word .aw-prose { column-count: 2; column-gap: 2.8rem; column-rule: 1px solid var(--c-border-soft); margin-bottom: .6rem; }
  .author-word .aw-prose p { break-inside: avoid; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
  .author-word .aw-prose p:first-child { margin-top: 0; }
}

/* ==========================================================================
   Invitation au mot de l'auteur (partials/author-invite.php, mise en page de base dans pages.css).
   La carte d'identité a été retirée du bloc : elle redisait celle du mot complet, sur la même page.
   La grille passe donc de trois à deux colonnes ; signature courte en guise de byline.
   ========================================================================== */
.author-invite { grid-template-columns: 96px 1fr; }
.author-invite .ai-byline { display: flex; align-items: center; gap: .5rem; margin: .1rem 0 .9rem; font-size: .95rem; color: rgba(255, 255, 255, .88); }
.author-invite .ai-byline .bi { color: var(--c-gold-on-dark, var(--c-gold)); }
.author-invite .ai-byline strong { font-family: var(--font-heading); font-weight: 600; color: #fff; }
.author-invite .ai-byline span { font-style: italic; color: var(--c-gold-light, var(--c-gold)); }
.author-invite .ai-byline span::before { content: "— "; font-style: normal; }
@media (max-width: 767.98px) { .author-invite { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Accueil : sections 2 à 8 repliables (details.aw-fold) ---------- */
.author-word details.aw-fold > summary { list-style: none; cursor: pointer; border-radius: var(--r-md); padding: .35rem .5rem; margin-inline: -.5rem; transition: background var(--transition, .2s); }
.author-word details.aw-fold > summary::-webkit-details-marker { display: none; }
.author-word details.aw-fold > summary:hover { background: var(--c-gold-soft); }
.author-word details.aw-fold > summary:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }
.author-word details.aw-fold > summary h3 { margin-bottom: 0; }
.author-word .aw-fold-icon { margin-inline-start: auto; flex: 0 0 auto; font-size: 1.25rem; color: var(--c-gold-text); transition: transform .25s ease; }
.author-word details.aw-fold[open] > summary .aw-fold-icon { transform: rotate(180deg); }
.author-word details.aw-fold[open] > summary { margin-bottom: .8rem; }
.author-word details.aw-fold + details.aw-fold { padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { .author-word .aw-fold-icon { transition: none; } }
