/* Feuille de style de la PWA (pages du site, test et hors connexion) : composants des vues Views/Pwa/_*.php. Les règles qui dépendent du thème sont dans Views/Pwa/_css.php (dans <head>, après cette feuille). */

/* Indicateur de chargement (_progress) */
#pwa-progress { display: var(--theme-loader-bar, block); position: fixed; z-index: 2147483645; top: 0; left: 0; width: 0; height: 3px; background: var(--theme-loader-color, var(--theme-primary)); pointer-events: none; }
/* Cercle : au centre de l'écran, sans fond, il tourne */
#pwa-spinner { display: var(--theme-loader-circle, none); position: fixed; z-index: 2147483645; top: 50%; left: 50%; box-sizing: border-box; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border: 3px solid rgba(127, 127, 127, .25); border-top-color: var(--theme-loader-color, var(--theme-primary)); border-radius: 50%; opacity: 0; pointer-events: none; animation: pwa-spin .8s linear infinite; transition: opacity .2s ease; }
#pwa-spinner.show { opacity: 1; }
@keyframes pwa-spin { to { transform: rotate(360deg); } }
/* Chargement de la page : le contenu attend d'être prêt (images visibles, polices), puis apparaît en fondu avec un léger glissement */
#pwa-content, .app-footer { transition: opacity .45s ease, transform .45s ease; }
html.pwa-wait #pwa-content { opacity: 0; transform: translateY(14px); }
html.pwa-wait .app-footer { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #pwa-content, .app-footer { transition: opacity .2s ease; } html.pwa-wait #pwa-content { transform: none; } }

/* Copyright de bas de page (_copyright) */
.app-copyright { padding: 1.5rem var(--gutter, 1rem) 2rem; text-align: center; font-size: .85rem; opacity: .75; }
.app-copyright a { color: inherit; text-decoration: none; }
.app-copyright.fixed { position: fixed; right: 0; bottom: 0; left: 0; padding: 1rem; }

/* Boîte des cookies (_cookie-box) */
.pwa-cookie { position: fixed; z-index: 2147483000; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); left: 1rem; max-width: 30rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.25rem; border-radius: var(--theme-cookie-radius, .75rem); background: var(--theme-cookie-background, var(--theme-background)); color: var(--theme-cookie-text, var(--theme-text)); box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .3); font-size: .9rem; line-height: 1.5; opacity: 0; transform: translateY(1.5rem); transition: opacity .4s ease, transform .4s ease; }
@media (min-width: 640px) { .pwa-cookie { right: auto; left: 1.5rem; bottom: calc(1.5rem + env(safe-area-inset-bottom)); } }
.pwa-cookie.show { opacity: 1; transform: none; }
.pwa-cookie-head { display: flex; gap: 1rem; align-items: flex-start; }
.pwa-cookie-icon { flex: none; font-size: 2rem; line-height: 1; color: var(--theme-cookie-btn, var(--theme-primary)); }
.pwa-cookie-text { min-width: 0; }
.pwa-cookie-text > :first-child { margin-top: 0; }
.pwa-cookie-text h2, .pwa-cookie-text h3, .pwa-cookie-text h4 { margin: 0 0 .4rem; font-family: var(--theme-font-title, inherit); line-height: 1.25; }
.pwa-cookie-text p { margin: 0 0 .6rem; }
.pwa-cookie-text a, .pwa-cookie-info a { color: inherit; text-decoration: underline; }
.pwa-cookie-choices { margin: .5rem 0 1rem; }
.pwa-cookie-choice { display: flex; align-items: center; gap: .75rem; padding: .35rem 0; }
.pwa-cookie-choice label { flex: 1; display: flex; align-items: center; gap: .75rem; margin: 0; cursor: pointer; }
.pwa-cookie-choice.is-locked label { opacity: .55; cursor: default; }
.pwa-cookie-switch { position: relative; flex: none; width: 2.4rem; height: 1.3rem; }
.pwa-cookie-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.pwa-cookie-switch span { position: absolute; inset: 0; border-radius: 1rem; background: rgba(127, 127, 127, .45); transition: background .2s ease; }
.pwa-cookie-switch span::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s ease; }
.pwa-cookie-switch input:checked + span { background: var(--theme-cookie-btn, var(--theme-primary)); }
.pwa-cookie-switch input:checked + span::after { transform: translateX(1.1rem); }
.pwa-cookie-info-toggle { flex: none; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: 50%; background: currentColor; cursor: pointer; position: relative; }
.pwa-cookie-info-toggle::after { content: "i"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--theme-cookie-background, #fff); font: 700 .8rem/1 Georgia, serif; }
.pwa-cookie-info { display: none; margin: 0 0 1rem; padding: .75rem .9rem; border-radius: calc(var(--theme-cookie-radius, .75rem) / 1.5); background: rgba(127, 127, 127, .14); font-size: .85rem; }
.pwa-cookie-info.is-open { display: block; }
.pwa-cookie-info > :first-child { margin-top: 0; } .pwa-cookie-info > :last-child { margin-bottom: 0; }
.pwa-cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pwa-cookie-actions button { flex: 1 1 auto; padding: .6rem .9rem; border: 0; border-radius: var(--theme-btn-radius, .4rem); font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; }
.pwa-cookie-reject { background: rgba(127, 127, 127, .22); color: inherit; }
.pwa-cookie-choose, .pwa-cookie-accept { background: var(--theme-cookie-btn, var(--theme-primary)); color: var(--theme-cookie-btn-text, #fff); }
.pwa-cookie-open { cursor: pointer; }
.app-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .75rem; margin-top: -.75rem; padding: 0 var(--gutter, 1rem) 1.25rem; font-size: .85rem; }
.app-footer-links:empty { display: none; }
.app-footer-links a { color: inherit; opacity: .75; text-decoration: none; }

/* Boîte de notifications (_notify-box) */
.pwa-notify { position: fixed; z-index: 2147483000; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); left: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; max-width: 26rem; margin: 0 auto; padding: 1rem 1.1rem; border-radius: var(--theme-notify-radius, .75rem); background: var(--theme-notify-background, var(--theme-background)); color: var(--theme-notify-text, var(--theme-text)); box-shadow: 0 .5rem 1.75rem rgba(0, 0, 0, .28); font-size: .9rem; line-height: 1.4; opacity: 0; transform: translateY(1.5rem); transition: opacity .4s ease, transform .4s ease; }
.pwa-notify.show { opacity: 1; transform: none; }
.pwa-notify-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--theme-notify-btn, var(--theme-primary)); color: var(--theme-notify-btn-text, #fff); font-size: 1.1rem; }
.pwa-notify-text { flex: 1 1 10rem; min-width: 0; }
.pwa-notify-text strong { display: block; font-family: var(--theme-font-title, inherit); }
.pwa-notify-text span { opacity: .8; }
.pwa-notify-actions { display: flex; justify-content: flex-end; gap: .5rem; flex: 1 1 100%; }
.pwa-notify-actions button { padding: .5rem 1rem; border: 0; border-radius: var(--theme-btn-radius, .5rem); font: inherit; font-weight: 600; cursor: pointer; }
.pwa-notify-allow { background: var(--theme-notify-btn, var(--theme-primary)); color: var(--theme-notify-btn-text, #fff); }
.pwa-notify-later { background: transparent; color: inherit; opacity: .75; }

/* Navigation ajax (_ajax) */
/* Changement de page : le contenu s'efface en fondu pendant le chargement, puis la nouvelle page arrive (fondu et léger glissement) quand elle est vraiment prête */
#pwa-content.is-loading { opacity: 0; transform: translateY(-8px); transition-duration: .2s; pointer-events: none; }
#pwa-content.is-entering { opacity: 0; transform: translateY(14px); transition: none; }
@media (prefers-reduced-motion: reduce) { #pwa-content.is-loading, #pwa-content.is-entering { transform: none; } }

/* Pied de page (_footer) */
.app-footer { background: var(--theme-footer-background); color: var(--theme-footer-text); }
.app-footer a { color: var(--theme-footer-link); }
/* Liens du bloc du haut (mail, téléphone, adresse) : couleur « Liens » de Design > Pied de page, sans soulignement */
.app-footer .app-footer-main a { color: var(--theme-footer-link); text-decoration: none; }
.app-footer a { transition: color .2s ease, opacity .2s ease; }
.app-footer a:hover, .app-footer a:focus-visible { color: color-mix(in srgb, var(--theme-footer-link) 60%, var(--theme-footer-background)); }
.app-footer-main { display: var(--theme-footer-desktop, block); padding: 4rem var(--gutter, 1rem) 3.5rem; }
@media (max-width: 767.98px) { .app-footer-main { display: var(--theme-footer-mobile, block); } }
/* Colonnes identiques (2, 3 avec Navigation : voir _css.php), l'une sous l'autre sur mobile ; une colonne masquée ou absente ne change pas la largeur des autres */
.app-footer-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: var(--container, var(--theme-container-width, 1140px)); margin: 0 auto; }
@media (min-width: 768px) { .app-footer-inner { grid-template-columns: repeat(var(--theme-footer-columns, 2), minmax(0, 1fr)); } }
.app-footer-brand { display: flex; align-items: center; align-self: start; gap: .6rem; color: var(--theme-footer-text); font-family: var(--theme-font-brand, inherit); font-weight: var(--theme-font-weight-brand, 700); }
.app-footer-logo { height: var(--theme-footer-logo-height, 48px); }
.app-footer-logo-icon { display: var(--theme-footer-logo-icon, block); width: var(--theme-footer-logo-height, 48px); border-radius: .4rem; object-fit: cover; }
.app-footer-logo-icon-reverse { display: var(--theme-footer-logo-icon-reverse, none); width: var(--theme-footer-logo-height, 48px); border-radius: .4rem; object-fit: cover; }
.app-footer-logo-custom { width: auto; max-width: 60vw; object-fit: contain; }
.app-footer-logo-normal { display: var(--theme-footer-logo-normal, none); }
.app-footer-logo-reverse { display: var(--theme-footer-logo-reverse, none); }
.app-footer-name { display: var(--theme-footer-logo-name, inline); }
.logo-fallback .app-footer-logo-icon { display: block; }
.logo-fallback .app-footer-logo-icon-reverse { display: none; }
.logo-fallback .app-footer-logo-custom { display: none; }
.app-footer-title { margin: 0 0 .75rem; font-size: var(--theme-footer-title-size, 1rem); font-weight: var(--theme-footer-title-weight, 700); text-transform: var(--theme-footer-title-transform, none); color: var(--theme-footer-title); font-family: var(--theme-font-title, inherit); }
.app-footer-contact { display: var(--theme-footer-contact, block); }
.app-footer-line { align-items: center; gap: .6rem; margin: 0 0 .4rem; }
.app-footer-line i, .app-footer-social i { color: var(--theme-footer-icon); }
/* Graisse des icônes réglée dans Design (les logos de réseaux sociaux n'ont qu'une graisse) */
.app-footer-line i.fa { font-weight: var(--theme-icon-weight, 400); }
.app-footer-line.mail { display: var(--theme-footer-email, flex); }
.app-footer-line.phone { display: var(--theme-footer-phone, flex); }
.app-footer-line.address { display: var(--theme-footer-address, flex); align-items: flex-start; }
.app-footer-line.address i { margin-top: .25rem; }
.app-footer-line.address a { text-decoration: none; }
.app-footer-social { display: var(--theme-footer-social, flex); flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.app-footer-social li { margin: 0; }
.app-footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 1px solid currentColor; border-radius: 50%; text-decoration: none; font-size: 1.05rem; }
.app-footer .app-copyright { padding: 1.25rem var(--gutter, 1rem) 1rem; }
/* Copyright et liens : barre pleine largeur, fond automatique = celui du pied de page décalé de 8 % vers la couleur du texte */
.app-footer-bottom { background: color-mix(in srgb, var(--theme-footer-text) 8%, var(--theme-footer-background)); }

/* Navigation (_nav) */
.app-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; min-height: var(--theme-nav-height, 64px); padding: 0 max(var(--nav-gutter, 1.25rem), var(--theme-nav-pad, 0px)); background: var(--theme-nav-background); color: var(--theme-nav-text); box-shadow: var(--theme-nav-shadow, none); }
.app-nav { --nav-gutter: 1.25rem; }
@media (min-width: 768px) { .app-nav { --nav-gutter: var(--theme-nav-gutter, 1.25rem); } }
.app-nav a { color: inherit; text-decoration: none; }
.nav-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.nav-logo, .nav-logo-reverse, .nav-appicon, .nav-appicon-reverse { display: var(--theme-brand-logo, none); width: var(--theme-nav-logo-height, 32px); height: var(--theme-nav-logo-height, 32px); border-radius: .4rem; object-fit: cover; }
.nav-logo-reverse { display: var(--theme-brand-logo-reverse, none); }
.nav-logo.nav-logo-real, .nav-logo-reverse.nav-logo-real { width: auto; max-width: 60vw; border-radius: 0; object-fit: contain; }
.nav-appicon { display: var(--theme-brand-icon, none); }
.nav-appicon-reverse { display: var(--theme-brand-icon-reverse, none); }
.nav-tree, .side-nav, .more-nav, .mob-bottom, .mob-overlay { font-family: var(--theme-font-menu, inherit); }
.nav-tree { font-size: var(--theme-nav-font-size, inherit); font-weight: var(--theme-nav-font-weight, inherit); text-transform: var(--theme-nav-text-transform, none); }
.nav-brand-text { display: var(--theme-brand-text, block); font-family: var(--theme-font-brand, inherit); font-weight: var(--theme-font-weight-brand, 700); }
.side-brand { min-width: 0; margin-right: 0; color: inherit; text-decoration: none; }
.side-brand .nav-logo.nav-logo-real, .side-brand .nav-logo-reverse.nav-logo-real { max-width: 200px; }
.app-nav a.nav-btn, .side-extra a.nav-btn, .mob-extra a.nav-btn { display: var(--theme-nav-btn-display, none); white-space: nowrap; }
.nav-btn { --theme-btn-background: var(--theme-nav-btn-bg); --theme-btn-text: var(--theme-nav-btn-text); --theme-btn-fill: var(--theme-nav-btn-fill); --theme-btn-ink: var(--theme-nav-btn-ink); }
.app-nav a.nav-btn-text { color: var(--theme-nav-btn-link, var(--theme-nav-text)); font-weight: 600; text-decoration: none; }
.app-nav a.nav-btn-text:hover { text-decoration: underline; }
.nav-btn .nav-btn-icon { margin-right: .5em; }
.app-nav a.nav-btn[hidden], .side-extra a.nav-btn[hidden], .mob-extra a.nav-btn[hidden] { display: none; }
/* Icônes des menus latéraux : leur propre couleur (Design > Navigation) */
.side-nav, .more-nav, .mob-bottom, .mob-overlay { --theme-nav-icon: var(--theme-side-icon); }
.nav-burger { display: none; padding: .25rem .5rem; border: 0; background: transparent; color: var(--theme-nav-icon); font-size: 1.5rem; line-height: 1; cursor: pointer; }

/* Barre du haut : arbre des pages en menus déroulants */
.nav-tree { display: flex; flex: 1; justify-content: var(--theme-nav-tree-justify, flex-end); }
.nav-tree ul { margin: 0; padding: 0; list-style: none; }
.nav-tree > ul { display: flex; gap: .25rem; }
.nav-tree li { position: relative; }
.nav-tree li > a { position: relative; display: block; padding: .5rem .75rem; border-radius: .5rem; white-space: nowrap; }
.nav-tree li:hover > a { background: rgba(127, 127, 127, .18); }
/* Page active : encadrée (fond + bordure) ou soulignée, selon Design > Entête */
.nav-tree li.is-current > a { background: var(--theme-nav-active-bg, rgba(127, 127, 127, .18)); box-shadow: inset 0 0 0 1px var(--theme-nav-active-border, transparent); color: var(--theme-nav-active-text, var(--theme-nav-text)); }
.nav-tree li.is-current > a::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .1rem; height: 2px; border-radius: 2px; background: var(--theme-nav-active-line, transparent); }
/* Au premier niveau, le trait descend près du bas de la barre, à 10px (le lien est centré dans la hauteur de la barre) */
.nav-tree > ul > li.is-current > a::after { bottom: calc((100% - var(--theme-nav-height, 64px)) / 2 + 10px); }
.nav-tree li > ul { position: absolute; top: 100%; left: 0; display: none; min-width: 12rem; padding: .35rem; border-radius: .75rem; background: var(--theme-nav-background); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.nav-tree li > ul ul { top: 0; left: 100%; }
.nav-tree li:hover > ul, .nav-tree li:focus-within > ul { display: block; }
.nav-caret { opacity: .6; font-size: .8em; color: var(--theme-nav-icon); }

.nav-langs { display: var(--theme-langs-links, flex); gap: .25rem; }
.nav-label { display: inline-flex; align-items: center; gap: .6rem; text-align: left; }
.nav-icon { flex: none; width: 1.25em; color: var(--theme-nav-icon); font-weight: var(--theme-icon-weight, 400); text-align: center; }
.nav-tree .nav-icon { display: var(--theme-icons-desktop, none); }
/* Page d'accueil de la barre du haut : son titre ou son icône seule (Design > Entête > Barre du haut > Page d'accueil) */
.nav-tree > ul > li.is-home > a .nav-icon { display: var(--theme-home-icon, var(--theme-icons-desktop, none)); }
.nav-tree > ul > li.is-home > a .nav-label > span { display: var(--theme-home-text, inline); }
.nav-flag { flex: none; width: 1.25rem; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(127, 127, 127, .3); }
.nav-langs-select { position: relative; display: var(--theme-langs-select, none); font-size: .85rem; }
.nav-langs-select summary { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; border: 1px solid var(--theme-langs-border, transparent); border-radius: .5rem; cursor: pointer; list-style: none; white-space: nowrap; }
.nav-langs-select summary::-webkit-details-marker { display: none; }
.nav-langs-select ul { position: absolute; top: 100%; right: 0; z-index: 60; min-width: 100%; margin: .35rem 0 0; padding: .35rem; list-style: none; border-radius: .75rem; background: var(--theme-nav-background); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.nav-langs-select li a { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; border-radius: .5rem; white-space: nowrap; }
.nav-langs-select li:hover a, .nav-langs-select li.is-active a { background: rgba(127, 127, 127, .18); }
.nav-langs a { display: flex; align-items: center; gap: .4rem; padding: .25rem .5rem; border: 1px solid var(--theme-langs-border, transparent); border-radius: .5rem; font-size: .8rem; font-weight: 600; opacity: .7; }
.nav-langs a.has-flag .nav-lang-code, .nav-langs-select summary.has-flag .nav-lang-name, .nav-langs-select li a.has-flag .nav-lang-label { display: var(--theme-langs-name, inline); }
.nav-langs a.is-active { background: rgba(127, 127, 127, .25); opacity: 1; }

/* Interrupteur clair / sombre (menus latéraux) */
.mode-switch { display: var(--theme-mode-switch, none); align-items: center; justify-content: space-between; gap: 1rem; margin: .5rem 1.25rem 1rem; padding: .7rem 0; border-top: 1px solid rgba(127, 127, 127, .3); cursor: pointer; }
.nav-install { display: flex; align-items: center; width: calc(100% - 2.5rem); margin: -.5rem 1.25rem 1rem; padding: .7rem 0; border: 0; border-top: 1px solid rgba(127, 127, 127, .3); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.nav-install[hidden] { display: none; }
.nav-install span { display: inline-flex; align-items: center; gap: .6rem; }
.nav-install span i.nav-icon { display: inline-block; }
.mode-switch span { display: inline-flex; align-items: center; gap: .6rem; }
.mode-switch span i.nav-icon { display: inline-block; }
.mode-toggle { position: relative; flex: none; width: 2.6rem; height: 1.5rem; margin: 0; border-radius: 1rem; background: rgba(127, 127, 127, .45); cursor: pointer; transition: background .2s; -webkit-appearance: none; appearance: none; }
.mode-toggle::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: transform .2s; }
.mode-toggle:checked { background: var(--theme-primary); }
.mode-toggle:checked::after { transform: translateX(1.1rem); }

/* Pages au-delà de la 5e : bouton à droite de la barre, menu qui s'ouvre de la droite vers la gauche */
.nav-tree li[hidden] { display: none !important; }
.nav-more { padding: .35rem .6rem; border: 0; border-radius: .5rem; background: transparent; color: var(--theme-nav-icon); cursor: pointer; }
.nav-more:hover { background: rgba(127, 127, 127, .18); }
.nav-more .nav-icon { display: inline-block; width: auto; font-size: 1.3rem; }
.more-nav { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-direction: column; width: min(86vw, 340px); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); overflow-y: auto; background: var(--theme-nav-background); color: var(--theme-nav-text); box-shadow: -8px 0 24px rgba(0, 0, 0, .18); transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s; }
.more-nav.is-open { transform: none; visibility: visible; }
.more-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.more-overlay.is-open { opacity: 1; pointer-events: auto; }
.more-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; font-weight: 700; }
.more-close { border: 0; background: transparent; color: var(--theme-nav-icon); font-size: 1.5rem; cursor: pointer; }
.more-nav ul { margin: 0; padding: 0; list-style: none; }
.more-nav ul ul { padding-left: 1rem; }
.more-nav li > a, .more-nav summary { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.25rem; color: inherit; text-decoration: none; cursor: pointer; list-style: none; }
.more-nav summary::-webkit-details-marker { display: none; }
.more-nav summary a { flex: 1; color: inherit; text-decoration: none; }
.more-nav details[open] > summary .nav-caret { transform: rotate(90deg); }
.more-nav li.is-current > a, .more-nav li.is-current > details > summary { background: rgba(127, 127, 127, .18); }
.more-nav .nav-icon { display: var(--theme-icons-sidenav, none); }

/* Menu latéral, à la une et plein écran (mobile) */
.side-nav, .side-overlay, .mob-bottom, .mob-overlay { display: none; }
body::after { content: ""; display: block; height: 0; }

/* Écran de démarrage (Design > Écran de démarrage, Configuration > Pwa) : html.pwa-splash-on le couvre à l'ouverture, pwa-splash.js le masque quand la page est prête ; sans script il disparaît après 9 secondes */
#pwa-splash { display: none; position: fixed; inset: 0; z-index: 2147483646; align-items: center; justify-content: center; background: var(--theme-splash-background, var(--theme-primary)); color: var(--theme-splash-text, #fff); opacity: 1; transition: opacity .35s ease; }
html.pwa-splash-on #pwa-splash, #pwa-splash.is-preview { display: flex; }
#pwa-splash.is-leaving { opacity: 0; pointer-events: none; }
.pwa-splash-inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 2rem; text-align: center; }
.pwa-splash-logo { display: var(--theme-splash-logo, block); width: 7rem; height: 7rem; object-fit: contain; border-radius: var(--theme-splash-logo-radius, 0); }
.pwa-splash-name { display: var(--theme-splash-name, block); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.pwa-splash-circle { display: var(--theme-splash-loader-circle, block); box-sizing: border-box; width: 2rem; height: 2rem; margin-top: .75rem; border: 3px solid color-mix(in srgb, var(--theme-splash-loader-color, currentColor) 25%, transparent); border-top-color: var(--theme-splash-loader-color, currentColor); border-radius: 50%; animation: pwa-spin .8s linear infinite; }
.pwa-splash-bar { display: var(--theme-splash-loader-bar, none); position: relative; overflow: hidden; width: 10rem; height: 4px; margin-top: .75rem; border-radius: 2px; background: color-mix(in srgb, var(--theme-splash-loader-color, currentColor) 25%, transparent); }
.pwa-splash-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 2px; background: var(--theme-splash-loader-color, currentColor); animation: pwa-splash-slide 1.2s ease-in-out infinite; }
@keyframes pwa-splash-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes pwa-splash-failsafe { to { opacity: 0; visibility: hidden; } }
html.pwa-splash-on #pwa-splash { animation: pwa-splash-failsafe .01s 9s forwards; }
@media (prefers-reduced-motion: reduce) { #pwa-splash { transition: none; } .pwa-splash-bar::after { animation-duration: 3s; } }

/* Contenu masqué pendant le chargement (html.pwa-wait posé par le rendu de la page) : sans le script pwa-progress.js, il apparaît quand même après 8 secondes */
@keyframes pwa-failsafe { to { opacity: 1; transform: none; } }
html.pwa-wait #pwa-content, html.pwa-wait .app-footer { animation: pwa-failsafe .01s 8s forwards; }

/* Boutons de partage sous un article de blog (Configuration > Réseaux sociaux) */
.r-share { display: flex; align-items: center; gap: .5rem; max-width: var(--container, var(--theme-container-width, 1140px)); margin: 2rem auto; padding: 0 var(--gutter, 1rem); }
.r-share-label { margin-right: .25rem; font-size: .9rem; opacity: .7; }
.r-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 1px solid rgba(127, 127, 127, .35); border-radius: 50%; color: inherit; font-size: 1rem; text-decoration: none; transition: color .15s, border-color .15s; }
.r-share-btn:hover { border-color: var(--theme-primary); color: var(--theme-primary); }


