/* static/css/styles.css
   scale.ag — refonte visuelle premium
   Palette : vert profond / bleu tech / beige fond / accent orange
*/

/* Fonts : import in head.html; fallback here */
:root{
  --green-deep:#0A3D2E;
  --blue-tech:#0F6B8E;
  --accent:#E07A2F;
  --bg:#F5F0E8; /* beige doux */
  --surface:#FFFFFF;
  --muted:#6B6B6B;
  --text:#1F2A37; /* gris anthracite */
  --radius:12px;
  --container:1200px;
  --gap:24px;
  --shadow-1: 0 8px 30px rgba(16,24,32,0.06);
  --shadow-2: 0 16px 60px rgba(16,24,32,0.08);
  --transition: 180ms ease;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Reset & base */
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;padding:0;font-family:var(--font-sans);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
.container{max-width:var(--container);margin:0 auto;padding:28px}

/* TYPOGRAPHY */
h1{font-size:44px;line-height:1.04;margin:0 0 12px;font-weight:800;letter-spacing:-0.02em}
h2{font-size:30px;margin:0 0 16px;font-weight:700}
h3{font-size:20px;margin:0 0 10px;font-weight:700}
p{font-size:17px;margin:0 0 12px;color:var(--text);line-height:1.6}

/* Header */
.site-header{position:sticky;top:0;z-index:999;background:linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.80));backdrop-filter:blur(4px);border-bottom:1px solid rgba(31,42,55,0.04)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:56px;width:auto;display:block}
.brand-text{font-weight:700;color:var(--green-deep);font-size:1.05rem}

.main-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:12px;align-items:center}
.main-nav a{color:var(--text);text-decoration:none;padding:8px 10px;border-radius:8px;font-weight:600}
.main-nav a:hover{background:rgba(15,107,142,0.06)}

.lang-switch{display:flex;gap:8px;align-items:center}

