/* Grès & Sel — démonstration de boutique en ligne (ZataLabs, V7.3). */
:root {
  --fond: #fbf8f4;
  --sable: #f3ece3;
  --encre: #2e2a26;
  --gris: #716960;
  --terre: #c9764f;
  --terre-fonce: #a95e3b;
  --sauge: #6f8f63;
  --trait: rgba(46, 42, 38, .12);
  --serif: Fraunces, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --rayon: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body.sans-defilement { overflow: hidden; }
svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--terre); outline-offset: 3px; }
.conteneur { width: min(100% - 2.5rem, 1200px); margin-inline: auto; }
.conteneur--etroit { width: min(100% - 2.5rem, 760px); }
.surtitre { margin: 0 0 .7rem; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--terre-fonce); }

.annonce { margin: 0; padding: .55rem 1rem; background: var(--encre); color: #f3ece3; text-align: center; font-size: .82rem; }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 244, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); }
.entete__inner { display: flex; align-items: center; gap: 2rem; height: 68px; }
.logo { font: 600 1.5rem/1 var(--serif); text-decoration: none; }
.logo span { color: var(--terre); }
.entete__liens { display: flex; gap: 1.6rem; margin-right: auto; }
.entete__liens a { text-decoration: none; font-size: .93rem; color: var(--gris); }
.entete__liens a:hover { color: var(--encre); }
.panier-bouton { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 99px; border: 1px solid var(--trait); background: #fff; cursor: pointer; }
.panier-bouton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.panier-bouton__nombre { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--terre); color: #fff; font-size: .78rem; font-weight: 700; }
.panier-bouton.is-rebond .panier-bouton__nombre { animation: rebond .45s ease; }
@keyframes rebond { 40% { transform: scale(1.35); } }
@media (max-width: 700px) {
  .entete__liens { display: none; }
  .entete__inner { justify-content: space-between; }
  .panier-bouton__texte { display: none; }
}

/* ---------- Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .9rem 1.5rem; border-radius: 99px; border: 0; background: var(--encre); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s; }
.bouton:hover { background: var(--terre-fonce); transform: translateY(-1px); }
.bouton--plein { width: 100%; }
.fermer { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sable); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.fermer:hover { background: #e9dfd2; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0; background: linear-gradient(180deg, var(--sable), var(--fond)); }
.hero__grille { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero__texte { color: var(--gris); font-size: 1.08rem; max-width: 32rem; margin-bottom: 1.8rem; }
.hero__visuel svg { width: 100%; height: auto; }
@media (max-width: 780px) { .hero__grille { grid-template-columns: 1fr; } .hero__visuel { max-width: 380px; } }

/* ---------- Catalogue ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--sable { background: var(--sable); }
.barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-bottom: 1rem; }
.barre-outils h2 { margin: 0 auto 0 0; }
.filtres { display: flex; flex-wrap: wrap; gap: .45rem; }
.filtre { padding: .5rem .95rem; border-radius: 99px; border: 1px solid var(--trait); background: #fff; font-size: .88rem; cursor: pointer; }
.filtre[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.tri { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--gris); }
.tri select { padding: .5rem .8rem; border-radius: 10px; border: 1px solid var(--trait); background: #fff; font: inherit; color: var(--encre); }
.resultat { font-size: .85rem; color: var(--gris); margin-bottom: 1.4rem; }
.grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 1.3rem; }
@media (max-width: 1000px) { .grille { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grille { grid-template-columns: repeat(2, 1fr); gap: 1.2rem .9rem; } }
.produit { position: relative; display: grid; gap: .55rem; animation: apparition .4s ease both; }
@keyframes apparition { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.produit__image { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--rayon); overflow: hidden; cursor: pointer; }
.produit__image svg { width: 100%; height: 100%; transition: transform .5s; }
.produit__image:hover svg, .produit__image:focus-visible svg { transform: scale(1.06); }
.pastille { position: absolute; top: .7rem; left: .7rem; padding: .25rem .6rem; border-radius: 99px; background: #fff; font-size: .72rem; font-weight: 700; }
.pastille--rare { background: var(--encre); color: #fff; }
.produit__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.produit__nom { margin: 0; font: 600 1.08rem/1.25 var(--serif); }
.produit__prix { font-weight: 700; white-space: nowrap; }
.produit__couleur { margin: -.3rem 0 0; font-size: .82rem; color: var(--gris); }
.ajout-rapide { justify-self: start; padding: .5rem .9rem; border-radius: 99px; border: 1px solid var(--encre); background: transparent; font-size: .84rem; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.ajout-rapide:hover { background: var(--encre); color: #fff; }
.ajout-rapide.is-ajoute { background: var(--sauge); border-color: var(--sauge); color: #fff; }

/* ---------- Atelier, FAQ ---------- */
.atelier { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.atelier__texte p { color: var(--gris); }
.garanties { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.garanties li { padding-left: 1.8rem; position: relative; }
.garanties li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--sauge); box-shadow: inset 0 0 0 4px var(--sable); }
@media (max-width: 760px) { .atelier { grid-template-columns: 1fr; gap: 1rem; } }
.faq { border-bottom: 1px solid var(--trait); }
.faq summary { padding: 1.1rem 0; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--terre); transition: transform .25s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--gris); padding-bottom: 1rem; margin: 0; }
.pied { padding: 1.6rem 0; border-top: 1px solid var(--trait); font-size: .85rem; color: var(--gris); }
.pied__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }

