/* Homepage composition only. The shared design system and interior pages stay independent. */
.home-hero-fallback { padding-block: clamp(3rem, 6vw, 6rem); }
.home-hero-fallback h1 { max-width: 14ch; color: var(--jc-blue-dark); font-size: clamp(2.8rem, 5vw, 5.5rem); }
.home-hero-fallback h1 em { color: #9d8311; }
.page-home .hero {
    position: relative;
    padding: clamp(3rem, 5vw, 5.5rem) 0 clamp(5rem, 8vw, 8rem);
    background: radial-gradient(circle at 92% 12%, #e6ddc2, transparent 29%), var(--jc-off-white);
    overflow: hidden;
}
.page-home .hero-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    min-height: min(68vw, 780px);
    position: relative;
}
.page-home .hero-copy {
    display: block;
    grid-column: 1 / 8;
    grid-row: 1;
    z-index: 2;
    padding: clamp(1.6rem, 3vw, 3rem) 0 0;
}
.page-home .hero-copy > .eyebrow { margin: 0 0 2rem; }
.page-home .hero h1 {
    max-width: 11ch;
    font-size: clamp(3.5rem, 6.6vw, 7.8rem);
    line-height: .96;
    letter-spacing: -.075em;
}
.page-home .hero h1 em { color: #9d8311; }
.page-home .hero-intro {
    max-width: 26.5rem;
    margin-top: clamp(2rem, 3vw, 3rem);
    padding: 1.3rem 1.6rem 1.6rem 0;
    background: var(--jc-off-white);
    border-radius: 0 1rem 1rem 0;
}
.page-home .hero .lead { max-width: 25rem; }
.page-home .hero .button-group { display: flex; flex-wrap: wrap; }
.page-home .hero .button { white-space: nowrap; }
.page-home .hero-art {
    grid-column: 5 / -1;
    grid-row: 1;
    z-index: 1;
    margin-top: clamp(11rem, 17vw, 16rem);
    padding: 0 0 0 1rem;
}
.page-home .hero-art::before {
    display: block;
    inset: -1rem -1rem 2.2rem 2rem;
    border: 1px solid rgb(157 131 17 / 70%);
    border-radius: 2rem 11rem 2rem 2rem;
}
.page-home .hero-image {
    aspect-ratio: 1.6;
    border-radius: 1.5rem 9rem 1.5rem 1.5rem;
    box-shadow: 0 32px 70px rgb(17 43 117 / 14%);
}
.page-home .hero-image img { object-position: 55% center; }
.page-home .hero-image-overlay { left: 2.5rem; bottom: 3.8rem; }
.page-home .art-caption { max-width: 37rem; margin-left: auto; }
.page-home .hero-scroll {
    grid-column: 1 / 5;
    grid-row: 1;
    align-self: end;
    margin-bottom: 4.4rem;
}

.home-value-strip {
    position: relative;
    z-index: 3;
    margin-top: -3.4rem;
    background: transparent;
}
.home-value-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 1.1rem;
    border: 1px solid var(--jc-border);
    border-radius: 1.45rem;
    background: white;
    box-shadow: 0 20px 45px rgb(17 43 117 / 8%);
}
.home-value {
    min-width: 0;
    display: flex;
    gap: .95rem;
    padding: 1.25rem;
    align-items: flex-start;
}
.home-value + .home-value { border-left: 1px solid var(--jc-border); }
.home-value-icon {
    width: 2.85rem;
    height: 2.85rem;
    flex: 0 0 2.85rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--jc-blue-dark);
    color: var(--jc-gold-light);
}
.home-value-icon svg { width: 1.2rem; height: 1.2rem; }
.home-value h2 { margin: 0 0 .35rem; color: var(--jc-blue-dark); font-size: .95rem; line-height: 1.2; }
.home-value p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }

.page-home .home-about { padding-top: clamp(6rem, 9vw, 10rem); }
.page-home .home-about-grid { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
.page-home .home-about-copy .eyebrow { margin-bottom: 1.4rem; }
.page-home .home-about-copy h2 { max-width: 12ch; }
.page-home .home-about-visual::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 1.2rem -1.2rem -1.2rem 1.2rem;
    border: 1px solid var(--jc-gold-dark);
    border-radius: 1.6rem;
}
.page-home .home-about-visual img { position: relative; z-index: 1; }
.page-home .home-about-visual figcaption { position: relative; z-index: 1; }

