/* ==========================================================================
   Micro-crèche Les P'tits Soleils — Tarbes (quartier de l'Arsenal)
   Feuille de style principale — charte graphique pastel « soleil »
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  /* Fonds */
  --cream:        #FFFBF2;
  --cream-2:      #FDF4E3;
  --cream-3:      #FBEDD8;

  /* Corail (couleur « Micro- » du logo) */
  --coral:        #E98E6E;
  --coral-dark:   #D9713F;
  --coral-light:  #FBE1D5;

  /* Jaune soleil (couleur « Crèche » du logo) */
  --yellow:       #F3BE44;
  --yellow-dark:  #D9A021;
  --yellow-light: #FCEBB8;

  /* Vert tendre */
  --green:        #A9C68C;
  --green-dark:   #7A9B5E;
  --green-light:  #E2EDD3;

  /* Bleu ciel (rappel Les P'tits Nuages) */
  --blue:         #9FC9D9;
  --blue-dark:    #5E96AC;
  --blue-light:   #DDEEF4;

  /* Rose poudré */
  --pink:         #F0B9AC;
  --pink-dark:    #D98570;
  --pink-light:   #FBE4DE;

  /* Textes */
  --brown:        #8A5A3B;
  --text:         #6B6157;
  --text-soft:    #8E857A;
  --white:        #FFFFFF;

  /* Ombres */
  --shadow-sm:  0 2px 10px rgba(190, 140, 100, .10);
  --shadow:     0 6px 24px rgba(190, 140, 100, .13);
  --shadow-lg:  0 14px 38px rgba(190, 140, 100, .18);

  --radius:     22px;
  --radius-lg:  34px;
  --header-h:   76px;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--coral-dark); }

h1, h2, h3, h4 {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.2;
  margin: 0 0 .5em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}
.container.narrow { max-width: 880px; }
.container.wide   { max-width: 1320px; }

.section { padding-block: 86px; position: relative; }
.section.tight { padding-block: 56px; }

