/* =====================================================================
   JC Formation — page d'accueil : couche graphique moderne
   Chargée uniquement par index.html, après style.css et responsive.css.
   Toutes les règles sont préfixées par body.home : les autres pages ne
   sont pas touchées. Palette, rayons et ombres sont des variables CSS.
   ===================================================================== */

html.home-page,
html:has(body.home) {
  font-size: 100% !important; /* neutralise les 90 % / 80 % de responsive.css */
  scroll-behavior: smooth;
}

body.home {
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e8ed;
  --soft: #f7f8fa;
  --card: #ffffff;
  --red: #b00300;
  --red-dk: #8f0200;
  --red-lt: #fbeaea;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06), 0 4px 14px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 14px 34px rgba(17, 24, 39, 0.11);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

body.home section > br {
  display: none;
}
body.home h1,
body.home h2,
body.home h3,
body.home h4 {
  font-family: inherit;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: none; /* les titres en capitales du reste du site restent inchangés */
  margin: 0;
}
body.home p {
  margin: 0;
}
body.home img {
  max-width: 100%;
}

/* Le header et le footer existants adoptent la même police */
body.home .jcnav-link,
body.home .jcnav-cta,
body.home .jcnav-drawer li a,
body.home .jc-footer {
  font-family: "Inter", system-ui, sans-serif !important;
}

/* ---------- Mise en page commune ---------- */
body.home .wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
body.home .sec {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  scroll-margin-top: 90px;
}
body.home .sec--soft {
  background: var(--soft);
}

body.home .sec-head {
  max-width: 720px;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
body.home .sec-head--left {
  margin: 0;
  text-align: left;
}
body.home .sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}
body.home .sec-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}
body.home .sec-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  text-transform: none;
}
body.home .sec-head p {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--muted);
  width: auto;
  padding: 0;
}
body.home .sec-head p strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Boutons ---------- */
body.home .btn-jc {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}
body.home .btn-jc--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(176, 3, 0, 0.25);
}
body.home .btn-jc--primary:hover {
  background: var(--red-dk);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(176, 3, 0, 0.32);
}
/* Lien secondaire du hero : texte seul, sans bordure ni fond */
body.home .btn-jc--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: transparent;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
body.home .btn-jc--ghost i {
  transition: transform 0.25s var(--ease);
}
body.home .btn-jc--ghost:hover {
  background: transparent;
  border-color: transparent;
  color: #fff;
  transform: none;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}
body.home .btn-jc--ghost:hover i {
  transform: translateY(3px);
}
body.home .btn-jc:focus-visible {
  outline: 3px solid rgba(176, 3, 0, 0.35);
  outline-offset: 2px;
}

/* ---------- Bandeau avis Google ---------- */
body.home .banner {
  height: auto;
  min-height: 0;
  padding: 0.6rem 1rem;
  background: #0b0d0c;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
body.home .banner a {
  color: #ff8a80 !important;
  font-weight: 600 !important;
  margin: 0 0.25rem !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 138, 128, 0.45);
  transition: color 0.2s, border-color 0.2s;
}
body.home .banner a:hover {
  color: #fff !important;
  border-color: #fff;
}

/* ---------- Hero ---------- */
body.home .hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0b0d0c;
  color: #fff;
}
body.home .hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../img/banner6.jpg") center / cover no-repeat;
  transform: scale(1.08);
  animation: jc-hero-zoom 16s var(--ease) forwards;
}
body.home .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(8, 10, 9, 0.94) 0%,
    rgba(8, 10, 9, 0.8) 45%,
    rgba(8, 10, 9, 0.4) 100%
  );
}
@keyframes jc-hero-zoom {
  to {
    transform: scale(1);
  }
}
body.home .hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7.5rem) 1.5rem clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 3rem;
  align-items: center;
  min-height: min(78vh, 720px);
}
body.home .hero__title {
  color: #fff;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 640px;
}
body.home .hero__lead {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
}
body.home .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.1rem;
}
body.home .hero__stats {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
body.home .hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
body.home .hero__stats strong {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
body.home .hero__stats li > span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}
body.home .hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
body.home .hero__visual img {
  width: min(100%, 380px);
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
  animation: jc-float 7s ease-in-out infinite;
}
@keyframes jc-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ---------- Cartes formations ---------- */
body.home .cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
body.home .card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s;
}
/* Survol sobre : légère élévation, ombre plus douce, bordure teintée ; les icônes ne bougent pas */
body.home .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(176, 3, 0, 0.28);
}
/* Photo de la formation en tête de carte */
body.home .card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
@supports not (aspect-ratio: 1) {
  body.home .card__media {
    height: 170px;
  }
}
body.home .card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
body.home .card:hover .card__media img {
  transform: scale(1.03);
}
body.home .card__title {
  font-size: 1.2rem;
  margin: 1.5rem 1.75rem 0.6rem;
}
body.home .card__text {
  flex: 1;
  margin: 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}
body.home .card__text strong {
  color: var(--text);
  font-weight: 600;
}
body.home .card__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5rem;
  margin: 1.1rem 1.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--red);
  text-decoration: none;
}
body.home .card__link::after {
  content: "";
  position: absolute;
  inset: 0; /* toute la carte est cliquable */
}
body.home .card__link i {
  transition: transform 0.25s var(--ease);
}
body.home .card:hover .card__link i {
  transform: translateX(4px);
}

