/* Déclaration et importation des polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Pushster&family=Shrikhand&family=Spirax&family=Sriracha&display=swap');

:root {
  --bg-color: #f7f3ed;
  --card-bg: #efebe4;
  --text-color: #4a4238;
  --btn-bg: #d9bfb4;
  
  /* Variables de polices que tu as choisies */
  --font-main: 'Cairo', sans-serif;             /* Pour le texte courant et les inputs */
  --font-title: 'Shrikhand', cursive;          /* Pour les grands titres (H1, h2, page-title) */
  --font-product: 'Pushster', cursive;         /* Pour les noms de produits et le texte brodé */
  --font-accent: 'Sriracha', cursive;          /* Pour les boutons et actions */
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

/* Header & Navigation */
header {
  background-color: #ffffff;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0dad0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

header h1 {
  font-family: var(--font-title);
  font-weight: normal;
  margin: 0;
  font-size: 28px;
  color: #5c4d44;
}

nav a {
  margin: 0 12px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover, nav a.active {
  color: #b58d71;
}

/* Hero Section (Page d'accueil) */
.hero-section {
  text-align: center;
  padding: 60px 20px;
  background-color: #fdfaf5;
  max-width: 700px;
  margin: 0 auto;
}

.hero-content h2 {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: normal;
  color: #4a3f35;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #6b5f52;
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--btn-bg);
  color: white;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-accent);
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #bc8a5f;
}

/* Features Section (Page d'accueil) */
.features-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 950px;
  margin: 50px auto;
  padding: 0 20px;
}

.feature-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  text-align: center;
}

.feature-card h3 {
  font-family: var(--font-product);
  font-size: 20px;
  font-weight: normal;
  margin-top: 0;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #6b5f52;
}

/* Responsive: 1 colonne sur mobile */
@media (max-width: 700px) {
  .features-section {
    grid-template-columns: 1fr;
  }
  .hero-content h2 {
    font-size: 26px;
  }
  .container {
    grid-template-columns: 1fr !important;
  }
}

/* Page Layout (Configurateur) */
.container {
  max-width: 950px;
  margin: 40px auto;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

/* Preview Area */
.preview-box {
  position: relative;
  width: 100%;
  background: var(--bg-color);
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-box img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* Text Overlay Broderie */
.embroidered-text {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-product);
  font-size: 28px;
  font-weight: normal;
  letter-spacing: 2px;
  color: #5c3a21;
  text-shadow: 0px 1px 1px rgba(0,0,0,0.15);
  pointer-events: none;
}

/* Form Styles */
.custom-form h2 {
  font-size: 16px;
  margin-top: 15px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f0ebe4;
  padding-bottom: 5px;
}
.model-select label {
  margin-right: 15px;
  cursor: pointer;
}

.color-options {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
}
.color-btn:hover {
  transform: scale(1.1);
}
.color-btn.active {
  border-color: #4a4238;
  transform: scale(1.1);
}

.btn-nuancier {
  background-color: var(--card-bg);
  border: 1px solid #dcd5ca;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-color);
  font-family: var(--font-main);
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcd5ca;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  font-family: var(--font-main);
}

.price-tag {
  font-size: 20px;
  margin-top: 20px;
  font-weight: bold;
}

.btn-submit {
  width: 100%;
  background-color: var(--btn-bg);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  font-family: var(--font-accent);
  transition: background-color 0.3s;
}
.btn-submit:hover {
  background-color: #bc8a5f;
}

/* Modal Pop-up Nuancier */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  text-align: center;
  position: relative;
}
.modal-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
}
.close-btn {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* Styling pour les pages annexes (Boutique, Blog, Contact) */
.page-container {
  max-width: 950px;
  margin: 30px auto;
  padding: 20px;
}

.page-title {
  text-align: center;
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: normal;
  margin-bottom: 25px;
}

/* Filtres Boutique */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}
.filter-btn {
  background: white;
  border: 1px solid #dcd5ca;
  padding: 6px 14px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-main);
}
.filter-btn.active {
  background: var(--text-color);
  color: white;
  border-color: var(--text-color);
}

/* Grille Boutique */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}
.product-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.product-card img {
  width: 100%;
  border-radius: 8px;
}
.product-card h3 {
  font-family: var(--font-product);
  font-size: 20px;
  font-weight: normal;
  margin: 12px 0 6px 0;
}
.product-card .price {
  font-weight: bold;
  margin-bottom: 12px;
}
.btn-card {
  display: inline-block;
  background-color: var(--btn-bg);
  color: white;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-accent);
}

/* Grille Blog */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.blog-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.blog-card h3 {
  font-family: var(--font-title);
  font-weight: normal;
  font-size: 18px;
  margin-top: 0;
  line-height: 1.4;
}
.btn-read {
  display: inline-block;
  margin-top: 15px;
  color: #a87b68;
  font-weight: bold;
  text-decoration: none;
  font-size: 13px;
}

/* Formulaire Contact */
.contact-card {
  background: white;
  max-width: 550px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.contact-form label {
  font-size: 14px;
  font-weight: bold;
}
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #dcd5ca;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
}

/* Grille et Mise en Page Nuancier */
.nuancier-main-title {
  text-align: center;
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: normal;
  margin: 20px 0 35px 0;
  color: #333;
}

.nuancier-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  max-width: 920px;
  margin: 0 auto;
}

.thread-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thread-crop {
  width: 100%;
  aspect-ratio: 1.15 / 1;
  background-color: #eae5dd;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thread-crop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.thread-label {
  font-size: 11px;
  color: #333;
  margin-top: 6px;
  text-align: center;
}

