/* ═══════════════════════════════════════════════════════
   HORATHECH PREMIUM — Design Upgrade v2
   Inspiré de mesbahwatches.shop
   Cartes épurées · Animations fluides · Typographie raffinée
   ═══════════════════════════════════════════════════════ */

/* ── Import des polices additionnelles ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens supplémentaires ── */
:root {
  --serif2: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --sans2: 'Inter', 'Manrope', system-ui, sans-serif;
  --gold-glow: rgba(201,169,106,.25);
  --card-hover-border: rgba(201,169,106,.45);
  --transition-slow: .45s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════
   SECTION : HERO — Amélioration
══════════════════════════════════════════════ */

.hero {
  position: relative;
  overflow: hidden;
}

/* Lumière ambiante dorée subtile */
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(201,169,106,.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content { position: relative; z-index: 1; }
.hero-media { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════
   SECTION : PRODUCT CARDS — Refonte complète
══════════════════════════════════════════════ */

.card {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform .38s cubic-bezier(.25,.8,.25,1),
              border-color .38s ease,
              box-shadow .38s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(201,169,106,0);
  transition: box-shadow .38s ease;
  pointer-events: none;
  z-index: 2;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--card-hover-border);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px var(--card-hover-border);
}

.card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(201,169,106,.2);
}

/* Image zone — ratio harmonieux */
.card .im {
  aspect-ratio: 4 / 3;
  background: radial-gradient(ellipse at 50% 30%, rgba(201,169,106,.12), transparent 70%), var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Overlay sombre au hover sur l'image */
.card .im::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .38s ease;
}

.card:hover .im::after {
  background: rgba(0,0,0,.08);
}

.card .im img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 18px;
  box-sizing: border-box;
  transition: transform .5s cubic-bezier(.25,.8,.25,1);
}

.card:hover .im img {
  transform: scale(1.08) rotate(1.5deg);
}

/* Card body */
.card .in {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-family: var(--serif2);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.25;
  letter-spacing: .01em;
}

.card .meta {
  color: var(--mute);
  font-size: .78rem;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.card .price {
  font: 600 1.15rem var(--sans2);
  color: var(--accent);
  margin-top: auto;
  padding-top: 10px;
}

.card .price s {
  color: var(--mute);
  font-weight: 400;
  margin-left: 8px;
  font-size: .88rem;
}

/* Badge produit — plus raffiné */
.badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--sans2);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  z-index: 3;
}

.badge.sale { background: #e05555; }
.badge.new { background: #3b82f6; }
.badge.limited { background: #7c5cbf; }

/* Bouton coeur — plus subtil */
.heart {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(10,14,24,.55);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.7);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 3;
}

.heart:hover, .heart.on {
  background: rgba(224,85,85,.25);
  border-color: rgba(224,85,85,.5);
  color: #e05555;
}

/* Card actions */
.card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.card .card-actions .btn {
  flex: 1;
  padding: 11px 14px;
  font-size: .82rem;
  letter-spacing: .03em;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════
   SECTION : CATEGORY CARDS — Nouveau design
══════════════════════════════════════════════ */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color .35s ease, transform .35s ease, box-shadow .35s ease;
}

/* Halo décoratif */
.cat-card::before {
  content: '';
  position: absolute;
  bottom: -40px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
}

.cat-card:hover {
  border-color: rgba(201,169,106,.45);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

.cat-card:hover::before { opacity: 1; }

.cat-card .cat-icon {
  width: 56px; height: 56px;
  background: rgba(201,169,106,.1);
  border: 1px solid rgba(201,169,106,.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: background .35s ease, border-color .35s ease;
  color: var(--accent);
}

.cat-card:hover .cat-icon {
  background: rgba(201,169,106,.18);
  border-color: rgba(201,169,106,.4);
}

.cat-card h3 {
  font-family: var(--serif2);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}

.cat-card .mute {
  font-size: .77rem;
  letter-spacing: .03em;
}

/* Arrow sur la card */
.cat-card .cat-arrow {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s ease, transform .3s ease;
  color: var(--accent);
  font-size: .85rem;
}

.cat-card:hover .cat-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════════════
   SECTION : HERO IMAGE BOX — Premium
══════════════════════════════════════════════ */

.hero-img-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(ellipse at 40% 45%, rgba(201,169,106,.14) 0%, transparent 60%), var(--bg2);
  border: 1px solid var(--line);
  padding: 48px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 40px 80px rgba(0,0,0,.45);
}

/* Coins décoratifs */
.hero-img-wrap::before,
.hero-img-wrap::after {
  content: '';
  position: absolute;
  width: 50px; height: 50px;
  border-color: rgba(201,169,106,.3);
  border-style: solid;
}
.hero-img-wrap::before {
  top: 18px; left: 18px;
  border-width: 1px 0 0 1px;
}
.hero-img-wrap::after {
  bottom: 18px; right: 18px;
  border-width: 0 1px 1px 0;
}

.hero-img-wrap img {
  max-width: 82%;
  transition: transform .7s cubic-bezier(.25,.8,.25,1);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}
.hero-img-wrap:hover img {
  transform: scale(1.05) rotate(1.5deg);
}

/* ══════════════════════════════════════════════
   SECTION : NAVBAR — Raffinement
══════════════════════════════════════════════ */

.nav {
  border-bottom: 1px solid rgba(201,169,106,.12);
}

.logo {
  font-family: var(--serif2);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink);
}
.logo span { color: var(--accent); }

.nav-links a {
  font-family: var(--sans2);
  font-size: .83rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   SECTION : SECTION HEADERS — Style élégant
══════════════════════════════════════════════ */

.sec-head {
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}

.sec-head h2 {
  font-family: var(--serif2);
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
  font-weight: 500;
}

/* Trait décoratif sous le label */
.sec-head .label {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  margin-bottom: 10px;
}
.sec-head .label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 1px;
  background: var(--accent);
}

/* ══════════════════════════════════════════════
   SECTION : BOUTONS — Style affiné
══════════════════════════════════════════════ */

.btn {
  font-family: var(--sans2);
  letter-spacing: .06em;
  font-size: .85rem;
  border-radius: 6px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

/* Effet shimmer au hover */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transition: left .5s ease;
  pointer-events: none;
}
.btn:hover::before { left: 150%; }

/* ══════════════════════════════════════════════
   SECTION : FEATURE STRIP — Redesign
══════════════════════════════════════════════ */

.feature-strip {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-item {
  transition: background .3s ease;
  position: relative;
}
.feature-item:hover {
  background: rgba(201,169,106,.04);
}

.feature-title {
  font-family: var(--sans2);
  font-weight: 600;
  font-size: .85rem;
}

.feature-text {
  font-size: .77rem;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════
   SECTION : REVIEW CARDS — Premium
══════════════════════════════════════════════ */

.review-card {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 28px;
  transition: border-color .3s ease, transform .3s ease;
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 16px; right: 22px;
  font-family: var(--serif2);
  font-size: 5rem;
  color: rgba(201,169,106,.08);
  line-height: 1;
  pointer-events: none;
}

.review-card:hover {
  border-color: rgba(201,169,106,.25);
  transform: translateY(-4px);
}

.review-text {
  font-style: italic;
  font-family: var(--serif2);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink2);
}

/* ══════════════════════════════════════════════
   SECTION : FOOTER — Upgrade
══════════════════════════════════════════════ */

.footer-logo {
  font-family: var(--serif2);
  letter-spacing: .06em;
}

.footer-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  margin-bottom: 40px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  overflow: hidden;
}

.ft-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-right: 1px solid var(--line2);
  transition: background .3s ease;
}
.ft-item:last-child { border-right: none; }
.ft-item:hover { background: rgba(201,169,106,.04); }

.ft-icon {
  width: 40px; height: 40px;
  background: rgba(201,169,106,.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   SECTION : ADMIN — Refonte complète
══════════════════════════════════════════════ */

/* Login screen admin */
#login-screen {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,169,106,.15) 0%, transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, #0a0e1a 100%);
}

.login-box {
  background: var(--bg2);
  border: 1px solid rgba(201,169,106,.15);
  border-radius: 20px;
  padding: 52px 44px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(201,169,106,.08);
}

.login-brand .logo-text {
  font-family: var(--serif2);
  font-style: italic;
}

/* Admin bar */
.admin-bar {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid rgba(201,169,106,.12);
}

.admin-bar .logo {
  font-family: var(--serif2);
  font-style: italic;
  font-size: 1.5rem;
}

/* Stat cards — modernisées */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 28px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 2px;
}

.stat-card:hover {
  border-color: rgba(201,169,106,.3);
  transform: translateY(-2px);
}

.stat-lbl {
  font-family: var(--sans2);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
  margin-bottom: 10px;
}

.stat-val {
  font-family: var(--serif2);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

/* Tabs admin */
.admin-tab {
  font-family: var(--sans2);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 16px 22px;
}

/* Table produits / commandes */
.admin-table {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line2);
}

.admin-table th {
  font-family: var(--sans2);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--bg3);
  color: var(--mute);
}

