/* ==========================================================================
   Page d'accueil — Institut UWEZO (premium, sobre)
   ========================================================================== */

.home-page {
  --home-ink: #111827;
  --home-muted: #6b7280;
  --home-line: #e5e7eb;
  --home-surface: #f8fafc;
  --home-accent: #BF5700;
  --home-accent-soft: rgba(191, 87, 0, 0.12);
  --home-radius: 1.25rem;
  --home-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  --home-section-y: clamp(2.25rem, 4.5vw, 3.5rem);
  --home-head-gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* ---- HERO ---- */
.home-hero {
  position: relative;
  min-height: clamp(460px, 72vh, 640px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.home-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: homeHeroZoom 22s ease-in-out infinite alternate;
}

@keyframes homeHeroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.35) 68%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 45%);
}

.home-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, black 30%, transparent 85%);
}

.home-hero__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 87, 0, 0.22) 0%, transparent 70%);
  top: -120px;
  right: -80px;
  z-index: 1;
  pointer-events: none;
}

.home-hero__container {
  position: relative;
  z-index: 2;
  padding: clamp(3.5rem, 6vw, 4.5rem) 0 clamp(3rem, 5vw, 3.75rem);
}

.home-hero__content {
  max-width: 640px;
}

.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.home-hero__eyebrow i {
  color: #fdba74;
  font-size: 0.85rem;
}

.home-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

.home-hero__title em {
  font-style: normal;
  color: #fdba74;
}

.home-hero__lead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.25rem;
  max-width: 520px;
  min-height: 2.8em;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

.home-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.home-hero__btn--primary {
  background: var(--home-accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(191, 87, 0, 35%);
}

.home-hero__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(191, 87, 0, 45%);
  color: #fff;
}

.home-hero__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.home-hero__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-2px);
}

.home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.home-hero__stat strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.home-hero__stat span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-hero__card {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(3.5rem, 8vw, 4.5rem);
  z-index: 2;
  width: min(280px, 34vw);
  padding: 1rem 1.15rem;
  border-radius: var(--home-radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: none;
}

@media (min-width: 992px) {
  .home-hero__card {
    display: block;
    animation: homeFloatCard 6s ease-in-out infinite;
  }
}

@keyframes homeFloatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.home-hero__card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--home-accent);
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}

.home-hero__card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.home-hero__card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  line-height: 1.5;
}

.home-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}

.home-hero__wave svg {
  display: block;
  width: 100%;
  height: 40px;
}

/* ---- Sections communes ---- */
.home-section {
  padding: var(--home-section-y) 0;
}

.home-section--muted {
  background: var(--home-surface);
}

/* 1re section après le hero : moins d'espace en haut (la vague compte déjà) */
.home-features {
  background: #fff;
  padding-top: clamp(1.75rem, 3vw, 2.5rem);
}

.home-section--cta {
  padding-top: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(2rem, 4vw, 2.75rem);
}

.home-section-head {
  max-width: 560px;
  margin: 0 auto var(--home-head-gap);
  text-align: center;
}

.home-section-head--left {
  text-align: left;
  margin: 0 0 0.85rem;
}

.home-section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--home-accent);
  margin-bottom: 0.65rem;
}

.home-section-title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--home-ink) !important;
  background: none !important;
  -webkit-text-fill-color: var(--home-ink) !important;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  line-height: 1.2;
}

.home-section-desc {
  color: var(--home-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0;
}

.feature-card {
  background: #fff;
  padding: 1.35rem 1.25rem;
  border-radius: var(--home-radius);
  border: 1px solid var(--home-line);
  box-shadow: 0 4px 20px rgba(17, 24, 39, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-align: left;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--home-shadow);
  border-color: rgba(191, 87, 0, 0.2);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--home-accent);
  background: var(--home-accent-soft);
  margin-bottom: 0.85rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: var(--home-accent);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--home-ink);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--home-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}

/* ---- About ---- */
.home-about__image-wrap {
  position: relative;
  border-radius: calc(var(--home-radius) + 4px);
  overflow: hidden;
  box-shadow: var(--home-shadow);
}

.home-about__image-wrap img {
  width: 100%;
  display: block;
  border-radius: calc(var(--home-radius) + 4px);
}

.home-about__badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.home-about__badge strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--home-accent);
  line-height: 1;
}

.home-about__badge span {
  font-size: 0.78rem;
  color: var(--home-muted);
  font-weight: 600;
}

#about .lead {
  color: var(--home-ink);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

#about p {
  color: var(--home-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.home-page #about .uw-identite__badges {
  margin: 0.5rem 0 0.75rem;
  gap: 0.4rem;
}

.home-page #about .uw-identite__badges li {
  font-size: 0.72rem;
  padding: 0.32rem 0.7rem;
}

.counter-box {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid var(--home-line);
  transition: border-color 0.25s ease;
}

.counter-box:hover {
  border-color: rgba(191, 87, 0, 0.25);
  transform: none;
  box-shadow: none;
}

.counter-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--home-accent);
  background: none;
  -webkit-text-fill-color: var(--home-accent);
}

.counter-label {
  font-size: 0.78rem;
  color: var(--home-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Filières ---- */
.section-card {
  background: #fff;
  border-radius: var(--home-radius);
  border: 1px solid var(--home-line);
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.04);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.section-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--home-shadow);
  color: inherit;
}

.section-card-image {
  height: 168px;
  overflow: hidden;
}

.section-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.section-card:hover .section-card-image img {
  transform: scale(1.06);
}

.section-card-body {
  padding: 1.15rem 1.25rem;
  text-align: left;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.section-card-icon {
  font-size: 1.25rem;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--home-accent-soft);
  color: var(--home-accent);
  margin-bottom: 1rem;
}

