/* ============================================================
   HOME PAGE — Nouveau design
   Chargé uniquement sur l'accueil (via $extra_css dans index.php).
   N'affecte aucune autre page. Toutes les classes sont préfixées "hm-".
   Couleurs pilotées par --brand / --brand-2 (cf. style.css :root).
   ============================================================ */

/* ---------- HERO ---------- */
.hm-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 9rem 2rem 5rem;
    overflow: hidden;
}
.hm-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        url('../images/briquete.avif') center/cover no-repeat,
        #0b3871;
}
.hm-hero-bg::before {
    content: ''; position: absolute; inset: 0;
    /* Voile #0b3871 translucide : l'image transparaît, teintée en bleu */
    background:
        radial-gradient(60% 60% at 82% 18%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%),
        linear-gradient(160deg, rgba(11,56,113,0.82) 0%, rgba(8,42,87,0.90) 100%);
}
.hm-hero-bg::after {
    content: ''; position: absolute;
    width: 420px; height: 420px; top: 6%; right: 4%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 32%, transparent) 0%, transparent 70%);
    filter: blur(50px); border-radius: 50%;
    animation: hmFloat 10s ease-in-out infinite;
}
@keyframes hmFloat { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-26px,30px)} }

.hm-hero-inner {
    position: relative; z-index: 1;
    width: 100%;
    max-width: 1200px; margin: 0 auto;
}
.hm-hero-text { max-width: 640px; }
.hm-badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .45rem 1.05rem; border-radius: 50px;
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 38%, transparent);
    color: var(--brand);
    font-size: .73rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    margin-bottom: 1.6rem;
}
.hm-badge i { width: 15px; height: 15px; }
.hm-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.4vw, 4.6rem);
    font-weight: 700; line-height: 1.04; letter-spacing: -.03em;
    margin-bottom: 1.4rem;
}
.hm-title .accent {
    background: var(--grad-gold);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hm-subtitle {
    font-size: 1.12rem; color: var(--muted); line-height: 1.7;
    max-width: 540px; margin-bottom: 2.2rem;
}
.hm-actions { display: flex; gap: 1rem; flex-wrap: wrap; }


/* ---------- Trame de section ---------- */
.hm-section { padding: 5rem 2rem; position: relative; }
.hm-section.alt { background: rgba(255,255,255,0.34); }
.hm-container { max-width: 1200px; margin: 0 auto; }
.hm-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.hm-tag {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .32rem .9rem; border-radius: 50px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    color: var(--brand);
    font-size: .71rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
    margin-bottom: 1rem;
}
.hm-h2 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    font-weight: 700; letter-spacing: -.025em; line-height: 1.12; color: var(--white);
}
.hm-h2 .accent {
    background: var(--grad-gold);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hm-sub { margin-top: 1rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }

/* ---------- Split "Qui sommes-nous" ---------- */
.hm-split {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center;
}
.hm-split-media {
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow);
    position: relative;
}
.hm-split-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.hm-split-media:hover img { transform: scale(1.05); }
.hm-split-text .hm-h2 { text-align: left; }
.hm-quote {
    border-left: 3px solid var(--brand);
    padding-left: 1.4rem; margin: 1.5rem 0;
    font-family: var(--font-display); font-size: 1.18rem; font-style: italic;
    color: rgba(13,34,64,.9); line-height: 1.6;
}
.hm-split-text p.body { color: var(--muted); font-size: .98rem; line-height: 1.8; margin-bottom: 1.6rem; }

/* ---------- "Who We Are?" — design superposé ---------- */
.hm-about-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4.5rem; align-items: center;
}
.hm-about-text .hm-h2 { text-align: left; margin-bottom: .4rem; }
.hm-about-text .hm-quote {
    border-left: 3px solid var(--brand);
    padding-left: 1.4rem; margin: 1.4rem 0;
    font-family: var(--font-display); font-size: 1.2rem; font-style: italic;
    color: rgba(13,34,64,.92); line-height: 1.55;
}
.hm-about-text p.body { color: var(--muted); font-size: .98rem; line-height: 1.8; margin-bottom: 1.8rem; }

.hm-about-media { position: relative; }
/* trame de points (haut-gauche) */
.hm-about-media::after {
    content: ''; position: absolute; z-index: 0;
    left: -24px; top: -24px; width: 130px; height: 130px;
    background-image: radial-gradient(color-mix(in srgb, var(--brand) 55%, transparent) 1.6px, transparent 1.6px);
    background-size: 16px 16px;
    opacity: .7;
}
/* bloc d'accent dégradé (bas-droite) */
.hm-about-media::before {
    content: ''; position: absolute; z-index: 0;
    right: -20px; bottom: -20px; width: 72%; height: 72%;
    border-radius: var(--radius-lg);
    background: var(--grad-accent);
    opacity: .45;
}
.hm-about-frame {
    position: relative; z-index: 1;
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hm-about-frame img {
    width: 100%; display: block;
    aspect-ratio: 4 / 3; object-fit: cover;
    transition: transform .6s ease;
}
.hm-about-frame:hover img { transform: scale(1.05); }

/* ---------- Secteurs (bento 2x2) ---------- */
.hm-sectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.hm-sector {
    padding: 2rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    transition: var(--transition); position: relative; overflow: hidden;
}
.hm-sector::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
    background: var(--grad-accent); transition: width .4s ease;
}
.hm-sector:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--brand) 28%, transparent); }
.hm-sector:hover::after { width: 100%; }
.hm-sector-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; }
.hm-sector-ico {
    width: 50px; height: 50px; flex-shrink: 0;
    border-radius: 14px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    color: var(--brand);
}
.hm-sector-ico i { width: 24px; height: 24px; }
.hm-sector-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.hm-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.hm-chip {
    padding: .38rem .85rem; border-radius: 50px;
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: .8rem; color: var(--muted); transition: var(--transition);
}
.hm-sector:hover .hm-chip { border-color: color-mix(in srgb, var(--brand) 22%, transparent); }