/* Accès privé : icône utilisateur de la barre du haut (connexion, ou Mon compte une fois connecté) et lien équivalent des menus latéraux */
.nav-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; color: var(--theme-nav-icon); text-decoration: none; }
.nav-cart:hover { background: rgba(127, 127, 127, .18); }
.nav-cart .nav-icon { display: inline-block; width: auto; font-size: 1.15rem; }
.nav-cart-count { position: absolute; top: -.1rem; right: -.1rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 1rem; background: var(--theme-primary); color: var(--theme-primary-text, #fff); font-size: .7rem; font-weight: 700; line-height: 1.1rem; text-align: center; }
.nav-cart-count[hidden] { display: none; }
.nav-user { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; color: var(--theme-nav-icon); text-decoration: none; }
.nav-user:hover { background: rgba(127, 127, 127, .18); }
.nav-user .nav-icon { display: inline-block; width: auto; font-size: 1.15rem; }
.nav-user.is-logged { color: var(--theme-primary, var(--theme-nav-icon)); }
/* Menus latéraux : ligne « Connexion » / « Mon compte », mise en forme comme l'interrupteur de mode sombre qui la suit */
.nav-user-link { display: flex; align-items: center; margin: .5rem 1.25rem -.5rem; padding: .7rem 0; border-top: 1px solid rgba(127, 127, 127, .3); color: inherit; text-decoration: none; }
.nav-user-link span { display: inline-flex; align-items: center; gap: .6rem; }
.nav-user-link span i.nav-icon { display: inline-block; width: auto; }

/* Alertes : fond gris clair, bord gauche épais, coins arrondis à droite (même style que le manager et la documentation) */
.alert { --alert-bar: var(--theme-primary, #3b71ca); margin: 1rem 0; padding: .75rem 1.25rem; border: 0; border-left: 4px solid var(--alert-bar); border-radius: 0 .5rem .5rem 0; background: rgba(127, 127, 127, .12); color: inherit; }
.alert-success { --alert-bar: #1ca36b; }
.alert-warning { --alert-bar: #f0a020; }
.alert-danger { --alert-bar: #dc4c64; }
