/* ============================================================
 *  Page d'accueil — CAP AVENIR JEUNES CI
 * ============================================================ */

/* ---------- HERO ---------- */
.ci-home-hero { position: relative; overflow: hidden; padding: 50px 0 86px; background: linear-gradient(180deg, #fff 0%, #fff6f0 55%, var(--bodyBg, #fff4e8) 100%); }
.ci-home-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.ci-home-hero__bg span { position: absolute; border-radius: 50%; filter: blur(10px); animation: ciBob 12s ease-in-out infinite; }
.ci-home-hero__bg .b1 { width: 420px; height: 420px; left: -160px; top: -120px; background: radial-gradient(circle, rgba(236, 117, 58, .28), transparent 70%); }
.ci-home-hero__bg .b2 { width: 520px; height: 520px; right: -200px; bottom: -220px; background: radial-gradient(circle, rgba(3, 109, 0, .22), transparent 70%); animation-delay: -4s; }
.ci-home-hero__bg .b3 { width: 200px; height: 200px; left: 45%; top: 10%; background: radial-gradient(circle, rgba(236, 117, 58, .18), transparent 70%); animation-delay: -8s; }
.ci-home-hero__grid { position: absolute; right: 4%; top: 6%; width: 340px; height: 340px; opacity: .9; animation: ciSpin 120s linear infinite; }

.ci-home-hero .hero-main-viewport { overflow: hidden; position: relative; z-index: 1; }
.ci-home-hero .hero-main-track { display: flex; transition: transform .9s var(--ci-ease); will-change: transform; }
.ci-home-hero .hero-main-slide { flex: 0 0 100%; max-width: 100%; padding: 20px 0; }

.ci-home-hero__text > * { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ci-ease), transform .8s var(--ci-ease); }
.hero-main-slide.is-active .ci-home-hero__text > * { opacity: 1; transform: none; }
.hero-main-slide.is-active .ci-home-hero__text > *:nth-child(2) { transition-delay: .12s; }
.hero-main-slide.is-active .ci-home-hero__text > *:nth-child(3) { transition-delay: .24s; }
.hero-main-slide.is-active .ci-home-hero__text > *:nth-child(4) { transition-delay: .36s; }
.hero-main-slide.is-active .ci-home-hero__text > *:nth-child(5) { transition-delay: .48s; }

.ci-home-hero__toptext { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: #fff; box-shadow: 0 8px 22px rgba(19, 35, 15, .08); color: var(--ci-green); font-weight: 700; font-size: 13px; letter-spacing: .02em; margin-bottom: 18px; max-width: 100%; }
.ci-home-hero__toptext .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ci-orange); flex: 0 0 auto; animation: ciHot 1.8s infinite; }
.ci-home-hero__small { display: block; color: var(--ci-orange); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin-bottom: 10px; }
.ci-home-hero__title { font-family: var(--ci-heading-font); font-size: clamp(32px, 4.6vw, 58px); line-height: 1.08; font-weight: 800; color: var(--ci-ink); margin: 0 0 18px; letter-spacing: -.02em; }
.ci-home-hero__desc { font-size: 17.5px; color: var(--ci-muted); max-width: 560px; margin-bottom: 28px; }
.ci-home-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.ci-home-hero__visual { position: relative; max-width: 520px; margin: 0 auto; padding: 30px; }
.ci-home-hero__visual .ring { position: absolute; inset: 0; border-radius: 46% 54% 52% 48% / 45% 45% 55% 55%; border: 3px dashed rgba(236, 117, 58, .45); animation: ciSpin 40s linear infinite; }
.ci-home-hero__img { position: relative; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; overflow: hidden; background: linear-gradient(135deg, var(--ci-orange), var(--ci-green)); box-shadow: 0 30px 70px rgba(19, 35, 15, .2); aspect-ratio: 1 / 1; animation: ciMorph 14s ease-in-out infinite; }
.ci-home-hero__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s ease-out; }
.hero-main-slide.is-active .ci-home-hero__img img { transform: scale(1); }
@keyframes ciMorph { 0%, 100% { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; } 50% { border-radius: 55% 45% 42% 58% / 52% 58% 42% 48%; } }

