/* ===================== */
/* 🌙 DARK THEME (DEFAULT) */
/* ===================== */
:root{
  --bg:#070b14;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.10);

  --text:#eaf0ff;
  --muted: rgba(234,240,255,.72);

  --accent:#6aa8ff;
  --accent-soft: rgba(106,168,255,.35);

  --scroll-track: #0f172a;
  --scroll-thumb: #334155;

  --footer-bg: rgba(8,12,24,.92);
  --footer-text: #e5e7eb;
}

/* ===================== */
/* ☀️ LIGHT THEME */
/* ===================== */
html[data-theme="light"]{
  /* Fond général : plus sombre que blanc */
  --bg: #c3c8cf;

  /* Cartes */
  --card: rgba(201, 195, 195, 0.85);
  --stroke: rgba(15,23,42,.12);

  /* Texte (beaucoup plus lisible) */
  --text: #0f172a;
  --muted: #475569;

  /* Accent */
  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,.25);

  /* Scrollbar */
  --scroll-track: #e2e8f0;
  --scroll-thumb: #94a3b8;

  /* Footer */
  --footer-bg: rgba(179, 180, 182, 0.96);
  --footer-text: #0f172a;
}


/* ===================== */
/* 🧱 LAYOUT GLOBAL */
/* ===================== */
*{box-sizing:border-box}

html, body {
  height: 100%;
}

body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;

  font-family: Inter, system-ui, Arial;
  color:var(--text);
  background:var(--bg);
  overflow-x:hidden;
}

main{
  flex:1;
}

/* ===================== */
/* 🎨 CANVAS */
/* ===================== */
#bgCanvas{
  position:fixed;
  inset:0;
  z-index:-1;
}

/* ===================== */
/* 📦 CONTAINER */
/* ===================== */
.container{
  width:min(1100px, 92vw);
  margin: 24px auto 80px;
}

/* ===================== */
/* 🧭 NAVBAR */
/* ===================== */
.nav{
  position:sticky;
  top:0;
  z-index:20;

  backdrop-filter: blur(12px);
  background: rgba(8,12,24,.55);
  border-bottom:1px solid var(--stroke);

  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
}

html[data-theme="light"] .nav{
  background: rgba(255,255,255,.75);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
}

.brand-logo{
  width:34px;
  height:34px;
  object-fit:contain;
}

.brand-name{
  font-family:Montserrat;
  font-weight:800;
  letter-spacing:.5px;
}

/* ===================== */
/* 🍔 BURGER */
/* ===================== */
.burger{
  display:none;
  background:transparent;
  border:1px solid var(--stroke);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  transition:.2s;
}
.burger:active{transform:scale(.98)}

/* ===================== */
/* 🔗 NAV LINKS */
/* ===================== */
.nav-links{
  display:flex;
  gap:14px;
  align-items:center;
}

.nav-links a{
  color:var(--muted);
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
  transition:.2s;
}

.nav-links a:hover{
  color:var(--text);
  border-color:var(--stroke);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

/* ===================== */
/* 🪟 CARD */
/* ===================== */
.card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);

  width:100%;
  max-width:260px;   /* 🔥 taille maîtrisée */
  padding:14px;

  /* ❌ SUPPRIMER margin:auto */
}

.product-img{
  width:100%;
  aspect-ratio:1/1;
  max-height:220px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--stroke);
  margin-bottom:10px;
}


/* ===================== */
/* 🔘 BUTTONS */
/* ===================== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;

  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);

  background: rgba(255,255,255,.08);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  transition:.2s;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:var(--accent);
}

.btn-primary{
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ===================== */
/* ✏️ INPUTS */
/* ===================== */
.input, select, textarea{
  width:100%;
  padding:12px;
  border-radius:14px;

  border:1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  color:var(--text);
}

html[data-theme="light"] .input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  background:#ffffff;
}

/* ===================== */
/* 📜 SCROLLBAR */
/* ===================== */
*{
  scrollbar-width:thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

::-webkit-scrollbar{
  width:10px;
}

::-webkit-scrollbar-track{
  background:var(--scroll-track);
}

::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  border-radius:10px;
  border:2px solid var(--scroll-track);
}

::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
}

/* ===================== */
/* 🦶 FOOTER */
/* ===================== */
footer{
  background:var(--footer-bg);
  color:var(--footer-text);
  border-top:1px solid var(--stroke);

  padding:28px 16px;
  margin-top:40px;

  backdrop-filter: blur(8px);
}

.footer-inner{
  width:min(1100px, 92vw);
  margin:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.footer-links a{
  color:var(--muted);
  font-size:20px;
  padding:10px;
}

.footer-bottom{
  width:min(1100px, 92vw);
  margin:12px auto 0;
  font-size:13px;
  color:var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  justify-items: center;
}
@media (max-width: 1400px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
}


/* ===================== */
/* 📱 MOBILE */
/* ===================== */
@media (max-width:860px){



    .burger{display:inline-flex}

  .nav-links{
    position:absolute;
    top:62px;
    left:16px;
    right:16px;

    display:none;
    flex-direction:column;
    padding:12px;

    border-radius:18px;
    border:1px solid var(--stroke);
    background: rgba(8,12,24,.92);
  }

  html[data-theme="light"] .nav-links{
    background: rgba(255,255,255,.95);
  }

  .nav-links.open{display:flex}
  .nav-links a{width:100%}
}


/* 🌗 Transition thème */
html,
body,
.card,
.nav,
footer,
.btn,
.input,
select,
textarea {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}
