/* =============================================================================
   Fond sombre sur smartphone pour les autres pages du site (15 novembre 2026, demande de Rémi)
   -----------------------------------------------------------------------------
   Même principe que l'accueil (css/sartine-sombre.css) : chargée avec le media mobile
   (≤ 800 px de large ou ≤ 599 px de haut) par brief, projets, liseuse, mentions légales,
   404, shop et connexion admin. Sur ordinateur, rien ne change.
   ========================================================================== */

/* Hauteur de la barre d'état à rattraper, SEULEMENT dans le site installé (PWA, barre translucide). Dans Safari,
   env(safe-area-inset-top) ne vaut pas toujours 0 (vu au retour du shop vers la home, 15-11-2026 : header décalé
   d'une soixantaine de pixels) alors que la page y commence déjà sous l'heure : on ne s'y fie donc qu'en PWA. */
:root { --haut-pwa: 0px; }
@media (display-mode: standalone) { :root { --haut-pwa: env(safe-area-inset-top, 0px); } }
html.pwa:root { --haut-pwa: env(safe-area-inset-top, 0px); }

:root:root:root {
    --white: #15161a !important;
    --black: #f5f6fa !important;
    --hero-responsive: #f5f6fa !important;
    --hero-color: #0060ff !important;
    --hc-encre: #05276b !important;
    --infuse-color: #692aec !important;
    --jo-color: #7660e2 !important;   /* JO : #625798 trop sourd sur la nuit (choix de Rémi, 15-11-2026) */
    /* brief */
    --purple: #0060ff !important;
    /* liseuse */
    --lz-encre: #f5f6fa !important;
    --lz-bleu-texte: #f5f6fa !important;
    --lz-bleu: #0060ff !important;
    /* 404 */
    --blanc-404: #15161a !important;
    --studio-404: #f5f6fa !important;
    /* shop (styles Spreadshirt) */
    --sprd-main1: #15161a !important;
    --sprd-main1-shifted: #24252b !important;
    --sprd-main2: #f5f6fa !important;
    --sprd-main2-shifted: #d9dae0 !important;
    --sprd-main2-shifted-3: #b9bac2 !important;
    --sprd-main3: #15161a !important;
    --boutique-sartine-color: #0060ff !important;
    /* connexion admin */
    --bg: #15161a !important;
}
html, body { background: #15161a !important; color: #f5f6fa; }

/* logos des en-têtes : « Sartine » en bleu, « Studio graphique » en blanc */
html body .header-logo #poisson path, html body .header-logo-404 #poisson path { fill: #0061ff !important; }
html body .header-logo #texte path, html body .header-logo-404 #texte path { fill: #f5f6fa !important; }

/* flèches et pictos dessinés en sombre : en blanc */
html body img[src*="retour.svg"],
html body img[src*="fleche.svg"],
html body img[src*="insta.svg"],
html body img[src*="panier"] { filter: invert(1) brightness(1.15) !important; }

/* header transparent (15-11-2026) : plus de voile sous le menu, le fond sombre suffit
   (et le jeu Space Miaou, sur la même nuit, s'enchaîne sans bandeau) */
html body .site-header::before { display: none !important; }
/* sans voile, un header fixe passerait sur le texte : sur ces pages il part avec le défilement */
html body .site-header.site-header { position: absolute !important; }
/* site installé (PWA, barre d'état translucide) : le header descend sous l'heure ; dans Safari la marge vaut 0 */
html body .site-header.site-header { padding-top: calc(30px + var(--haut-pwa)) !important; }
/* sauf le shop (15-11-2026, Rémi : « le header doit rester fixe ») : logo et panier restent à l'écran.
   Comme sur la home (css/sartine-sombre.css), le header ne fait plus de boîte et ses deux morceaux sont fixes
   séparément : un élément fixe pleine largeur en haut ferait peindre à Safari 26 un fond plein sous l'heure. */
@media (max-width: 800px) {
    html body:has(#panier-icon) .site-header.site-header { display: contents; }
    html body:has(#panier-icon) .site-header.site-header > .header-logo,
    html body:has(#panier-icon) .site-header.site-header > .header-nav { position: fixed; top: calc(30px + var(--haut-pwa)); z-index: 1000; }
    html body:has(#panier-icon) .site-header.site-header > .header-logo { left: 30px; }
    html body:has(#panier-icon) .site-header.site-header > .header-nav { right: 30px; height: 53px; display: flex; align-items: center; }
    /* shop : le header s'efface une fois passée l'introduction (comme sur la home à partir du book) et revient en haut
       de page ou quand on ajoute un article au panier (shop/js/header-shop.js, 16-11-2026) */
    html body:has(#panier-icon) .site-header.site-header > .header-logo,
    html body:has(#panier-icon) .site-header.site-header > .header-nav { transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .35s ease; }
    html body:has(#panier-icon) .site-header.site-header.header-cache > * { transform: translateY(calc(-120px - var(--haut-pwa))); opacity: 0; pointer-events: none; }
    /* quand il revient montrer le panier (ajout d'un article) : voile sombre en fondu dessous, version sombre du voile
       clair de l'ordinateur ; seulement le temps de l'apparition (shop/js/header-shop.js, .header-panier) */
    html body:has(#panier-icon) .site-header.site-header.header-panier::before {
        display: block !important; content: ''; position: fixed; top: 0; left: 0; right: 0;
        height: calc(150px + var(--haut-pwa)); z-index: 999; pointer-events: none;
        background: linear-gradient(#15161a, rgba(21, 22, 26, .7) 85%, rgba(21, 22, 26, 0)) !important;
        -webkit-mask-image: none; mask-image: none; backdrop-filter: none; -webkit-backdrop-filter: none;
        opacity: 1; animation: voile-panier .35s ease both;
    }
    html body:has(#panier-icon) .site-header.site-header.header-panier-sortie::before { animation: voile-panier-sortie .4s ease both; }
    @keyframes voile-panier { from { opacity: 0; } }
    @keyframes voile-panier-sortie { to { opacity: 0; } }
}

/* ---------- brief : les gris étaient des noirs transparents ---------- */
:root:root:root { --border: rgba(245, 246, 250, .14) !important; --muted: rgba(245, 246, 250, .55) !important; }
html body input[type="text"], html body input[type="email"], html body input[type="url"], html body input[type="date"],
html body select, html body textarea { background: rgba(245, 246, 250, .06) !important; color: #f5f6fa !important; }
html body .toggle-group label { background: rgba(245, 246, 250, .05) !important; }
html body .ref-block { background: rgba(245, 246, 250, .03) !important; }
html body .upload-zone { border-color: rgba(245, 246, 250, .25) !important; }
html body .upload-hint { color: rgba(245, 246, 250, .45) !important; }
html body .form-rgpd { color: rgba(245, 246, 250, .65) !important; }
html body p[style*="rgba(17,17,17"] { color: rgba(245, 246, 250, .5) !important; }

/* ---------- liseuse : fond et barre ---------- */
:root:root:root { --lz-fond: #15161a !important; }

/* ---------- 404 : fond blanc codé en dur ---------- */
html body { background-color: #15161a !important; }
html body #p404 { background: #15161a !important; }
html body .titre-404-code, html body .nav-item-404, html body .stitre-404 { color: #f5f6fa !important; }
html body .titre-404-mot { color: #0060ff !important; }
html body .header-nav-404 img { filter: invert(1) brightness(1.15) !important; }

/* ---------- shop ---------- */
html body .btn-panier, html body .format-add-btn { background: #0060ff !important; color: #ffffff !important; }
html body .produits-description li, html body .produit-info { color: rgba(245, 246, 250, .65) !important; }
html body .produit-info strong { color: rgba(245, 246, 250, .85) !important; }
html body .produits-note, html body .note-prix { color: rgba(245, 246, 250, .5) !important; }
html body .drawer-vide, html body .drawer-item-format, html body .drawer-item-qty { color: rgba(245, 246, 250, .6) !important; }
html body .modal-panier-inner .modal-close { background: #24252b !important; }
/* tiroir du panier (15-11-2026) : la croix, la corbeille et les totaux étaient restés en noir (invisibles), et dans le
   site installé (PWA) le haut du tiroir passait sous l'heure, où le doigt ne l'atteint pas : on le descend */
html body #panier-drawer { padding-top: var(--haut-pwa); padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box; }
html body .drawer-close { opacity: .85 !important; min-width: 44px; min-height: 44px; }
html body .drawer-item-trash { color: rgba(245, 246, 250, .6) !important; min-width: 44px; min-height: 44px; }
html body .drawer-item-trash:hover, html body .drawer-item-trash:focus-visible { color: #0061ff !important; }
html body .drawer-total-line { color: rgba(245, 246, 250, .65) !important; }
html body .drawer-total-line.total, html body .drawer-total-line.total span:last-child { color: #f5f6fa !important; }
html body .drawer-note-port { color: rgba(245, 246, 250, .5) !important; }
html body .drawer-item, html body .drawer-header, html body .drawer-footer { border-color: rgba(245, 246, 250, .12) !important; }

/* Boutons d'appel (CTA) en fond sombre : états inversés (demande de Rémi, 15 novembre 2026). Au repos, aplat bleu
   #0061ff et texte blanc ; au survol ou au toucher, le contour blanc d'origine sur fond transparent.
   (En fond clair, c'était l'inverse : contour au repos, aplat #4f00f5 au survol.) */
html body .btn-brief, html body .btn-submit {
    background-color: #0061ff !important; border-color: transparent !important; color: #ffffff !important;
}
html body .btn-brief img { filter: invert(1) brightness(1.15) !important; }
html body .btn-brief:hover, html body .btn-brief:focus-visible, html body .btn-brief:active,
html body .btn-submit:hover, html body .btn-submit:focus-visible, html body .btn-submit:active {
    background-color: transparent !important; border: 1px solid #f5f6fa !important; color: #f5f6fa !important;
}

/* le bleu ciel #8fc5ff des pages annexes devient le bleu #0061ff en fond sombre (demande de Rémi) */
:root:root:root { --bleu-404: #0061ff !important; }
html body .shop-toggle-btn--active { background: #0061ff !important; border-color: #0061ff !important; color: #ffffff !important; }
html body .bab-sprd-card.selected { border-color: #0061ff !important; background: rgba(0, 97, 255, .14) !important; }

/* ---------- banc de poissons du loader (shop) : la même gamme que la home en sombre (css/sartine-sombre.css),
   du bleu du site #0060ff au bleu de la carte #05276b (15-11-2026, oubli signalé par Rémi) ---------- */
html body .fish img[src$="loader001.svg"] { content: url(../img/loader/sombre/loader001.svg?v=2026-11-15b); }
html body .fish img[src$="loader002.svg"] { content: url(../img/loader/sombre/loader002.svg?v=2026-11-15b); }
html body .fish img[src$="loader003.svg"] { content: url(../img/loader/sombre/loader003.svg?v=2026-11-15b); }
html body .fish img[src$="loader004.svg"] { content: url(../img/loader/sombre/loader004.svg?v=2026-11-15b); }
html body .fish img[src$="loader005.svg"] { content: url(../img/loader/sombre/loader005.svg?v=2026-11-15b); }
html body .fish img[src$="loader006.svg"] { content: url(../img/loader/sombre/loader006.svg?v=2026-11-15b); }
html body .fish img[src$="loader007.svg"] { content: url(../img/loader/sombre/loader007.svg?v=2026-11-15b); }
html body .fish img[src$="loader008.svg"] { content: url(../img/loader/sombre/loader008.svg?v=2026-11-15b); }
html body .fish img[src$="loader009.svg"] { content: url(../img/loader/sombre/loader009.svg?v=2026-11-15b); }
html body .fish img[src$="loader010.svg"] { content: url(../img/loader/sombre/loader010.svg?v=2026-11-15b); }

/* shop : le haut (« Shop », « Marseille s'affiche en grand ! ») descend de 20 px (30 : « un poil trop bas »), il était trop collé au logo
   (15-11-2026, Rémi) ; dans le site installé, il descend en plus de la hauteur de la barre d'état, comme le header */
html body main.spreadshirt { padding-top: calc(70px + var(--haut-pwa)) !important; }

/* l'onde du logo (js/logo-prisme.js) : ton sur ton, dans le bleu du mot (15-11-2026, Rémi) */
:root:root:root { --onde-reflet-1: #0061ff; --onde-reflet-2: #0052d9; }

/* brief : le haut (« Brief Créatif », « Parlons de votre projet. ») descend comme celui du shop (16-11-2026, Rémi) :
   20 px de plus, et dans le site installé la hauteur de la barre d'état (le header y descend déjà d'autant) */
html body .brief-hero { padding-top: calc(160px + var(--haut-pwa)) !important; }
/* mentions légales : même poussée que le brief et le shop (16-11-2026) */
html body main.mentions { padding-top: calc(180px + var(--haut-pwa)) !important; }
