:root {
  --bg-color: #ffffff;
  --bg-secondary: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #475569;
  --accent-color: #0ea5e9;
  --accent-hover: #0284c7;
  --cta-color: #f97316;
  --cta-hover: #ea580c;
  --border-color: #e2e8f0;
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);
  --transition: all 0.2s ease-in-out;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  padding-top: 80px; /* Nav bar spacing */
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--text-color);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 0.8rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 75ch;
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Navigation Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* Hero Section */
.hero {
  padding: 5rem 2rem;
  background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.05) 0%, rgba(255, 255, 255, 0) 50%), var(--bg-color);
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

/* Premium Buttons */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--cta-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-color);
}

.btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Static Calculator Widget */
.calc-container {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.calc-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-color);
}

.calc-group {
  margin-bottom: 1.5rem;
}

.calc-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.calc-value-display {
  color: var(--accent-color);
  font-weight: 700;
}

/* Custom Range Input styling */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #cbd5e1;
  border-radius: 4px;
}

input[type=range]::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: var(--transition);
}

input[type=range]::-webkit-slider-thumb:hover {
  background: var(--cta-color);
  transform: scale(1.1);
}

.calc-result-box {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.calc-result-value {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  color: #10b981; /* Green success */
  line-height: 1;
  margin: 0.5rem 0;
}

/* Standard Section Padding */
section.main-section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* Cards */
.info-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.info-card-icon {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1.25rem;
}

/* Forms */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-color);
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-state {
  margin-top: 1.5rem;
  padding: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: none;
  text-align: center;
}

.form-state.success {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
  display: block;
}

.form-state.error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  display: block;
}

.form-state.loading {
  background-color: var(--border-color);
  color: var(--text-muted);
  display: block;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  background-color: #0f172a;
  color: #94a3b8;
  padding: 5rem 2rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.footer-brand h3 span {
  color: var(--accent-color);
}

.footer-links h4,
.footer-contact h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #94a3b8;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

/* Mobile Toggler */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-color);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .calc-container {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ===== Consentement RGPD et information de collecte ===== */
.form-consent-group {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}

.form-consent-group input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.form-consent-group label {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-rgpd-notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 1.5rem 0 0;
}

.form-consent-group a,
.form-rgpd-notice a {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Avertissement du simulateur : doit rester lisible, jamais relégué en petits caracteres. */
.calc-disclaimer {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0.5rem 0 1.5rem;
}

/* Pages légales : les titres de section sont des h2 (hiérarchie Hn correcte),
   avec l'échelle visuelle d'origine conservée. */
.legal-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* ===== Visuels — bandeaux et illustrations techniques =====================
   Ajouts isolés pour accueillir les 6 visuels du lot. Aucune règle existante
   n'est modifiée : la grille du hero et le simulateur restent intacts. */

.hero-banner {
  max-width: 1200px;
  margin: -3rem auto 0;
  padding: 0 2rem;
}

.hero-banner figure,
.section-banner figure,
.card-visual figure,
.section-visual figure {
  margin: 0;
}

.hero-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 55%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

/* Légende commune : rappelle le statut non contractuel de chaque visuel. */
.visual-caption {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: right;
}

/* Visuel d'appui d'une section pleine largeur */
.section-banner {
  margin: 0 0 3rem;
}

.section-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

/* Illustration en tête de carte : la marge négative annule le padding 2rem
   de .info-card pour que l'image touche les bords arrondis de la carte. */
.card-visual {
  margin: -2rem -2rem 1.5rem;
}

.card-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-visual .visual-caption {
  padding: 0 2rem;
}

/* Illustration de l'encart Méthode de travail */
.section-visual {
  margin-top: 2.5rem;
}

.section-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* Recadrage mobile : on resserre les ratios les plus larges, sinon le bandeau
   se réduit à une bande trop fine pour rester lisible. */
@media (max-width: 768px) {
  .hero-banner {
    margin-top: -2rem;
    padding: 0 1rem;
  }

  .hero-banner img {
    aspect-ratio: 16 / 10;
  }

  .section-banner img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .section-visual img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .visual-caption {
    text-align: left;
  }
}
