/* ============================================
   N3D PRINTS — Feuille de style globale
   ============================================
   PERSONNALISATION RAPIDE :
   Modifie les variables CSS ci-dessous pour
   changer les couleurs, polices et espacements
   du site entier en un seul endroit.
   ============================================ */

/* --- VARIABLES PERSONNALISABLES --- */
:root {
  /* Couleurs principales */
  --color-bg: #FAFAF8;           /* Fond de page */
  --color-surface: #FFFFFF;      /* Fond des cartes */
  --color-surface-alt: #F5F2EC; /* Fond alternatif (sidebar, badges) */
  --color-border: #E8E4DC;       /* Bordures */
  --color-border-strong: #C8C4BC;

  /* Texte */
  --color-text: #1A1A18;         /* Texte principal */
  --color-text-muted: #7A776E;   /* Texte secondaire */
  --color-text-hint: #AAA79F;    /* Texte tertiaire */

  /* Accent — couleur principale du site */
  --color-accent: #1A1A18;       /* Boutons, liens actifs */
  --color-accent-inv: #FAFAF8;   /* Texte sur boutons foncés */

  /* Couleurs sémantiques */
  --color-success-bg: #EAF0E6;
  --color-success-text: #2E5E1E;
  --color-error-bg: #FAECE7;
  --color-error-text: #8B2A1A;
  --color-info-bg: #EEEDFE;
  --color-info-text: #3C3489;

  /* Fonds produits (ambiance Japandi) */
  --bg-beige: #F5F0E8;
  --bg-sage: #EAF0E6;
  --bg-clay: #F0E8E2;
  --bg-stone: #EEECE8;

  /* Typographie */
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  /* Espacements */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }
img { max-width: 100%; display: block; }

/* --- NAVIGATION --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo span { color: var(--color-text-muted); font-weight: 400; }

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 14px;
  color: var(--color-text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a.active {
  font-weight: 500;
  border-bottom: 1.5px solid var(--color-text);
  padding-bottom: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-cart-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px 14px 6px 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-cart-btn:hover { border-color: var(--color-border-strong); color: var(--color-text); }

.cart-badge {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 1px 7px;
}

/* --- BREADCRUMB --- */
.breadcrumb {
  padding: 0.75rem 2rem;
  font-size: 12px;
  color: var(--color-text-hint);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 4px;
  align-items: center;
}

.breadcrumb a, .breadcrumb span:not(.current) {
  color: var(--color-text-muted);
}

.breadcrumb > * + *::before {
  content: "›";
  margin-right: 4px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.breadcrumb a:hover { color: var(--color-text); }
.breadcrumb .current { color: var(--color-text); font-weight: 500; }

/* --- BOUTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-inv);
}

.btn-primary:hover { opacity: 0.88; }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.btn-outline:hover { border-color: var(--color-text); }

.btn-full { width: 100%; }

/* --- BADGES --- */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.badge-new { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-sold { background: var(--color-error-bg); color: var(--color-error-text); }
.badge-custom { background: var(--color-info-bg); color: var(--color-info-text); }
.badge-perso   { background: #FDF3FF; color: #7C3AED; }
.badge-restock { background: #D1FAE5; color: #065F46; }

/* --- CARDS PRODUIT --- */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
}

.product-img .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.product-info { padding: 12px 14px; }
.product-name { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.product-mat { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 15px; font-weight: 600; }

/* --- FORMULAIRES --- */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.form-label .required { color: #D4537E; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-border-strong);
}

.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* --- INFO BOX --- */
.info-box {
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.info-box.success { background: var(--color-success-bg); color: var(--color-success-text); }
.info-box.info { background: var(--color-info-bg); color: var(--color-info-text); }
.info-box.neutral { background: var(--color-surface-alt); color: var(--color-text-muted); }

/* --- STEPS BAR --- */
.steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--color-border);
  gap: 6px;
  background: var(--color-surface);
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-hint);
}

.step.active { color: var(--color-text); font-weight: 500; }
.step.done { color: var(--color-success-text); }

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.step.active .step-num { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.step.done .step-num { background: var(--color-success-bg); color: var(--color-success-text); border-color: #C0DD97; }
.step-sep { width: 40px; height: 1px; background: var(--color-border); }

/* --- SUMMARY SIDEBAR --- */
.summary-sidebar {
  background: var(--color-surface-alt);
  padding: 1.5rem;
}

.summary-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-row .label { color: var(--color-text-muted); }
.summary-row .val { font-weight: 500; }

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  padding-top: 12px;
}

/* --- PRICE ESTIMATE BOX --- */
.price-estimate {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
}

.price-est-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-bottom: 4px; }
.price-est-val { font-size: 26px; font-weight: 600; }
.price-est-note { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* --- DELIVERY OPTIONS --- */
.delivery-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.delivery-opt:hover { border-color: var(--color-border-strong); }
.delivery-opt.active { border: 2px solid var(--color-text); }
.delivery-opt-info { font-size: 13px; font-weight: 500; }
.delivery-opt-sub { font-size: 11px; color: var(--color-text-muted); }
.delivery-opt-price { font-size: 14px; font-weight: 600; }

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--color-text); }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted); transition: all .15s;
  text-decoration: none; font-size: 16px;
}
.footer-social a:hover { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }

/* --- RESPONSIVE --- */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .layout-grid { grid-template-columns: 1fr !important; }
}

/* --- UTILITAIRES --- */
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }

/* ── BANNIÈRE COOKIES ───────────────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0,0,0,.07);
  font-size: 13px;
  color: var(--color-text-muted);
}
#cookie-banner a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cookie-banner-close {
  flex-shrink: 0;
  background: var(--color-accent);
  color: var(--color-accent-inv);
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
}
#cookie-banner-close:hover { opacity: .85; }
@media (max-width: 600px) {
  #cookie-banner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
}