.admin-table tr:hover td {
  background: rgba(201,169,106,.03);
}

/* Settings cards */
.settings-card {
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--bg2);
  transition: border-color .3s ease;
}
.settings-card:hover {
  border-color: rgba(201,169,106,.2);
}

.danger-card {
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 14px;
  background: rgba(239,68,68,.04);
}

/* Modal produit — amélioration */
#product-modal .modal-box {
  border-radius: 20px;
  border: 1px solid rgba(201,169,106,.15);
  box-shadow: 0 40px 100px rgba(0,0,0,.7);
}

/* Zone photo */
.photo-zone {
  border: 2px dashed rgba(201,169,106,.2);
  border-radius: 14px;
  background: var(--bg3);
  transition: border-color .3s ease, background .3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.photo-zone:hover {
  border-color: rgba(201,169,106,.5);
  background: rgba(201,169,106,.04);
}

/* ══════════════════════════════════════════════
   SECTION : ANIMATIONS AVANCÉES
══════════════════════════════════════════════ */

/* Fade-in au chargement des cartes */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeSlideUp .5s ease backwards;
}

/* Délais pour l'effet cascading */
.card:nth-child(1) { animation-delay: .05s; }
.card:nth-child(2) { animation-delay: .1s; }
.card:nth-child(3) { animation-delay: .15s; }
.card:nth-child(4) { animation-delay: .2s; }
.card:nth-child(5) { animation-delay: .25s; }
.card:nth-child(6) { animation-delay: .3s; }
.card:nth-child(7) { animation-delay: .35s; }
.card:nth-child(8) { animation-delay: .4s; }

/* Skeleton loading */
@keyframes skeleton-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease infinite;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════
   SECTION : RESPONSIVE PREMIUM
══════════════════════════════════════════════ */

@media (max-width: 640px) {
  /* Category cards 2x2 */
  .cat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
  .cat-card { padding: 20px 12px; gap: 8px; }
  .cat-card .cat-icon { width: 44px; height: 44px; border-radius: 10px; }
  .cat-card h3 { font-size: .92rem; }
  .cat-card .mute { font-size: .72rem; }

  /* Product grid 2 colonnes */
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card .in { padding: 14px 14px 18px; }
  .card h3 { font-size: 1rem; }
  .card .price { font-size: 1rem; }
  .card .card-actions .btn { padding: 9px 10px; font-size: .77rem; }

  /* Stat admin grille 2x2 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
  .stat-val { font-size: 1.4rem; }

  /* Footer trust strip vertical */
  .ft-item { border-right: none; border-bottom: 1px solid var(--line2); }
  .ft-item:last-child { border-bottom: none; }
  .footer-trust { display: flex; flex-direction: column; }
}

@media (max-width: 400px) {
  .cat-card { padding: 16px 8px; }
  .grid-4 { gap: 8px; }
}

/* ══════════════════════════════════════════════
   SECTION : PAGE D'ACCUEIL — Améliorations
══════════════════════════════════════════════ */

/* Genre tabs — style mesbah */
#tab-homme, #tab-femme {
  min-width: 130px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .82rem;
  font-family: var(--sans2);
  border-radius: 6px;
  padding: 12px 28px;
}

/* Ligne décorative section */
.sec-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 16px auto 0;
}

/* ══════════════════════════════════════════════
   SECTION : CHATBOT — Style premium
══════════════════════════════════════════════ */

#chat-toggle-btn {
  box-shadow: 0 8px 30px rgba(201,169,106,.45), 0 2px 8px rgba(0,0,0,.3);
}

#chat-window {
  border-radius: 20px;
  border: 1px solid rgba(201,169,106,.15);
}

/* ══════════════════════════════════════════════
   SECTION : SCROLL BAR — Style cohérent
══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(201,169,106,.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(201,169,106,.5);
}

/* ══════════════════════════════════════════════
   SECTION : SÉLECTION TEXTE — Cohérent
══════════════════════════════════════════════ */

::selection {
  background: rgba(201,169,106,.25);
  color: var(--ink);
}
