/* =========================================================
   VARIABLES
========================================================= */
:root {
  /* Images saisonnières (modifiable en 1 endroit) */
  --hero-bg: url('images/hero.jpg');
  --residentiel-bg: url('images/residentiel.jpg');
  --forfaits-bg: url('images/forfaits.jpg');

  --color-primary: #1a4d8f;
  --color-secondary: #0d2a4d;
  --color-light: #f7f7f7;
  --color-dark: #1a1a1a;
  --color-white: #ffffff;

  --transition-fast: 0.2s ease;
  --transition-medium: 0.35s ease;
}

/* =========================================================
   GLOBAL
========================================================= */
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0 0 15px 0;
  font-weight: 650;
  letter-spacing: 0.2px;
}

p { margin: 0 0 16px; }

.section-subtitle {
  margin-bottom: 28px;
  color: #555;
  font-size: 1.08em;
}

section {
  padding: 78px 40px;
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HEADER
========================================================= */
.header-premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-premium {
  width: 128px;
  background: white;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.logo-text {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--color-dark);
}

/* NAV */
.nav-premium .menu {
  list-style: none;
  display: flex;
  gap: 26px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-premium .menu > li > a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  padding: 8px 0;
  transition: var(--transition-fast);
}

.nav-premium .menu > li > a:hover { color: var(--color-primary); }
.nav-premium .menu > li > a.active { color: var(--color-primary); }

.cta-nav {
  background: var(--color-primary);
  color: white !important;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 800;
  transition: var(--transition-fast);
}
.cta-nav:hover { background: var(--color-secondary); }

/* =========================================================
   HERO
========================================================= */
.hero {
  background:
    linear-gradient(rgba(0,0,0,0.22), rgba(0,0,0,0.22)),
    var(--hero-bg) center/cover no-repeat;
  padding: 150px 40px;
  text-align: center;
  color: white;
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-content h1 {
  font-size: 3.0em;
  margin-bottom: 12px;
}
.hero-content p {
  font-size: 1.22em;
  margin: 0 auto 18px;
  max-width: 920px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-note {
  margin-top: 14px;
  font-size: 0.95em;
  opacity: 0.95;
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 850;
  transition: var(--transition-medium);
}

.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-secondary); transform: translateY(-3px); }

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-secondary:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.8); }

