/* ============ RESET CSS ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============ GLOBAL ============ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fff;
  padding-top: 80px; /* espace pour header fixe */
}

/* ============ VARIABLES DE COULEUR (à modifier selon canton) ============ */
:root {
  --primary: #005BBB;      /* bleu suisse officiel */
  --secondary: #F0F6FF;    /* bleu clair */
  --accent: #00BA70;       /* vert pro */
  --text-dark: #222;
  --text-light: #555;
  --canvas-blue: rgba(0,91,187,0.8);
}

canvas {
  transition: background 0.3s ease;
}

/* ============ HEADER ============ */
header {
  position: fixed;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  top: 0;
  width: 100%;
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  z-index: 100;
  transition: transform .35s ease;
  will-change: transform;
}

header:hover {
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.95);
}


header.hide {
  transform: translateY(-100%);
}

.logo {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.5px;
}

nav a {
  margin-left: 16px;
  font-size: 15px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  letter-spacing: 0.2px;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

nav a:hover {
  color: var(--primary);
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a.active {
  color: var(--primary);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100vh;       /* hauteur plein écran */
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  max-width: 1200px;
  border-radius: 60px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* container des images */
.hero-images {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* images du slider */
.hero-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* image active */
.hero-images img.active {
  opacity: 1;
}

/* overlay gradient */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.5), rgba(0,0,0,0.15));
  z-index: 2;
}

/* contenu du hero */
.hero-content {
  position: absolute;
  top: 25%;
  left: 8%;
  max-width: 420px;
  color: white;
  z-index: 3;
}

.hero h1,
.hero p,
.hero button {
  position: relative;
  z-index: 3;
}

.hero button {
  background: #0066e3;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 22px;
  backdrop-filter: blur(4px);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0px 6px 16px rgba(0,0,0,0.25);
}

.hero button:hover {
  background: #004fb1;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0px 10px 24px rgba(0,0,0,0.35);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}


section {
  padding: 90px 20px;
  max-width: 1100px;
  margin: auto;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s, transform .6s;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

section h2 {
  margin-bottom: 25px;
  font-size: 26px;
}

#subside {
  background: linear-gradient(135deg, #F8FBFF, #EEF4FF);
  border-radius: 20px;
  padding: 50px;
}

#subside p, 
#subside ul {
  text-align: center;
}

#subside ul {
  max-width: 600px;
  margin: 20px auto;
  list-style: none;
}

#subside ul li {
  padding: 6px 0;
}


.steps {
  display: flex;
  gap: 20px;
  justify-content: center;
  text-align: center;
  padding-top: 10px;
}

.steps div {
  flex: 1;
  background: #fafafa;
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 6px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

form label {
  font-weight: bold;
}

form input, form select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  margin-top: 15px;
  padding: 12px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
}

form button:hover {
  background: #159f46;
}

.faq-item {
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.faq-question {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 17px;
  cursor: pointer;
  padding: 10px 0;
  width: 100%;
  text-align: left;
}

.faq-answer {
  display: none;
  padding: 5px 0 10px;
  color: var(--text-light);
}

.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.why-cards .card {
  transition: transform .25s ease, box-shadow .25s ease;
}

.why-cards .card:hover {
  transform: translateY(-10px);
  box-shadow: 0px 12px 28px rgba(0,0,0,0.12);
}


footer {
  text-align: center;
  padding: 25px 10px;
  border-top: 1px solid #ddd;
  margin-top: 50px;
  color: #666;
}

@media(max-width: 700px) {
  nav {
    display: none;
  }
  header {
    justify-content: center;
  }
}

/* TITRES CENTRÉS */
.section-title-center {
  text-align: center;
}

/* INTRO DE SECTION */
.section-intro {
  max-width: 650px;
  margin: 0 auto 25px;
  color: var(--text-light);
}

/* LISTE AVEC CHECK */
.list-check {
  margin: 15px 0 15px 20px;
  color: var(--text-dark);
}
.list-check li {
  margin-bottom: 6px;
}

/* CARTES "POURQUOI NOUS" */
.why-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.why-cards .card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.card-title {
  min-height: 60px;  /* garantit même hauteur de titre */
  display: flex;
  align-items: center;
}

.eligibility-box {
  background: #f7faff;
  border-radius: 20px;
  padding: 60px;
  margin: 60px auto;
}

.eligibility-box h2 {
  text-align: center;
  margin-bottom: 40px;
}

.eligibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 20px;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
}

.eligibility-grid div {
  background: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


/* MINI-FORM ÉLIGIBILITÉ */
.mini-form {
  max-width: 540px;
  margin: 0 auto;
  justify-content: center;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.mini-form .field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mini-form button {
  grid-column: 1 / -1;
}

.form-note {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 6px;
}

/* TIMELINE "COMMENT ÇA MARCHE" */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.timeline-step {
  background: #fafafa;
  border-radius: 8px;
  padding: 18px 16px;
  border: 1px solid #eee;
  transition: transform .25s ease, box-shadow .25s ease;
}

.timeline-step h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.timeline-step p {
  font-size: 14px;
  color: var(--text-light);
}

.timeline-step:hover {
  transform: translateY(-8px);
  box-shadow: 0px 10px 24px rgba(0,0,0,0.14);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  margin-bottom: 8px;
}

#demande form {
  margin: 0 auto;
  text-align: left;
}

#demande {
  text-align: center;
}

