/* =========================================================
   UPB — L'ATELIER 2 (page-atelier-2.php)
   Transposition fidèle de l'Artifact « L'Atelier — V3 » : toutes
   les valeurs (couleurs, polices, tailles,
   espacements, rayons, ombres, transitions, points de rupture
   640 / 900 px) sont celles de l'Artifact, y compris celles qui y
   étaient écrites en ligne.
   Chargé uniquement sur ce template. Tout est confiné sous
   .upb-at2-page (préfixe upb-at2-) : aucune règle globale, aucun
   effet sur les autres pages ni sur l'Atelier existant (.upb-ate-*).
   ========================================================= */

/* ---------- Conteneur Astra : pleine largeur (même principe que
   .upb-toutes-creations .site-content > .ast-container) ---------- */
.upb-atelier-2 .site-content > .ast-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

html:has(body.upb-atelier-2) {
    scroll-behavior: smooth;
}

/* ---------- Variables et base (équivalent :root / body de l'Artifact) ---------- */
.upb-at2-page {
    --ink: #3E2A22;
    --ink-soft: #7A5B49;
    --cream: #FBF6EE;
    --cream-2: #F4EBDD;
    --pink: #E9A9B7;
    --pink-soft: #FBE3E8;
    --blue: #AFD7E6;
    --blue-soft: #E7F3F7;
    --white: #FFFFFF;
    --line: #E7DCC9;

    width: 100%;
    min-height: 100vh;
    background: var(--cream);
    position: relative;
    overflow-x: hidden;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: normal;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Remise à zéro locale (contre les styles Astra) ---------- */
.upb-at2-page *,
.upb-at2-page *::before,
.upb-at2-page *::after {
    box-sizing: border-box;
}

.upb-at2-page h1,
.upb-at2-page h2,
.upb-at2-page h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    margin: 0;
    padding: 0;
    color: var(--ink);
}

.upb-at2-page p {
    margin: 0;
    padding: 0;
    line-height: 1.65;
}

.upb-at2-page a {
    text-decoration: none;
    color: inherit;
}

.upb-at2-page button {
    font-family: inherit;
    font-size: 13.3333px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    color: buttontext;
    cursor: pointer;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    text-shadow: none;
    padding: 1px 6px;
    margin: 0;
    min-height: 0;
}

.upb-at2-page img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* ---------- Navigation ---------- */
.upb-at2-page .upb-at2-header {
    position: sticky;
    top: 0;
    z-index: 40;
    /* Fond blanc de la barre COLORIAGES / JEUX / RECETTES / LE LIVRE ;
       trait très discret sous la barre en beige doux UPB (--cream). */
    background: #FFFFFF;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid #FBF6EE;
}

.upb-at2-page .upb-at2-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.upb-at2-page .upb-at2-nav-links {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.upb-at2-page .upb-at2-nav-links::-webkit-scrollbar {
    display: none;
}

.upb-at2-page .upb-at2-nav-link {
    white-space: nowrap;
    font-size: 12.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 8px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}

.upb-at2-page .upb-at2-nav-link:hover {
    color: var(--ink);
    border-color: var(--pink);
}

/* ---------- Boutons ---------- */
.upb-at2-page .upb-at2-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ink);
    color: var(--cream);
    padding: 15px 30px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    transition: transform .18s ease, background .18s ease;
    min-height: 48px;
}

.upb-at2-page .upb-at2-btn-primary:hover {
    background: var(--ink-soft);
    color: var(--cream);
    transform: translateY(-2px);
}

.upb-at2-page .upb-at2-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: var(--white);
    transition: background .18s ease, color .18s ease;
    width: 100%;
    min-height: 44px;
}

.upb-at2-page .upb-at2-btn-outline:hover {
    background: var(--ink);
    color: var(--cream);
}

.upb-at2-page .upb-at2-btn-outline.upb-at2-btn-hover-pink:hover {
    background: #FBE3E8;
    color: var(--ink);
    border-color: transparent;
}

.upb-at2-page .upb-at2-btn-hover-pink {
    padding: 9px 12px;
    font-size: 12.5px;
    border-radius: 16px;
    min-height: auto;
}

/* ---------- Pastilles et libellés ---------- */
.upb-at2-page .upb-at2-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pink-soft);
    color: var(--ink-soft);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .03em;
}

