/* ===== THÈME : suit le système (clair / sombre), bouton pour forcer l'un ou l'autre ===== */
:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --surface-2: #F3ECE2;
  --text: #1F1B16;
  --text-2: #6B6258;
  --border: #E6DCCB;
  --accent: #946B20;
  --accent-hover: #7A5719;
  --on-accent: #FFFFFF;
  --nav-bg: rgba(251,248,243,.88);
  --shadow: 0 8px 30px rgba(60,40,10,.08);
  --shadow-hover: 0 16px 40px rgba(60,40,10,.16);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0D0C; --surface: #181614; --surface-2: #211E1B;
    --text: #F3EEE6; --text-2: #B5ABA0; --border: #34302B;
    --accent: #D4AF6A; --accent-hover: #E6C789; --on-accent: #1A1306;
    --nav-bg: rgba(14,13,12,.88);
    --shadow: 0 8px 30px rgba(0,0,0,.5); --shadow-hover: 0 16px 40px rgba(0,0,0,.65);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0D0C; --surface: #181614; --surface-2: #211E1B;
  --text: #F3EEE6; --text-2: #B5ABA0; --border: #34302B;
  --accent: #D4AF6A; --accent-hover: #E6C789; --on-accent: #1A1306;
  --nav-bg: rgba(14,13,12,.88);
  --shadow: 0 8px 30px rgba(0,0,0,.5); --shadow-hover: 0 16px 40px rgba(0,0,0,.65);
  color-scheme: dark;
}

/* ===== BASE ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:70px; }
body {
  font-family:'Poppins',sans-serif; color:var(--text); background:var(--bg);
  line-height:1.6; transition:background .3s, color .3s;
}
img { max-width:100%; display:block; }
a { text-decoration:none; color:inherit; }
ul { list-style:none; }
.container { max-width:1200px; margin:0 auto; padding:0 20px; }

/* ===== NAVIGATION ===== */
.navbar {
  position:fixed; top:0; left:0; width:100%; z-index:1000;
  background:var(--nav-bg); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}
.nav-inner { display:flex; align-items:center; justify-content:space-between; height:70px; }
.logo {
  font-family:'Great Vibes','Playfair Display',cursive;
  font-size:2.1rem; line-height:1; color:var(--accent); white-space:nowrap;
}
.nav-links { display:flex; align-items:center; gap:1.8rem; }
.nav-links a { font-size:.95rem; font-weight:500; transition:color .3s; }
.nav-links a:hover { color:var(--accent); }
.hamburger { display:none; font-size:1.6rem; background:none; border:none; cursor:pointer; color:var(--text); }