.bg-cream   { background: var(--cream); }
.bg-cream-2 { background: var(--cream-2); }
.bg-white   { background: var(--white); }
.bg-peach   { background: linear-gradient(160deg, #FEF3E6 0%, #FDE9DC 100%); }
.bg-sky     { background: linear-gradient(160deg, #EFF8FB 0%, #E4F1F6 100%); }
.bg-mint    { background: linear-gradient(160deg, #F2F7EA 0%, #E7F0DA 100%); }

/* Titres de section ---------------------------------------------------- */
.section-title {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  text-align: center;
  margin: 0 0 10px;
  letter-spacing: .3px;
}
.section-title.coral  { color: var(--coral-dark); }
.section-title.yellow { color: var(--yellow-dark); }
.section-title.green  { color: var(--green-dark); }
.section-title.blue   { color: var(--blue-dark); }

.lead {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 46px;
  color: var(--text-soft);
  font-size: 1.06rem;
}
.lead:last-child { margin-bottom: 0; }

/* ==========================================================================
   3. BOUTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: .93rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-3px); }

.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, #EFA14B 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 113, 63, .32);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(217, 113, 63, .42); }

.btn-outline {
  background: #fff;
  color: var(--coral-dark);
  border-color: var(--coral-light);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: var(--coral); box-shadow: var(--shadow); }

.btn-lg { padding: 17px 38px; font-size: 1rem; }
.btn-sm { padding: 10px 20px; font-size: .82rem; }

/* --------------------------------------------------------------------------
   Bouton de préinscription : il doit se voir, en permanence et sur tout écran.
   Trois animations superposées, toutes sans interaction :
     · le dégradé défile           (mega-flow)
     · le bouton respire           (mega-beat)
     · un halo se propage          (mega-halo, pseudo-élément ::after)
     · un éclat balaie la surface  (mega-shine, pseudo-élément ::before)
   -------------------------------------------------------------------------- */
.btn-mega {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  font-weight: 700;
  letter-spacing: .8px;
  background: linear-gradient(100deg,
              #E9704B 0%, #F0904F 22%, #F7C948 44%,
              #F0904F 66%, #E9704B 88%, #F0904F 100%);
  background-size: 300% 100%;
  box-shadow: 0 8px 22px rgba(217, 113, 63, .42);
  animation: mega-flow 6s linear infinite,
             mega-beat 2.2s ease-in-out infinite;
}

/* Halo qui se propage en continu */
.btn-mega::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--coral);
  animation: mega-halo 2.2s ease-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Éclat qui balaie le bouton */
.btn-mega::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg,
              rgba(255,255,255,0) 0%,
              rgba(255,255,255,.55) 50%,
              rgba(255,255,255,0) 100%);
  transform: skewX(-22deg);
  animation: mega-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}

.btn-mega:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 32px rgba(217, 113, 63, .55);
}

.btn-mega i { animation: mega-nudge 2.2s ease-in-out infinite; }

@keyframes mega-flow {
  0%   { background-position:   0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes mega-beat {
  0%, 100%   { transform: scale(1); }
  45%        { transform: scale(1.045); }
  60%        { transform: scale(.995); }
}
@keyframes mega-halo {
  0%   { opacity: .85; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.22); }
}
@keyframes mega-shine {
  0%, 62%  { left: -60%; }
  100%     { left: 130%; }
}
@keyframes mega-nudge {
  0%, 100% { transform: rotate(0deg); }
  40%      { transform: rotate(-12deg) scale(1.15); }
  55%      { transform: rotate(8deg) scale(1.1); }
}


.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn-row.center { justify-content: center; }

/* ==========================================================================
   4. HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 251, 242, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #F4E4CE;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-h);
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { width: 52px; height: 52px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--coral-dark);
}
.brand-sub {
  font-size: .64rem;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
}

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-soft);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active { color: var(--coral-dark); border-bottom-color: var(--coral); }

.burger {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  color: var(--coral-dark);
  cursor: pointer;
  padding: 8px;
}

/* Menu mobile ---------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
  padding: 80px 24px 40px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--brown);
  text-decoration: none;
  padding: 11px 20px;
}
.mobile-menu a:hover { color: var(--coral-dark); }
.mobile-menu .btn {
  margin-top: 18px;
  max-width: 270px;
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: .8rem;
  padding: 14px 18px;
  line-height: 1.35;
}
.mobile-menu .close {
  position: absolute;
  top: 22px; right: 24px;
  background: none; border: 0;
  font-size: 1.8rem;
  color: var(--coral-dark);
  cursor: pointer;
}

/* ==========================================================================
   5. HERO
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(170deg, #FFFBF2 0%, #FEF5E5 55%, #FDEEDC 100%);
  padding-block: 72px 110px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.9rem);
  line-height: .98;
  margin: 0 0 18px;
  letter-spacing: 1px;
}
.hero h1 .l1 { display: block; color: var(--coral-dark); }
.hero h1 .l2 { display: block; color: var(--yellow); }

.hero-tagline {
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.2rem, 2.6vw, 1.62rem);
  font-weight: 500;
  color: var(--brown);
  line-height: 1.3;
  margin: 0 0 18px;
}
.hero-tagline .heart { color: var(--coral); }

.hero-text {
  max-width: 470px;
  color: var(--text-soft);
  font-size: 1rem;
  margin: 0 0 30px;
}

/* Visuel de droite : forme organique + arc-en-ciel */
.hero-visual {
  position: relative;
  width: 82%;
  max-width: 400px;
  margin-inline: auto;
}
.hero-blob {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 58% 42% 46% 54% / 48% 52% 48% 52%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(150deg, var(--yellow-light), var(--coral-light));
  animation: blob-morph 16s ease-in-out infinite;
}
@keyframes blob-morph {
  0%, 100% { border-radius: 58% 42% 46% 54% / 48% 52% 48% 52%; }
  50%      { border-radius: 44% 56% 58% 42% / 55% 45% 55% 45%; }
}
.hero-blob img { width: 100%; height: 100%; object-fit: cover; }
.hero-blob .blob-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  color: var(--brown);
  font-family: 'Baloo 2', sans-serif;
  text-align: center;
  padding: 30px;
}
.hero-blob .blob-fallback i { font-size: 3.2rem; color: var(--yellow-dark); }

.hero-rainbow {
  position: absolute;
  top: -34px; right: -26px;
  width: 62%;
  z-index: -1;
  opacity: .95;
}

.hero-logo-badge {
  position: absolute;
  bottom: -10px; left: -12px;
  width: 92px; height: 92px;
  border-radius: 50%;
  /* Le logo est détouré en rond : pas de fond ni de marge, sinon un liseré
     blanc apparaît entre le disque du logo et le bord du médaillon. */
  box-shadow: var(--shadow);
  animation: float-y 5s ease-in-out infinite;
}
.hero-logo-badge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

/* Décors flottants ------------------------------------------------------ */
.decor {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes float-x {
  0%, 100% { transform: translateX(0) translateY(0); }
  50%      { transform: translateX(16px) translateY(-10px); }
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.float-y { animation: float-y 6s ease-in-out infinite; }
.float-x { animation: float-x 9s ease-in-out infinite; }
.spin    { animation: spin-slow 38s linear infinite; transform-origin: center; }

.decor-sun-1   { top: 8%;  left: 6%;   width: 86px;  }
.decor-cloud-1 { top: 18%; left: 44%;  width: 132px; opacity: .8; }
.decor-cloud-2 { bottom: 16%; left: 2%; width: 106px; opacity: .65; }
.decor-star-1  { top: 46%; left: 36%;  width: 26px;  }
.decor-star-2  { bottom: 24%; right: 8%; width: 22px; }

/* Vague de séparation --------------------------------------------------- */
.wave {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -2px;
  position: relative;
  z-index: 3;
}
.wave.flip { transform: rotate(180deg); margin: -2px 0 0; }

/* ==========================================================================
   6. HERO COMPACT (pages internes)
   ========================================================================== */
.hero-compact {
  position: relative;
  background: linear-gradient(170deg, #FFFBF2 0%, #FEF3E3 100%);
  padding-block: 66px 78px;
  text-align: center;
  overflow: hidden;
}
.hero-compact h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  color: var(--coral-dark);
  margin: 0 0 10px;
  position: relative; z-index: 2;
}
.hero-compact .hero-tagline {
  margin: 0 auto 24px;
  max-width: 660px;
  position: relative; z-index: 2;
}
.hero-compact .btn-row { position: relative; z-index: 2; }

/* ==========================================================================
   7. CARTES « VALEURS » (cercles pastel)
   ========================================================================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.value-card {
  text-align: center;
  padding: 34px 18px 30px;
  border-radius: 50% 50% 46% 46% / 34% 34% 12% 12%;
  transition: transform .3s ease, box-shadow .3s ease;
}
.value-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.value-card.v-yellow { background: var(--yellow-light); }
.value-card.v-pink   { background: var(--pink-light); }
.value-card.v-green  { background: var(--green-light); }
.value-card.v-peach  { background: var(--coral-light); }

.value-card .ic { font-size: 2.3rem; margin-bottom: 12px; line-height: 1; }
.value-card h3 {
  font-size: 1.02rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 8px;
}
.value-card p { font-size: .9rem; color: var(--text-soft); margin: 0; line-height: 1.6; }

/* ==========================================================================
   8. BLOC TEXTE + IMAGE
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 58px;
  align-items: center;
}
.split.reverse .split-visual { order: 2; }

.split-visual .blob {
  aspect-ratio: 4 / 3;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(150deg, var(--blue-light), var(--green-light));
  position: relative;
}
.split-visual .blob img { width: 100%; height: 100%; object-fit: cover; }

/* Variante logo : le visuel n'est pas une photo à recadrer mais une marque à
   présenter en entier, sur un fond clair et dans une forme ronde. */
.split-visual .blob.blob-logo {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  max-width: 400px;
  margin-inline: auto;
  /* Ni fond ni marge : le disque du logo est exactement le cercle affiché. */
  background: none;
  padding: 0;
}
.split-visual .blob.blob-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.split-visual .blob .blob-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--green-dark);
}

.split-body h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  color: var(--coral-dark);
  margin: 0 0 6px;
}
.split-body p { margin: 0 0 15px; }

/* ==========================================================================
   9. CARTES « UNIVERS »
   ========================================================================== */
.univers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.univers-card {
  display: block;
  border-radius: 50% 50% 46% 46% / 34% 34% 12% 12%;
  padding: 40px 24px 34px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
}
.univers-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.univers-card.u-yellow { background: var(--yellow-light); }
.univers-card.u-pink   { background: var(--pink-light); }
.univers-card.u-green  { background: var(--green-light); }
.univers-card.u-peach  { background: var(--coral-light); }
.univers-card.u-blue   { background: var(--blue-light); }

.univers-card .ic { font-size: 2.6rem; margin-bottom: 14px; line-height: 1; }
.univers-card h3 {
  font-size: 1.02rem;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--coral-dark);
}
.univers-card.u-green h3  { color: var(--green-dark); }
.univers-card.u-yellow h3 { color: var(--yellow-dark); }
.univers-card.u-blue h3   { color: var(--blue-dark); }
.univers-card p { font-size: .9rem; color: var(--text-soft); margin: 0; line-height: 1.6; }
.univers-card .card-cta {
  display: inline-block;
  margin-top: 14px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: .85rem;
  color: var(--coral-dark);
}
.univers-card .card-cta i { transition: transform .25s ease; margin-left: 5px; }
.univers-card:hover .card-cta i { transform: translateX(5px); }

/* ==========================================================================
   10. PARCOURS « GRANDIR À SON RYTHME »
   ========================================================================== */
.rythme {
  position: relative;
  background: linear-gradient(170deg, #FDF1DC 0%, #FCE8CE 100%);
  overflow: hidden;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 46px;
  position: relative;
  z-index: 2;
}
.step { text-align: center; }
.step .bubble {
  width: 92px; height: 92px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem;
  box-shadow: var(--shadow-sm);
}
.step h3 {
  font-size: .95rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin: 0 0 6px;
}
.step p { font-size: .88rem; color: var(--text-soft); margin: 0; line-height: 1.55; }

/* ==========================================================================
   11. JOURNÉE TYPE (timeline)
   ========================================================================== */
.timeline-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px 34px;
  position: relative;
  z-index: 2;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.tl-item { text-align: center; position: relative; }
.tl-item .dot {
  width: 62px; height: 62px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: var(--cream-3);
}
.tl-item:nth-child(1) .dot { background: var(--yellow-light); }
.tl-item:nth-child(2) .dot { background: var(--coral-light); }
.tl-item:nth-child(3) .dot { background: var(--pink-light); }
.tl-item:nth-child(4) .dot { background: var(--blue-light); }
.tl-item:nth-child(5) .dot { background: var(--green-light); }
.tl-item:nth-child(6) .dot { background: var(--yellow-light); }
.tl-item .hour {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  color: var(--yellow-dark);
  font-size: .92rem;
  display: block;
}
.tl-item h3 {
  font-size: .86rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin: 2px 0 6px;
}
.tl-item p { font-size: .82rem; color: var(--text-soft); margin: 0; line-height: 1.5; }

/* ==========================================================================
   12. GALERIE
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item { text-align: center; }
.gallery-item .frame {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--cream-3), var(--coral-light));
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-item:hover .frame { transform: translateY(-6px); box-shadow: var(--shadow); }
.gallery-item .frame img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .frame .fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  opacity: .55;
}

/* En attendant les photos, chaque tuile prend une teinte pastel différente :
   la galerie se lit comme un motif voulu, pas comme des images manquantes. */
.gallery-item:nth-child(8n+1) .frame { background: linear-gradient(150deg, #FDF0C8, #FCE4C0); }
.gallery-item:nth-child(8n+1) .fallback { color: var(--yellow-dark); }
.gallery-item:nth-child(8n+2) .frame { background: linear-gradient(150deg, #FBE4DE, #F8D6CE); }
.gallery-item:nth-child(8n+2) .fallback { color: var(--pink-dark); }
.gallery-item:nth-child(8n+3) .frame { background: linear-gradient(150deg, #E6F0D8, #D9E8C6); }
.gallery-item:nth-child(8n+3) .fallback { color: var(--green-dark); }
.gallery-item:nth-child(8n+4) .frame { background: linear-gradient(150deg, #DDEEF4, #CBE4EE); }
.gallery-item:nth-child(8n+4) .fallback { color: var(--blue-dark); }
.gallery-item:nth-child(8n+5) .frame { background: linear-gradient(150deg, #FBE1D5, #F7CFBE); }
.gallery-item:nth-child(8n+5) .fallback { color: var(--coral-dark); }
.gallery-item:nth-child(8n+6) .frame { background: linear-gradient(150deg, #DDEEF4, #E2EDD3); }
.gallery-item:nth-child(8n+6) .fallback { color: var(--blue-dark); }
.gallery-item:nth-child(8n+7) .frame { background: linear-gradient(150deg, #EDE6F3, #E3DAEE); }
.gallery-item:nth-child(8n+7) .fallback { color: #8A6FB0; }
.gallery-item:nth-child(8n+8) .frame { background: linear-gradient(150deg, #FDF0C8, #F8E0CE); }
.gallery-item:nth-child(8n+8) .fallback { color: var(--coral-dark); }
.gallery-item .label {
  display: block;
  margin-top: 10px;
  font-family: 'Baloo 2', sans-serif;
  font-size: .78rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ==========================================================================
   13. CARTES GÉNÉRIQUES / FEATURES
   ========================================================================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* Grille des projets : cinq cartes. En flex plutôt qu'en grille, pour que la
   dernière ligne incomplète reste centrée au lieu d'être ferrée à gauche. */
.projets-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}
.projets-grid > * {
  flex: 0 1 calc(33.333% - 15px);
  min-width: 240px;
}

.feature {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature .ic {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.feature.center { text-align: center; }
.feature.center .ic { margin-inline: auto; }
.feature h3 { font-size: 1.14rem; margin: 0 0 8px; color: var(--brown); }
.feature p  { font-size: .93rem; color: var(--text-soft); margin: 0; }

.ic-yellow { background: var(--yellow-light); color: var(--yellow-dark); }
.ic-coral  { background: var(--coral-light);  color: var(--coral-dark); }
.ic-green  { background: var(--green-light);  color: var(--green-dark); }
.ic-blue   { background: var(--blue-light);   color: var(--blue-dark); }
.ic-pink   { background: var(--pink-light);   color: var(--pink-dark); }

/* Liste d'infos ---------------------------------------------------------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed #F0DFC6;
}
.info-list li:last-child { border-bottom: 0; }
.info-list .ic {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
}
.info-list .k {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  color: var(--brown);
  display: block;
  line-height: 1.3;
}
.info-list .v { color: var(--text-soft); font-size: .95rem; }
.info-list a { text-decoration: none; }
.info-list a:hover .v { color: var(--coral-dark); }

/* Tranches d'aides CAF ---------------------------------------------------- */
.tranches {
  max-width: 620px;
  margin-inline: auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 34px;
  box-shadow: var(--shadow-sm);
}
.tranches-intro {
  text-align: center;
  color: var(--text-soft);
  margin: 0 0 20px;
}
.tranches ul { list-style: none; margin: 0; padding: 0; }
.tranches li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--green-light);
  border-radius: 14px;
  padding: 13px 20px;
  margin-bottom: 10px;
}
.tranches li:last-child { margin-bottom: 0; }
.tranches .k {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  color: var(--brown);
}
.tranches .v {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-dark);
  white-space: nowrap;
}
.tranches-note {
  margin: 20px 0 0;
  font-size: .85rem;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.6;
}

/* Encadré doux ----------------------------------------------------------- */
.note {
  background: var(--yellow-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  border-left: 6px solid var(--yellow);
}
.note.green { background: var(--green-light); border-left-color: var(--green); }
.note.blue  { background: var(--blue-light);  border-left-color: var(--blue); }
.note p:last-child { margin-bottom: 0; }

/* ==========================================================================
   14. AVIS
   ========================================================================== */
.testimonial {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.testimonial .stars { color: var(--yellow); letter-spacing: 3px; margin-bottom: 12px; }
.testimonial .quote { font-style: italic; color: var(--text); flex-grow: 1; margin: 0 0 16px; font-size: .96rem; }
.testimonial .who { font-family: 'Baloo 2', sans-serif; font-weight: 600; color: var(--brown); }
.testimonial .src { font-size: .8rem; color: var(--text-soft); }

/* Carrousel d'avis : défilement lent et continu, à l'arrêt au survol ou au doigt ---- */
.avis-marquee {
  overflow: hidden;
  position: relative;
  padding-block: 6px;
  /* Les bords s'estompent pour suggérer la continuité */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.avis-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: avis-defile 72s linear infinite;
}
.avis-marquee:hover .avis-track,
.avis-marquee:focus-within .avis-track,
.avis-marquee.paused .avis-track { animation-play-state: paused; }

.avis-marquee .testimonial {
  flex: 0 0 340px;
  width: 340px;
  margin: 0;
}
.avis-marquee .testimonial .quote {
  margin: 0 0 16px;
  /* Les avis n'ont pas tous la même longueur : on tronque visuellement au-delà
     de neuf lignes pour que toutes les cartes gardent la même hauteur. Le texte
     intégral reste dans le code, donc lisible par les moteurs et les lecteurs
     d'écran. */
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  line-clamp: 9;
  overflow: hidden;
}
.avis-marquee .testimonial figcaption { margin-top: auto; }
.avis-marquee .testimonial .who { display: block; }
.avis-marquee .testimonial .src { display: block; }
/* Le G de Google garde ses couleurs officielles : la provenance doit être évidente */
.avis-marquee .testimonial .src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.avis-marquee .testimonial .g-logo {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* La piste contient deux fois la même série : un demi-tour boucle exactement */
@keyframes avis-defile {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 11px)); }
}

.avis-hint {
  text-align: center;
  font-size: .84rem;
  color: var(--text-soft);
  margin: 22px 0 0;
}

/* ==========================================================================
   15. RÉSEAU / AUTRES CRÈCHES
   ========================================================================== */
.network-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.network-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.network-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.network-card img { width: 82px; height: 82px; border-radius: 50%; flex-shrink: 0; }
.network-card h3 { margin: 0 0 4px; font-size: 1.14rem; color: var(--coral-dark); }
.network-card .where { font-size: .88rem; color: var(--text-soft); margin: 0 0 8px; }
.network-card .card-cta { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: .85rem; color: var(--blue-dark); }
.network-card .card-cta i { margin-left: 5px; transition: transform .25s ease; }
.network-card:hover .card-cta i { transform: translateX(5px); }

.network-card .tag {
  display: inline-block;
  margin-top: 8px;
  background: var(--yellow-light);
  color: var(--yellow-dark);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
}

/* Bandeau « Les P'tits Nuages » ------------------------------------------ */
.sister {
  display: flex;
  align-items: center;
  gap: 26px;
  background: linear-gradient(140deg, #EFF8FB 0%, #E3F0F6 100%);
  border-radius: var(--radius-lg);
  padding: 34px 38px;
}
.sister img { width: 118px; height: 118px; border-radius: 50%; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.sister h3 { color: var(--blue-dark); margin: 0 0 6px; font-size: 1.35rem; }
.sister p  { margin: 0; color: var(--text-soft); font-size: .96rem; }

/* ==========================================================================
   16. PRÉ-FOOTER CTA
   ========================================================================== */
.cta-band {
  background: linear-gradient(145deg, #FDF0DA 0%, #FBE3CD 100%);
  text-align: center;
  padding-block: 74px;
  position: relative;
  overflow: hidden;
}
.cta-band h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--coral-dark);
  margin: 0 0 8px;
  position: relative; z-index: 2;
}
.cta-band .btn-row { position: relative; z-index: 2; }
.cta-band .tel {
  display: block;
  margin-top: 20px;
  font-size: .95rem;
  color: var(--text-soft);
  position: relative; z-index: 2;
}
.cta-band .tel a { color: var(--coral-dark); font-weight: 700; text-decoration: none; }

/* ==========================================================================
   17. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--cream-2);
  padding-block: 60px 28px;
  border-top: 1px solid #F3E3CB;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 38px;
}
.footer-logo { width: 76px; height: 76px; border-radius: 50%; margin-bottom: 14px; }
.footer-title {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  color: var(--brown);
  font-size: 1.02rem;
  letter-spacing: .6px;
  margin-bottom: 14px;
}
.site-footer p, .site-footer li { font-size: .92rem; color: var(--text-soft); margin: 0 0 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--coral-dark); }

.socials { display: flex; gap: 10px; margin-top: 6px; }
.socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--coral-dark);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.socials a:hover { transform: translateY(-4px); background: var(--coral); color: #fff; }

.footer-bottom {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px dashed #EFDCC0;
  text-align: center;
  font-size: .85rem;
  color: var(--text-soft);
}
.footer-bottom a { color: var(--coral-dark); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* ==========================================================================
   18. PAGES LÉGALES / CONTENU LONG
   ========================================================================== */
.prose {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.prose h2 {
  font-size: 1.42rem;
  color: var(--coral-dark);
  margin: 2.2em 0 .6em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cream-3);
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; color: var(--brown); margin: 1.6em 0 .4em; }
.prose ul { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--blue-dark); }

/* ==========================================================================
   19. CARTE GOOGLE MAPS
   ========================================================================== */
.map-frame {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.map-frame iframe { width: 100%; height: 460px; border: 0; border-radius: 16px; display: block; }

/* --------------------------------------------------------------------------
   Repli image : l'icône ou le message ne s'affiche que si la photo est absente.
   Les <img> portent onerror="this.remove()" : quand le fichier manque, la balise
   disparaît du DOM et :has(img) devient faux, ce qui révèle le repli.
   -------------------------------------------------------------------------- */
.hero-blob:has(img) .blob-fallback,
.split-visual .blob:has(img) .blob-fallback,
.gallery-item .frame:has(img) .fallback { display: none; }

/* ==========================================================================
   20. APPARITION AU SCROLL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }

  /* Sans animation, les avis restent consultables en faisant défiler à la main */
  .avis-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .avis-track { width: auto; }
  .avis-track > [aria-hidden="true"] { display: none; }
  .avis-hint { display: none; }
}

/* ==========================================================================
   21. RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .main-nav { gap: 18px; }
  .main-nav a { font-size: .78rem; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: block; }

  .hero-grid { grid-template-columns: 1fr; gap: 42px; text-align: center; }
  .hero-text { margin-inline: auto; }
  .hero .btn-row { justify-content: center; }
  .hero-visual { max-width: 340px; margin-inline: auto; width: 100%; }

  .split { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse .split-visual { order: 0; }

  .values-grid, .univers-grid, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3, .card-grid-5, .steps { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .network-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-block: 58px; }
  .values-grid, .univers-grid, .card-grid-2, .card-grid-3,
  .card-grid-4, .card-grid-5, .steps { grid-template-columns: 1fr; }

  /* Grilles « m2 » : deux widgets par ligne plutôt qu'un seul en pleine largeur.
     Si le nombre d'éléments est impair, le dernier est centré sur sa propre ligne. */
  .m2 { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; row-gap: 14px; }
  .m2 > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 6px);
  }

  /* Contenu resserré pour tenir dans une demi-largeur */
  .m2 .feature { padding: 22px 14px; }
  .m2 .feature .ic { width: 46px; height: 46px; font-size: 1.15rem; margin-bottom: 10px; }
  .m2 .feature h3 { font-size: .97rem; margin-bottom: 6px; }
  .m2 .feature p  { font-size: .82rem; line-height: 1.5; }
  .m2 .feature .btn-sm { padding: 8px 13px; font-size: .7rem; }

  .m2 .univers-card { padding: 30px 12px 24px; }
  .m2 .univers-card .ic { font-size: 2rem; margin-bottom: 10px; }
  .m2 .univers-card h3 { font-size: .84rem; letter-spacing: .8px; }
  .m2 .univers-card .card-cta { font-size: .76rem; margin-top: 10px; }

  .m2 .value-card { padding: 28px 12px 22px; }
  .m2 .value-card .ic { font-size: 1.9rem; margin-bottom: 8px; }
  .m2 .value-card h3 { font-size: .86rem; letter-spacing: .8px; }
  .m2 .value-card p  { font-size: .79rem; line-height: 1.45; }

  .projets-grid { gap: 12px; }
  .projets-grid > * { flex-basis: calc(50% - 6px); min-width: 0; }
  .projets-grid .feature { padding: 22px 14px; }
  .projets-grid .feature .ic { width: 46px; height: 46px; font-size: 1.15rem; margin-bottom: 10px; }
  .projets-grid .feature h3 { font-size: .97rem; margin-bottom: 6px; }
  .projets-grid .feature p  { font-size: .82rem; line-height: 1.5; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .sister { flex-direction: column; text-align: center; }
  .timeline-card { padding: 30px 20px; }
  .prose { padding: 26px 20px; }
  .brand-name { font-size: 1rem; }
  .brand img { width: 46px; height: 46px; }
  .hero-logo-badge { width: 82px; height: 82px; }
  .map-frame iframe { height: 340px; }
  .avis-marquee .testimonial { flex-basis: 80vw; width: 80vw; }
  .avis-track { animation-duration: 58s; gap: 16px; }
  @keyframes avis-defile {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - 8px)); }
  }
  .btn { font-size: .85rem; padding: 13px 22px; }
}