/* ---------- Fiche produit ---------- */
dialog { padding: 0; border: 0; border-radius: 20px; background: var(--fond); color: var(--encre); }
dialog::backdrop { background: rgba(46, 42, 38, .55); backdrop-filter: blur(3px); }
.fiche { width: min(94vw, 880px); }
.fiche[open] { animation: apparition .3s ease both; }
.fiche__grille { display: grid; grid-template-columns: 1fr 1fr; }
.fiche__image svg { width: 100%; height: 100%; min-height: 300px; }
.fiche__texte { padding: 2.2rem 2rem; }
.fiche__prix { font-size: 1.3rem; font-weight: 700; }
.fiche__texte > p:not(.surtitre):not(.fiche__prix) { color: var(--gris); }
.fiche__details { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0 0 1.4rem; font-size: .88rem; }
.fiche__details dt { color: var(--gris); }
.fiche__details dd { margin: 0; }
.fiche__achat { display: flex; flex-wrap: wrap; gap: .8rem; }
.quantite { display: flex; align-items: center; border: 1px solid var(--trait); border-radius: 99px; background: #fff; }
.quantite button { width: 40px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.quantite output { min-width: 2ch; text-align: center; font-weight: 700; }
@media (max-width: 680px) { .fiche__grille { grid-template-columns: 1fr; } .fiche__image svg { min-height: 0; max-height: 38vh; } .fiche__texte { padding: 1.5rem; } }

/* ---------- Panier ---------- */
.voile { position: fixed; inset: 0; z-index: 60; background: rgba(46, 42, 38, .45); }
.panier { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; display: flex; flex-direction: column; width: min(100vw, 420px); background: var(--fond); box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .35); transform: translateX(105%); transition: transform .35s cubic-bezier(.22, 1, .36, 1); visibility: hidden; }
.panier.is-ouvert { transform: none; visibility: visible; }
.panier__tete { position: relative; padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--trait); }
.panier__tete h2 { margin: 0; font-size: 1.4rem; }
.panier__tete .fermer { top: .9rem; }
.livraison { padding: .9rem 1.4rem; background: var(--sable); font-size: .86rem; }
.livraison p { margin: 0 0 .5rem; }
.livraison__barre { height: 6px; border-radius: 99px; background: #e6dbcd; overflow: hidden; }
.livraison__barre span { display: block; height: 100%; width: 0; background: var(--sauge); transition: width .4s; }
.panier__lignes { list-style: none; margin: 0; padding: .5rem 1.4rem; overflow-y: auto; flex: 1; }
.ligne { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--trait); }
.ligne__image { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.ligne__image svg { width: 100%; height: 100%; }
.ligne__nom { margin: 0; font: 600 1rem/1.2 var(--serif); }
.ligne__prix { margin: .15rem 0 .4rem; font-size: .84rem; color: var(--gris); }
.ligne .quantite { display: inline-flex; }
.ligne .quantite button { width: 32px; height: 32px; font-size: 1rem; }
.ligne__total { font-weight: 700; text-align: right; }
.ligne__retirer { display: block; margin-top: .3rem; border: 0; background: none; padding: 0; font-size: .78rem; color: var(--gris); text-decoration: underline; cursor: pointer; }
.panier__vide { padding: 2rem 1.4rem; text-align: center; color: var(--gris); flex: 1; }
.panier__pied { padding: 1.2rem 1.4rem 1.5rem; border-top: 1px solid var(--trait); background: #fff; }
.panier__pied dl { margin: 0 0 1rem; display: grid; gap: .35rem; }
.panier__pied dl div { display: flex; justify-content: space-between; }
.panier__pied dt { color: var(--gris); }
.panier__pied dd { margin: 0; }
.panier__pied .total { padding-top: .5rem; margin-top: .3rem; border-top: 1px solid var(--trait); font-weight: 700; font-size: 1.1rem; }
.panier__pied .total dt { color: var(--encre); }

/* ---------- Commande simulée ---------- */
.commande { width: min(94vw, 520px); padding: 2rem; }
.commande h3 { font-size: 1.6rem; }
.commande__form { display: grid; gap: .9rem; }
.commande__form label { display: grid; gap: .3rem; font-size: .85rem; color: var(--gris); }
.commande__form input { padding: .75rem .9rem; border-radius: 10px; border: 1px solid var(--trait); background: #fff; font: 400 1rem/1.3 var(--sans); color: var(--encre); }
.commande__form input:focus { outline: none; border-color: var(--terre); }
.commande__form input.is-invalide { border-color: #c0473a; }
.commande__ligne { display: grid; grid-template-columns: 1fr 2fr; gap: .8rem; }
.commande__note { margin: .2rem 0 0; padding: .8rem; border-radius: 10px; background: var(--sable); font-size: .82rem; color: var(--gris); }
.commande__erreur { margin: 0; color: #a3372b; font-size: .85rem; min-height: 1em; }
#commandeEtape2 { text-align: center; }
.commande__ok { width: 64px; height: 64px; margin: .5rem auto 1rem; }