.upb-at2-page .upb-at2-pill--inter {
    font-family: Inter, sans-serif;
}

.upb-at2-page .upb-at2-pill--blue {
    background: var(--blue-soft);
    color: var(--ink-soft);
}

.upb-at2-page .upb-at2-section-link-wrap {
    text-align: center;
    margin: 0 auto 32px;
}

.upb-at2-page .upb-at2-section-link {
    display: inline-block;
    color: var(--ink-soft);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: color .18s ease;
}

.upb-at2-page .upb-at2-section-link:hover {
    color: var(--ink);
}

.upb-at2-page .upb-at2-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

/* ---------- Bulles du Nounours ---------- */
.upb-at2-page .upb-at2-nounours-wrap {
    position: relative;
}

.upb-at2-page .upb-at2-bubble {
    position: absolute;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
    box-shadow: 0 8px 18px rgba(62, 42, 34, 0.14);
}

.upb-at2-page .upb-at2-nounours-wrap:hover .upb-at2-bubble {
    opacity: 1;
    transform: translateY(0);
}

.upb-at2-page .upb-at2-nounours-desktop {
    display: none;
}

.upb-at2-page .upb-at2-nounours-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Hero ---------- */
.upb-at2-page .upb-at2-hero {
    padding: 44px 20px 60px;
    position: relative;
    overflow: hidden;
    /* Fond blanc du hero, demandé explicitement pour Atelier V2 (page
       atelier-2 / .upb-at2-*) ; le fond crème global de .upb-at2-page
       et celui de #coloriages ne sont pas modifiés. */
    background: #FFFFFF;
}

.upb-at2-page .upb-at2-hero-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.upb-at2-page .upb-at2-hero-blob--blue {
    top: -70px;
    right: -90px;
    width: 280px;
    height: 280px;
    background: var(--blue-soft);
    opacity: .7;
}

.upb-at2-page .upb-at2-hero-blob--pink {
    bottom: 20px;
    left: -70px;
    width: 220px;
    height: 220px;
    background: var(--pink-soft);
    opacity: .6;
}

.upb-at2-page .upb-at2-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
}

.upb-at2-page .upb-at2-grid-hero {
    display: block;
}

.upb-at2-page .upb-at2-hero-copy {
    position: relative;
    z-index: 2;
    text-align: center;
}

.upb-at2-page .upb-at2-hero-copy p {
    margin-left: auto;
    margin-right: auto;
}

.upb-at2-page .upb-at2-hero-title {
    font-size: clamp(42px, 10vw, 66px);
    line-height: 1.02;
    margin-top: 18px;
    font-family: Playfair Display, serif;
    color: #7a5b49;
    position: relative;
}

.upb-at2-page .upb-at2-hero-subtitle {
    font-size: clamp(15px, 3vw, 18px);
    color: var(--ink-soft);
    margin-top: 28px;
    max-width: 420px;
    font-family: Inter, sans-serif;
}

.upb-at2-page .upb-at2-nounours-mobile {
    margin: 30px 0;
    position: relative;
}

.upb-at2-page .upb-at2-nounours-blob {
    position: absolute;
    z-index: 1;
}

.upb-at2-page .upb-at2-nounours-blob--pink-mobile {
    width: 220px;
    height: 220px;
    border-radius: 48% 52% 55% 45% / 52% 48% 52% 48%;
    background: var(--pink-soft);
    top: 6px;
}

.upb-at2-page .upb-at2-nounours-blob--blue-mobile {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--blue-soft);
    left: 6%;
    bottom: -4px;
}

.upb-at2-page .upb-at2-nounours-img {
    position: relative;
    z-index: 2;
}

.upb-at2-page .upb-at2-nounours-img--mobile {
    width: 220px;
}

