/* ═══════════════════════════════════════════════════════════════════
   shop.css — L'Oracle Sacré de l'Éveil
   Palette : doré #b08d57 · vert sauge #7d9b76 · crème #fdf9f3
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  background: #fdf9f3;
  color: #3a2e1e;
  font-size: 15px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: #b08d57; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Variables ────────────────────────────────────────────────────── */
:root {
  --or: #b08d57;
  --or-clair: #d4a96a;
  --or-fonce: #8a6a3a;
  --sauge: #7d9b76;
  --creme: #fdf9f3;
  --creme-sombre: #f3ead8;
  --texte: #3a2e1e;
  --texte-muted: #7c6850;
  --blanc: #ffffff;
  --border: #e8dcc8;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* ── Typographie ──────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; color: var(--texte); line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }

/* ── Header / Nav ────────────────────────────────────────────────── */
.site-header {
  background: var(--creme);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
}
.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo-titre { font-family: Georgia, serif; font-size: 17px; color: var(--or); font-weight: 700; }
.logo-sous  { font-size: 11px; color: var(--texte-muted); }
.main-nav { display: flex; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.main-nav a { padding: 6px 12px; border-radius: var(--radius); font-size: 14px; color: var(--texte); transition: background .15s, color .15s; }
.main-nav a:hover, .main-nav a.active { background: var(--or); color: #fff; text-decoration: none; }
.panier-icone { position: relative; font-size: 22px; padding: 4px; }
.panier-badge {
  position: absolute; top: -4px; right: -6px;
  background: var(--sauge); color: #fff;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }

/* ── Flash messages ──────────────────────────────────────────────── */
.flash-container { max-width: 1180px; margin: 12px auto 0; padding: 0 24px; }
.flash { padding: 11px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 8px; border-left: 4px solid transparent; }
.flash-success { background: #f0fdf4; color: #166534; border-color: var(--sauge); }
.flash-danger  { background: #fef2f2; color: #991b1b; border-color: #f87171; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #fbbf24; }
.flash-info    { background: #f0f9ff; color: #0c4a6e; border-color: #38bdf8; }

/* ── Layout principal ────────────────────────────────────────────── */
.main-content { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }

/* ── Boutique hero ───────────────────────────────────────────────── */
.boutique-hero { text-align: center; padding: 40px 0 28px; }
.boutique-hero h1 { color: var(--or); }
.sous-titre { color: var(--texte-muted); margin-top: 8px; font-size: 16px; }

/* ── Filtres catégories ──────────────────────────────────────────── */
.filtres-categories {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 36px;
}
.filtre-btn {
  padding: 7px 18px; border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 13px; color: var(--texte-muted);
  transition: all .18s; cursor: pointer;
}
.filtre-btn:hover, .filtre-btn.active {
  background: var(--or); color: #fff;
  border-color: var(--or); text-decoration: none;
}

/* ── Grille produits ─────────────────────────────────────────────── */
.produits-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.produits-grille.mini { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

/* ── Carte produit ───────────────────────────────────────────────── */
.produit-card {
  background: var(--blanc);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.produit-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.produit-card-lien { display: block; position: relative; overflow: hidden; }
.produit-card-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  transition: transform .3s;
}
.produit-card:hover .produit-card-img { transform: scale(1.04); }
.produit-no-img {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--creme-sombre); font-size: 48px;
}
.produit-card-body { padding: 14px 16px 18px; }
.produit-categorie { font-size: 11px; text-transform: uppercase; color: var(--sauge); letter-spacing: .06em; }
.produit-nom { font-size: 15px; margin: 4px 0 6px; }
.produit-nom a { color: var(--texte); }
.produit-nom a:hover { color: var(--or); text-decoration: none; }
.produit-desc-courte { font-size: 13px; color: var(--texte-muted); margin-bottom: 10px; }

/* Badges sur les cartes */
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-vedette  { background: var(--or); color: #fff; }
.badge-rupture  { background: #ef4444; color: #fff; }
.badge-alerte   { background: #f59e0b; color: #fff; }

/* Prix */
.produit-prix-ligne { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.prix        { font-size: 18px; font-weight: 700; color: var(--or); }
.prix-promo  { font-size: 18px; font-weight: 700; color: #e53e3e; }
.prix-barre  { font-size: 13px; color: var(--texte-muted); text-decoration: line-through; }
.prix.grand, .prix-promo.grand { font-size: 26px; }
.stock-nul  { color: #e53e3e; font-size: 13px; }
.stock-ok   { color: var(--sauge); font-size: 13px; }
.stock-alerte { color: #d97706; font-size: 13px; }

/* ── Page produit détail ─────────────────────────────────────────── */
.fil-ariane { font-size: 13px; color: var(--texte-muted); margin-bottom: 20px; }
.fil-ariane a { color: var(--texte-muted); }
.fil-ariane a:hover { color: var(--or); }

.produit-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.img-principale { width: 100%; border-radius: 10px; object-fit: cover; max-height: 500px; }
.img-placeholder { width: 100%; aspect-ratio: 1; background: var(--creme-sombre); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 80px; }
.galerie-miniatures { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.miniature { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.miniature.active, .miniature:hover { border-color: var(--or); }
.produit-categorie-label { font-size: 12px; text-transform: uppercase; color: var(--sauge); letter-spacing: .07em; }
.produit-titre { margin: 8px 0 16px; }
.produit-prix-bloc { margin-bottom: 14px; }
.produit-accroche { font-size: 16px; color: var(--texte-muted); margin-bottom: 16px; }
.produit-description { margin-top: 28px; }
.produit-description h3 { margin-bottom: 10px; font-size: 15px; }
.description-texte { font-size: 15px; line-height: 1.75; color: var(--texte); }
.description-texte p { margin-bottom: .8em; }

/* Contrôle quantité */
.quantite-controle { margin-bottom: 16px; }
.quantite-controle label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; }
.quantite-input { display: flex; align-items: center; gap: 0; width: 120px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-btn { width: 36px; height: 40px; background: var(--creme-sombre); border: none; font-size: 18px; cursor: pointer; transition: background .15s; }
.qty-btn:hover { background: var(--or); color: #fff; }
.qty-field { width: 48px; height: 40px; border: none; text-align: center; font-size: 15px; background: #fff; }
.qty-field:focus { outline: none; }

/* Similaires */
.similaires { margin-top: 56px; }
.similaires h2 { margin-bottom: 20px; }

/* ── Panier ──────────────────────────────────────────────────────── */
.panier-section h1 { margin-bottom: 28px; }
.panier-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.panier-table { width: 100%; border-collapse: collapse; }
.panier-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-size: 13px; color: var(--texte-muted); text-transform: uppercase; }
.panier-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.panier-produit { display: flex; align-items: center; gap: 14px; }
.panier-img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.panier-img-placeholder { width: 60px; height: 60px; background: var(--creme-sombre); display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 6px; }
.btn-suppr { background: none; border: none; cursor: pointer; font-size: 16px; color: #aaa; transition: color .15s; }
.btn-suppr:hover { color: #e53e3e; }
.panier-recap { background: var(--blanc); border: 1px solid var(--border); border-radius: 10px; padding: 24px; position: sticky; top: 80px; }
.panier-recap h2 { font-size: 17px; margin-bottom: 18px; }
.recap-ligne { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.recap-total { font-size: 17px; font-weight: 700; color: var(--or); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.livraison-gratuite { color: var(--sauge); font-style: normal; font-weight: 600; }
.livraison-hint { font-size: 12px; color: var(--texte-muted); margin-bottom: 14px; }
.panier-vide { text-align: center; padding: 60px 0; }
.panier-vide-msg { font-size: 18px; color: var(--texte-muted); margin-bottom: 20px; }

/* ── Checkout ────────────────────────────────────────────────────── */
.checkout-section h1 { margin-bottom: 28px; }
.checkout-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: start; }
.checkout-form-bloc { background: var(--blanc); border: 1px solid var(--border); border-radius: 10px; padding: 28px; }
.form-section { border: none; margin-bottom: 24px; }
.form-section legend { font-family: Georgia, serif; font-size: 16px; font-weight: 700; color: var(--or); padding: 0; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--texte); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; background: #fff; color: var(--texte);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(176,141,87,.15); }
.stripe-card-element { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: #fff; }
.stripe-error { color: #e53e3e; font-size: 13px; margin-top: 6px; min-height: 18px; }
.stripe-info { font-size: 12px; color: var(--texte-muted); margin-top: 8px; }

.checkout-recap { background: var(--blanc); border: 1px solid var(--border); border-radius: 10px; padding: 24px; position: sticky; top: 80px; }
.checkout-recap h2 { font-size: 17px; margin-bottom: 16px; }
.checkout-article { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; gap: 12px; }
.checkout-article-nom { color: var(--texte); flex: 1; }
.checkout-article-prix { color: var(--or); font-weight: 600; white-space: nowrap; }
.recap-sep { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Confirmation ────────────────────────────────────────────────── */
.confirmation-section { display: flex; justify-content: center; padding: 40px 0 80px; }
.confirmation-card { background: var(--blanc); border: 1px solid var(--border); border-radius: 12px; padding: 40px; max-width: 640px; width: 100%; text-align: center; }
.confirmation-icone { font-size: 52px; margin-bottom: 12px; }
.confirmation-card h1 { margin-bottom: 10px; }
.confirmation-ref { font-size: 14px; color: var(--texte-muted); margin-bottom: 10px; }
.confirmation-msg { font-size: 15px; color: var(--texte-muted); margin-bottom: 28px; line-height: 1.7; }
.confirmation-recap { text-align: left; background: var(--creme-sombre); border-radius: 8px; padding: 20px; margin-bottom: 24px; }
.confirmation-recap h2 { font-size: 16px; margin-bottom: 14px; }
.recap-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.recap-table th { padding: 6px 10px; background: var(--border); text-align: left; }
.recap-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.total-ligne td { font-weight: 700; color: var(--or); border-top: 2px solid var(--border); }
.livraison-detail { font-size: 13px; color: var(--texte-muted); line-height: 1.7; }
.livraison-detail h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--or); margin-bottom: 6px; }
.confirmation-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Boutons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 10px 22px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-align: center;
  transition: opacity .15s, transform .12s;
  text-decoration: none; line-height: 1.4;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primaire { background: var(--or); color: #fff; }
.btn-secondaire { background: var(--sauge); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--border); color: var(--texte-muted); }
.btn-ghost:hover { border-color: var(--or); color: var(--or); }
.btn-full { width: 100%; display: block; margin-top: 8px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer { background: var(--creme-sombre); border-top: 1px solid var(--border); margin-top: 60px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 32px 24px; text-align: center; }
.footer-marque { font-family: Georgia, serif; font-size: 16px; color: var(--or); margin-bottom: 10px; }
.footer-nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.footer-nav a { font-size: 13px; color: var(--texte-muted); }
.footer-nav a:hover { color: var(--or); }
.footer-copy { font-size: 12px; color: var(--texte-muted); }

/* ── Message vide ────────────────────────────────────────────────── */
.vide-message { text-align: center; padding: 60px 0; color: var(--texte-muted); }
.vide-message p { font-size: 17px; margin-bottom: 20px; }
.text-muted { color: var(--texte-muted); font-size: 12px; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .produit-detail { grid-template-columns: 1fr; gap: 28px; }
  .panier-layout  { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0; background: var(--creme); border-bottom: 1px solid var(--border); padding: 12px 0; z-index: 99; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
  .form-row { grid-template-columns: 1fr; }
  .panier-table thead { display: none; }
  .panier-table tr { display: block; margin-bottom: 12px; border-bottom: 2px solid var(--border); }
  .panier-table td { display: flex; justify-content: space-between; padding: 8px 0; border: none; font-size: 13px; }
}