.page-home .home-services { padding-block: clamp(5rem, 8vw, 9rem); }
.home-services-intro {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
    margin-bottom: clamp(3rem, 5vw, 5rem);
}
.home-services-intro .section-heading { display: block; margin: 0; }
.home-services-intro .section-heading h2 { max-width: 11ch; }
.home-services-intro .section-heading > p { max-width: 28rem; margin-top: 1.4rem; }
.home-services-overview { margin: 0; min-width: 0; }
.home-services-overview img {
    display: block;
    width: 100%;
    aspect-ratio: 1.85;
    object-fit: cover;
    border-radius: 1.5rem;
}
.home-services-overview figcaption { color: var(--muted); font-size: .68rem; margin-top: .6rem; text-align: right; }
.page-home .services-grid-editorial { gap: 1.15rem; }
.page-home .services-grid-editorial > .service-card:nth-child(-n+3) .media { aspect-ratio: 1.5; }
.page-home .services-grid-editorial > .service-card:nth-child(n+4):not(.service-card-accent) .media { aspect-ratio: 1.68; }
.page-home .service-card .card-body { position: relative; }
.page-home .service-card .card-body .text-link {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    align-items: center;
    width: 100%;
}
.page-home .service-card .card-body .text-link span {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    border: 1px solid var(--jc-gold-dark);
    border-radius: 50%;
    color: var(--jc-blue);
    font-size: 1rem;
    transition: background .2s ease, color .2s ease;
}
.page-home .service-card:hover .card-body .text-link span { background: var(--jc-gold); color: var(--jc-blue-dark); }