.upb-at2-page .upb-at2-bubble--mobile {
    top: -4px;
    right: 6%;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 9px 15px;
    border-radius: 14px 14px 14px 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.upb-at2-page .upb-at2-hero-intro {
    margin-top: 2px;
    color: #7a5b49;
    font-size: 15.5px;
    max-width: 440px;
    font-family: Inter, sans-serif;
}

/* CTA Hero : dans l'Artifact, le fond et la couleur sont écrits en
   ligne, ils l'emportent donc aussi au survol (seul le décalage
   vertical de .btn-primary:hover reste visible). */
.upb-at2-page .upb-at2-hero-cta,
.upb-at2-page .upb-at2-hero-cta:hover {
    background-color: #fbf6ee;
    color: #7a5b49;
}

.upb-at2-page .upb-at2-hero-cta {
    margin-top: 26px;
    border-style: solid;
    border-width: 1px;
    border-color: #141413;
}

.upb-at2-page .upb-at2-nounours-desktop {
    position: relative;
    width: 100%;
    height: 420px;
    align-items: flex-end;
    justify-content: center;
}

.upb-at2-page .upb-at2-nounours-blob--pink-desktop {
    width: 380px;
    height: 380px;
    border-radius: 48% 52% 55% 45% / 52% 48% 52% 48%;
    background: var(--pink-soft);
    right: 20px;
    top: 0;
}

.upb-at2-page .upb-at2-nounours-blob--blue-desktop {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--blue-soft);
    left: 10px;
    bottom: 6px;
}

.upb-at2-page .upb-at2-nounours-img--desktop {
    width: 380px;
    max-width: 100%;
}

.upb-at2-page .upb-at2-bubble--desktop {
    top: 6px;
    left: 6px;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 11px 17px;
    border-radius: 16px 16px 16px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

/* ---------- Titres de section ---------- */
.upb-at2-page .upb-at2-section-head {
    max-width: 560px;
    text-align: center;
}

.upb-at2-page .upb-at2-section-head--coloriages {
    margin: 0 auto 36px;
}

.upb-at2-page .upb-at2-section-head--jeux {
    margin: 0 auto 32px;
}

.upb-at2-page .upb-at2-section-head--recettes {
    margin: 0 auto 8px;
}

.upb-at2-page .upb-at2-section-intro {
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: 15.5px;
}

.upb-at2-page .upb-at2-section-intro--inter {
    font-family: Inter, sans-serif;
}

/* ---------- Coloriages ---------- */
.upb-at2-page .upb-at2-coloriages {
    padding: 60px 20px 68px;
    max-width: 1180px;
    margin: 0 auto;
}

.upb-at2-page .upb-at2-coloriages-title {
    font-size: clamp(28px, 5.5vw, 38px);
    margin-top: 14px;
    font-family: Playfair Display, serif;
    color: #7a5b49;
}

.upb-at2-page .upb-at2-grid-coloriages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.upb-at2-page .upb-at2-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

.upb-at2-page .upb-at2-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(62, 42, 34, 0.12);
}

.upb-at2-page .upb-at2-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--cream-2);
}

.upb-at2-page .upb-at2-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.upb-at2-page .upb-at2-card:hover .upb-at2-card-media img,
.upb-at2-page .upb-at2-card:active .upb-at2-card-media img {
    transform: scale(1.045);
}

.upb-at2-page .upb-at2-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.upb-at2-page .upb-at2-pill--free {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--cream-2);
    color: var(--ink-soft);
    font-size: 10.5px;
    padding: 5px 12px;
}

.upb-at2-page .upb-at2-card-title {
    font-size: 15px;
    margin-top: 8px;
    flex-grow: 1;
    font-family: Playfair Display, serif;
    text-align: center;
}

/* Bouton « Imprimer » des cartes : dans l'Artifact, couleur et fond
   sont écrits en ligne et l'emportent aussi au survol (seul le liseré
   disparaît via .btn-hover-pink:hover). */
.upb-at2-page .upb-at2-card-btn,
.upb-at2-page .upb-at2-btn-outline.upb-at2-btn-hover-pink.upb-at2-card-btn:hover {
    color: #7a5b49;
    background-color: #ffffff;
}

.upb-at2-page .upb-at2-card-btn {
    margin-top: 10px;
    font-family: Inter, sans-serif;
    box-shadow: 0px 2px 8px 0px #00000033;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
}

.upb-at2-page .upb-at2-respiration {
    text-align: center;
    margin-top: 32px;
    color: var(--ink-soft);
    font-size: 14px;
}

/* ---------- Jeux ---------- */
.upb-at2-page .upb-at2-jeux {
    padding: 56px 20px;
    background: var(--cream-2);
}

