/*
Theme Name: Teckel Lovers
Theme URI: https://teckel-lovers.fr
Author: Teckel Lovers
Description: Thème de boutique pour Teckel Lovers : un teckel, mille univers. Thème par blocs compatible WooCommerce, modifiable entièrement depuis l'éditeur de site de WordPress.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teckel-lovers
Tags: e-commerce, block-patterns, full-site-editing, custom-colors, editor-style
*/

/* ---------- Réglages généraux ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) *:focus-visible { outline: 2px solid var(--wp--preset--color--framboise); outline-offset: 3px; }

/* ---------- Styles de blocs du thème ---------- */
/* Image « sticker » : ombre douce et légère rotation */
.is-style-sticker img { filter: drop-shadow(0 10px 14px rgba(90, 20, 30, .16)); transform: rotate(-3deg); transition: transform .3s ease; }
.is-style-sticker:hover img { transform: rotate(0deg) scale(1.03); }
@media (prefers-reduced-motion: reduce) { .is-style-sticker img, .is-style-sticker:hover img { transition: none; transform: none; } }

/* Groupe « motif » : fond de teckels répétés */
.is-style-motif { background-image: url("assets/images/motif-hot-dog.webp"); background-size: 420px 420px; background-repeat: repeat; }

.is-style-collection-noel-au-chaud.is-style-motif, .is-style-collection-noel-au-chaud .is-style-motif { background-image: url("assets/images/motif-noel.webp"); }

/* Groupe « bulle » : carte arrondie rose */
.is-style-bulle { background-color: var(--wp--preset--color--rose-bulle); border-radius: 28px; }

/* Séparateur « vague de moutarde » */
.wp-block-separator.is-style-vague {
	border: 0 !important; height: 18px !important; max-width: 220px; opacity: 1; background: none !important;
	background-color: var(--tl-deco, var(--wp--preset--color--moutarde)) !important;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='18' viewBox='0 0 40 18'%3E%3Cpath d='M0 9 Q5 1 10 9 T20 9 T30 9 T40 9' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 18px;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='18' viewBox='0 0 40 18'%3E%3Cpath d='M0 9 Q5 1 10 9 T20 9 T30 9 T40 9' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 18px;
}
.wp-block-separator.is-style-vague.alignwide, .wp-block-separator.is-style-vague.alignfull { max-width: none; }
.wp-block-separator.is-style-vague { margin-left: 0 !important; margin-right: auto !important; }
.has-text-align-center + .wp-block-separator.is-style-vague, .wp-block-separator.is-style-vague.aligncenter { margin-left: auto !important; margin-right: auto !important; }

/* Couleur d'accent : celle de la collection dans une section de collection, framboise ailleurs */
.tl-accent { color: var(--tl-accent, var(--wp--preset--color--framboise)); }

/* Liste « cœurs » */
ul.is-style-coeurs { list-style: none; padding-left: 0; }
ul.is-style-coeurs li { padding-left: 1.8em; position: relative; margin-bottom: .5em; }
ul.is-style-coeurs li::before { content: "♥"; position: absolute; left: 0; color: var(--wp--preset--color--framboise); }

/* Titre manuscrit (Pacifico) : pas de gras forcé */
.has-manuscrit-font-family { font-weight: 400 !important; letter-spacing: 0 !important; }

/* ---------- En-tête ---------- */
.tl-annonce p { margin: 0; }
.tl-entete { position: sticky; top: 0; z-index: 50; }
.admin-bar .tl-entete { top: 32px; }
@media (max-width: 782px) { .admin-bar .tl-entete { top: 46px; } .tl-entete { position: relative; } }
.tl-entete .wp-block-navigation a:hover { color: var(--wp--preset--color--framboise); }
.tl-entete .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--framboise); }

/* ---------- Tuiles catégories ---------- */
.tl-tuile { transition: transform .25s ease, box-shadow .25s ease; }
.tl-tuile:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(90, 20, 30, .10); }
.tl-tuile .wp-block-image { margin-bottom: 0; }
.tl-tuile .wp-block-image img { height: 96px; width: auto; object-fit: contain; }
.tl-tuile a { text-decoration: none; color: inherit; }
.tl-tuile a::after { content: ""; position: absolute; inset: 0; }
.tl-tuile { position: relative; }
@media (prefers-reduced-motion: reduce) { .tl-tuile, .tl-tuile:hover { transition: none; transform: none; } }