/* CTA */
.btn{display:inline-block;padding:10px 18px;border-radius:10px;text-decoration:none;font-weight:700;transition:all var(--transition)}
.btn-primary{background:var(--green-deep);color:#fff}
.btn-primary:hover{transform:translateY(-3px);box-shadow:var(--shadow-1)}
.btn-outline{background:transparent;border:2px solid rgba(31,42,55,0.06);color:var(--text)}
.cta-ghost{background:transparent;border:2px solid rgba(15,107,142,0.08);color:var(--blue-tech)}

/* HERO */
.hero{position:relative;padding:72px 0 60px;overflow:hidden}
.hero-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.55) saturate(.95);z-index:0}
.hero-overlay{position:relative;z-index:2;display:flex;align-items:flex-start}
.hero-inner{padding:28px 0;position:relative;z-index:3;max-width:980px}
.kicker{display:inline-block;background:rgba(255,255,255,0.06);color:#fff;padding:6px 10px;border-radius:999px;font-weight:600;margin-bottom:12px}
.hero h1{color:#fff;font-size:48px}
.hero p.lead{color:rgba(255,255,255,0.92);font-size:18px}

/* Hero counters */
.counter-band{display:flex;gap:12px;margin-top:18px}
.counter{background:rgba(255,255,255,0.06);padding:10px 14px;border-radius:10px;color:#fff;font-weight:700;min-width:96px;text-align:center}

/* Sections alternating background */
.section{padding:46px 0}
.section.alt{background:#fff;border-radius:8px}
/* Cards layout */
.cards{display:grid;grid-template-columns:1fr;gap:18px}
.card{background:var(--surface);padding:20px;border-radius:12px;box-shadow:var(--shadow-1);border:1px solid rgba(31,42,55,0.03)}
.card .icon{width:56px;height:56px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(120deg,var(--green-deep),var(--blue-tech));margin-bottom:12px}

/* Services grid */
.services-grid{display:grid;grid-template-columns:1fr;gap:18px}

/* Portfolio / Réalisations */
.realisations-grid{display:grid;grid-template-columns:1fr;gap:18px}
.project{background:var(--surface);border-radius:12px;overflow:hidden;box-shadow:var(--shadow-1);border:1px solid rgba(31,42,55,0.04)}
.project .thumb{width:100%;height:220px;object-fit:cover}
.project .meta{padding:16px}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:rgba(15,107,142,0.06);font-weight:700;margin-right:8px;font-size:13px}

/* Partners band — logos gris -> couleur on hover */
.partners-band{padding:28px 0;margin-top:8px}
.partners-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;align-items:center;justify-items:center}
.partner-item{display:flex;align-items:center;justify-content:center;padding:10px;background:transparent;border-radius:8px}
.partner-item img{max-height:56px;width:auto;filter:grayscale(1) opacity(.68);transition:all var(--transition)}
.partner-item:hover img{filter:grayscale(0) opacity(1);transform:translateY(-6px)}

/* Testimonials */
.testimonials-grid{display:grid;grid-template-columns:1fr;gap:18px}
.testimonial{background:var(--surface);padding:16px;border-radius:12px;box-shadow:var(--shadow-1);display:flex;gap:12px;align-items:flex-start}
.testimonial img{width:64px;height:64px;border-radius:50%;object-fit:cover}

/* Gallery masonry (css columns fallback) */
.gallery{column-count:1;column-gap:12px}
.gallery-item{break-inside:avoid;margin-bottom:12px;border-radius:8px;overflow:hidden}
.gallery-item img{width:100%;display:block;object-fit:cover}

/* Blog / Resources */
.blog-list{display:grid;grid-template-columns:1fr;gap:16px}
.blog-card{background:var(--surface);padding:18px;border-radius:12px;box-shadow:var(--shadow-1)}

/* Contact */
.contact-grid{display:grid;grid-template-columns:1fr;gap:18px}

/* Footer */
.site-footer{padding:48px 0;background:linear-gradient(180deg,#fff,rgba(245,240,232,0.7));border-top:1px solid rgba(31,42,55,0.04)}
.footer-inner{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;align-items:start}
.footer-badges{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* Utilities */
.small{font-size:14px;color:var(--muted)}
.center{text-align:center}
.container-narrow{max-width:980px;margin:0 auto}

/* Responsive */
@media(min-width:720px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .services-grid{grid-template-columns:repeat(2,1fr)}
  .realisations-grid{grid-template-columns:repeat(2,1fr)}
  .partners-grid{grid-template-columns:repeat(4,1fr)}
  .gallery{column-count:2}
}
@media(min-width:1100px){
  h1{font-size:56px}
  .cards{grid-template-columns:repeat(3,1fr)}
  .services-grid{grid-template-columns:repeat(4,1fr)}
  .realisations-grid{grid-template-columns:repeat(3,1fr)}
  .partners-grid{grid-template-columns:repeat(6,1fr)}
  .gallery{column-count:3}
  .hero{padding:96px 0 72px}
}
/* Debug safeguard — force footer visible + nav links readable */
.site-footer { display: block !important; visibility: visible !important; opacity: 1 !important; }
.main-nav a { color: var(--text) !important; } /* replace --text with concrete value if not set */
.main-nav a:hover, .main-nav a:focus { color: var(--blue-tech, #0F6B8E) !important; outline: none; }
.lang-flag.active-lang img { outline: 2px solid rgba(15,107,142,0.18); border-radius:3px; }
/* Posts feed */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

.post-card {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.image-column {
  flex: 0 0 38%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.image-column img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .image-column img {
  transform: scale(1.05);
}

.text-column {
  flex: 1;
  padding: 20px 20px 20px 0;
}

.post-meta {
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  background: #e9f0f5;
  color: #2c3e50;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 8px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-column h2 {
  margin: 0 0 15px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #0a2e1c; /* remplacez par votre couleur d'accent */
}

.text-column h2 a {
  color: inherit;
  text-decoration: none;
}

.text-column h2 a:hover {
  text-decoration: underline;
}

.post-excerpt {
  color: #3b4b5c;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #6c7a8a;
}

.post-date {
  font-size: 13px;
  color: #8a9aa8;
}

.read-more {
  font-weight: 600;
  color: #0a2e1c;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* Filtres */
.filters-section {
  margin: 30px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
}

.filters-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-checkbox {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid #d0d9e0;
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-checkbox input {
  margin-right: 6px;
  accent-color: #0a2e1c;
}

.filter-checkbox:has(input:checked) {
  background: #0a2e1c;
  border-color: #0a2e1c;
  color: white;
}

#reset-filters {
  background: transparent;
  border: 1px solid #0a2e1c;
  color: #0a2e1c;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
}

#reset-filters:hover {
  background: #0a2e1c;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .post-card {
    flex-direction: column;
    gap: 20px;
  }
  .image-column {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16/9;
  }
  .text-column {
    padding: 0 20px 20px;
  }
}
/* Pages individuelles des ressources */
.single-resource {
  padding-top: 40px;
  padding-bottom: 60px;
}

.back-link {
  margin-bottom: 30px;
}

.back-link a {
  color: #2E7D32;
  text-decoration: none;
  font-weight: 600;
}

.back-link a:hover {
  text-decoration: underline;
}

.resource-image {
  margin-bottom: 30px;
  text-align: center;
}

.resource-image img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.resource-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: #6c7a8a;
  font-size: 14px;
}

.resource-meta .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-meta .tag {
  background: #e9f0f5;
  color: #2c3e50;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.single-resource h1 {
  font-size: 36px;
  font-weight: 700;
  color: #0a2e1c; /* ou votre couleur d'accent */
  margin-top: 0;
  margin-bottom: 30px;
  line-height: 1.2;
}

.resource-content {
  font-size: 18px;
  line-height: 1.7;
  color: #1e2b38;
}

.resource-content h2 {
  font-size: 28px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.resource-content h3 {
  font-size: 22px;
  margin-top: 30px;
}

.resource-content p {
  margin-bottom: 1.5em;
}

.resource-content a {
  color: #2E7D32;
  text-decoration: underline;
}

.resource-content a:hover {
  text-decoration: none;
}

.resource-content pre {
  background: #f5f7fa;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
}

.resource-content code {
  background: #f0f2f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
/* Challenge section stats */
.challenge-stats {
  margin: 2rem 0;
}
.stat-card {
  background: var(--surface);
  padding: 2rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(31,42,55,0.03);
  transition: transform 0.2s;
}
.stat-card:hover {
  transform: translateY(-6px);
}
.stat-value {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--green-deep);
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 1rem;
  color: var(--muted);
}
.featured-badge {
  display: inline-block;
  background: #FFD700;
  color: #1F2A37;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.footer-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(31,42,55,0.1);
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-stats div {
  padding: 0.5rem;
  text-align: center;
}