.upb-at2-page .upb-at2-jeux-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.upb-at2-page .upb-at2-jeux-title {
    font-size: clamp(26px, 5vw, 34px);
    margin-top: 14px;
    font-family: Playfair Display, serif;
    color: #7a5b49;
}

.upb-at2-page .upb-at2-grid-jeux {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 14px;
}

.upb-at2-page .upb-at2-game-card {
    background: var(--blue-soft);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .2s ease;
    text-align: center;
}

.upb-at2-page a.upb-at2-game-card {
    display: block;
}

.upb-at2-page .upb-at2-game-card:hover {
    transform: translateY(-3px);
}

/* Visuel en haut de carte (Artifact « L'Atelier — V3 », mise à jour
   des cartes « D'autres coloriages ») : absent si aucun visuel. */
.upb-at2-page .upb-at2-game-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--cream-2);
}

.upb-at2-page .upb-at2-game-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upb-at2-page .upb-at2-game-body {
    padding: 24px;
}

.upb-at2-page .upb-at2-game-title {
    font-size: 17px;
    margin-top: 16px;
    font-family: Playfair Display, serif;
    color: #7a5b49;
}

.upb-at2-page .upb-at2-game-text {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 14px;
    font-family: Inter, sans-serif;
}

.upb-at2-page .upb-at2-pill--status {
    margin-top: 16px;
    background: var(--white);
    color: var(--ink-soft);
    font-size: 11px;
    font-family: Inter, sans-serif;
}

/* ---------- Mes recettes ---------- */
.upb-at2-page .upb-at2-recettes {
    padding: 64px 20px 68px;
    max-width: 1180px;
    margin: 0 auto;
}

.upb-at2-page .upb-at2-recettes-title {
    font-size: clamp(26px, 5vw, 34px);
    margin-top: 14px;
    font-family: Playfair Display, serif;
    color: #7a5b49;
}

.upb-at2-page .upb-at2-recettes-img {
    width: 110px;
    margin: 14px auto 0;
}

.upb-at2-page .upb-at2-swipe-hint {
    text-align: center;
    color: var(--ink-soft);
    font-size: 13px;
    margin: 22px 0 4px;
}

.upb-at2-page .upb-at2-recipe-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 4px 22px;
    outline: none;
}

.upb-at2-page .upb-at2-recipe-carousel::-webkit-scrollbar {
    display: none;
}

.upb-at2-page .upb-at2-recipe-slide {
    flex: 0 0 86%;
    scroll-snap-align: center;
}

/* Feuilles pointillées (modèles 1, 2 et 4) */
.upb-at2-page .upb-at2-recette {
    background: var(--white);
    border: 1.5px dashed var(--ink-soft);
    border-radius: 18px;
    padding: 26px 24px;
    position: relative;
    height: 100%;
}

.upb-at2-page .upb-at2-recette--v1 {
    transform: rotate(-0.6deg);
}

.upb-at2-page .upb-at2-recette--v2 {
    transform: rotate(0.5deg);
}

.upb-at2-page .upb-at2-recette--v4 {
    transform: rotate(0.6deg);
}

.upb-at2-page .upb-at2-recette-tape {
    position: absolute;
    top: -14px;
    width: 74px;
    height: 24px;
    border-radius: 2px;
}

.upb-at2-page .upb-at2-recette--v1 .upb-at2-recette-tape {
    left: 30px;
    background: var(--blue-soft);
    opacity: .9;
    transform: rotate(-4deg);
}

.upb-at2-page .upb-at2-recette--v2 .upb-at2-recette-tape {
    right: 30px;
    background: var(--pink-soft);
    opacity: .9;
    transform: rotate(4deg);
}

.upb-at2-page .upb-at2-recette--v4 .upb-at2-recette-tape {
    left: 30px;
    background: var(--cream-2);
    opacity: .95;
    transform: rotate(-3deg);
}

.upb-at2-page .upb-at2-recette-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upb-at2-page .upb-at2-recette--v1 .upb-at2-recette-pill {
    background: var(--pink-soft);
}

.upb-at2-page .upb-at2-recette--v2 .upb-at2-recette-pill {
    background: var(--blue-soft);
}