.lang-switcher { display:flex; align-items:center; gap:.6rem; margin-left:.4rem; padding-left:1.2rem; border-left:1px solid var(--border); }
.lang-select {
  appearance:none; -webkit-appearance:none; background:transparent; color:var(--accent);
  border:1.5px solid var(--accent); border-radius:8px; padding:6px 28px 6px 12px;
  font:500 .85rem 'Poppins',sans-serif; cursor:pointer; outline:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b8893c' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; background-size:12px;
}
.lang-select option { color:#1F1B16; background:#fff; }
.theme-toggle {
  width:36px; height:36px; border-radius:50%; cursor:pointer; font-size:1rem; line-height:1;
  background:transparent; color:var(--accent); border:1.5px solid var(--accent); transition:all .25s;
}
.theme-toggle:hover { background:var(--accent); color:var(--on-accent); }

/* ===== HERO ===== */
.hero {
  min-height:100vh; padding:110px 0 70px;
  background:url('https://images.unsplash.com/photo-1556905055-8f358a7a47b2?w=1600&q=85') center/cover no-repeat;
  position:relative; display:flex; align-items:center;
}
.hero-overlay { position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,8,6,.72) 0%, rgba(10,8,6,.5) 55%, rgba(10,8,6,.78) 100%); }
.hero-content { position:relative; color:#fff; text-align:center; max-width:820px; }
.hero-logo { width:min(520px,82vw); margin:0 auto 1.2rem; filter:drop-shadow(0 6px 24px rgba(0,0,0,.5)); }
.hero-content h1 { font-family:'Playfair Display',serif; font-size:2.1rem; font-weight:600; line-height:1.25; margin-bottom:.8rem; }
.hero-content p { font-size:1.1rem; font-weight:300; margin-bottom:2rem; opacity:.9; }
.hero .btn { background:#D4AF6A; border-color:#D4AF6A; color:#1A1306; }
.hero .btn:hover { background:transparent; color:#D4AF6A; }

/* ===== BOUTONS ===== */
.btn {
  display:inline-block; background:var(--accent); color:var(--on-accent);
  padding:14px 36px; border-radius:50px; font:500 1rem 'Poppins',sans-serif;
  border:2px solid var(--accent); transition:all .3s; cursor:pointer;
}
.btn:hover { background:transparent; color:var(--accent); }
.btn:disabled { opacity:.6; cursor:wait; }
.btn-dark { background:var(--text); border-color:var(--text); color:var(--bg); }
.btn-dark:hover { background:transparent; color:var(--text); }

/* ===== SECTIONS ===== */
.section { padding:100px 0; }
.section-title { font-family:'Playfair Display',serif; font-size:2.4rem; text-align:center; margin-bottom:.5rem; color:var(--text); }
.section-title::after { content:""; display:block; width:56px; height:2px; background:var(--accent); margin:14px auto 0; }
.section-sub { text-align:center; color:var(--text-2); margin:1rem 0 3rem; }

/* ===== FILTRES ===== */
.filter-btns { display:flex; justify-content:center; gap:.8rem; flex-wrap:wrap; margin-bottom:3rem; }
.filter-btn {
  padding:9px 24px; border-radius:50px; border:1.5px solid var(--accent);
  background:transparent; color:var(--accent); font:500 .95rem 'Poppins',sans-serif; cursor:pointer; transition:all .3s;
}
.filter-btn.active, .filter-btn:hover { background:var(--accent); color:var(--on-accent); }

/* ===== PRODUITS ===== */
.products { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:2rem; }
.empty-msg { grid-column:1/-1; text-align:center; color:var(--text-2); padding:3rem 0; }
.product-card {
  background:var(--surface); border:1px solid var(--border); border-radius:16px; overflow:hidden;
  box-shadow:var(--shadow); transition:transform .4s, box-shadow .4s;
  opacity:0; transform:translateY(20px); animation:fadeUp .5s ease forwards;
}
.product-card:hover { transform:translateY(-6px); box-shadow:var(--shadow-hover); }
.product-card img { width:100%; height:360px; object-fit:cover; transition:transform .6s; }
.product-card:hover img { transform:scale(1.04); }
.product-info { padding:1.2rem 1.2rem 1.5rem; }
.product-info h3 { font-size:1.15rem; font-weight:600; margin-bottom:.3rem; }
.product-info .category { font-size:.78rem; color:var(--accent); font-weight:500; text-transform:uppercase; letter-spacing:.8px; }
.product-info .price { display:block; margin-top:.6rem; font-size:1.15rem; font-weight:600; color:var(--accent); }
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }

/* ===== SUR MESURE ===== */
.custom { background:var(--surface-2); }
.custom .section-title { text-align:left; }
.custom .section-title::after { margin-left:0; }
.custom-inner { display:grid; grid-template-columns:1fr 1fr; gap:4rem; align-items:center; }
.custom-text p { font-size:1.05rem; color:var(--text-2); margin:1.2rem 0 1.5rem; }
.custom-features { margin-bottom:2rem; }
.custom-features li { padding:.55rem 0; border-bottom:1px solid var(--border); }
.custom-features li:last-child { border:none; }
.custom-img { border-radius:16px; overflow:hidden; box-shadow:var(--shadow); }
.custom-img img { width:100%; height:450px; object-fit:cover; }

/* ===== CONTACT ===== */
.contact-form { max-width:700px; margin:0 auto; display:flex; flex-direction:column; gap:1.2rem; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:1.2rem; }
.contact-form input, .contact-form textarea {
  width:100%; padding:14px 18px; border-radius:10px; border:1.5px solid var(--border);
  background:var(--surface); color:var(--text); font:1rem 'Poppins',sans-serif; outline:none; transition:border-color .3s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color:var(--text-2); opacity:.8; }
.contact-form input:focus, .contact-form textarea:focus { border-color:var(--accent); }
.contact-form textarea { resize:vertical; }
.contact-form .btn { align-self:center; }

/* ===== PIED DE PAGE (toujours sombre, pour le logo doré) ===== */
.footer { background:#0E0D0C; color:#B5ABA0; padding:44px 0 30px; text-align:center; }
.footer-logo { width:min(260px,70vw); margin:0 auto 1rem; }
.footer-links { display:flex; justify-content:center; flex-wrap:wrap; gap:1.6rem; margin-bottom:1.2rem; }
.footer-links a { transition:color .3s; }
.footer-links a:hover { color:#D4AF6A; }
.footer p { font-size:.85rem; }

/* ===== RTL (arabe) ===== */
html[dir="rtl"] .lang-switcher { margin-left:0; margin-right:.4rem; padding-left:0; padding-right:1.2rem; border-left:none; border-right:1px solid var(--border); }
html[dir="rtl"] .lang-select { padding:6px 12px 6px 28px; background-position:left 10px center; }
html[dir="rtl"] .custom .section-title, html[dir="rtl"] .custom-text { text-align:right; }
html[dir="rtl"] .custom .section-title::after { margin-left:auto; margin-right:0; }
html[dir="rtl"] .contact-form input, html[dir="rtl"] .contact-form textarea { text-align:right; }

/* ===== RESPONSIVE ===== */
@media(max-width:768px) {
  .nav-links {
    position:fixed; top:70px; left:0; width:100%; flex-direction:column; gap:1.2rem; padding:2rem;
    background:var(--surface); border-bottom:1px solid var(--border); box-shadow:0 10px 30px rgba(0,0,0,.2);
    transform:translateY(-130%); transition:transform .4s;
  }
  .nav-links.open { transform:translateY(0); }
  .hamburger { display:block; }
  .lang-switcher, html[dir="rtl"] .lang-switcher { margin:0; padding:0; border:none; }
  .hero { min-height:auto; padding:100px 0 60px; }
  .hero-content h1 { font-size:1.6rem; }
  .section { padding:60px 0; }
  .section-title { font-size:2rem; }
  .custom-inner { grid-template-columns:1fr; gap:2rem; }
  .custom-img img { height:280px; }
  .products { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:1.2rem; }
  .product-card img { height:300px; }
  .form-row { grid-template-columns:1fr; }
}
@media(max-width:480px) {
  .nav-inner { height:60px; }
  .nav-links { top:60px; padding:1.2rem; }
  html { scroll-padding-top:60px; }
  .logo { font-size:1.8rem; }
  .hero-content h1 { font-size:1.35rem; }
  .hero-content p { font-size:.95rem; margin-bottom:1.5rem; }
  .btn { padding:12px 28px; font-size:.9rem; }
  .section { padding:44px 0; }
  .section-title { font-size:1.7rem; }
  .products { grid-template-columns:1fr; }
  .contact-form input, .contact-form textarea { padding:12px 14px; font-size:.9rem; }
  .filter-btn { padding:8px 18px; font-size:.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .product-card { animation:none; opacity:1; transform:none; }
}
