/* BudgetPilote – Fintech style, optimisé */
:root {
  --blue: #0066CC;
  --green: #00C853;
  --white: #ffffff;
  --gray: #f8fafc;
  --gray-dark: #1e293b;
  --font: 'Roboto', 'Open Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--gray-dark); line-height: 1.7; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 4rem 0; }
.alt-bg { background: var(--gray); }
.text-center { text-align: center; }

/* ========== HEADER OPTIMISÉ ========== */
.header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,102,204,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 24px;
  gap: 1.5rem;
}
.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }
.nav { flex: 1; display: flex; justify-content: flex-end; }
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav li { position: relative; }
.nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--gray-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--blue); background: rgba(0,102,204,0.06); }
.nav .btn-header { padding: 0.5rem 1rem; background: var(--green); color: var(--white) !important; margin-left: 0.5rem; }
.nav .btn-header:hover { background: #00a843; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gray-dark); margin: 5px 0; transition: 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 992px) {
  .nav { display: none; }
  .nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-top: 1px solid var(--gray);
  }
  .nav.open ul { flex-direction: column; align-items: stretch; }
  .nav.open a { padding: 0.75rem 1rem; }
  .nav .btn-header { margin-left: 0; margin-top: 0.5rem; }
  .nav-toggle { display: flex; flex-direction: column; }
}

/* Buttons */
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: 10px; text-decoration: none; font-weight: 600; transition: transform 0.2s, box-shadow 0.2s; border: none; cursor: pointer; font-size: 1rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,200,83,0.35); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-secondary { background: var(--blue); color: var(--white); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--blue) 0%, #0052a3 100%); color: var(--white); padding: 4rem 0; position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); margin: 0 0 1rem; max-width: 700px; line-height: 1.2; }
.hero-lead { font-size: 1.2rem; opacity: 0.95; max-width: 600px; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cta .btn-secondary { background: var(--white); color: var(--blue); }
.hero-image { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 40%; max-width: 450px; opacity: 0.2; border-radius: 16px; overflow: hidden; }
.hero-image img { width: 100%; height: auto; object-fit: cover; }
@media (max-width: 1024px) { .hero-image { display: none; } }

/* Stats interactifs */
.stats-row { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; margin: 3rem 0; }
.stat-item { text-align: center; padding: 1.5rem 2rem; background: var(--white); border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); min-width: 140px; transition: transform 0.2s; }
.stat-item:hover { transform: translateY(-4px); }
.stat-num { font-size: 2.5rem; font-weight: 700; color: var(--green); display: block; }
.stat-label { font-size: 0.9rem; color: #64748b; margin-top: 0.25rem; }

/* Course grid + interactivité */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.course-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}
.course-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,102,204,0.12); }
.course-card img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.3s; }
.course-card:hover img { transform: scale(1.03); }
.course-card h3 { margin: 1rem 1rem 0; font-size: 1.15rem; color: var(--blue); }
.course-card p { margin: 0.5rem 1rem 1rem; font-size: 0.95rem; color: #475569; }
.course-card .link { margin: 0 1rem 1rem; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--green); font-weight: 600; text-decoration: none; transition: gap 0.2s; }
.course-card .link:hover { gap: 0.6rem; text-decoration: none; }

/* Mini calculateur sur accueil */
.mini-calc { background: var(--white); border-radius: 16px; padding: 2rem; box-shadow: 0 4px 24px rgba(0,0,0,0.08); max-width: 400px; margin: 2rem auto; }
.mini-calc h3 { margin-top: 0; color: var(--blue); }
.mini-calc input { width: 100%; padding: 0.75rem; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1.1rem; margin: 0.5rem 0; }
.mini-calc .result { font-size: 1.5rem; font-weight: 700; color: var(--green); margin-top: 1rem; }

.cta { text-align: center; background: linear-gradient(135deg, var(--green) 0%, #00a843 100%); color: var(--white); }
.cta h2 { margin-top: 0; }
.cta .btn-primary { background: var(--white); color: var(--green); }

/* ========== FOOTER AVEC RÉSEAUX ========== */
.footer { background: var(--gray-dark); color: var(--white); padding: 3rem 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.footer-col h4 { margin: 0 0 1rem; font-size: 1rem; font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--green); }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--white);
  transition: background 0.2s, transform 0.2s;
}
.footer-social a:hover { background: var(--green); transform: translateY(-2px); color: var(--white); }
.footer-social svg { width: 22px; height: 22px; fill: currentColor; }
.footer-contact { margin-top: 0.5rem; }
.footer-contact a { color: var(--green); }
.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.9rem;
  opacity: 0.9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; } }

.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--gray-dark); color: var(--white); padding: 1rem 24px; box-shadow: 0 -4px 20px rgba(0,0,0,0.2); z-index: 9999; display: none; }
.cookie-banner.show { display: block; }
.cookie-banner-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 0.95rem; }
.cookie-banner a { color: var(--green); }
.cookie-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem; border: 2px solid #e2e8f0; border-radius: 10px; font-family: inherit; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); }
.form-group textarea { min-height: 120px; resize: vertical; }
form .btn { cursor: pointer; }

.page-title { background: linear-gradient(135deg, var(--blue), #0052a3); color: var(--white); padding: 2.5rem 0; margin-bottom: 2rem; }
.page-title h1 { margin: 0; font-size: 1.75rem; }

.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 2px solid #e2e8f0; border-radius: 12px; margin-bottom: 0.5rem; overflow: hidden; transition: border-color 0.2s; }
.faq-item:hover { border-color: rgba(0,102,204,0.3); }
.faq-question { width: 100%; padding: 1rem 1.25rem; text-align: left; background: var(--gray); border: none; font-weight: 600; font-size: 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: inherit; }
.faq-question:hover { background: #f1f5f9; }
.faq-question::after { content: "+"; font-size: 1.25rem; color: var(--blue); }
.faq-item.open .faq-question::after { content: "−"; }
.faq-answer { padding: 1rem 1.25rem; display: none; }
.faq-item.open .faq-answer { display: block; }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.testimonial-card { background: var(--white); padding: 1.5rem; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.testimonial-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.testimonial-card .stars { color: #f0c14b; margin-bottom: 0.5rem; }
.testimonial-card .meta { font-size: 0.9rem; color: #64748b; margin-bottom: 0.75rem; }

.map-container { border-radius: 16px; overflow: hidden; height: 350px; background: #e2e8f0; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.map-container iframe { width: 100%; height: 100%; border: 0; }

.link { color: var(--green); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.progress-bar { height: 14px; background: #e2e8f0; border-radius: 7px; overflow: hidden; margin: 0.5rem 0; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), #00a843); border-radius: 7px; transition: width 0.5s ease; }

/* Blog / articles */
.article-list { display: grid; gap: 2rem; max-width: 900px; margin: 0 auto; }
.article-card { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; padding: 1.5rem; background: var(--white); border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.article-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; }
.article-card h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.article-card .meta { font-size: 0.85rem; color: #64748b; margin-bottom: 0.5rem; }
.article-card p { margin: 0; color: #475569; }
@media (max-width: 600px) { .article-card { grid-template-columns: 1fr; } }

.article-full { max-width: 720px; margin: 0 auto; }
.article-full .lead { font-size: 1.2rem; color: #475569; margin-bottom: 2rem; }
.article-full h2 { margin-top: 2rem; color: var(--blue); }
.article-full img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }
