:root {
  --color-primary: #1a1a2e;
  --color-accent: #e94560;
  --color-accent-hover: #d63851;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-text: #2d2d2d;
  --color-text-light: #6c757d;
  --color-border: #dee2e6;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent-hover); }

.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--color-accent); color: #fff; padding: .5rem 1rem;
  z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* NAV */
.site-nav {
  background: var(--color-primary);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.nav-brand {
  display: flex; align-items: center; gap: .75rem;
  color: #fff; font-weight: 700; font-size: 1.1rem;
  text-decoration: none;
}
.nav-brand img { border-radius: 4px; }
.nav-brand span { white-space: nowrap; }
.nav-menu {
  list-style: none; display: flex; gap: .25rem;
}
.nav-menu a {
  color: rgba(255,255,255,.85); padding: .5rem 1rem; border-radius: var(--radius);
  font-size: .95rem; transition: background .2s, color .2s;
}
.nav-menu a:hover, .nav-menu a.active {
  background: rgba(255,255,255,.12); color: #fff;
}
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: .5rem;
}
.nav-toggle span {
  width: 24px; height: 2px; background: #fff; display: block;
  transition: transform .2s;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; flex-direction: column;
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--color-primary); padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: .75rem 1rem; }
  .nav-brand span { font-size: .9rem; }
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #16213e 100%);
  color: #fff; padding: 5rem 1.5rem; text-align: center;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; margin-bottom: 1rem;
  line-height: 1.15;
}
.hero p { font-size: 1.2rem; opacity: .9; max-width: 650px; margin: 0 auto 2rem; }

.hero-split {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; text-align: left;
}
.hero-split img { border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.3); }

@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero { padding: 3rem 1.5rem; }
}

/* SECTIONS */
.section {
  padding: 4rem 1.5rem;
  max-width: var(--max-width); margin: 0 auto;
}
.section-alt { background: var(--color-bg-alt); }
.section-alt .section { margin: 0 auto; }
.section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; margin-bottom: 1.5rem;
  color: var(--color-primary);
}
.section p { margin-bottom: 1rem; }

/* CARDS GRID */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem; margin-top: 2rem;
}
.card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.15rem; margin-bottom: .5rem; color: var(--color-primary); }
.card-body p { font-size: .9rem; color: var(--color-text-light); }
.card-body .card-meta {
  font-size: .8rem; color: var(--color-text-light);
  margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--color-border);
}

/* BUTTONS */
.btn {
  display: inline-block; padding: .75rem 2rem;
  border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  transition: background .2s, transform .1s; cursor: pointer;
  border: none; text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #fff; }

/* STATS ROW */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem; text-align: center; margin: 2rem 0;
}
.stat-item h3 { font-size: 2.5rem; color: var(--color-accent); font-weight: 800; }
.stat-item p { font-size: .9rem; color: var(--color-text-light); }

/* FAQ */
.faq-list { list-style: none; }
.faq-item {
  border: 1px solid var(--color-border); border-radius: var(--radius);
  margin-bottom: 1rem; overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.5rem; cursor: pointer; font-weight: 600;
  background: var(--color-bg-alt);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--color-accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-answer { padding: 1rem 1.5rem; }

/* CONTACT FORM */
.contact-form {
  max-width: 600px; margin: 0 auto;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: .5rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .75rem; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-size: 1rem; font-family: inherit;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(233,69,96,.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ARTICLE */
.article-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #16213e 100%);
  color: #fff; padding: 4rem 1.5rem; text-align: center;
}
.article-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800; max-width: 800px; margin: 0 auto 1rem;
}
.article-meta { color: rgba(255,255,255,.7); font-size: .9rem; }
.article-content {
  max-width: 800px; margin: 0 auto; padding: 3rem 1.5rem;
}
.article-content h2 {
  font-size: 1.5rem; color: var(--color-primary);
  margin: 2rem 0 1rem; font-weight: 700;
}
.article-content h3 {
  font-size: 1.2rem; color: var(--color-primary);
  margin: 1.5rem 0 .75rem; font-weight: 600;
}
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1rem 2rem; }
.article-content li { margin-bottom: .5rem; }
.article-content img {
  border-radius: var(--radius); margin: 1.5rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,.1);
}