.page-home .challenges-section { padding-block: clamp(5rem, 8vw, 9rem); }
.page-home .challenge-showcase {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: stretch;
    gap: clamp(2.5rem, 5vw, 5.5rem);
}
.page-home .challenge-showcase .challenge-visual {
    order: 1;
    min-height: 650px;
    margin: 0;
    background: var(--jc-blue-dark);
}
.page-home .challenge-showcase .challenges { order: 2; align-self: center; }
.challenge-base { display: block; width: 100%; height: 100%; object-fit: cover; }
.page-home .challenge-art {
    inset: auto 1.3rem 1.3rem auto;
    width: min(48%, 280px);
    height: auto;
    padding: .55rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 14px 35px rgb(4 4 4 / 20%);
}
.page-home .challenge-art[hidden] { display: none; }
.page-home .challenge-art::after { display: none; }
.page-home .challenge-art .media { width: 100%; height: auto; aspect-ratio: 1.5; border-radius: .7rem; overflow: hidden; }
.page-home .challenge-art .media > img { width: 100%; height: 100%; object-fit: cover; }
.page-home .challenge-art p {
    position: static;
    margin: .6rem .35rem .3rem;
    color: var(--jc-blue-dark);
    font-size: .88rem;
    line-height: 1.3;
}
.page-home .challenge-art p span { color: #735e08; font-size: .54rem; margin: 0 0 .2rem; }
.page-home .challenges details > div { padding-left: 2.8rem; }
.page-home .challenges details > div .text-link { display: inline-flex; margin: .4rem 1.1rem .25rem 0; }

.page-home .home-values { padding-block: clamp(5rem, 8vw, 9rem); }
.home-values-head { max-width: 58rem; margin-bottom: clamp(2.5rem, 5vw, 5rem); }
.page-home .home-values h2 { max-width: 17ch; }
.page-home .home-values h2 em { color: var(--jc-gold-light); }
.home-values-body {
    display: grid;
    grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
.home-values-visual { min-width: 0; margin: 0; }
.home-values-visual img { width: 100%; height: clamp(340px, 37vw, 570px); object-fit: cover; border-radius: 1.5rem; }
.home-values-visual figcaption { color: #c7d2e8; font-size: .68rem; margin-top: .6rem; }
.page-home .home-values .values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.page-home .home-values .values-grid > div {
    display: block;
    min-width: 0;
    min-height: 138px;
    padding: 1.25rem;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 1rem;
    background: rgb(255 255 255 / 5%);
}
.home-values-icon { display: block; color: var(--jc-gold-light); margin-bottom: .7rem; }
.home-values-icon svg { width: 1.4rem; height: 1.4rem; }
.page-home .home-values .values-grid h3 { color: white; font-size: 1rem; margin: 0 0 .4rem; }
.page-home .home-values .values-grid p { color: #d7e0f2; font-size: .74rem; line-height: 1.5; margin: 0; }

.page-home .home-projects, .page-home .home-news { padding-block: clamp(5rem, 8vw, 9rem); }
.page-home .home-projects .cards-grid,
.page-home .home-news .news-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.15rem; }
.page-home .home-projects .cards-grid > .project-card:first-child,
.page-home .home-news .news-grid > .news-card:first-child {
    grid-column: 1;
    grid-row: 1 / span 3;
}
.page-home .home-projects .cards-grid > .project-card:not(:first-child),
.page-home .home-news .news-grid > .news-card:not(:first-child) {
    grid-column: 2;
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1fr);
}
.page-home .home-projects .cards-grid > .project-card:not(:first-child) .media,
.page-home .home-news .news-grid > .news-card:not(:first-child) .media { height: 100%; min-height: 180px; aspect-ratio: auto; }
.page-home .home-projects .cards-grid > .project-card:first-child .media,
.page-home .home-news .news-grid > .news-card:first-child .media { aspect-ratio: 1.5; }
.page-home .home-projects .cards-grid > .project-card:not(:first-child) .card-body,
.page-home .home-news .news-grid > .news-card:not(:first-child) .card-body { padding: 1.1rem; }
.page-home .home-projects .cards-grid > .project-card:not(:first-child) h3,
.page-home .home-news .news-grid > .news-card:not(:first-child) h3 { font-size: 1.05rem; }
.page-home .home-projects .cards-grid > .project-card:only-child,
.page-home .home-news .news-grid > .news-card:only-child { grid-column: 1 / -1; grid-row: auto; }
.page-home .home-projects .cards-grid.count-2 > .project-card:first-child,
.page-home .home-news .news-grid.count-2 > .news-card:first-child { grid-row: 1; }
.page-home .home-projects .cards-grid.count-3 > .project-card:first-child,
.page-home .home-news .news-grid.count-3 > .news-card:first-child { grid-row: 1 / span 2; }
.page-home .home-news .news-grid > .news-card:first-child { display: flex; flex-direction: column; }
/* Le badge À la une ne doit pas réactiver le vieux layout horizontal ni sa
   hauteur 100 %, même avec une seule publication ou trois cartes éditoriales. */
.page-home .home-news .news-grid > .news-card:first-child > .media { width: 100%; height: auto; min-height: 0; flex-shrink: 0; }
.page-home .home-news { background: var(--jc-off-white-cool); }

/* Deux publications ou réalisations : même format vertical pour éviter que la seconde image
   s'étire à la hauteur d'un long titre dans la première carte. La présence
   réelle du badge « À la une » ne doit pas modifier cette composition. */
@media (min-width: 601px) {
    .page-home .home-projects .cards-grid.count-2,
    .page-home .home-news .news-grid.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-home .home-projects .cards-grid.count-2 > .project-card,
    .page-home .home-news .news-grid.count-2 > .news-card { display: flex; flex-direction: column; grid-row: auto; }
    .page-home .home-projects .cards-grid.count-2 > .project-card > .media,
    .page-home .home-news .news-grid.count-2 > .news-card > .media { height: clamp(200px, 22vw, 320px); min-height: 0; aspect-ratio: auto; flex-shrink: 0; }
    .page-home .home-projects .cards-grid.count-2 > .project-card .card-body,
    .page-home .home-news .news-grid.count-2 > .news-card .card-body { padding: clamp(1.4rem, 2vw, 2.2rem); }
    .page-home .home-projects .cards-grid.count-2 > .project-card h3,
    .page-home .home-news .news-grid.count-2 > .news-card h3 { font-size: clamp(1.25rem, 1.6vw, 1.8rem); }
}

.page-home .home-process { background: var(--jc-off-white); }
.page-home .home-process .section { padding-block: clamp(5rem, 8vw, 8rem); }
.page-home .home-process .process-grid { gap: 1rem; }
.page-home .home-process .process-grid li { padding: 1.5rem 1.2rem 1.4rem; border: 1px solid var(--jc-border); border-radius: 1rem; background: white; }
.page-home .home-process .process-grid li::before { background: var(--jc-blue); color: var(--jc-gold-light); border: 0; }
.page-home .home-process .process-grid::before { top: 1.8rem; }

.page-home .home-cta { background: var(--jc-blue-dark); padding-block: clamp(4rem, 7vw, 7rem); }
.home-cta-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.home-cta-copy { position: relative; z-index: 1; }
.page-home .home-cta h2 { max-width: 13ch; }
.page-home .home-cta h2 em { color: var(--jc-gold-light); }
.page-home .home-cta .cta-actions { display: flex; flex-wrap: wrap; margin-top: 2rem; }
.home-cta-visual { margin: 0; }
.home-cta-visual img { display: block; width: 100%; aspect-ratio: 1.15; object-fit: cover; border-radius: 10rem 1.5rem 1.5rem 1.5rem; }
.home-cta-visual figcaption { color: #c7d2e8; font-size: .68rem; margin-top: .6rem; }

@media (max-width: 1100px) {
    .home-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-value:nth-child(3) { border-left: 0; }
    .home-value:nth-child(n+3) { border-top: 1px solid var(--jc-border); }
    .page-home .hero-grid { min-height: 700px; }
    .page-home .hero-copy { grid-column: 1 / 9; }
    .page-home .hero-art { grid-column: 5 / -1; margin-top: 15rem; }
    .page-home .hero-scroll { margin-bottom: 1.5rem; }
    .page-home .challenge-showcase .challenge-visual { min-height: 560px; }
}
@media (max-width: 760px) {
    .page-home .hero { padding-block: 2.5rem 5rem; }
    .page-home .hero-grid { display: block; min-height: 0; }
    .page-home .hero-copy { padding: 0; }
    .page-home .hero h1 { max-width: 11ch; font-size: clamp(3rem, 10vw, 5rem); }
    .page-home .hero-intro { max-width: 36rem; margin-top: 1.6rem; padding: 0; }
    .page-home .hero-art { margin: 2.5rem 0 0; padding: 0; }
    .page-home .hero-art::before { inset: -.6rem -.6rem 1.8rem .6rem; border-radius: 1.2rem 5rem 1.2rem 1.2rem; }
    .page-home .hero-image { aspect-ratio: 1.45; border-radius: 1rem 4rem 1rem 1rem; }
    .page-home .hero-scroll { margin: 1rem 0 0; }
    .home-value-strip { margin-top: -2.5rem; }
    .page-home .home-about-grid, .home-services-intro, .page-home .challenge-showcase, .home-values-body, .home-cta-inner { grid-template-columns: 1fr; }
    .page-home .home-about-grid { gap: 2.5rem; }
    .home-services-intro { gap: 2rem; }
    .home-services-overview img { aspect-ratio: 1.7; }
    .page-home .challenge-showcase .challenge-visual { order: 1; min-height: 420px; }
    .page-home .challenge-showcase .challenges { order: 2; }
    .home-values-body { gap: 2rem; }
    .home-values-visual img { height: 360px; }
    .page-home .home-cta h2 { max-width: 16ch; }
    .home-cta-visual img { aspect-ratio: 1.6; }
}
@media (max-width: 800px) {
    .page-home .home-process .process-grid { grid-template-columns: 1fr; gap: .9rem; }
    .page-home .home-process .process-grid::before { left: 2.1rem; top: 1.4rem; bottom: 1.4rem; }
    .page-home .home-process .process-grid li { min-height: 0; padding: 1.3rem 1.2rem 1.3rem 4.6rem; }
    .page-home .home-process .process-grid li::before { top: .9rem; left: .7rem; margin: 0; }
}
@media (max-width: 600px) {
    .page-home .hero h1 { font-size: clamp(2.85rem, 11vw, 4.3rem); letter-spacing: -.055em; }
    .page-home .hero .button-group { display: grid; }
    .page-home .hero .button { width: 100%; }
    .page-home .hero-image { aspect-ratio: 1.1; }
    .page-home .hero-image-overlay { left: .65rem; bottom: 2.5rem; }
    .home-value-grid { grid-template-columns: 1fr; padding: .5rem; }
    .home-value { padding: 1rem; border-left: 0 !important; }
    .home-value + .home-value { border-top: 1px solid var(--jc-border); }
    .page-home .home-values .values-grid { grid-template-columns: 1fr; }
    .page-home .home-values .values-grid > div { min-height: 0; }
    .page-home .home-projects .cards-grid,
    .page-home .home-news .news-grid { grid-template-columns: 1fr; }
    .page-home .home-projects .cards-grid > .project-card,
    .page-home .home-news .news-grid > .news-card { grid-column: 1 !important; grid-row: auto !important; display: flex !important; }
    .page-home .home-projects .cards-grid > .project-card .media,
    .page-home .home-news .news-grid > .news-card .media { height: auto !important; min-height: 0 !important; aspect-ratio: 1.55 !important; }
    .page-home .challenge-showcase .challenge-visual { min-height: 320px; }
    .page-home .challenge-art { width: min(55%, 190px); }
    .page-home .home-process .process-grid li { padding: 1.25rem 1rem 1.25rem 4.6rem; }
    .page-home .home-cta .cta-actions { display: grid; }
    .page-home .home-cta .button { width: 100%; }
}

/* Editorial photos only: override intrinsic HTML heights and earlier ratios.
   The existing navigation breakpoint treats widths below 1200px as tablet/mobile.
   Captions stay outside the crop; the hero and other CMS media remain untouched. */
:is(.home-about-visual, .home-services-overview, .home-cta-visual) img {
    width: 100%;
    height: 400px;
    max-height: 400px;
    aspect-ratio: auto;
    object-fit: cover;
}
.home-about-visual img { object-position: center 35%; }
@media (max-width: 1199px) {
    :is(.home-about-visual, .home-services-overview, .home-cta-visual) img {
        height: 270px;
        max-height: 270px;
    }
}