.faq-answer {
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}

.faq-item.open .faq-answer {
  display: block;
  opacity: 1;
  transform: translateY(0);
}


/* RWD pour écrans plus petits */
@media (max-width: 900px) {
  .why-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .why-cards,
  .timeline {
    grid-template-columns: 1fr;
  }

  .mini-form {
    grid-template-columns: 1fr;
  }
}

/* ============== SECTION BENEFICIAIRES ============== */

#beneficiaires {
  background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
  border-radius: 25px;
  padding: 70px 40px;
  margin: 60px auto;
  text-align: center;
}

#beneficiaires .benef-title {
  font-size: 28px;
  margin-bottom: 45px;
  font-weight: 600;
}

#beneficiaires .eligibility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 900px;
  margin: 0 auto;
  gap: 18px;
}

#beneficiaires .eligibility-grid div {
  background: white;
  padding: 18px 20px;
  border-radius: 80px;
  font-size: 17px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

#beneficiaires .eligibility-grid div:nth-child(n+4) {
  grid-column: span 1;
}

#beneficiaires .elig-note {
  margin-top: 35px;
  font-size: 15px;
  color: var(--text-light);
}

/* ===== SECTION BENEFICIAIRES : 3 CARTES EN HAUT, 2 CENTRÉES EN BAS ===== */

#beneficiaires .eligibility-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* centre chaque ligne */
  gap: 24px 40px;            /* vertical / horizontal */
  max-width: 1000px;
  margin: 0 auto;
}

#beneficiaires .eligibility-grid div {
  flex: 0 1 28%;             /* environ 3 par ligne sur grand écran */
  max-width: 320px;          /* évite que ça prenne toute la largeur */
}

#why .card:hover {
  background: var(--primary);
  color: white;
}

#why .card:hover h3 {
  color: white;
}

#beneficiaires .eligibility-grid div {
  cursor: pointer;
  font-weight: 500;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

#beneficiaires .eligibility-grid div:hover {
  background: rgba(255,255,255,0.6);
  transform: scale(1.04);
}

.mini-form .field-group:nth-child(3) {
  grid-column: 1 / -1;
  max-width: 280px;
  margin: 0 auto;
}

#demarche h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 45px;
}

.step-number {
  background: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform .25s ease;
}

.timeline-step:hover .step-number {
  transform: scale(1.12);
}

.timeline-step .step-sub {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
  opacity: .8;
}

.faq-item {
  border-radius: 12px;
  padding: 14px 18px;
  background: #f9f9f9;
  transition: background .25s ease, box-shadow .25s ease;
}

.faq-item.open {
  background: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "🔵";
  font-size: 18px;
  transition: transform .25s ease;
}

.faq-item.open .faq-question::after {
  content: "➖";
  transform: rotate(180deg);
}

.faq-answer {
  opacity: 0;
  transition: opacity .25s ease;
}

.faq-item.open .faq-answer {
  opacity: 1;
}

/* STYLE DE LA RÉPONSE DANS LA FAQ */

.faq-answer {
  background: #f7faff;
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  margin-top: 12px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.55;
  color: #333;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
}

.faq-item.open .faq-answer {
  opacity: 1;
  transform: translateY(0);
}

.faq-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .4s ease, transform .4s ease;
}

.faq-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================= ABOUT SECTION ULTRA PREMIUM ========================= */

#about {
  position: relative;
  padding: 120px 40px;
  text-align: center;
  overflow: hidden;
  border-radius: 20px;
}

/* SUBTILE GRADIENT LIGHT */
#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,91,187,0.05), rgba(255,255,255,0.8), rgba(0,91,187,0.08));
  opacity: 0;
  transition: opacity .8s ease;
}

#about.visible::before {
  opacity: 1;
}

/* TITRE */
.about-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

#about.visible .about-title {
  opacity: 1;
  transform: translateY(0);
}

/* BLOC TEXTE */
.about-block {
  max-width: 700px;
  margin: auto;
}

.about-block p {
  font-size: 18px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(25px);
  filter: blur(4px);
  transition: opacity .6s ease, transform .6s ease, filter .6s ease;
}

/* EFFET STAGGERING — 1 phrase puis l'autre */
.about-block p:nth-child(1) {
  transition-delay: .3s;
}

.about-block p:nth-child(2) {
  transition-delay: .6s;
}

#about.visible .about-block p {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .9;
}

/* ========================= BOUTONS CTA ========================= */

.cta-btn {
  background: #0066e3;
  color: white;
  border: none;
  padding: 14px 34px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 35px;
  backdrop-filter: blur(4px);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0px 6px 16px rgba(0,0,0,0.20);
}

.cta-btn:hover {
  background: var(--primary);
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0px 12px 26px rgba(0,0,0,0.30);
}

.why-button-container,
.benef-button-container {
  text-align: center;
  margin-top: 40px;
}