.ci-float-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 16px 34px rgba(19, 35, 15, .16); backdrop-filter: blur(6px); font-size: 13px; }
.ci-float-card i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--ci-orange); }
.ci-float-card strong { display: block; font-size: 20px; font-family: var(--ci-heading-font); color: var(--ci-ink); line-height: 1; }
.ci-float-card span { color: var(--ci-muted); }
.ci-float-card--1 { left: -10px; top: 18%; animation: ciBob 6s ease-in-out infinite; }
.ci-float-card--2 { right: -14px; bottom: 20%; animation: ciBob 7s ease-in-out infinite reverse; }
.ci-float-card--2 i { background: var(--ci-green); }
.ci-float-card--3 { left: 18%; bottom: 0; font-weight: 700; color: var(--ci-ink); animation: ciBob 8s ease-in-out infinite; animation-delay: -2s; }
.ci-float-card--3 .flag { display: inline-flex; width: 30px; height: 20px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px #eee; }
.ci-float-card--3 .flag b { flex: 1; } .flag b:nth-child(1) { background: var(--ci-orange); } .flag b:nth-child(2) { background: #fff; } .flag b:nth-child(3) { background: var(--ci-green); }

.ci-home-hero .hero-main-controls { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; z-index: 3; }
.ci-home-hero .hero-main-prev, .ci-home-hero .hero-main-next { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ci-orange) !important; background: #fff !important; color: var(--ci-orange) !important; font-size: 24px; line-height: 1; transition: all .25s; }
.ci-home-hero .hero-main-prev:hover, .ci-home-hero .hero-main-next:hover { background: var(--ci-orange) !important; color: #fff !important; }
.ci-home-hero .hero-main-prev:disabled, .ci-home-hero .hero-main-next:disabled { opacity: .35; }
.ci-home-hero .hero-main-dots { display: flex; gap: 8px; }
.ci-home-hero .hero-main-dot { width: 10px; height: 10px; border-radius: 99px; border: 0; padding: 0; background: #d9cfc8 !important; transition: all .35s var(--ci-ease); }
.ci-home-hero .hero-main-dot.is-active { width: 34px; background: var(--ci-flag) !important; }

@media (max-width: 991px) {
  .ci-home-hero { padding: 30px 0 80px; }
  .ci-home-hero__visual { max-width: 400px; }
  .ci-float-card--1 { left: 0; } .ci-float-card--2 { right: 0; }
}
@media (max-width: 575px) {
  .ci-float-card { padding: 8px 10px; font-size: 11.5px; }
  .ci-float-card i { width: 32px; height: 32px; font-size: 16px; }
  .ci-float-card strong { font-size: 16px; }
  .ci-home-hero__desc { font-size: 15.5px; }
}

/* ---------- CHIFFRES CLÉS ---------- */
.ci-stats-band { position: relative; z-index: 2; margin-top: -40px; }
.ci-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 24px; box-shadow: 0 24px 60px rgba(19, 35, 15, .12); overflow: hidden; position: relative; }
.ci-stats::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--ci-flag); }
.ci-stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 16px 26px; position: relative; color: var(--ci-ink); transition: background .3s; }
.ci-stat + .ci-stat::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: #eee; }
.ci-stat:hover { background: var(--ci-orange-soft); color: var(--ci-ink); }
.ci-stat__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; margin-bottom: 12px; color: #fff; background: linear-gradient(135deg, var(--ci-orange), var(--ci-orange-dark)); box-shadow: 0 10px 22px rgba(236, 117, 58, .35); transition: transform .4s var(--ci-ease); }
.ci-stat:nth-child(even) .ci-stat__icon { background: linear-gradient(135deg, var(--ci-green-2), var(--ci-green)); box-shadow: 0 10px 22px rgba(3, 109, 0, .3); }
.ci-stat:hover .ci-stat__icon { transform: translateY(-6px) rotate(-8deg); }
.ci-stat__value { font-family: var(--ci-heading-font); font-size: 38px; font-weight: 800; line-height: 1; }
.ci-stat__label { color: var(--ci-muted); font-size: 14px; margin-top: 6px; }
@media (max-width: 767px) {
  .ci-stats { grid-template-columns: repeat(2, 1fr); }
  .ci-stat:nth-child(3)::before { display: none; }
  .ci-stat__value { font-size: 30px; }
}