/* ---------- Variante COMPACTE (section "Our Sectors") ---------- */
.hm-section.hm-compact { padding-top: 3rem; padding-bottom: 3rem; }
.hm-compact .hm-head { margin-bottom: 2rem; }
.hm-compact .hm-sub { font-size: .92rem; margin-top: .6rem; }
.hm-compact .hm-sectors { gap: 1rem; }
.hm-compact .hm-sector { padding: 1.35rem 1.4rem; }
.hm-compact .hm-sector-head { gap: .7rem; margin-bottom: .9rem; }
.hm-compact .hm-sector-ico { width: 40px; height: 40px; border-radius: 11px; }
.hm-compact .hm-sector-ico i { width: 20px; height: 20px; }
.hm-compact .hm-sector-title { font-size: 1.1rem; }
.hm-compact .hm-chips { gap: .4rem; }
.hm-compact .hm-chip { padding: .3rem .7rem; font-size: .76rem; }

/* ---------- Notre offre (parcours numéroté) ---------- */
.hm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.hm-steps::before {
    content: ''; position: absolute; top: 34px; left: 8%; right: 8%; height: 2px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 40%, transparent), color-mix(in srgb, var(--brand-2) 40%, transparent));
    z-index: 0;
}
.hm-step { position: relative; z-index: 1; text-align: center; padding: 0 .5rem; }
.hm-step-num {
    width: 68px; height: 68px; margin: 0 auto 1.2rem;
    border-radius: 50%; display: grid; place-items: center;
    font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #ffffff;
    background: #04326D;
    box-shadow: 0 10px 26px -8px rgba(4,50,109,0.55);
    position: relative;
}
.hm-step-ico {
    position: absolute; right: -4px; bottom: -4px;
    width: 28px; height: 28px; border-radius: 50%;
    background: #ffffff; border: 1px solid rgba(4,50,109,0.2);
    box-shadow: 0 2px 8px -2px rgba(4,50,109,0.4);
    display: grid; place-items: center; color: #04326D;
}
.hm-step-ico i { width: 15px; height: 15px; }
.hm-step-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.hm-step-text { color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* ---------- Pourquoi nous (features) ---------- */
.hm-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.hm-feature {
    padding: 1.9rem 1.6rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    transition: var(--transition);
}
.hm-feature:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--brand) 28%, transparent); background: var(--surface-2); }
.hm-feature-ico {
    width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.2rem;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--brand-2) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-2) 40%, transparent);
    color: color-mix(in srgb, var(--brand-2) 70%, white);
}
.hm-feature-ico i { width: 24px; height: 24px; }
.hm-feature-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; margin-bottom: .55rem; }
.hm-feature-text { color: var(--muted); font-size: .9rem; line-height: 1.65; }

/* ---------- CTA bannière ---------- */
.hm-cta-wrap { padding: 2rem; }
.hm-cta {
    position: relative; overflow: hidden;
    max-width: 1000px; margin: 0 auto;
    border-radius: var(--radius-lg);
    padding: 4.5rem 2rem;
    text-align: center;
    background: linear-gradient(130deg,
        color-mix(in srgb, var(--brand) 92%, #000) 0%,
        color-mix(in srgb, var(--brand-2) 88%, #000) 100%);
    border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
    box-shadow: var(--shadow);
}
.hm-cta::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(60% 100% at 50% 0%, rgba(255,255,255,.18), transparent 60%);
    pointer-events: none;
}
.hm-cta-title {
    position: relative; font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -.025em;
    color: #fff; margin-bottom: 1rem;
}
.hm-cta-sub { position: relative; color: rgba(13,34,64,.9); font-size: 1.02rem; margin-bottom: 2.2rem; }
.hm-cta-actions { position: relative; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn.hm-btn-light { background: #fff; color: #1a1304; }
.btn.hm-btn-light:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
.btn.hm-btn-ghost { background: rgba(255,255,255,.12); border: 1.5px solid rgba(13,34,64,.5); color: #fff; }
.btn.hm-btn-ghost:hover { background: rgba(255,255,255,.2); transform: translateY(-3px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .hm-split { grid-template-columns: 1fr; gap: 2.5rem; }
    .hm-split-media { order: -1; }
    .hm-about-grid { grid-template-columns: 1fr; gap: 3.5rem; }
    .hm-about-media::before { right: -10px; bottom: -10px; }
    .hm-about-media::after { left: -12px; top: -12px; width: 90px; height: 90px; }
    .hm-steps { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .hm-steps::before { display: none; }
    .hm-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .hm-hero { padding: 8rem 1.25rem 4rem; }
    .hm-section { padding: 3.5rem 1.25rem; }
    .hm-sectors { grid-template-columns: 1fr; }
    .hm-steps { grid-template-columns: 1fr; }
    .hm-features { grid-template-columns: 1fr; }
    .hm-actions { flex-direction: column; align-items: stretch; }
    .hm-actions .btn { justify-content: center; }
}

/* ── Thème clair : restaurer le texte clair sur les blocs à fond SOMBRE ── */
.hm-hero {
    --white: #ffffff;
    --muted: rgba(255,255,255,0.82);
    --brand: #B2BED6;          /* accent mist clair sur le hero sombre */
    color: #fff;
}
.hm-hero .hm-title { color: #fff; }
.hm-cta-title, .hm-cta-sub { color: #fff; }
.hm-cta-sub { color: rgba(255,255,255,0.92); }