.action-bar {
  text-align: center;
  margin: 40px 0;
}

.btn-validate {
  display: inline-block;
  background-color: #d6b7aa;
  color: white;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 30px;
  border-radius: 20px;
  font-weight: bold;
  font-family: var(--font-accent);
}

/* Pied de page général */
footer {
  text-align: center;
  padding: 30px;
  background-color: #f4f0ec;
  color: #8c7b70;
  font-size: 0.9rem;
  border-top: 1px solid #e6ded7;
  margin-top: 50px;
}


/* ===== En-tête commun ===== */
.site-header {
  background: #ffffff;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0dad0;
  position: relative;
}
.site-header .logo-container img { height: 64px; width: auto; display: block; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; }
.nav-cart { position: relative; white-space: nowrap; }
.cart-count {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: #b58d71; color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.menu-toggle, .menu-burger { display: none; }

/* ===== Pied de page commun ===== */
.site-footer { background: #4a4238; color: #efebe4; margin-top: 60px; padding: 40px 30px 20px; }
.footer-grid {
  max-width: 950px; margin: 0 auto; display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 30px;
}
.site-footer h4 { font-family: var(--font-product); font-weight: normal; font-size: 18px; margin: 0 0 12px; color: #fff; }
.site-footer p { font-size: 13px; line-height: 1.6; margin: 0 0 8px; color: #d9d2c6; }
.site-footer a { display: block; color: #efebe4; text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.site-footer a:hover { color: #d9bfb4; text-decoration: underline; }
.footer-note { font-style: italic; }
.footer-copy { text-align: center; border-top: 1px solid #665c50; margin: 30px auto 0 !important; padding-top: 16px; max-width: 950px; }

/* ===== Panier ===== */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: start; }
.cart-lines, .cart-summary { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.cart-line { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0ebe4; }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.cart-line h3 { font-family: var(--font-product); font-weight: normal; margin: 0 0 4px; font-size: 17px; }
.cart-line small { color: #7a6f62; display: block; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #ccc; vertical-align: middle; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button, .btn-link { border: 1px solid #dcd5ca; background: #f9f9f9; border-radius: 6px; cursor: pointer; padding: 2px 9px; font-size: 15px; }
.btn-link { border: 0; background: none; color: #b58d71; text-decoration: underline; font-size: 12px; }
.cart-summary h2 { font-family: var(--font-title); font-weight: normal; font-size: 22px; margin-top: 0; }
.cart-summary label { display: block; font-size: 13px; margin: 12px 0 4px; }
.cart-summary input[type=text], .cart-summary input[type=email], .cart-summary input[type=tel] { width: 100%; padding: 10px; border: 1px solid #dcd5ca; border-radius: 8px; box-sizing: border-box; font-family: var(--font-main); }
.ship-title { font-size: 15px; margin: 18px 0 2px; padding-top: 12px; border-top: 1px solid #f0ebe4; }
.cart-summary select { width: 100%; padding: 10px; border: 1px solid #dcd5ca; border-radius: 8px; font-family: var(--font-main); }
.sum-row { display: flex; justify-content: space-between; margin: 8px 0; font-size: 14px; }
.sum-total { font-weight: bold; font-size: 18px; border-top: 1px solid #f0ebe4; padding-top: 10px; }
.cgv-check { font-size: 13px; margin: 14px 0; display: flex; gap: 8px; align-items: flex-start; }
.cart-error { color: #a33; font-size: 13px; min-height: 18px; }
.cart-empty { text-align: center; padding: 40px 10px; }
.cart-packaging { max-width: 950px; margin: 30px auto 0; text-align: center; }
.cart-packaging img { max-width: 100%; width: 420px; border-radius: 12px; }
.order-done { background: #fff; border-radius: 12px; padding: 30px; text-align: center; }
.toast { color: #4b7a4b; font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ===== Coffret (accueil) ===== */
.gift-section { max-width: 950px; margin: 40px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.gift-section img { width: 100%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.gift-section h2 { font-family: var(--font-title); font-weight: normal; }
.gift-section p { line-height: 1.6; color: #6b5f52; }

/* ===== CGV ===== */
.legal { max-width: 800px; margin: 0 auto; background: #fff; padding: 30px 40px; border-radius: 12px; line-height: 1.7; font-size: 14px; }
.legal h3 { font-family: var(--font-product); font-weight: normal; margin-top: 28px; }
.legal .warning { background: #fdf3e7; border-left: 4px solid #b58d71; padding: 12px 16px; border-radius: 6px; }

@media (max-width: 800px) {
  .site-header { padding: 8px 16px; flex-wrap: wrap; }
  .menu-burger { display: block; font-size: 26px; cursor: pointer; }
  .site-header nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 10px 0; }
  .menu-toggle:checked ~ nav { display: flex; }
  .site-header nav a { margin: 8px 0; }
  .footer-grid, .cart-layout, .gift-section { grid-template-columns: 1fr; }
  .legal { padding: 20px; }
}

.cart-count[hidden] { display: none; }

.ship-note { font-size: 12px; color: #7a6f62; margin: -2px 0 8px; }
.cart-summary a, .legal a, .custom-form a { color: #b58d71; }

/* Mention sous les photos du packaging */
.packaging-fig { margin: 0; }
.packaging-note { font-size: 12px; font-style: italic; color: #7a6f62; margin: 8px 0 0; text-align: center; }