/* ---------- PARCOURS ---------- */
.ci-parcours-card { display: flex; flex-direction: column; height: 100%; padding: 30px 28px; border-radius: 24px; background: #fff; box-shadow: var(--ci-shadow); position: relative; overflow: hidden; color: var(--ci-ink); transition: transform .45s var(--ci-ease), box-shadow .45s var(--ci-ease), color .3s; isolation: isolate; }
.ci-parcours-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .45s var(--ci-ease); }
.ci-parcours-card--orange::before { background: linear-gradient(140deg, var(--ci-orange), var(--ci-orange-dark)); }
.ci-parcours-card--green::before { background: linear-gradient(140deg, var(--ci-green-2), #024d00); }
.ci-parcours-card:hover { transform: translateY(-10px); box-shadow: var(--ci-shadow-hover); color: #fff; }
.ci-parcours-card:hover::before { opacity: 1; }
.ci-parcours-card__num { position: absolute; right: 22px; top: 14px; font-family: var(--ci-heading-font); font-weight: 800; font-size: 54px; color: rgba(19, 35, 15, .05); transition: color .4s; line-height: 1; }
.ci-parcours-card:hover .ci-parcours-card__num { color: rgba(255, 255, 255, .18); }
.ci-parcours-card__icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; font-size: 32px; margin-bottom: 22px; transition: all .45s var(--ci-ease); }
.ci-parcours-card--orange .ci-parcours-card__icon { background: var(--ci-orange-soft); color: var(--ci-orange); }
.ci-parcours-card--green .ci-parcours-card__icon { background: var(--ci-green-soft); color: var(--ci-green); }
.ci-parcours-card:hover .ci-parcours-card__icon { background: rgba(255, 255, 255, .2); color: #fff; transform: rotate(-10deg) scale(1.08); }
.ci-parcours-card__icon i { animation: ciFloat 4s ease-in-out infinite; }
.ci-parcours-card h3 { font-family: var(--ci-heading-font); font-size: 21px; font-weight: 700; margin-bottom: 10px; color: inherit; transition: color .3s; }
.ci-parcours-card p { color: var(--ci-muted); font-size: 15px; margin-bottom: 22px; transition: color .3s; }
.ci-parcours-card:hover p, .ci-parcours-card:hover h3 { color: #fff; }
.ci-parcours-card__cta { margin-top: auto; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; color: var(--ci-orange); transition: color .3s, gap .3s; }
.ci-parcours-card--green .ci-parcours-card__cta { color: var(--ci-green); }
.ci-parcours-card:hover .ci-parcours-card__cta { color: #fff; gap: 14px; }

/* ---------- SECTIONS ---------- */
.ci-concours-home { padding: 70px 0 40px; background: linear-gradient(180deg, transparent, #fff 30%, #fff 70%, transparent); }

/* ---------- CTA ---------- */
.ci-cta { padding: 30px 0 10px; }
.ci-cta__box { position: relative; overflow: hidden; border-radius: 30px; padding: 54px 50px; color: #fff; background: linear-gradient(120deg, var(--ci-orange-dark) 0%, var(--ci-orange) 35%, #6a8d2c 65%, var(--ci-green) 100%); background-size: 200% 200%; animation: ciGradientMove 14s ease infinite; box-shadow: 0 30px 60px rgba(236, 117, 58, .3); }
.ci-cta__box h2 { color: #fff !important; font-family: var(--ci-heading-font); font-weight: 800; font-size: clamp(26px, 3vw, 38px); margin-bottom: 10px; }
.ci-cta__box p { color: rgba(255, 255, 255, .9); font-size: 17px; margin: 0; max-width: 640px; }
.ci-cta__shapes span { position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); }
.ci-cta__shapes span:nth-child(1) { width: 260px; height: 260px; right: -60px; top: -120px; animation: ciSpin 24s linear infinite; border-style: dashed; }
.ci-cta__shapes span:nth-child(2) { width: 140px; height: 140px; left: 40%; bottom: -80px; background: rgba(255, 255, 255, .08); border: 0; animation: ciBob 8s ease-in-out infinite; }
.ci-cta__shapes span:nth-child(3) { width: 18px; height: 18px; left: 6%; top: 18%; background: #fff; border: 0; animation: ciBob 5s ease-in-out infinite; }
@media (max-width: 575px) { .ci-cta__box { padding: 36px 24px; } }