/* ---------- Cartes collections ---------- */
.tl-carte-collection { position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.tl-carte-collection:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(90, 20, 30, .10); }
.tl-carte-collection h2 a { text-decoration: none; color: inherit; }
.tl-carte-collection h2 a::after { content: ""; position: absolute; inset: 0; }
@media (prefers-reduced-motion: reduce) { .tl-carte-collection, .tl-carte-collection:hover { transition: none; transform: none; } }

/* ---------- Blog ---------- */
.tl-cats { list-style: none; padding: 0; margin: 1.5rem auto 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.tl-cats li { margin: 0; }
.tl-cats a { display: inline-block; text-decoration: none; color: var(--wp--preset--color--encre); background: var(--wp--preset--color--papier); border: 1.5px solid var(--wp--preset--color--ligne); border-radius: 999px; padding: .45rem 1rem; font-weight: 500; }
.tl-cats a:hover, .tl-cats .current-cat a { border-color: var(--wp--preset--color--framboise); background: var(--wp--preset--color--framboise); color: #fff; }
.tl-cat-article { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tl-cat-article a { color: var(--wp--preset--color--framboise-fonce); text-decoration: none; }
.tl-carte-article { position: relative; height: 100%; box-sizing: border-box; transition: transform .25s ease, box-shadow .25s ease; }
.tl-carte-article:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(90, 20, 30, .10); }
.tl-carte-article .wp-block-post-title a { color: var(--wp--preset--color--encre); text-decoration: none; }
.tl-carte-article .wp-block-post-title a:hover { color: var(--wp--preset--color--framboise-fonce); }
.tl-carte-article .wp-block-post-excerpt__excerpt { margin: 0; }
.tl-lire { font-weight: 600; color: var(--wp--preset--color--framboise-fonce); text-decoration: none; }
.tl-lire::after { content: " →"; }
.tl-article { font-size: 1.1rem; line-height: 1.75; }
.tl-article h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.25rem; }
.tl-article h3 { font-size: var(--wp--preset--font-size--large); margin-top: 1.75rem; }
.tl-article img { border-radius: 16px; }
.tl-article .tl-encadre { font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .tl-carte-article, .tl-carte-article:hover { transition: none; transform: none; } }

/* ---------- WooCommerce : grilles produits (shortcodes et blocs) ---------- */
.woocommerce ul.products, .woocommerce-page ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; margin: 0; padding: 0; }
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--wp--preset--color--papier); border: 1px solid var(--wp--preset--color--ligne); border-radius: 22px; padding: 14px 14px 18px; display: flex; flex-direction: column; text-align: left; }
.woocommerce ul.products li.product a { text-decoration: none; color: inherit; }
.woocommerce ul.products li.product a img { display: block; width: 100%; height: auto; box-sizing: border-box; border-radius: 14px; background: var(--wp--preset--color--rose-bulle); margin-bottom: 14px !important; aspect-ratio: 1 / 1; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.1rem !important; font-weight: 600; color: var(--wp--preset--color--encre); padding: 0 !important; line-height: 1.25; }
.woocommerce ul.products li.product .price { color: var(--wp--preset--color--ketchup) !important; font-weight: 600; font-size: 1rem !important; margin-top: .35rem; }
.woocommerce ul.products li.product .button { margin-top: auto !important; align-self: flex-start; }
@media (max-width: 600px) { .woocommerce ul.products li.product .button { font-size: .9rem; padding: .6em 1em; line-height: 1.25; } }
@media (max-width: 900px) { .woocommerce ul.products, .woocommerce ul.products.columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; } }

/* Boutons WooCommerce classiques aux couleurs de la marque */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
	background: var(--tl-accent, var(--wp--preset--color--framboise)); color: #fff; border-radius: 999px; padding: .75em 1.4em; font-family: var(--wp--preset--font-family--instrument-sans); font-weight: 600; border: 0;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--tl-accent-fonce, var(--wp--preset--color--framboise-fonce)); color: #fff; }

/* Badges promo, prix, notices */
.woocommerce span.onsale, .wc-block-components-product-sale-badge { background: var(--wp--preset--color--moutarde) !important; color: var(--wp--preset--color--cacao) !important; border-radius: 999px !important; min-height: 0; min-width: 0; padding: .35em .9em !important; line-height: 1.4 !important; font-weight: 700; border: 0 !important; }
.woocommerce div.product p.price, .woocommerce div.product span.price, .wc-block-components-product-price { color: var(--wp--preset--color--ketchup); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--wp--preset--color--framboise) !important; background: var(--wp--preset--color--papier) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--wp--preset--color--framboise) !important; }