/* Buttons on light sections */
.section-bg-pricing .btn-secondary,
.section-bg-residentiel .btn-secondary,
.section-bg-texture .btn-secondary {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.section-bg-pricing .btn-secondary:hover,
.section-bg-residentiel .btn-secondary:hover,
.section-bg-texture .btn-secondary:hover {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* =========================================================
   GRIDS & CARDS
========================================================= */
.piliers-grid, .pricing-grid, .etapes-grid {
  display: grid;
  gap: 34px;
}

.piliers-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.etapes-grid  { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.pilier, .package-card, .etape {
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: var(--transition-medium);
}

.pilier:hover, .package-card:hover, .etape:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

.featured-package { border: 3px solid var(--color-primary); }

.price {
  font-size: 1.85em;
  font-weight: 900;
  margin: 10px 0 14px;
  color: var(--color-secondary);
}
.price span {
  font-size: 0.48em;
  font-weight: 700;
  color: #666;
}

ul { margin: 0 0 18px; padding-left: 18px; }
.small-note { margin-top: -8px; color: #666; }
.tiny { margin-top: 10px; color: #666; font-size: 0.95em; }
.text-link {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  font-weight: 850;
  color: var(--color-primary);
}
.text-link:hover { color: var(--color-secondary); }

/* =========================================================
   BACKGROUNDS
========================================================= */
.section-bg-residentiel {
  background:
    linear-gradient(rgba(255,255,255,0.90), rgba(255,255,255,0.90)),
    var(--residentiel-bg) center/cover no-repeat;
}

.section-bg-texture {
  background:
    linear-gradient(rgba(255,255,255,0.95), rgba(255,255,255,0.95)),
    url('images/texture-light.jpg') center/cover no-repeat;
}

.section-bg-pricing {
  background:
    linear-gradient(rgba(240,244,250,0.96), rgba(240,244,250,0.96)),
    var(--forfaits-bg) center/cover no-repeat;
}

.section-bg-plex {
  background:
    linear-gradient(rgba(255,255,255,0.93), rgba(255,255,255,0.93)),
    url('images/hero-plex.jpg') center/cover no-repeat;
}

.section-bg-approche {
  background:
    linear-gradient(rgba(255,255,255,0.93), rgba(255,255,255,0.93)),
    url('images/texture-light.jpg') center/cover no-repeat;
}

/* =========================================================
   NOTICES / CALLOUTS
========================================================= */
.notice {
  max-width: 980px;
  margin: 18px auto 0;
  background: #f3f7ff;
  border: 1px solid rgba(26,77,143,0.22);
  border-left: 6px solid var(--color-primary);
  padding: 16px 18px;
  border-radius: 12px;
  color: #1f2d3d;
}

.callout {
  max-width: 780px;
  margin: 0 auto;
  padding: 26px;
  border-radius: 14px;
  border: 3px solid var(--color-primary);
  background-color: var(--color-white);
  text-align: left;
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
}

/* =========================================================
   CONTACT
========================================================= */
.contact-form { max-width: 760px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 8px; font-weight: 850; }
input, textarea, select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1em;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(26,77,143,0.6);
  box-shadow: 0 0 0 4px rgba(26,77,143,0.12);
}

.reassurance {
  max-width: 760px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  color: #1f2d3d;
  font-weight: 850;
}

.forfait-banner {
  max-width: 760px;
  margin: 0 auto 18px;
  background: #1a4d8f;
  color: white;
  padding: 15px;
  border-radius: 12px;
  font-weight: 900;
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  text-align: center;
  padding: 40px;
  background: var(--color-dark);
  color: white;
}
footer a { color: rgba(255,255,255,0.86); }

/* =========================================================
   MOBILE
========================================================= */
.mobile-toggle {
  display: none;
  font-size: 2em;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-premium { display: none; }
  .mobile-toggle { display: block; }

  .nav-premium.nav-open {
    display: block;
    position: absolute;
    top: 74px;
    right: 0;
    width: 100%;
    background: rgba(26,26,26,0.95);
    padding: 20px 0;
    animation: fadeDown 0.35s ease forwards;
    z-index: 2000;
  }

  .nav-premium .menu {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }
  .nav-premium .menu > li > a {
    color: white;
    font-size: 1.15em;
  }

  .hero-content h1 { font-size: 2.15em; }
  .hero-content p  { font-size: 1.05em; }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-15px); }
  to   { opacity: 1; transform: translateY(0); }
}



/* Section humaine (maintien à domicile) */
.human-section{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items:center;
}
.human-section img{
  width:100%;
  height:auto;
  border-radius:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
@media (max-width: 860px){
  .human-section{ grid-template-columns: 1fr; }
}

/* HERO mobile : image recadrée pour éviter le flou et garder le sujet */
@media (max-width: 720px){
  .hero{
    background:
      linear-gradient(rgba(0,0,0,0.24), rgba(0,0,0,0.24)),
      url('images/hero-mobile.jpg') center/cover no-repeat !important;
  }
}


/* === Correction visibilité logo === */
.header-logo-premium {
  background: rgba(255,255,255,0.9);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}


/* === v15: Header/menu centering after removing brand text === */
header .nav, header nav { text-align: center; }

/* Try to center menu items when header uses flex */
header {
  justify-content: center;
}

/* If a logo container exists, give it breathing room */
header .logo, header .brand, header .site-logo {
  margin-right: 32px;
}

/* Center UL menus */
header nav ul, header .nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Mobile: keep spacing sensible */
@media (max-width: 768px) {
  header {
    justify-content: space-between;
  }
  header nav ul, header .nav ul {
    justify-content: flex-start;
    gap: 16px;
  }
  header .logo, header .brand, header .site-logo {
    margin-right: 0;
  }
}


/* === v19: Menu centré + logo seul + responsive safe === */
header, .header, .site-header {
  display: flex;
  align-items: center;
}

/* Desktop: logo à gauche, menu centré */
@media (min-width: 901px) {
  header, .header, .site-header {
    position: relative;
    justify-content: flex-start;
  }
  header nav, .header nav, .site-header nav, header .nav, .header .nav, .site-header .nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  header nav ul, .header nav ul, .site-header nav ul,
  header .nav ul, .header .nav ul, .site-header .nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
}

/* Mobile/tablette: comportement normal */
@media (max-width: 900px) {
  header nav, .header nav, .site-header nav, header .nav, .header .nav, .site-header .nav {
    position: static;
    transform: none;
  }
}


/* v23 hero-benefits (safe add) */
.hero-benefits{
  margin: 16px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}
.hero-benefits li{
  margin: 0;
  padding: 0;
  line-height: 1.35;
}
@media (max-width: 768px){
  .hero-benefits{
    grid-template-columns: 1fr;
  }
}

/* v24 premium benefits (more visible, still sober) */
.hero-benefits-intro{
  margin: 14px 0 8px 0;
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0.95;
}

.hero-benefits{
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(6px);
}

.hero-benefits li{
  position: relative;
  padding-left: 26px;
}

.hero-benefits li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  opacity: 0.95;
}

/* Mobile spacing */
@media (max-width: 768px){
  .hero-benefits{
    padding: 12px 12px;
    border-radius: 12px;
  }
}


/* Language switcher */
.lang-switch{margin-left:12px;display:flex;align-items:center;}
.lang-switch a{font-weight:700;text-decoration:none;border:1px solid rgba(255,255,255,.35);padding:6px 10px;border-radius:999px;line-height:1;color:inherit;}
.lang-switch a:hover{opacity:.9;}
@media (max-width: 860px){.lang-switch{margin-left:0;margin-right:10px;}}


/* v35: CLSC/Organismes callout (page only) */
.page-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:12px;}
.page-title-left{min-width:240px;flex:1;}
.partner-callout{max-width:420px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:14px;padding:14px 14px 12px;}
.partner-callout-title{font-weight:700;margin-bottom:6px;}
.partner-callout-text{font-size:0.95rem;line-height:1.35;margin-bottom:10px;}
.page-local-footer{margin-top:28px;padding-top:14px;border-top:1px solid rgba(0,0,0,0.12);}
.page-local-footer-link{font-weight:600;text-decoration:none;}
@media (max-width: 860px){
  .partner-callout{max-width:100%;}
}


/* v37 enhancements */
.pivot-text{max-width:900px;margin-top:10px;font-size:1.05rem;line-height:1.45;opacity:0.95}
.story-section{padding:28px 0}
.story-section h2{margin-bottom:10px}
.story-section p{max-width:980px}
.onboarding-note{margin-top:10px;opacity:0.85}
.plan-indicators{list-style:none;padding-left:0;margin:10px 0 14px 0;font-size:0.95rem;opacity:0.95}
.plan-indicators li{margin:4px 0}
.faq-list details{background:rgba(0,0,0,0.04);border:1px solid rgba(0,0,0,0.10);border-radius:12px;padding:10px 12px;margin:10px 0}
.faq-list summary{cursor:pointer;font-weight:700}


/* v37.2 layout fixes */
.lead-unified{font-size:1.05rem;line-height:1.5;margin-top:12px}
.onboarding-note.container{max-width:1100px;margin:24px auto 0 auto}
.story-section .container{max-width:1100px;margin:0 auto}

/* v3 compact spacing */
.section{padding:40px 0;}
.section-alt{padding:40px 0;}
.hero{padding:78px 0 52px;}
@media (max-width: 720px){
  .section{padding:32px 0;}
  .section-alt{padding:32px 0;}
  .hero{padding:64px 0 42px;}
}
.group-link{margin-top:26px;padding:16px 18px;border:1px solid rgba(0,0,0,.08);border-radius:14px;background:rgba(255,255,255,.6);}

/* v4 layout fixes */
main{padding-left:0;padding-right:0;}
.container{padding-left:20px;padding-right:20px;}
.section .container, .section-alt .container{padding-left:20px;padding-right:20px;}


/* --- v8 spacing tightening (safe overrides) --- */
.section-bg-pricing,
.section-bg-residentiel,
.section-bg-texture,
.section {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}

.hero {
  padding-top: 72px !important;
  padding-bottom: 56px !important;
}

.hero-content h1 { margin-bottom: 12px !important; }
.hero-content p { margin-top: 10px !important; margin-bottom: 10px !important; }

.piliers-grid {
  gap: 18px !important;
}

.pricing-grid {
  gap: 18px !important;
}

.package-card {
  margin: 0 !important;
}

.section-subtitle {
  margin-top: 10px !important;
  margin-bottom: 18px !important;
}

.cta-row {
  gap: 12px !important;
  margin-top: 16px !important;
}

/* Ensure containers keep comfortable horizontal padding */
.container {
  padding-left: 18px;
  padding-right: 18px;
}


/* --- v9 spacing refinement (validated À propos) --- */
.section-bg-approche {
  padding-top: 56px !important;
  padding-bottom: 56px !important;
}

.section-bg-approche h1 {
  margin-bottom: 12px !important;
}

.section-bg-approche p {
  margin-top: 8px !important;
  margin-bottom: 10px !important;
}

.piliers-grid {
  margin-top: 24px !important;
  gap: 20px !important;
}

.section {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}

.section-bg-texture {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}

.section-bg-texture h2 {
  margin-bottom: 12px !important;
}

.section-subtitle {
  margin-bottom: 16px !important;
}


/* --- v10: tighter spacing on Résidentiel & Maintien à domicile --- */
.section-bg-residentiel {
  padding-top: 44px !important;
  padding-bottom: 44px !important;
}

.section-bg-residentiel .section-subtitle {
  margin-bottom: 14px !important;
}

.section-bg-residentiel h2 {
  margin-bottom: 10px !important;
}

.section-bg-residentiel p {
  margin-top: 8px !important;
  margin-bottom: 10px !important;
}

.payment-options,
.faq-section,
.story-section {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

.story-section.story-short p {
  margin-bottom: 10px !important;
}

.payment-options .piliers-grid,
.section-bg-residentiel .piliers-grid {
  gap: 16px !important;
  margin-top: 18px !important;
}

.faq-section .faq-item {
  margin-bottom: 10px !important;
}


/* --- v11: Forfaits page refinements --- */
.section-bg-pricing {
  padding-top: 44px !important;
  padding-bottom: 44px !important;
}
/* More space under the 'Gestion financière encadrée' notice */
.notice-card {
  margin-bottom: 18px !important;
}


/* --- v12: Forfaits page fixes --- */
.forfaits-hero.section-bg-pricing,
.forfaits-hero {
  padding-top: 34px !important;
  padding-bottom: 34px !important;
}

.notice-card {
  margin-bottom: 22px !important;
}


/* --- v13: Forfaits spacing fixes --- */
/* 2) Reduce blue header height on Forfaits */
.section-bg-pricing{
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}
.section-bg-pricing h1{
  margin: 0 0 8px 0 !important;
}
.section-bg-pricing .section-subtitle{
  margin: 0 !important;
}

/* 3) Add space under 'Gestion financière encadrée' notice */
.notice{
  margin-bottom: 18px !important;
}

