/* ===========================
   Samiah Cosmetics — styles
   (Mise à jour : Design Moderne + Grille Fixe + Responsive)
   =========================== */

:root{
  --charcoal:#0A0A0A;
  --ivory:#F5F2EA;
  --gold:#D9B56C;
  --blush:#F6D6E1;

  --container:1160px;
  --radius:16px;
  --border:#eaeaea;
  --muted:#6b7280;
}

/* Base */
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;color:#222;background:#fff}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.muted{color:var(--muted)}
small.muted{opacity:.75}

/* Boutons */
.btn{display:inline-block;background:var(--charcoal);color:#fff;padding:12px 18px;border-radius:10px;font-weight:600;cursor:pointer}
.btn.gold{background:var(--gold);color:#222}
.btn.secondary{background:#1111110d;color:#111;border:1px solid var(--border)}

/* Layout généraux */
.container{max-width:var(--container);margin:0 auto;padding:0 16px}
.header{display:flex;align-items:center;gap:18px;padding:16px 0}
.logo img{height:64px;width:auto}
.brand{font-family:ui-serif,Georgia,'Times New Roman',serif;font-weight:700;letter-spacing:.08em}

/* Hero */
.hero{background:linear-gradient(135deg,#fff,#ffeef4);border-bottom:1px solid #eee;padding:36px 0}
.hero .wrap{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:center}
.hero h1{margin:0 0 8px;font-size:38px;letter-spacing:.02em}
.hero p{margin:0 0 16px;font-size:18px;opacity:.85}

/* Image Hero “propre” */
.hero-photo{
  border:1px solid #eee;border-radius:var(--radius);
  box-shadow:0 10px 30px rgba(0,0,0,.08);background:#fff;
  background-image:url('/assets/images/consultation-hero.jpg?v=5');
  background-position:center;background-repeat:no-repeat;background-size:contain;
  aspect-ratio:3 / 4;min-height:320px;
}
@media (min-width:900px){ .hero-photo{min-height:540px} }

/* Titres de section */
.section-title{font-family:ui-serif,Georgia,'Times New Roman',serif;font-size:28px;margin:24px 0 10px}

/* Filtres catalogue */
.filters{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 18px}
select,.search{padding:10px;border-radius:10px;border:1px solid #ddd;min-width:160px}

/* Grilles standard (Catalogue + Témoignages) */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}

/* === CARTE MODERNE (Produits & Témoignages) === */
.card {
  position: relative;
  background: #fff;
  border: 0; /* Pas de bordure grise */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04); /* Ombre douce */
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-4px); /* Légère montée */
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* Typographie interne carte */
.card .p { padding: 16px; }
.card .p div:first-child { font-size: 1.05rem; margin-bottom: 4px; font-weight: 700; }
.card .price { color: #D9B56C; font-size: 1.1rem; margin-top: 8px; font-weight: 800; }

/* Badge générique */
.badge{display:inline-block;background:#111;color:#fff;border-radius:999px;font-size:12px;padding:6px 10px;margin-right:6px;opacity:.9}

/* Badge "Nouveau" */
.badge.badge-new {
  position: absolute;
  top: 8px; left: 8px;
  background: #D9B56C; color: #111;
  font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  z-index: 5;
}

/* Message vide */
.empty{padding:20px;text-align:center;color:var(--muted)}

/* Footer */
.footer{margin-top:40px;padding:24px 0;border-top:1px solid #eee;font-size:14px;color:#666}

/* WhatsApp flottant */
.wa-float{
  position:fixed;right:18px;bottom:18px;z-index:999;
  display:inline-flex;align-items:center;justify-content:center;
  width:56px;height:56px;border-radius:999px;background:#25D366;color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.2);text-decoration:none;
  touch-action:manipulation;
}

/* =========================
   Images Produits : Effet "Jumia" + Bouton survol
   ========================= */
.card-thumb{ position:relative; overflow:hidden; background:#fff; }

.card-img{
  width:100%; height:240px; /* Hauteur fixe produits */
  object-fit:cover; display:block;
  transition:transform .25s ease, opacity .25s ease;
}
.card-img-secondary{ position:absolute; inset:0; opacity:0; }

/* Hover & Swipe */
.card:hover .card-img-primary{ transform:scale(1.06); }
.card:hover .card-img-secondary{ opacity:1; }
.card.card-swiped .card-img-primary{ opacity:0; transform:scale(1.06); }
.card.card-swiped .card-img-secondary{ opacity:1; transform:scale(1.06); }

/* Bouton "Voir le produit" */
.card-action {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #fff; color: #000;
  padding: 8px 16px; border-radius: 20px;
  font-weight: 600; font-size: 13px;
  opacity: 0; transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  pointer-events: none;
}
.card:hover .card-action {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* =========================
   TÉMOIGNAGES : GRID FIXE (Comme avant)
   ========================= */
/* Force la hauteur des images témoignages pour éviter l'effet géant */
#testiGrid .card img {
  width: 100%;
  height: 220px;     /* Hauteur contrainte */
  object-fit: cover; /* Coupe proprement */
  display: block;
  background: #f9f9f9;
}

/* Responsive images générales */
@media (max-width:1100px){ .hero h1{font-size:34px} .card-img{height:220px} }
@media (max-width:900px){ .hero .wrap{grid-template-columns:1fr} }
@media (max-width:620px){ .card-img{height:180px} .grid{gap:14px} }

/* =========================
   SKELETON LOADING
   ========================= */
.skeleton { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%{opacity:1} 50%{opacity:.5} 100%{opacity:1} }

/* =========================
   Modale
   ========================= */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;z-index:1000}
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:1001}
.modal-card{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  width:min(980px,96vw);overflow:hidden;
}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--border)}
.modal-body{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;padding:14px}
@media (max-width:900px){ .modal-body{grid-template-columns:1fr} }

.gal-main{border:1px solid #eee;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#fff;aspect-ratio:4/3}
.gal-main img{max-width:100%;max-height:100%}
.gal-thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gal-thumbs img{width:72px;height:72px;object-fit:cover;border:1px solid #eee;border-radius:8px;cursor:pointer}

/* Outils Admin */
#listControls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;justify-content:space-between;margin:10px 0 12px}
#listControls select{padding:10px;border:1px solid var(--border);border-radius:10px}
#pageInfo{color:var(--muted)}

.thumbs{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.thumbs .thumb{position:relative;display:inline-block}
.thumbs .thumb img{width:56px;height:56px;object-fit:cover;border:1px solid #eee;border-radius:8px}
.thumb-btn{
  position:absolute;border:0;cursor:pointer;font-size:12px;line-height:20px;
  width:20px;height:20px;border-radius:999px;color:#fff;
}
.thumb-btn.del{right:-6px;top:-6px;background:#b42318}
.thumb-btn.star{right:18px;top:-6px;background:#111}
.thumb-btn.star.on{background:#f59e0b;color:#111}
.thumb-btn.drag{left:-6px;top:-6px;background:#6b7280}
.thumb.dragging{opacity:.6;outline:2px dashed #bbb}

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