.upb-at2-page .upb-at2-recette--v4 .upb-at2-recette-pill {
    background: transparent;
    border: 1.4px solid var(--ink-soft);
    color: var(--ink-soft);
}

.upb-at2-page .upb-at2-recette-model {
    font-size: 11px;
    color: var(--ink-soft);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.upb-at2-page .upb-at2-recette-title {
    margin-top: 14px;
    font-size: 22px;
}

/* Feuille à bandeau chocolat (modèle 3) */
.upb-at2-page .upb-at2-recette.upb-at2-recette--v3 {
    border: 1.5px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    padding: 0;
}

.upb-at2-page .upb-at2-recette-band {
    background: var(--ink);
    color: var(--cream);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upb-at2-page .upb-at2-recette-band-title {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 16px;
}

.upb-at2-page .upb-at2-recette-band-model {
    font-size: 11px;
    color: var(--pink-soft);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.upb-at2-page .upb-at2-recette-inner {
    padding: 22px 24px 24px;
}

.upb-at2-page .upb-at2-recette--v3 .upb-at2-recette-title {
    margin-top: 0;
}

/* Corps commun des fiches */
.upb-at2-page .upb-at2-recette-block {
    margin-top: 22px;
}

.upb-at2-page .upb-at2-recette-block--first {
    margin-top: 20px;
}

.upb-at2-page .upb-at2-recette-ingredients {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upb-at2-page .upb-at2-recette-ingredient {
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px dotted var(--line);
    padding-bottom: 7px;
}

.upb-at2-page .upb-at2-recette-check {
    width: 14px;
    height: 14px;
    border: 1.4px solid var(--ink-soft);
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
}

.upb-at2-page .upb-at2-recette-dots {
    color: var(--ink-soft);
    font-size: 14px;
}

.upb-at2-page .upb-at2-recette-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upb-at2-page .upb-at2-recette-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.upb-at2-page .upb-at2-recette-num {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    color: var(--pink);
}

.upb-at2-page .upb-at2-recette--v2 .upb-at2-recette-num {
    color: var(--blue);
}

.upb-at2-page .upb-at2-recette--v3 .upb-at2-recette-num {
    color: var(--ink);
}

.upb-at2-page .upb-at2-recette-line {
    border-bottom: 1px dotted var(--line);
    flex-grow: 1;
    padding-bottom: 7px;
    color: var(--ink-soft);
    font-size: 14px;
}

.upb-at2-page .upb-at2-recette-meta {
    display: flex;
    gap: 26px;
}

.upb-at2-page .upb-at2-recette-meta-col {
    flex: 1;
}

.upb-at2-page .upb-at2-recette-field {
    border-bottom: 1px dotted var(--line);
    padding: 7px 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.upb-at2-page .upb-at2-recette-note {
    border-bottom: 1px dotted var(--line);
    padding: 9px 0;
}

.upb-at2-page .upb-at2-recette-print {
    margin-top: 24px;
}

/* Contrôles du carrousel */
.upb-at2-page .upb-at2-recipe-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
    outline: none;
}

.upb-at2-page .upb-at2-carousel-dots {
    display: flex;
    gap: 10px;
}

.upb-at2-page .upb-at2-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s ease;
    outline: none;
    background: var(--line);
}

.upb-at2-page .upb-at2-carousel-dot.is-active {
    background: var(--ink);
}

.upb-at2-page .upb-at2-carousel-arrow {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: background .18s ease, color .18s ease;
    outline: none;
    opacity: 1;
    pointer-events: auto;
}

.upb-at2-page .upb-at2-carousel-arrow:hover {
    background: var(--ink);
    color: var(--cream);
}

.upb-at2-page .upb-at2-carousel-arrow.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.upb-at2-page .upb-at2-carousel-arrow:focus,
.upb-at2-page .upb-at2-carousel-dot:focus,
.upb-at2-page .upb-at2-recipe-carousel:focus {
    outline: none;
    box-shadow: none;
}

/* ---------- Livre ---------- */
.upb-at2-page .upb-at2-livre {
    padding: 70px 20px;
    background: var(--pink-soft);
}

.upb-at2-page .upb-at2-livre-card {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 28px;
    padding: 42px 28px;
}

.upb-at2-page .upb-at2-livre-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
}

.upb-at2-page .upb-at2-livre-cover {
    width: 170px;
    height: 236px;
    background: var(--ink);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 16px;
    box-shadow: 0 16px 32px rgba(62, 42, 34, 0.25);
}

.upb-at2-page .upb-at2-livre-cover-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pink);
}