/* Galerie et onglets fiche produit */
.woocommerce div.product div.images img, .wc-block-components-product-image img, .wp-block-woocommerce-product-image-gallery img { border-radius: 20px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: var(--wp--preset--color--framboise); }

/* Grilles blocs WooCommerce (Product Collection) */
.wc-block-product-template .wc-block-product, .wp-block-woocommerce-product-template .wc-block-product { background: var(--wp--preset--color--papier); border: 1px solid var(--wp--preset--color--ligne); border-radius: 22px; padding: 14px 14px 18px; }
.wc-block-components-product-image img, .wc-block-grid__product-image img { background: var(--wp--preset--color--rose-bulle); border-radius: 14px; }

/* Mini-panier */
.wc-block-mini-cart__badge { background: var(--wp--preset--color--framboise) !important; color: #fff !important; border: 0 !important; }

/* ---------- Pied de page ---------- */
.tl-pied a { color: #fff; text-decoration: none; }
.tl-pied a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tl-pied h3 { margin-bottom: .6em; }
.tl-pied ul { list-style: none; padding-left: 0; margin: 0; }
.tl-pied ul li { margin-bottom: .45em; }

/* ---------- Petites largeurs ---------- */
@media (max-width: 600px) {
	.tl-hero-collage img { max-width: min(420px, 100%); margin-inline: auto; }
}

/* Galerie de stickers : images entières, sans recadrage */
.wp-block-gallery.has-nested-images figure.wp-block-image img { object-fit: contain; }

/* ---------- Animations ---------- */
/* Apparition au défilement (classe ajoutée par assets/js/animations.js) */
.tl-apparait { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--tl-delai, 0ms); }
.tl-apparait.tl-visible { opacity: 1; transform: none; }

/* Logo de la bannière : le teckel respire doucement */
.tl-hero-collage img { animation: tl-flotte 5s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes tl-flotte { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-1.2deg); } }

/* Stickers de collection : flottent, se redressent au survol */
.is-style-sticker img { animation: tl-sticker 6s ease-in-out infinite; }
.is-style-sticker:hover img { animation-play-state: paused; }
@keyframes tl-sticker { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-6px); } }

/* Boutons : petit rebond */
.wp-element-button, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .tl-btn { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .2s ease, color .2s ease; }
.wp-element-button:hover, .wp-block-button__link:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .tl-btn:hover { transform: translateY(-2px) scale(1.03); }
.wp-element-button:active, .wp-block-button__link:active, .woocommerce a.button:active, .woocommerce button.button:active, .tl-btn:active { transform: scale(.97); }

/* Cartes produit et articles : l'image zoome un peu */
.woocommerce ul.products li.product a img, .tl-carte-article .wp-block-post-featured-image img { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.woocommerce ul.products li.product:hover a img, .tl-carte-article:hover .wp-block-post-featured-image img { transform: scale(1.05); }
.woocommerce ul.products li.product a:first-child, .tl-carte-article .wp-block-post-featured-image { overflow: hidden; border-radius: 14px; display: block; }
.woocommerce ul.products li.product { transition: transform .25s ease, box-shadow .25s ease; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(90, 20, 30, .10); }

/* Icônes des tuiles : se dandinent au survol */
.tl-tuile:hover .wp-block-image img { animation: tl-dandine .6s ease-in-out; }
@keyframes tl-dandine { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

/* Vague de moutarde : ondule doucement */
.wp-block-separator.is-style-vague { animation: tl-vague 3s linear infinite; }
@keyframes tl-vague { from { -webkit-mask-position: 0 center; mask-position: 0 center; } to { -webkit-mask-position: 40px center; mask-position: 40px center; } }

/* Cœurs des listes : battent au survol */
ul.is-style-coeurs li:hover::before { animation: tl-bat .7s ease; display: inline-block; }
@keyframes tl-bat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(.9); } }

/* Panier : saute quand on ajoute un produit */
.tl-saut { animation: tl-saut .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tl-saut { 0% { transform: scale(1); } 35% { transform: scale(1.35) rotate(-8deg); } 70% { transform: scale(.92) rotate(4deg); } 100% { transform: scale(1); } }

/* Page 404 : le teckel cherche son chemin */
.error404 main .wp-block-image img { animation: tl-cherche 2.4s ease-in-out infinite; }
@keyframes tl-cherche { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) translateX(-6px); } 75% { transform: rotate(4deg) translateX(6px); } }

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.tl-apparait { opacity: 1; transform: none; }
}
