:root {
  --primary: #2872fa;
  --primary-dark: #1559ed;
  --text: #3A4F66;
  --headings: #192a3d;
  --border: #e1e8ed;
  --light: #f2f5f7;
  --page-bg: #FAFBFC;
  --white: #ffffff;
}

* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.65;
  font-size: 16px;
}

.container { max-width: 1290px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: 40px; font-weight: 700; line-height: 1.5; color: var(--headings); margin: 0 0 20px; }
h2 { font-size: 35px; font-weight: 700; line-height: 1.5; color: var(--headings); margin: 0 0 30px; }
h3 { font-size: 30px; font-weight: 700; line-height: 1.5; color: var(--headings); }
h4 { font-size: 25px; font-weight: 700; line-height: 1.5; color: var(--headings); }
h5 { font-size: 20px; font-weight: 700; line-height: 1.5; color: var(--headings); }
h6 { font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--headings); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* HEADER */
header {
  background: var(--white);
  height: 120px;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo { display: flex; align-items: center; gap: 15px; text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo img { height: 60px; vertical-align: middle; }
.site-title {
  font-size: 25px;
  font-weight: 700;
  color: var(--headings);
  line-height: 1.5;
}
.nav-menu {
  display: flex;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--primary); text-decoration: none; }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}
.hero h1 { color: var(--white); font-size: 40px; margin-bottom: 15px; }
.hero p { font-size: 18px; opacity: 0.9; margin: 0; }

/* FORM */
.form-box {
  background: var(--white);
  color: var(--text);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  max-width: 500px;
  margin: -100px auto 40px;
  position: relative;
}

/* BUTTONS */
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 5px 20px;
  min-height: 40px;
  border: none;
  border-radius: 3px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  line-height: 40px;
  text-align: center;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); color: var(--white); text-decoration: none; }
.btn-full { width: 100%; }

/* SECTIONS */
section { padding: 60px 0; }
section + section { padding-top: 0; }

/* ARTISAN CARDS */
.artisan-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.artisan-card {
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 12px 18px -6px rgba(34, 56, 101, 0.04);
}
.artisan-name {
  font-weight: 700;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 5px;
  color: var(--headings);
}

/* MAILLAGE (listes de liens) */
.maillage {
  background: var(--light);
  padding: 40px 0;
  border-radius: 4px;
}
.maillage ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.maillage a {
  color: var(--primary);
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  border-radius: 3px;
  transition: background 0.2s;
}
.maillage a:hover {
  background: var(--white);
  text-decoration: none;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 30px 0;
  font-size: 15px;
  color: var(--text);
  border-top: 1px solid var(--border);
  background: var(--light);
}
footer a { color: var(--primary); }

/* BLOG CARDS */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 20px;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  transition: box-shadow 0.3s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 18px -6px rgba(34, 56, 101, 0.04);
}
.blog-card:hover { box-shadow: 0 12px 18px -6px rgba(34, 56, 101, 0.1); }
.blog-card-img { display: block; overflow: hidden; }
.blog-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.blog-card-date {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-card-body h3 { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
.blog-card-body h3 a { color: var(--headings); text-decoration: none; }
.blog-card-body h3 a:hover { color: var(--primary); }
.blog-card-body p { font-size: 15px; color: var(--text); line-height: 1.6; flex: 1; margin: 0 0 15px; }
.blog-card-link { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 14px; }
.blog-card-link:hover { text-decoration: underline; }

/* SOLAIRE GRID */
.solaire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}
.solaire-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px 15px;
  text-align: center;
  box-shadow: 0 12px 18px -6px rgba(34, 56, 101, 0.04);
}
.solaire-label { display: block; font-size: 13px; color: #888; margin-bottom: 5px; }
.solaire-value { display: block; font-size: 1.15rem; font-weight: 700; color: var(--headings); }
#btn-fetch-solaire { max-width: 300px; }

/* DEVIS BLOCK */
.devis-block .container {
  max-width: 60%;
  margin: 0 auto;
}

/* RESPONSIVE */
@media (max-width: 999.98px) {
  header { height: 70px; }
  .logo img { height: 45px; }
  .site-title { font-size: 20px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .artisan-list { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
}

@media (max-width: 689.98px) {
  .header-inner { flex-direction: column; gap: 8px; }
  header { height: auto; padding: 15px 0; }
  .nav-menu { gap: 12px; justify-content: center; }
  .nav-menu a { font-size: 10px; }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 28px; }
  .blog-grid { grid-template-columns: 1fr; }
  .artisan-list { grid-template-columns: 1fr; }
  .solaire-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 40px 0; }
  h1 { font-size: 26px; }
  h2 { font-size: 24px; }
}