.upb-at2-page .upb-at2-livre-cover-title {
    font-family: 'Fraunces', serif;
    color: var(--cream);
    font-size: 15px;
    line-height: 1.28;
    font-weight: 600;
}

.upb-at2-page .upb-at2-livre-cover-sub {
    margin-top: 10px;
    color: var(--pink-soft);
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.upb-at2-page .upb-at2-livre-copy {
    max-width: 460px;
}

.upb-at2-page .upb-at2-livre-title {
    font-size: clamp(24px, 4.5vw, 32px);
    margin-top: 14px;
    font-family: Playfair Display, serif;
    color: #7a5b49;
}

.upb-at2-page .upb-at2-livre-text {
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: 15px;
}

/* CTA Livre : dans l'Artifact V3, fond et couleur sont écrits en
   ligne et l'emportent aussi au survol (seul le décalage reste). */
.upb-at2-page .upb-at2-livre-cta,
.upb-at2-page .upb-at2-livre-cta:hover {
    color: #fbf6ee;
    background-color: #7a5b49;
}

.upb-at2-page .upb-at2-livre-cta {
    margin-top: 22px;
}

/* ---------- Aperçu d'un coloriage (fenêtre) ----------
   z-index relevé par rapport à l'Artifact (60) : sur WordPress, la
   fenêtre doit passer au-dessus de l'en-tête Astra, comme elle passe
   au-dessus de tout le contenu dans l'Artifact. */
.upb-at2-page .upb-at2-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(62, 42, 34, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100000;
}

.upb-at2-page .upb-at2-modal-backdrop.is-open {
    display: flex;
}

.upb-at2-page .upb-at2-modal-card {
    background: var(--white);
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
}

.upb-at2-page .upb-at2-modal-close,
.upb-at2-page .upb-at2-modal-close:hover {
    background: var(--white);
}

.upb-at2-page .upb-at2-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-size: 18px;
    z-index: 2;
}

.upb-at2-page .upb-at2-modal-media {
    aspect-ratio: 4 / 3;
    background: var(--cream-2);
}

.upb-at2-page .upb-at2-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upb-at2-page .upb-at2-modal-body {
    padding: 22px;
}

.upb-at2-page .upb-at2-modal-title {
    font-size: 19px;
}

.upb-at2-page .upb-at2-modal-meta {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 14px;
}

.upb-at2-page .upb-at2-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.upb-at2-page .upb-at2-modal-print {
    flex: 1;
}

/* ---------- Responsive (points de rupture de l'Artifact) ---------- */
@media (min-width: 640px) {
    .upb-at2-page .upb-at2-recipe-slide {
        flex: 0 0 360px;
    }
}

@media (min-width: 640px) {
    .upb-at2-page .upb-at2-grid-jeux {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 900px) {
    .upb-at2-page .upb-at2-grid-coloriages {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 26px;
    }

    .upb-at2-page .upb-at2-grid-hero {
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        align-items: center;
        gap: 28px;
    }

    .upb-at2-page .upb-at2-nounours-mobile {
        display: none;
    }

    .upb-at2-page .upb-at2-nounours-desktop {
        display: flex;
    }

    .upb-at2-page .upb-at2-livre-wrap {
        flex-direction: row;
        text-align: left;
        gap: 46px;
    }

    .upb-at2-page .upb-at2-hero-copy {
        text-align: left;
    }

    .upb-at2-page .upb-at2-hero-copy p {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ---------- Impression d'un coloriage ou d'une fiche ----------
   atelier-2.js place l'image dans #upb-at2-print (enfant direct de
   body) et ajoute .upb-at2-printing sur <html> le temps d'imprimer.
   Seule cette image est imprimée, en pleine page A4. */
#upb-at2-print {
    display: none;
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    html.upb-at2-printing body > *:not(#upb-at2-print) {
        display: none !important;
    }

    html.upb-at2-printing,
    html.upb-at2-printing body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html.upb-at2-printing #upb-at2-print {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 277mm;
    }

    html.upb-at2-printing #upb-at2-print img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}