/* BLOG LISTING */
.blog-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #16213e 100%);
  color: #fff; padding: 3rem 1.5rem; text-align: center;
}
.blog-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; }
.blog-header p { opacity: .8; margin-top: .5rem; }

.blog-categories {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center; margin: 2rem 0;
}
.blog-categories a {
  padding: .4rem 1rem; border-radius: 20px; font-size: .85rem;
  border: 1px solid var(--color-border); color: var(--color-text);
  transition: all .2s;
}
.blog-categories a:hover, .blog-categories a.active {
  background: var(--color-accent); color: #fff; border-color: var(--color-accent);
}

.pagination {
  display: flex; justify-content: center; gap: .5rem;
  margin: 3rem 0; flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: .5rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--color-border); font-size: .9rem;
}
.pagination span { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #16213e 100%);
  color: #fff; text-align: center; padding: 4rem 1.5rem;
}
.cta-inner { max-width: 600px; margin: 0 auto; }
.cta-inner h2 { font-size: 1.8rem; margin-bottom: 1rem; color: #fff; }
.cta-inner p { opacity: .9; margin-bottom: 2rem; }

/* FOOTER */
.site-footer {
  background: var(--color-primary); color: rgba(255,255,255,.8);
  padding: 3rem 1.5rem 1rem;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-brand img { margin-bottom: 1rem; border-radius: 4px; }
.footer-brand p { font-size: .9rem; line-height: 1.6; }
.footer-links h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width); margin: 2rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; font-size: .85rem;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* LEGAL PAGES */
.legal-content {
  max-width: 800px; margin: 0 auto; padding: 3rem 1.5rem;
}
.legal-content h1 { font-size: 2rem; margin-bottom: 2rem; color: var(--color-primary); }
.legal-content h2 { font-size: 1.3rem; margin: 2rem 0 1rem; color: var(--color-primary); }
.legal-content p { margin-bottom: 1rem; }

/* 404 */
.page-404 { text-align: center; padding: 5rem 1.5rem; }
.page-404 h1 { font-size: 6rem; color: var(--color-accent); font-weight: 800; margin-bottom: 1rem; }
.page-404 p { font-size: 1.2rem; margin-bottom: 2rem; }

/* --- poser_meta_image.py : vignette des cartes de listing ------------------
   Les articles portaient deja leur image ; seul le listing ne la lisait pas. */
.blog-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: #eee; border-radius: 8px 8px 0 0; margin: -1px -1px 0.9rem; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- fil d'Ariane -----------------------------------------------------------
   Discret par construction : il sert a s'orienter, pas a attirer l'oeil. */
.he-ariane { max-width: 1180px; margin: 0 auto; padding: .9rem 1.2rem .2rem; }
.he-ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 0; padding: 0; font-size: .85rem; color: #777; }
.he-ariane li + li::before { content: "›"; margin-right: .4rem; color: #aaa; }
.he-ariane a { color: #777; text-decoration: none; }
.he-ariane a:hover { color: #b3121a; text-decoration: underline; }

/* --- articles lies ----------------------------------------------------------
   Pose par poser_articles_lies.py : trois liens vers des articles proches, en
   fin de lecture. Discret, mais c'est le seul chemin qu'un lecteur arrive par
   un moteur avait vers le reste du site. */
.he-lies { margin: 2.5rem 0 0; padding: 1.2rem 1.4rem; background: #f6f7f6;
  border-left: 3px solid #cfd6cf; border-radius: 6px; }
.he-lies h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.he-lies p { font-size: .9rem; color: #6b6b6b; margin: 0 0 .8rem; }
.he-lies ul { margin: 0; padding-left: 1.1rem; }
.he-lies li { margin: .35rem 0; }
