﻿/* Build&Save — styles propres au site (en plus de app.css, généré par Tailwind) */
html { background: #f5f2ec; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { background: #f5f2ec; color: #10292b; -webkit-font-smoothing: antialiased; overflow-x: clip; }

/* Barre des catégories (en-tête) */
.catlink { display: inline-flex; align-items: center; gap: .4rem; height: 2.25rem; padding: 0 .85rem; border-radius: 9999px; color: rgba(16,41,43,.72); white-space: nowrap; transition: background-color .2s, color .2s; }
.catlink:hover { background: #f5f2ec; color: #10292b; }
.catlink[aria-current="page"] { background: #10292b; color: #fff; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
/* Bouton d'en-tête : simple icône sur téléphone, bouton entouré sur ordinateur */
.hbtn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 2.75rem; min-width: 2.75rem; border-radius: 9999px; color: #10292b; font-size: .875rem; font-weight: 500; transition: background-color .2s, border-color .2s; }
.hbtn:hover { background: #f5f2ec; }
@media (min-width: 640px) { .hbtn-o { border: 1px solid rgba(16,41,43,.18); padding: 0 1rem; background: rgba(255,255,255,.5); } .hbtn-o:hover { border-color: #10292b; background: #fff; } }
/* Menu ☰ du téléphone */
.mm-link { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.25rem; border-radius: 1rem; padding: .5rem 1rem; font-size: 1.0625rem; color: #10292b; }
.mm-link:active, .mm-link:hover { background: #f5f2ec; }
.mm-link[aria-current="page"] { background: #eef6f6; font-weight: 600; }
.mm-title { padding: 1rem 1rem .35rem; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(16,41,43,.45); }
.mm-lang { display: grid; place-items: center; height: 2.75rem; border-radius: 9999px; font-size: .9375rem; font-weight: 500; color: #10292b; box-shadow: inset 0 0 0 1px rgba(16,41,43,.15); }
.mm-lang[aria-current="true"] { background: #10292b; color: #fff; box-shadow: none; }
#mobileMenu { max-height: calc(100dvh - 9rem); overflow-y: auto; overscroll-behavior: contain; }

/* Panneau panier */
.drawer-bg { opacity: 0; transition: opacity .25s; }
.drawer-panel { transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
#drawer.open .drawer-bg { opacity: 1; }
#drawer.open .drawer-panel { transform: none; }
.qty-sm button { width: 2rem; height: 2rem; font-size: 1.05rem; }

/* Menu de la gestion (/admin) */
.side-nav { display: flex; align-items: center; gap: .75rem; border-radius: .75rem; padding: .7rem .85rem; font-size: .9375rem; color: rgba(255,255,255,.72); transition: background-color .2s, color .2s; text-align: left; }
.side-nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav.is-on { background: #fff; color: #10292b; font-weight: 600; }

/* Tri / filtres (pages produits) */
.side-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-radius: .75rem; padding: .55rem .75rem; font-size: .9375rem; color: rgba(16,41,43,.75); transition: background-color .2s; }
.side-link:hover { background: #f5f2ec; color: #10292b; }
.side-link[aria-current="page"] { background: #10292b; color: #fff; }
.side-link[aria-current="page"] span { color: rgba(255,255,255,.6); }
::selection { background: rgba(252,101,56,.22); }
[hidden] { display: none !important; }

.wordmark { font-weight: 700; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.amp { color: #fc6538; }
.serif-accent { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.eyebrow { font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #0e6264; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 9999px; font-weight: 500; transition: background-color .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s; }
.btn-primary { background: #0f3a3d; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #0c2b2d; transform: translateY(-1px); box-shadow: 0 12px 28px -14px rgba(15,58,61,.7); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: #fc6538; color: #fff; }
.btn-accent:hover:not(:disabled) { background: #e94c1e; transform: translateY(-1px); box-shadow: 0 12px 28px -14px rgba(233,76,30,.7); }
.btn-outline { border: 1px solid rgba(16,41,43,.18); color: #10292b; background: rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #10292b; background: #fff; }
.btn-light { background: #fff; color: #10292b; }
.btn-light:hover { background: #f5f2ec; transform: translateY(-1px); }
:focus-visible { outline: 2px solid #fc6538; outline-offset: 3px; }

/* Menu */
#topbar { transition: max-height .4s ease, opacity .3s ease; max-height: 40px; }
#topbar.collapsed { max-height: 0; opacity: 0; }
#navWrap { transition: background-color .3s, box-shadow .3s, border-color .3s; }
#navWrap.scrolled { background: rgba(245,242,236,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: rgba(16,41,43,.08); }
.dd-panel { visibility: hidden; opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s, visibility .2s; }
.dd:hover .dd-panel, .dd:focus-within .dd-panel, .dd.open .dd-panel { visibility: visible; opacity: 1; transform: translate(-50%, 0); }

/* Filtres */
.chip { border-radius: 9999px; padding: .55rem 1rem; font-size: .875rem; box-shadow: inset 0 0 0 1px rgba(16,41,43,.15); transition: background-color .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.chip:hover { box-shadow: inset 0 0 0 1px rgba(16,41,43,.4); }
.chip[aria-current="page"] { background: #10292b; color: #fff; box-shadow: none; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Fiche produit */
.opt:has(input:checked) { border-color: #0f3a3d; background: #eef6f6; box-shadow: inset 0 0 0 1px #0f3a3d; }
.opt:has(input:focus-visible) { outline: 2px solid #fc6538; outline-offset: 2px; }
.thumb[aria-current="true"] { box-shadow: 0 0 0 2px #0f3a3d; }
.rich-list { margin-top: .75rem; display: grid; gap: .6rem; }
.rich-list li { position: relative; padding-left: 1.9rem; }
.rich-list li::before { content: ""; position: absolute; left: 0; top: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 9999px; background: #eef6f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6264' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 60% no-repeat; }
.rich p + p { margin-top: .75rem; }

/* Formulaires */
.field { width: 100%; border-radius: 12px; border: 1px solid #e2dacd; background: #fff; padding: .8rem 1rem; font-size: 16px; color: #10292b; outline: none; transition: border-color .2s, box-shadow .2s; }
.field:focus { border-color: #0f3a3d; box-shadow: 0 0 0 4px rgba(15,58,61,.1); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310292b' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px; padding-right: 2.6rem; }
.qty { display: inline-flex; align-items: center; border-radius: 9999px; border: 1px solid #e2dacd; background: #fff; }
.qty button { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; color: #10292b; }
.qty button:hover { background: #f5f2ec; }
.qty input { width: 2.5rem; text-align: center; font-weight: 600; background: transparent; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

details summary::-webkit-details-marker { display: none; }

/* Fenêtres */
.modal[open] { animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
.modal::backdrop { background: rgba(16,41,43,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#toast:not([hidden]) { animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }

/* Apparitions douces */
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 10px); } to { opacity: 1; transform: translate(var(--tx, 0), 0); } }
#toast { --tx: -50%; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* Barre « Ajouter au panier » collée en bas sur mobile */
.sticky-buy { box-shadow: 0 -10px 30px -12px rgba(16,41,43,.25); padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Aperçu en direct du produit (inc/apercu.php) */
.preview-box { background: #efe9df; }
.preview-box svg { display: block; width: 100%; height: 100%; }
.viewtabs button { border-radius: 9999px; padding: .45rem .9rem; color: rgba(29,42,46,.6); transition: background .15s, color .15s; }
.viewtabs button[aria-pressed="true"] { background: #0f3a3d; color: #fff; }
.logo-drop:has(input:focus-visible) { outline: 2px solid #fc6538; outline-offset: 2px; }

/* Aide de la gestion : petits bouts de commande à copier */
.help-text code { word-break: break-all; border-radius: .375rem; background: #f3efe8; padding: .1rem .4rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: #10292b; }
