/* ==========================================================
   ETS TCHABOU — Charte graphique
   Palette inspirée du logo : terracotta/brique, brun case, vert, rouge
   ========================================================== */
:root {
  --brique: #b3532c;
  --brique-dark: #8f3f20;
  --brun: #7a5230;
  --brun-clair: #a67c4e;
  --vert: #3f8f3f;
  --rouge: #c0392b;
  --creme: #faf6ef;
  --creme-dark: #f0e6d6;
  --texte: #2b2420;
  --texte-clair: #6b5f52;
  --blanc: #ffffff;
  --ombre: 0 4px 18px rgba(43, 36, 32, 0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--texte);
  background: var(--creme);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; margin: 0 0 .5em; color: var(--brique-dark); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  font-size: .95rem;
}
.btn-primary { background: var(--brique); color: var(--blanc); }
.btn-primary:hover { background: var(--brique-dark); }
.btn-outline { background: transparent; border-color: var(--brique); color: var(--brique); }
.btn-outline:hover { background: var(--brique); color: var(--blanc); }
.btn-vert { background: var(--vert); color: var(--blanc); }
.btn-vert:hover { background: #326e32; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; text-align: center; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--brun);
  color: var(--creme);
  font-size: .82rem;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.topbar a { color: var(--creme); }
.topbar span { margin-right: 18px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--blanc);
  box-shadow: var(--ombre);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 56px; width: 56px; object-fit: contain; }
.brand .brand-text strong { display: block; font-size: 1.15rem; color: var(--brique-dark); font-family: Georgia, serif; }
.brand .brand-text small { color: var(--texte-clair); font-size: .78rem; }

nav.main-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
nav.main-nav a {
  font-weight: 600;
  font-size: .93rem;
  color: var(--texte);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a.active { border-bottom-color: var(--brique); color: var(--brique); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-link { position: relative; font-size: 1.4rem; }
.cart-badge {
  position: absolute; top: -8px; right: -12px;
  background: var(--rouge); color: #fff; font-size: .7rem;
  border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--brique-dark); }

@media (max-width: 900px) {
  nav.main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 0; }
  nav.main-nav.open { display: flex; }
  .site-header .container { flex-wrap: wrap; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, rgba(179,83,44,.92), rgba(122,82,48,.92)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><rect width="200" height="200" fill="%23000"/></svg>');
  background-size: cover;
  color: var(--blanc);
  padding: 70px 0;
}
.hero h1 { color: var(--blanc); font-size: 2.3rem; max-width: 700px; }
.hero p { max-width: 600px; font-size: 1.05rem; opacity: .95; }
.hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--brique-dark); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 1.9rem; }
.section-title p { color: var(--texte-clair); max-width: 620px; margin: 8px auto 0; }
.section-alt { background: var(--creme-dark); }

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { height: 180px; width: 100%; object-fit: cover; background: var(--creme-dark); }
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card-body p { color: var(--texte-clair); font-size: .9rem; flex: 1; }
.card-footer { padding: 0 18px 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { font-weight: 700; color: var(--brique-dark); font-size: 1.05rem; }
.price-old { text-decoration: line-through; color: var(--texte-clair); font-size: .85rem; margin-right: 6px; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  align-self: flex-start;
}
.badge-vert { background: #e4f3e4; color: var(--vert); }
.badge-rouge { background: #fbe4e1; color: var(--rouge); }
.badge-brun { background: #f0e6d6; color: var(--brun); }

/* ---------- Formulaires ---------- */
form .form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid #ddd0bf;
  border-radius: 8px; font-size: .95rem; background: #fff; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brique); border-color: var(--brique); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--ombre); padding: 30px; max-width: 720px; margin: 0 auto; }
.checkbox-line { display: flex; align-items: center; gap: 8px; }
.checkbox-line input { width: auto; }

/* ---------- Alertes ---------- */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: .92rem; }
.alert-succes { background: #e4f3e4; color: #2c6b2c; border: 1px solid #bfe0bf; }
.alert-erreur { background: #fbe4e1; color: #8f2b20; border: 1px solid #f0b8b0; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--creme-dark); font-size: .9rem; }
th { background: var(--creme-dark); color: var(--brun); text-transform: uppercase; font-size: .75rem; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--texte-clair); padding: 16px 0; }
.breadcrumb a { color: var(--brique); }

/* ---------- Footer ---------- */
footer.site-footer { background: #2b2420; color: #d9cdbb; padding: 50px 0 20px; margin-top: 60px; }
footer.site-footer h4 { color: #fff; font-size: 1rem; }
footer.site-footer a { color: #d9cdbb; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer .grid { margin-bottom: 30px; }
footer.site-footer .footer-bottom { border-top: 1px solid #423a32; padding-top: 16px; text-align: center; font-size: .82rem; color: #a9998a; }

/* ---------- WhatsApp bouton flottant ---------- */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: #25D366; color: #fff; width: 58px; height: 58px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

/* ---------- Divers ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--texte-clair); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--texte-clair); }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.filter-bar { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--ombre); margin-bottom: 30px; }
.filter-bar form { display: grid; grid-template-columns: 2fr 1.5fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .filter-bar form { grid-template-columns: 1fr; } }