.section-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--home-ink);
  margin-bottom: 0.5rem;
}

.section-card-body .mt-auto {
  color: var(--home-accent);
  font-weight: 600;
  font-size: 0.88rem;
}

/* ---- Blog ---- */
.blog-card {
  border-radius: var(--home-radius);
  overflow: hidden;
  min-height: 300px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--home-shadow);
}

.blog-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover img {
  transform: scale(1.05);
}

.blog-card-content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  color: #fff;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.4) 55%, transparent 100%);
  padding: 1.15rem 1.25rem;
}

.blog-card-date {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  text-align: center;
  line-height: 1.1;
  font-weight: 700;
  background: #fff;
  color: var(--home-ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog-card-date .day {
  display: block;
  font-size: 1.35rem;
  color: var(--home-accent);
}

.blog-card-date .month {
  font-size: 0.7rem;
  text-transform: uppercase;
}

.blog-card-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: #fdba74;
}

.blog-card-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

.blog-card-read-more {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.35s ease;
  text-align: right;
}

.blog-card:hover .blog-card-read-more {
  max-height: 48px;
  opacity: 1;
  margin-top: 0.85rem;
}

/* ---- Témoignages ---- */
.testimonial-card {
  background: #fff;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.05);
  padding: 2rem 1.35rem 1.35rem;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  box-shadow: var(--home-shadow);
  transform: translateY(-4px);
}

.testimonial-avatar {
  border-color: var(--home-line);
}

.testimonial-role {
  color: var(--home-accent);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.testimonial-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.12);
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
}

.testimonial-card p {
  font-style: italic;
  color: var(--home-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 1rem 0;
  flex-grow: 1;
}

.testimonial-quote-icon {
  font-size: 1.5rem;
  color: var(--home-accent);
  opacity: 0.15;
}

.testimonial-author {
  font-weight: 700;
  color: var(--home-ink);
  font-size: 1rem;
}

#testimonials .row > [class*="col-"] {
  padding-top: 1.5rem;
}

#testimonials .home-section-head {
  margin-bottom: 0.5rem;
}

/* ---- CTA ---- */
.home-cta {
  background: var(--home-ink);
  border-radius: calc(var(--home-radius) + 4px);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
}

.home-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(191, 87, 0, 25%) 0%, transparent 70%);
  pointer-events: none;
}

.home-cta__title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

.home-cta__desc {
  color: rgba(255, 255, 255, 0.72);
  max-width: 480px;
  margin: 0 auto 1.15rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-cta .home-hero__btn--primary {
  position: relative;
}

/* ---- Boutons page accueil ---- */
.home-page .home-hero__btn,
.home-page .inscrire_btn,
.home-page .btn_2,
.home-page .btn3 {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto !important;
  height: auto !important;
  min-height: 48px;
  padding: 0.85rem 1.75rem !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.home-page a.home-hero__btn--primary,
.home-page a.home-hero__btn--primary:hover,
.home-page a.home-hero__btn--primary:focus,
.home-page .inscrire_btn,
.home-page .inscrire_btn:hover,
.home-page .inscrire_btn:focus,
.home-page button.inscrire_btn,
.home-page button.inscrire_btn:hover {
  background: var(--home-accent) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  box-shadow: 0 8px 22px rgba(191, 87, 0, 0.28);
}

.home-page a.home-hero__btn--primary:hover,
.home-page .inscrire_btn:hover,
.home-page button.inscrire_btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(191, 87, 0, 0.38);
  color: #fff !important;
}

.home-page a.home-hero__btn--ghost,
.home-page a.home-hero__btn--ghost:hover,
.home-page a.home-hero__btn--ghost:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.home-page a.home-hero__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  transform: translateY(-2px);
}

.home-page .btn_2,
.home-page button.btn_2 {
  background: transparent !important;
  color: var(--home-accent) !important;
  -webkit-text-fill-color: var(--home-accent) !important;
  border: 2px solid var(--home-accent) !important;
  box-shadow: none !important;
}

.home-page .btn_2:hover,
.home-page button.btn_2:hover:not(:disabled) {
  background: var(--home-accent) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(191, 87, 0, 0.22) !important;
}

.home-page .btn_2:disabled,
.home-page button.btn_2:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.home-page .btn3 {
  min-height: auto;
  padding: 0.45rem 1rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--home-ink) !important;
  -webkit-text-fill-color: var(--home-ink) !important;
  background: #fff !important;
  border: none !important;
  box-shadow: none;
}

.home-page .btn3:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: var(--home-ink) !important;
}

.section-subtitle {
  max-width: 560px;
  margin: 0 auto;
  color: var(--home-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  font-weight: 800;
  color: var(--home-ink) !important;
  background: none !important;
  -webkit-text-fill-color: var(--home-ink) !important;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-title::after {
  display: none;
}

.section_padding {
  padding: var(--home-section-y) 0;
}

#testimonialModal .modal-content {
  border-radius: var(--home-radius);
  border: none;
  overflow: hidden;
}

#testimonialModal .modal-body {
  padding: 1.75rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--home-accent);
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

#testimonialModal .modal-header {
  background: var(--home-ink) !important;
}

#testimonialModal .modal-header .btn-close {
  filter: invert(1);
}

@media (max-width: 767.98px) {
  .home-hero {
    min-height: auto;
  }
  .home-hero__container {
    padding: 3rem 0 2.75rem;
  }
  .home-hero__stats {
    gap: 0.75rem 1.25rem;
  }
  .home-hero__stat strong {
    font-size: 1.2rem;
  }
  .home-section {
    padding: 2rem 0;
  }
  .home-features {
    padding-top: 1.5rem;
  }
  .home-section-head {
    margin-bottom: 1.15rem;
  }
  .blog-card {
    min-height: 280px;
  }
}
