/* ============================================================
   homepage-images.css — intégration photo de accueil.php
   Chargé APRÈS homepage.css / components.css.
   Chaque règle est neutre si l'image est absente (fallback = design actuel).
   ============================================================ */

/* ── Base ── */
.home-image{width:100%;height:100%;object-fit:cover;display:block;}
.home-figure{margin:0;position:relative;overflow:hidden;border-radius:var(--radius);background:var(--void);}
.home-figure img{width:100%;height:100%;object-fit:cover;display:block;}
.home-figure::after{content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(5,8,18,0) 55%,rgba(5,8,18,.28) 100%);}

/* ── 01 HERO ── */
.hero-photo{position:absolute;inset:0;z-index:0;}
.hero-photo img{width:100%;height:100%;object-fit:cover;object-position:70% center;display:block;}
.hero.has-photo::before{ /* remplace la lueur iris par l'overlay de lisibilité */
  inset:0;width:auto;height:auto;filter:none;z-index:1;
  background:linear-gradient(90deg,rgba(5,8,18,.92) 0%,rgba(5,8,18,.72) 48%,rgba(5,8,18,.30) 100%);}
.hero.has-photo::after{display:none;}
.hero.has-photo .hero-grid{grid-template-columns:minmax(0,680px);}
.hero.has-photo .hero-visual,.hero.has-photo .ledger-grid{display:none;}
@media (max-width:768px){
  .hero-photo img{object-position:60% center;}
  .hero.has-photo::before{background:linear-gradient(180deg,rgba(5,8,18,.55) 0%,rgba(5,8,18,.88) 60%,rgba(5,8,18,.95) 100%);}
}

/* ── 02 CARTES DOMAINES ── */
.quick-card.has-photo{padding:0;overflow:hidden;display:flex;flex-direction:column;}
.quick-card.has-photo .qc-photo{aspect-ratio:4/3;overflow:hidden;}
.quick-card.has-photo .qc-photo img{transition:transform .6s ease;}
.quick-card.has-photo:hover .qc-photo img{transform:scale(1.04);}
.quick-card.has-photo .qc-body{padding:22px 24px 26px;}
.quick-card.wide.has-photo{flex-direction:row;}
.quick-card.wide.has-photo .qc-photo{aspect-ratio:auto;flex:0 0 46%;min-height:220px;}
.quick-card.wide.has-photo .qc-body{align-self:center;}
@media (max-width:560px){
  .quick-card.wide.has-photo{flex-direction:column;}
  .quick-card.wide.has-photo .qc-photo{aspect-ratio:16/10;flex:none;min-height:0;}
}

/* ── Panneaux sombres avec photo en fond (03 module principal, 04 service-feature) ── */
.has-bg-photo{position:relative;overflow:hidden;isolation:isolate;
  background-size:cover;background-position:center;background-repeat:no-repeat;}
.has-bg-photo::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,rgba(5,8,18,.55) 0%,rgba(5,8,18,.86) 100%);}
.service-feature.has-bg-photo{background-position:60% center;}
.service-feature.has-bg-photo::before{background:linear-gradient(90deg,rgba(5,8,18,.90) 0%,rgba(5,8,18,.70) 60%,rgba(5,8,18,.45) 100%);}

/* ── Blocs éditoriaux 2 colonnes (05, 08, 09, 10) ── */
.home-split{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center;margin-bottom:56px;}
.home-split.is-reverse .home-figure{order:-1;}
.home-split .section-head{margin-bottom:0;}
.home-split .home-figure{aspect-ratio:3/2;}
.home-split .home-figure.r43{aspect-ratio:4/3;}
.home-split .home-figure.r1610{aspect-ratio:16/10;}
@media (max-width:900px){
  .home-split,.home-split.is-reverse{grid-template-columns:1fr;gap:28px;margin-bottom:36px;}
  .home-split.is-reverse .home-figure{order:0;}
}

/* ── 06 / 07 Parcours ── */
.parcours.has-photo{padding:0;overflow:hidden;}
.parcours.has-photo .p-photo{aspect-ratio:4/3;max-height:260px;width:100%;overflow:hidden;}
.parcours.has-photo .p-body{padding:36px 40px 44px;display:flex;flex-direction:column;justify-content:space-between;flex:1;}
@media (max-width:640px){.parcours.has-photo .p-body{padding:28px 20px 34px;}}

/* ── 11 Actualités ── */
.news-card.has-photo{padding-top:0;overflow:hidden;}
.news-card.has-photo .n-photo{aspect-ratio:3/2;margin:0 -1px 18px;overflow:hidden;}
.news-card.has-photo .n-photo img{transition:transform .6s ease;}
.news-card.has-photo:hover .n-photo img{transform:scale(1.04);}

/* ── 12 Statement ── */
.statement.has-photo{background-size:cover;background-position:center;background-repeat:no-repeat;}
.statement.has-photo::before{inset:0;width:auto;height:auto;z-index:0;
  background:linear-gradient(90deg,rgba(5,8,18,.90) 0%,rgba(5,8,18,.72) 55%,rgba(5,8,18,.55) 100%);}
@media (max-width:768px){.statement.has-photo{background-position:65% center;}}

/* ── 13 CTA final ── */
.cta-final.has-photo{background-size:cover;background-position:center;isolation:isolate;min-height:340px;}
.cta-final.has-photo::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,rgba(5,8,18,.90) 0%,rgba(5,8,18,.70) 55%,rgba(5,8,18,.40) 100%);}
.cta-final.has-photo .btn-primary{color:var(--void);}
@media (max-width:640px){.cta-final.has-photo{background-position:65% center;min-height:0;}}

@media (prefers-reduced-motion:reduce){
  .quick-card.has-photo .qc-photo img,.news-card.has-photo .n-photo img{transition:none;}
}