/*
Theme Name: UPB
Description: Thème enfant d'Astra pour Univers Petite Bulle : reprend le design des maquettes validées.
Author: UPB
Template: astra
Version: 0.3.18
Text Domain: upb
*/
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
body{margin:0;background:oklch(0.975 0.012 80);color:oklch(0.24 0.02 40);font-family:'Hanken Grotesk',sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
a:hover{color:oklch(0.55 0.1 5)}
button{font-family:inherit}
img{max-width:100%;height:auto}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none !important}
.upb-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Texte éditable (pages légales et pages de texte) : typographie des maquettes */
.upb-legal>p:first-child{margin:0 0 56px;font-size:18px;line-height:1.6;max-width:520px}
.upb-legal h2{margin:0 0 14px;padding-top:40px;border-top:1.5px solid oklch(0.24 0.02 40);font-family:'Bricolage Grotesque',sans-serif;font-weight:700;font-size:clamp(26px,6vw,36px);line-height:1.02;letter-spacing:-0.03em}
.upb-legal h2:not(:first-of-type){margin-top:40px}
.upb-legal p{margin:0 0 12px;font-size:16px;line-height:1.7}
.upb-legal p:last-child{margin-bottom:0}
.upb-legal section+h2{margin-top:40px}
.upb-legal a{font-weight:600;border-bottom:1px solid currentColor;padding-bottom:1px;word-break:break-word}
/* Formulaire de contact */
.upb-field label{display:block;margin-bottom:8px;font-family:'DM Mono',monospace;font-size:11px;letter-spacing:.1em;text-transform:uppercase}
.upb-field input,.upb-field textarea{display:block;width:100%;min-height:52px;padding:0 18px;border-radius:14px;border:1.5px solid oklch(0.24 0.02 40);background:oklch(0.975 0.012 80);color:oklch(0.24 0.02 40);font-family:'Hanken Grotesk',sans-serif;font-size:16px;outline:none}
.upb-field textarea{min-height:150px;padding:14px 18px;resize:vertical;line-height:1.5}
.upb-field input:focus,.upb-field textarea:focus{box-shadow:0 0 0 3px oklch(0.88 0.05 245)}
.upb-err{margin-top:8px;font-size:14px;color:oklch(0.55 0.1 5)}
@media (min-width:1024px){
	.upb-legal>p:first-child{font-size:18px}
}

/* Accueil : deux compositions, bascule à 1024 px comme dans la maquette */
.upb-d{display:none}
@media (min-width:1024px){.upb-m{display:none}.upb-d{display:block}}

/* Duo de Polaroïdes : flèches visibles au survol ou au focus (souris, clavier) ; absentes au tactile */
.upb-duo-btn{width:44px;height:44px;border-radius:50%;border:1.5px solid oklch(0.24 0.02 40);background:oklch(0.975 0.012 80);color:oklch(0.24 0.02 40);font-size:18px;cursor:pointer;opacity:0;transition:opacity .2s}
[data-duo]:hover .upb-duo-btn,.upb-duo-btn:focus{opacity:1}
@media (hover:none){.upb-duo-btn{display:none}}

/* Lisibilité mobile et contrastes (retours du site de test) */
body.upb-atelier p{font-size:20px !important;line-height:1.55 !important}
body.upb-atelier a,body.upb-atelier button{font-size:17px}
body.upb-atelier [style*="DM Mono"]{font-size:13px !important}
body.upb-atelier [data-act^="atoggle"]:is(button){font-size:16px !important}
body.upb-atelier button[data-act^="ashare"]{width:44px !important;height:44px !important;border:1.5px solid oklch(0.24 0.02 40) !important;background:oklch(0.975 0.012 80) !important;color:oklch(0.24 0.02 40) !important}
body.upb-atelier span[style*="top:8px"][style*="right:8px"]{border:1.5px solid oklch(0.24 0.02 40);width:36px !important;height:36px !important;font-size:18px !important}
body.upb-fiche a[data-tip],body.upb-fiche a[href*="pinterest.com"],body.upb-fiche button[data-act="share"]{font-size:17px !important}

/* Atelier : description courte, interlignage resserré et espace avant le bouton */
body.upb-atelier .upb-desc{line-height:1.3 !important;margin:4px 0 22px !important}

section[id],div[id="coloriages"],div[id="recettes"],div[id="marque-pages"],div[id^="activite-"]{scroll-margin-top:110px}
/* Histoire de la création : le HTML saisi dans l'éditeur garde la taille et l'interligne du premier paragraphe */
.upb-story p{font-size:inherit;line-height:inherit;margin:16px 0}
