/*
 * Nexstory boutique — ajouts du theme, charges APRES la feuille Tailwind de Zite
 * (assets/css/zite-<surface>.css, reprise telle quelle sans l import Google Fonts : Poppins est
 * servie par le theme). A specificite egale, ces regles l emportent.
 *
 * Regles de Jason (01/10/2026), valables pour tous ses sites :
 *  - couleurs alignees sur l application Nexstory (nexstory_school/lib/theme/app_theme.dart) :
 *    fond #080627, cartes #141234, texte attenue #93AFF5 ; primaire = degrade de marque
 *    #2C4196 (hsl 228 55% 38%, deja celui de Zite) ;
 *  - boutons d action = bouton « Accepter » de la boite de consentement : primaire, texte blanc ;
 *  - aucun lien souligne, ni au repos ni au survol.
 */

/* ---------- Couleurs de l application ---------- */
:root, .dark {
	--background: 244 73% 9%;
	--card: 244 49% 14%;
	--muted-foreground: 223 83% 77%;
}
html, body { background: hsl(var(--background)); }

/* ---------- WordPress ---------- */
.wp-site-blocks { padding: 0 !important; min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
[hidden] { display: none !important; }
.admin-bar [data-nxb-entete], .admin-bar [data-nxb-progression] { top: 32px; }
@media (max-width: 782px) { .admin-bar [data-nxb-entete] { top: 46px; } }

/* ---------- Ecran de chargement (PageLoader.tsx), une fois par visite ---------- */
.nxb-chargement { position: fixed; inset: 0; z-index: 9999; background: #080627; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .3s ease; }
.nxb-chargement p { font-family: Poppins, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: #fff; }
.nxb-chargement.est-fini { opacity: 0; pointer-events: none; }
.nxb-deja-vu .nxb-chargement, html:not(.nxb-js) .nxb-chargement { display: none; }

/* ---------- Aucun lien souligne ---------- */
.nxb a, .nxb a:hover, .nxb a:focus, .nxb .underline, .nxb .hover\:underline:hover { text-decoration: none !important; }
.nxb .prose a { font-weight: 600; color: #fff; }

/* ---------- Boutons d action = « Accepter » ---------- */
.nxb [data-nxb-lettre] button[type="submit"],
.nxb [data-nxb-livre] a.rounded-lg:not([data-possede]),
.nxb-consentement__boutons button[data-nxb-choix="oui"] {
	background: hsl(var(--primary)) !important;
	border-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
}

/* ---------- FAQ : contenu replie ---------- */
.nxb [role="region"][hidden] { display: none !important; }
.nxb .prose p + p, .nxb .prose ul { margin-top: .5rem; }
.nxb .prose ul { list-style: disc; padding-left: 1.25rem; }

/* ---------- Classes que Zite compilait a la volee (absentes de sa feuille) ---------- */
.hover\:bg-white\/8:hover { background-color: rgb(255 255 255 / .08); }

/* ---------- Consentement a la mesure d audience (inc/consentement.php) ---------- */
.nxb-consentement { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9990; max-width: 820px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 16px; border-radius: 20px; border: 1px solid rgba(59, 96, 212, .22); background: rgba(8, 6, 39, .86); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 32px rgba(0, 0, 0, .45); color: #fff; font-family: Poppins, Arial, sans-serif; }
.nxb-consentement__texte { flex: 1 1 260px; }
.nxb-consentement__texte strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.nxb-consentement__texte p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .8); }
.nxb-consentement__texte a { color: #93AFF5; font-weight: 600; white-space: nowrap; }
.nxb-consentement__boutons { display: flex; gap: 8px; flex: 0 0 auto; }
.nxb-consentement__boutons button { font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .05); color: #fff; cursor: pointer; white-space: nowrap; }
.nxb-consentement__boutons button:hover { opacity: .9; }
@media (max-width: 767px) { .nxb-consentement { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (max-width: 480px) {
	.nxb-consentement { flex-direction: column; align-items: stretch; }
	.nxb-consentement__texte { flex: 0 0 auto; }
	.nxb-consentement__boutons button { flex: 1; }
}

/* ---------- Boutons d action (CTA) = couleur du bouton « Accepter » : #3B60D4 (consigne du 01/10 soir) ---------- */
.nxb button.bg-primary, .nxb a.bg-primary,
.nxb [data-nxb-lettre] button[type="submit"],
.nxb [data-nxb-livre] a.rounded-lg:not([data-possede]),
.nxb-consentement__boutons button[data-nxb-choix="oui"] {
	background: #3B60D4 !important;
	border-color: #3B60D4 !important;
	color: #fff !important;
}
.nxb button.bg-primary:hover, .nxb a.bg-primary:hover { background: #3556c0 !important; }

/* ---------- Page de vente (landing-html de la feuille School) : liens jamais soulignes ---------- */
.nxb .landing-html a { color: #94aff5; font-weight: 600; }
.nxb .landing-html a:hover { color: #c2d2f9; }
.nxb .landing-html u { text-decoration: none; font-weight: 600; }

/* ---------- Page d article : bouton Fermer sous l en-tete ---------- */
.nxb .nxb-article a[aria-label="Fermer"] { position: absolute; top: 16px; right: 16px; }
.nxb .nxb-article { position: relative; }
.nxb .nxb-article .prose a { color: #94aff5; }

/* ---------- Compte : survol des lignes (onMouseEnter de Zite) ---------- */
.nxb .nxb-ligne-compte:hover { background: rgba(59, 96, 212, 0.12) !important; }
.nxb .nxb-reseau:hover { background: rgba(59, 96, 212, 0.18) !important; }
.nxb input[readonly] { opacity: .85; cursor: default; }

/* ---------- Liseuse PDF : pas d impression (PdfViewerModal) ---------- */
.pdf-print-notice { display: none; }
@media print {
	body.pdf-viewer-open > *:not(div) { display: none !important; }
	body.pdf-viewer-open .pdf-print-notice { display: block; padding: 48px; text-align: center; font-family: Poppins, sans-serif; color: #000; }
	body.pdf-viewer-open .pdf-print-notice ~ * { display: none !important; }
}

/* ---------- Mes appareils (page compte, projet 58 tache 13) : ligne en colonne sur mobile ---------- */
.nx-appareil__actions button { min-height: 36px; }
@media (min-width: 640px) {
	.nx-appareil { flex-direction: row; align-items: center; }
	.nx-appareil__actions { justify-content: flex-end; flex-wrap: nowrap; }
}

/* ---------- Titre principal (H1) lu par les moteurs et les lecteurs d ecran, invisible a l ecran (projet 58, tache 14) ---------- */
.nxb-titre-cache { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Revue legale (02/10/2026) : pied (liens legaux, « Gérer les cookies ») visible sous 768 px sur Livres,
   et au-dessus de la barre de navigation fixe du bas (Livres et School ; mesure Playwright 375 px). */
@media (max-width: 767px) {
	.nxb #site-footer.hidden { display: block; }
	body:has(nav.fixed.bottom-0) #site-footer { padding-bottom: 72px; }
}
