/*
Theme Name: Mossal
Theme URI: https://mossal.groupecraec.com
Author: Groupe CRAEC
Description: Thème vitrine de Mossal — épices et piments du terroir sénégalais. Une marque du Groupe CRAEC.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mossal
*/

html { scroll-behavior: smooth; }
:where(body) { -webkit-font-smoothing: antialiased; }
[id] { scroll-margin-top: 96px; }

/* ---------- Header ---------- */
.mossal-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(241,174,74,.18); }
.admin-bar .mossal-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mossal-header { top: 46px; } }
.mossal-header .wp-block-navigation a { text-decoration: none; letter-spacing: .06em; text-transform: uppercase; font-size: .82rem; }
.mossal-header .wp-block-navigation a:hover { color: var(--wp--preset--color--safran); }
.mossal-logo img { height: 52px; width: auto; }

/* ---------- Hero ---------- */
.mossal-hero { position: relative; overflow: hidden; }
.mossal-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 50%, rgba(241,174,74,.22), transparent 70%); pointer-events: none; }
.mossal-hero > * { position: relative; }
.mossal-hero .mossal-kicker mark { padding: .1em .5em; border-radius: 2px; }
.mossal-hero h1 { text-wrap: balance; }
.mossal-hero-img img { filter: drop-shadow(0 30px 40px rgba(0,0,0,.45)); }

/* ---------- Feature cards ---------- */
.mossal-card { height: 100%; transition: transform .25s ease, box-shadow .25s ease; }
.mossal-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(59,42,22,.14); }
.mossal-card .wp-block-image img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.mossal-card .wp-block-image { margin-bottom: 0; }

/* ---------- Products ---------- */
.mossal-product { height: 100%; text-align: center; }
.mossal-product .wp-block-image img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; transition: transform .3s ease; }
.mossal-product:hover .wp-block-image img { transform: scale(1.04) rotate(-1deg); }
.mossal-pouch .wp-block-image { background: radial-gradient(circle at 50% 60%, #4a3820, #2a1e10 70%); border-radius: 6px; padding: 1.2rem; }
.mossal-price { font-family: var(--wp--preset--font-family--aleo); }
.mossal-divider { width: 64px; height: 3px; background: var(--wp--preset--color--safran); margin-left: auto !important; margin-right: auto !important; border: 0; }

/* ---------- Order form ---------- */
.mossal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.mossal-form .full { grid-column: 1 / -1; }
.mossal-form label { display: block; font-size: .85rem; letter-spacing: .04em; margin-bottom: .35rem; color: var(--wp--preset--color--creme); }
.mossal-form input, .mossal-form select, .mossal-form textarea {
  width: 100%; box-sizing: border-box; padding: .8rem .9rem; font: inherit; font-size: 1rem;
  background: rgba(245,235,214,.06); color: var(--wp--preset--color--creme);
  border: 1px solid rgba(245,235,214,.28); border-radius: 4px; }
.mossal-form select option { color: #3b2a16; }
.mossal-form input:focus, .mossal-form select:focus, .mossal-form textarea:focus { outline: 2px solid var(--wp--preset--color--safran); outline-offset: 1px; border-color: transparent; }
.mossal-form textarea { min-height: 120px; resize: vertical; }
.mossal-form button { justify-self: start; cursor: pointer; border: 0; border-radius: 4px; padding: .95rem 2rem;
  background: var(--wp--preset--color--safran); color: var(--wp--preset--color--brun); font-family: var(--wp--preset--font-family--lato);
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; transition: background .2s; }
.mossal-form button:hover { background: var(--wp--preset--color--creme); }
.mossal-form .mossal-note { font-size: .8rem; opacity: .7; margin: 0; }
@media (max-width: 640px) { .mossal-form { grid-template-columns: 1fr; } }

/* ---------- WhatsApp floating ---------- */
.mossal-wa { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s; }
.mossal-wa:hover { transform: scale(1.08); }
.mossal-wa svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Footer ---------- */
.mossal-footer a { text-decoration: none; }
.mossal-footer a:hover { color: var(--wp--preset--color--safran); }
.mossal-social { display: flex; gap: .6rem; }
.mossal-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(245,235,214,.3); }
.mossal-social svg { width: 18px; height: 18px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Ajustements ---------- */
.wp-site-blocks > main, .wp-site-blocks > footer, .wp-site-blocks > header + * { margin-block-start: 0; }
.mossal-footer a { color: var(--wp--preset--color--creme); }
.mossal-product { display: flex; flex-direction: column; }
.mossal-product > * { margin-block-start: 0; margin-block-end: 0; }
.mossal-product > * + * { margin-top: .6rem; }
.mossal-product > .wp-block-heading { margin-top: 1rem; }
.mossal-product > .wp-block-buttons { margin-top: auto; padding-top: .6rem; }
@media (max-width: 781px) {
  .mossal-products { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .mossal-products .wp-block-button__link { padding: .75rem 1.1rem; font-size: .78rem; }
  .mossal-product .has-small-font-size { font-size: .8rem !important; }
  .mossal-header .wp-block-buttons { display: none; }
  .mossal-logo img { height: 42px; }
}
