/* style.css
   Styles globaux et styles des composants.
   Inspiré: importemoi.fr (cards), royalmotors (propre) et cardiscount (header).
*/

/* VARIABLES */
:root{
  --bg: #f6f6f6;
  --card: #ffffff;
  --text: #222;
  --muted: #777;
  --accent: #e74a4a; /* rouge accent principal */
  --accent-2: #f7c7c7;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(30,30,30,0.08);
  --gap: 16px;
  --max-width: 1100px;
  --header-height: 70px;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family: var(--font-sans);
  background:var(--bg);
  color:var(--text);
  margin:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* CONTAINER */
.container{
  width:90%;
  max-width:var(--max-width);
  margin: 20px auto;
}

/* HEADER (inspiré Card Discount) */
.header{
  position:sticky;
  top:0;
  background:#fff;
  border-bottom: 1px solid #eee;
  z-index:999;
}
.header-inner{
  height:var(--header-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:90%;
  max-width:var(--max-width);
  margin:0 auto;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
  font-weight:800;
  font-size:1.15rem;
}
.logo svg{width:34px;height:34px}
nav.main-nav{
  display:flex;
  gap:18px;
  align-items:center;
}
.main-nav a{
  text-decoration:none;
  color:var(--text);
  font-weight:600;
  padding:8px 10px;
  border-radius:8px;
}
.main-nav a:hover{background:#fafafa}

/* Search box in header */
.header-search{
  display:flex;
  align-items:center;
  gap:8px;
  border-radius:8px;
  overflow:hidden;
  background:#fafafa;
  padding:6px;
}
.header-search input{
  border:none;
  outline:none;
  background:transparent;
  padding:8px;
  width:220px;
}

/* Mobile menu */
.menu-btn{
  display:none;
  font-size:22px;
  padding:8px;
}

/* CATALOGUE GRID */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:20px;
  margin-top:18px;
}
@media(max-width:1000px){ .grid{ grid-template-columns: repeat(2,1fr);} }
@media(max-width:700px){ .grid{ grid-template-columns: 1fr; } .header-search input{ width:120px } .main-nav{ display:none } .menu-btn{ display:block } }

/* VEHICLE CARD (style importemoi) */
.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform: translateY(-6px); box-shadow: 0 12px 30px rgba(30,30,30,0.12); }

/* image */
.card .thumb{
  width:100%;
  aspect-ratio:16/10;
  background-size:cover;
  background-position:center;
  border-bottom: 1px solid #f0f0f0;
}

/* content */
.card .card-body{
  padding:18px;
}
.card h3{ margin:0 0 8px; font-size:1.05rem; }
.card p.desc{ margin:0 0 14px; color:var(--muted); font-size:0.95rem; }

/* specs boxes row */
.spec-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.spec{
  background:#fafafa;
  border-radius:10px;
  padding:10px;
  min-width:110px;
  flex:1 1 110px;
  text-align:center;
  border:1px solid #f0f0f0;
}
.spec .label{ font-size:0.82rem; color:var(--muted) }
.spec .val{ font-weight:700; margin-top:6px }

/* price block (large) */
.price-block{
  margin-top:10px;
  border-radius:12px;
  border:1px solid #eee;
  padding:14px;
  background:linear-gradient(180deg,#fff,#fff);
}

/* big price and buttons row */
.price {
  font-size:1.6rem;
  font-weight:800;
  color:var(--text);
}
.small-muted { color:var(--muted); font-size:0.95rem; margin-top:6px; }

/* actions */
.actions{
  display:flex;
  gap:10px;
  margin-top:12px;
  align-items:center;
}
.icon-btn{
  background:var(--accent-2);
  border-radius:40px;
  padding:8px 14px;
  border:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  color:var(--text);
}
.primary-btn{
  background:var(--accent);
  color:white;
  padding:12px 18px;
  border-radius:40px;
  border:none;
  cursor:pointer;
  font-weight:800;
  flex:1;
  text-align:center;
  box-shadow: 0 6px 18px rgba(231,74,74,0.18);
}

/* list features with check */
.features{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.feature-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.check{
  width:28px;
  height:28px;
  border-radius:50%;
  background:var(--accent);
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  flex:0 0 28px;
}
.feature-text{ font-size:0.95rem; color:var(--muted) }

/* delivery card */
.delivery{
  margin-top:12px;
  background:#fff;
  border-radius:12px;
  padding:12px;
  border:1px solid #f0f0f0;
  text-align:center;
  color:var(--muted);
  font-weight:700;
}

/* FOOTER */
footer.site-footer{
  margin-top:40px;
  background:#fff;
  border-top:1px solid #eee;
  padding:24px 0;
}
.footer-inner{
  width:90%;
  max-width:var(--max-width);
  margin:0 auto;
  display:flex;
  gap:20px;
  justify-content:space-between;
  align-items:flex-start;
  flex-wrap:wrap;
}
.footer-column{ min-width:200px; }
.footer-column h4{ margin:0 0 10px; font-size:1rem;}
.footer-contact p{ margin:6px 0; color:var(--muted) }

/* Form styles (inscription / contact / login) */
.form-card{
  background:var(--card);
  padding:18px;
  border-radius:12px;
  box-shadow:var(--shadow);
  max-width:800px;
  margin: 18px auto;
}
.form-row{ margin-bottom:12px; display:flex; gap:10px; flex-wrap:wrap; }
label{ font-size:0.9rem; color:var(--muted); display:block; margin-bottom:6px; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width:100%;
  padding:10px 12px;
  border:1px solid #eee;
  border-radius:8px;
  font-size:1rem;
}
textarea{ min-height:120px; resize:vertical; }
.form-actions{ display:flex; gap:12px; align-items:center; margin-top:8px; }

/* messages list */
.messages-list{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.message-item{ background:#fafafa; padding:10px; border-radius:10px; border:1px solid #f0f0f0; }
.message-meta{ font-size:0.85rem; color:var(--muted); margin-bottom:6px; }

/* small utilities */
.center{ text-align:center }
.muted{ color:var(--muted) }
.link{ color:var(--accent); text-decoration:none; font-weight:700 }

/* tiny */
.small{ font-size:0.85rem; color:var(--muted) }