/* ---------- Qui sommes-nous ---------- */
body.home .about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: center;
}
body.home .about-grid .btn-jc {
  margin-top: 1.75rem;
}
body.home .features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
body.home .feature {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
body.home .feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}
/* Numérotation éditoriale 01 à 04, soulignée d'un filet */
body.home .feature__num {
  display: block;
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
body.home .feature h3 {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
}
body.home .feature p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Indicateurs ---------- */
body.home .kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
body.home .kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 1.5rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
body.home .kpi strong {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
body.home .kpi > span {
  font-size: 0.88rem;
  color: var(--muted);
}
body.home .chart-card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
body.home .chart-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
}
body.home .chart-card__head h3 {
  font-size: 1.1rem;
}
body.home .chart-card__head p {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 520px;
}
body.home .chart-card__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
body.home .chart-card__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
body.home .chart-card__legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--c);
}
body.home .chart-card__canvas {
  position: relative;
  height: 380px;
}

/* ---------- Mot du gérant ---------- */
body.home .founder {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  max-width: 1040px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
body.home .founder__media {
  position: relative;
  min-height: 380px;
}
body.home .founder__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
body.home .founder__body {
  position: relative;
  padding: clamp(1.75rem, 4vw, 3rem);
}
body.home .founder__quote {
  display: block;
  font-size: 1.6rem;
  color: var(--red);
  margin-bottom: 1rem;
}
body.home .founder__body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}
body.home .founder__body p + p {
  margin-top: 1rem;
}
body.home .founder__strong {
  padding-left: 1rem;
  border-left: 3px solid var(--red);
  font-weight: 600;
  color: var(--ink);
}
body.home .founder__sign {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1.75rem;
}
body.home .founder__sign strong {
  font-size: 1.05rem;
  color: var(--ink);
}
body.home .founder__sign span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Accessibilité ---------- */
body.home .access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}
body.home .access-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
body.home .access-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 104px;
  padding: 1rem;
  background: #fff; /* même fond que le reste de la carte */
  border-radius: 12px;
}
body.home .access-card__media img {
  max-height: 64px;
  width: auto;
  max-width: 100%;
}
body.home .access-card__media--logos img {
  max-height: 72px;
}
body.home .access-card h3 {
  font-size: 1.1rem;
}
body.home .access-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- Partenaires + appel à l'action ---------- */
body.home .partners {
  padding-bottom: 0;
}
body.home .partners .sec-head {
  margin-bottom: 2.5rem;
}
body.home .cta-strip {
  max-width: 1180px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem 4.5rem;
}
body.home .cta-strip__box {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(120deg, #0b0d0c, #1a1d1c 60%, #26292a);
  color: #fff;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.22);
}
body.home .cta-strip__box::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -140px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}
body.home .cta-strip__box h2 {
  color: #fff;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
}
body.home .cta-strip__box p {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
}
body.home .cta-strip__box > * {
  position: relative;
}

/* ---------- Apparitions au scroll (classe .js posée par le script) ---------- */
html.js body.home [data-reveal]:not(.is-visible) {
  opacity: 0;
}
html.js body.home [data-reveal].is-visible {
  animation: jc-reveal 0.75s var(--ease) backwards;
  animation-delay: var(--d, 0s);
}
@keyframes jc-reveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  body.home .cards-grid,
  body.home .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.home .hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  body.home .hero__visual {
    display: none;
  }
}
@media (max-width: 860px) {
  body.home .about-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  body.home .founder {
    grid-template-columns: 1fr;
  }
  body.home .founder__media {
    min-height: 320px;
  }
  body.home .access-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  body.home .cards-grid,
  body.home .features {
    grid-template-columns: 1fr;
  }
  body.home .kpis {
    gap: 0.9rem;
  }
  body.home .kpi {
    padding: 1.2rem 1.1rem;
  }
  body.home .kpi strong {
    font-size: 1.7rem;
  }
  body.home .hero__stats {
    gap: 1.25rem 1.75rem;
  }
  body.home .hero__stats strong {
    font-size: 1.6rem;
  }
  body.home .btn-jc {
    width: 100%;
    justify-content: center;
  }
  body.home .cta-strip .btn-jc {
    width: auto;
  }
  body.home .chart-card {
    padding: 1.25rem 1rem;
  }
  body.home .chart-card__canvas {
    height: 320px;
  }
}

/* ---------- Préférence « réduire les animations » ---------- */
@media (prefers-reduced-motion: reduce) {
  html.home-page,
  html:has(body.home) {
    scroll-behavior: auto;
  }
  html.js body.home [data-reveal]:not(.is-visible) {
    opacity: 1;
  }
  html.js body.home [data-reveal].is-visible {
    animation: none;
  }
  body.home .hero__bg,
  body.home .hero__visual img {
    animation: none;
    transform: none;
  }
  body.home .card,
  body.home .card__media img,
  body.home .feature,
  body.home .btn-jc {
    transition: none;
  }
}
