/*
Theme Name: Charlie Dalin
Template: twentytwentyfive
Description: Thème enfant de Twenty Twenty-Five pour la boutique de l'affiche « Hommage à Charlie Dalin ». Studio K37.
Author: Studio K37
Version: 1.0.0
Text Domain: charliedalin
*/

/* Surtitres */
.cd-kicker{font-size:14px;font-weight:700;letter-spacing:.2em;text-transform:uppercase}

/* Affiche provisoire du bandeau */
.cd-poster{aspect-ratio:3/4;width:100%;max-width:420px;margin:0 auto;background:var(--wp--preset--color--base);color:var(--wp--preset--color--contrast);box-shadow:0 24px 60px rgba(0,0,0,.45);display:flex;flex-direction:column;padding:28px;box-sizing:border-box}
.cd-poster img{width:100%;height:100%;object-fit:cover}
.cd-poster__slot{flex-grow:1;border:1px dashed #9AA3AE;margin-bottom:20px;display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--wp--preset--color--muted);text-align:center}
.cd-poster__k{text-align:center;font-size:14px;font-weight:700;letter-spacing:.3em}
.cd-poster__t{text-align:center;font-size:42px;font-weight:900;line-height:1;letter-spacing:.04em}

/* Tuiles photo en attente */
.cd-photo{aspect-ratio:4/3;background:var(--wp--preset--color--contrast);color:#C9D2DC;display:flex;align-items:flex-end;padding:16px;box-sizing:border-box;font-size:14px}

/* Fiche produit WooCommerce (shortcode product_page) */
.cd-shop .woocommerce div.product{display:flex;flex-wrap:wrap;gap:64px;align-items:flex-start}
.cd-shop .woocommerce div.product div.images,.cd-shop .woocommerce div.product div.summary{float:none;width:auto;margin:0}
.cd-shop .woocommerce div.product div.images{flex:1 1 420px;background:#fff;padding:40px;box-sizing:border-box}
.cd-shop .woocommerce div.product div.summary{flex:1 1 360px;display:flex;flex-direction:column;gap:18px}
.cd-shop .woocommerce div.product .product_title{font-size:clamp(32px,4vw,40px);font-weight:900;line-height:1.05;margin:0}
.cd-shop .woocommerce div.product p.price{font-size:32px;font-weight:700;color:var(--wp--preset--color--contrast);margin:0}
.cd-shop .woocommerce div.product form.cart{display:flex;gap:12px;flex-wrap:wrap;margin:8px 0 0}
.cd-shop .woocommerce .quantity .qty{width:64px;height:52px;font:inherit;font-size:18px;text-align:center;border:1px solid var(--wp--preset--color--contrast);border-radius:4px;background:#fff;color:var(--wp--preset--color--contrast)}
.cd-shop .woocommerce div.product form.cart .button{flex-grow:1;min-height:52px;background:var(--wp--preset--color--accent-1);color:#fff;border:0;border-radius:4px;font:inherit;font-size:18px;font-weight:700}
.cd-shop .woocommerce div.product form.cart .button:hover{background:#A9461A}
.cd-shop .woocommerce div.product .woocommerce-product-details__short-description p{margin:0 0 10px;font-size:17px;line-height:1.6}
.cd-shop .woocommerce div.product .product_meta,.cd-shop .woocommerce div.product .woocommerce-tabs,.cd-shop .woocommerce div.product .related{display:none}
.cd-shop .woocommerce-product-gallery__trigger{display:none}
.cd-atouts{list-style:none;margin:8px 0 0;padding:20px 0 0;border-top:1px solid var(--wp--preset--color--line);display:flex;flex-direction:column;gap:12px;font-size:16px}
.cd-atouts li{display:flex;gap:12px;align-items:baseline}
.cd-atouts li::before{content:"";flex:0 0 8px;height:8px;background:var(--wp--preset--color--accent-1);transform:translateY(-2px)}

/* FAQ */
.cd-faq details{border-bottom:1px solid var(--wp--preset--color--line);padding:20px 0}
.cd-faq summary{font-size:19px;font-weight:700;cursor:pointer}

@media (max-width:600px){
 .cd-shop .woocommerce div.product{gap:32px}
 .cd-shop .woocommerce div.product div.images{padding:16px}
 .cd-photos{grid-template-columns:1fr !important}
}

/* Affiche reelle dans le bandeau */
.cd-poster--img{padding:0;aspect-ratio:auto;background:none}
.cd-poster--img img{display:block;width:100%;height:auto}

/* Protection du visuel : pas de clic droit, de glisser ni d'appui long sur l'image */
.cd-protect,.cd-shop .woocommerce-product-gallery{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.cd-protect img,.cd-shop .woocommerce-product-gallery img,.cd-shop .woocommerce-product-gallery a{pointer-events:none;-webkit-user-drag:none}

/* Mini-panier de l'en-tete en creme sur bleu */
header .wc-block-mini-cart__button{color:var(--wp--preset--color--base)}
header .wc-block-mini-cart__badge{background:var(--wp--preset--color--accent-1);color:#fff;border-color:transparent}
.cd-shop .woocommerce div.product .woocommerce-product-details__short-description p.cd-credit{font-size:15px;color:var(--wp--preset--color--muted)}

/* Mobile : bandeau compact, l'affiche et le bouton sont dans la fiche juste en dessous */
@media (max-width:781px){
 .cd-hero-visuel,.cd-hero-cta{display:none !important}
 .wp-block-group.alignfull:has(> .wp-block-columns .cd-hero-visuel){padding-top:40px !important;padding-bottom:40px !important}
 .cd-shop{padding-top:40px !important}
}

/* Barre d'achat fixe (mobile) */
.cd-buybar{display:none}
@media (max-width:781px){
 .cd-buybar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:var(--wp--preset--color--deep);color:var(--wp--preset--color--base);box-shadow:0 -6px 20px rgba(0,0,0,.25);transform:translateY(110%);transition:transform .25s ease}
 .cd-buybar.is-visible{transform:none}
 .cd-buybar__info{display:flex;flex-direction:column;line-height:1.2}
 .cd-buybar__name{font-size:14px}
 .cd-buybar__price{font-size:18px;font-weight:700}
 .cd-buybar__btn{background:var(--wp--preset--color--accent-1);color:#fff !important;text-decoration:none;font-weight:700;font-size:16px;padding:14px 20px;border-radius:4px;white-space:nowrap}
 body.cd-has-buybar{padding-bottom:76px}
}
@media (prefers-reduced-motion:reduce){.cd-buybar{transition:none}}

/* Ordinateur : le bandeau bleu occupe tout l'ecran sous l'en-tete, la fiche produit commence en dessous */
@media (min-width:782px){
 .wp-block-group.alignfull:has(> .wp-block-columns .cd-hero-visuel){min-height:calc(100vh - var(--cd-header-h, 85px));min-height:calc(100svh - var(--cd-header-h, 85px));box-sizing:border-box;display:grid;align-content:center}
 body.admin-bar .wp-block-group.alignfull:has(> .wp-block-columns .cd-hero-visuel){min-height:calc(100svh - var(--cd-header-h, 85px) - 32px)}
}

/* Photos de la journee */
.cd-photo--img{margin:0;padding:0;aspect-ratio:auto;display:block;background:none;color:var(--wp--preset--color--muted)}
.cd-photo--img img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;background:var(--wp--preset--color--sand)}
.cd-photo--img figcaption{margin-top:6px;font-size:12px;text-align:right}

/* En-tete : marque sur deux lignes */
.cd-marque{display:flex;flex-direction:column;gap:3px;text-decoration:none;color:var(--wp--preset--color--base);line-height:1.1;text-transform:uppercase}
.cd-marque__sur{font-size:11px;font-weight:700;letter-spacing:.26em;color:var(--wp--preset--color--accent-2)}
.cd-marque__nom{font-size:20px;font-weight:900;letter-spacing:.18em}
@media (max-width:420px){.cd-marque__nom{font-size:17px;letter-spacing:.12em}.cd-marque__sur{font-size:10px;letter-spacing:.2em}}

/* Section L'hommage : bandeau blanc, texte centre */
.cd-hommage .cd-photo--img figcaption{text-align:center}

/* Page d'attente (mode « Bientôt disponible » de WooCommerce) : l'affiche seule */
body:has(.cd-attente){margin:0;background:var(--wp--preset--color--deep)}
.cd-attente{min-height:100vh;min-height:100svh;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;background:var(--wp--preset--color--deep)}
.cd-attente img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100svh - 48px);box-shadow:0 24px 60px rgba(0,0,0,.45);pointer-events:none;-webkit-user-drag:none}
