/* ============================================================
   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: var(--page-bg-solid);   /* pas d'image par défaut : fond blanc si aucun média */
}
/* Carrousel images / vidéos (géré depuis l'admin : Médias d'accueil) */
.hm-hero-bg.has-slides { background: var(--page-bg-solid); }
.hm-slides { position: absolute; inset: 0; z-index: 0; }
.hm-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.hm-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.1s ease, visibility 0s; }
.hm-slide img, .hm-slide video {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block;
}
#hmTitleText, #hmSubtitleText { display: inline-block; transition: opacity .35s ease, transform .35s ease; }
#hmTitleText.is-changing, #hmSubtitleText.is-changing { opacity: 0; transform: translateY(8px); }
.hm-slider-nav {
    position: absolute; z-index: 2;
    right: 2rem; bottom: 2rem;
    display: flex; align-items: center; gap: .6rem;
}
.hm-slider-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.9); color: #000;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 6px 18px -8px rgba(0,0,0,.35);
    cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.hm-slider-btn:hover { background: #fff; transform: translateY(-1px); }
.hm-slider-btn svg { width: 18px; height: 18px; }
.hm-slider-dots { display: flex; gap: .4rem; padding: 0 .35rem; }
.hm-slider-dot {
    width: 9px; height: 9px; border-radius: 50px; padding: 0;
    background: rgba(255,255,255,.65); border: 1px solid rgba(0,0,0,.15);
    cursor: pointer; transition: width .3s ease, background .3s ease;
}
.hm-slider-dot.is-active { width: 26px; background: #1f1f1f; border-color: #1f1f1f; }
@media (max-width: 768px) {
    .hm-slider-nav { right: 50%; transform: translateX(50%); bottom: 1.25rem; }
}

.hm-hero-bg::before {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    /* Fondu blanc : texte sur blanc à gauche, photo visible à droite */
    background: linear-gradient(90deg, var(--page-bg-solid) 0%, var(--page-bg-solid) 38%, color-mix(in srgb, var(--page-bg-solid) 70%, transparent) 60%, color-mix(in srgb, var(--page-bg-solid) 10%, transparent) 100%);
}
.hm-hero-bg::after {
    content: ''; position: absolute;
    width: 420px; height: 420px; top: 6%; right: 4%;
    background: radial-gradient(circle, rgba(245,143,32,0.10) 0%, transparent 70%);
    filter: blur(50px); border-radius: 50%;
    display: none; /* halo animé désactivé */
}
@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; }
#hmHeroBtn[hidden] { display: none; }
.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: var(--section-alt-bg); }
.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: var(--tx-2); 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: var(--tx-2); 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: #2c2c2c;
    box-shadow: 0 10px 26px -8px rgba(44,44,44,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(44,44,44,0.2);
    box-shadow: 0 2px 8px -2px rgba(44,44,44,0.4);
    display: grid; place-items: center; color: #000;
}
.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: var(--section-alt-bg);
    border: 1px solid var(--line-1);
}
.hm-cta::before {
    content: ''; position: absolute; inset: 0;
    background: none;
    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: var(--tx-1); margin-bottom: 1rem;
}
.hm-cta-sub { position: relative; color: var(--tx-2); 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: #000; }
.btn.hm-btn-light:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
.btn.hm-btn-ghost { background: var(--tx-1); border: 1.5px solid var(--tx-1); color: var(--page-bg-solid); }
.btn.hm-btn-ghost:hover { opacity: .9; 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; }
}

/* Hero et CTA d'accueil : fond blanc, texte anthracite (tokens par défaut) */
@media (max-width: 768px) {
    .hm-hero-bg::before { background: color-mix(in srgb, var(--page-bg-solid) 88%, transparent); }
}
/* Qui sommes-nous : mission + valeurs */
.hm-about-sub { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--tx-1); margin: 0 0 .45rem; }
.hm-about-text p.body { margin-bottom: 1.2rem; }
.hm-values { list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hm-values li { padding: .45rem .95rem; border: 1px solid var(--tx-1); font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: var(--tx-1); }

/* ══ Our Sectors : tous les domaines en tuiles ══ */
.sx { padding: clamp(4rem, 8vw, 6rem) 0; background: var(--page-bg-solid, #fff); color: var(--tx-1); }
.sx-wrap { max-width: 1320px; margin: 0 auto; padding: 0 2rem; }
.sx-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: 2.25rem; }
.sx-kicker { display: inline-block; margin-bottom: .8rem; font-size: .74rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.sx-title { font-family: var(--font-display); font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; color: var(--tx-1); }
.sx-sub { font-size: 1.05rem; line-height: 1.65; max-width: 520px; justify-self: end; color: var(--tx-1); }
.sx-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-1); border-left: 1px solid var(--line-1); }
.sx-tile { position: relative; display: flex; flex-direction: column; gap: .55rem; min-height: 176px; padding: 1.4rem 1.3rem; border-right: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); overflow: hidden; isolation: isolate; transition: color .35s ease; }
.sx-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #000; transform: scaleY(0); transform-origin: bottom; transition: transform .4s cubic-bezier(.22,.8,.24,1); }
.sx-tile:hover { color: #fff; }
.sx-tile:hover::before { transform: scaleY(1); }
:root[data-theme="dark"] .sx-tile::before { background: #fff; }
:root[data-theme="dark"] .sx-tile:hover { color: #000; }
.sx-num { font-size: .74rem; font-weight: 800; letter-spacing: .08em; opacity: .45; }
.sx-tile h3 { margin-top: auto; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.2; color: inherit; transition: transform .35s ease; }
.sx-tile:hover h3 { transform: translateY(-2px); }
.sx-tile p { font-size: .86rem; line-height: 1.5; opacity: .8; }
.sx-tile.is-extra { display: none; }
.sx-grid.is-open .sx-tile.is-extra { display: flex; animation: sxIn .4s ease both; }
@keyframes sxIn { from { opacity: 0; transform: translateY(8px); } }
.sx-more-wrap { display: flex; justify-content: center; margin-top: 2rem; }
.sx-more { display: inline-flex; align-items: center; gap: .8rem; padding: .95rem 1.5rem; border: 1.5px solid var(--tx-1); background: transparent; color: var(--tx-1); font: inherit; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .2s ease, color .2s ease; }
.sx-more:hover { background: var(--tx-1); color: var(--page-bg-solid, #fff); }
.sx-more svg { width: 14px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.sx-more[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 1100px) { .sx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .sx-head { grid-template-columns: 1fr; gap: .8rem; } .sx-sub { justify-self: start; } }
@media (max-width: 720px) { .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sx-tile { min-height: 150px; padding: 1.1rem 1rem; } .sx-tile h3 { font-size: 1.05rem; } .sx-tile p { font-size: .8rem; } }
@media (max-width: 560px) { .sx-wrap { padding: 0 1.1rem; } }
/* Lien « Voir tous les domaines » et page /secteurs */
a.sx-more { text-decoration: none; }
.sx-more svg.is-right { width: 8px; height: 13px; }
.sx-more:hover svg.is-right { transform: translateX(3px); }
.sx-more.is-solid { background: var(--tx-1); color: var(--page-bg-solid, #fff); }
.sx-page { padding-top: clamp(7rem, 12vw, 9rem); }
.sx-crumbs { display: flex; gap: .5rem; margin-bottom: 1.2rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sx-crumbs a { color: var(--tx-1); }
.sx-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sx-crumbs span { opacity: .6; }
/* Accueil : les 4 métiers toujours sur une ligne (2 x 2 sur petit écran) */
.sx:not(.sx-page) .sx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .sx:not(.sx-page) .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ══ Our Advantages : rangée compacte, sans icônes ══ */
.av { padding: clamp(2.75rem, 5vw, 4rem) 0; background: var(--section-alt-bg); border-block: 1px solid var(--line-1); color: var(--tx-1); }
.av-wrap { max-width: 1320px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: minmax(200px, .7fr) minmax(0, 3fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: stretch; }
.av-head { display: flex; flex-direction: column; justify-content: center; }
.av-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin-bottom: .6rem; }
.av-title { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; color: var(--tx-1); }
.av-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-1); background: var(--surface-1); }
.av-item { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: 1.25rem 1.2rem; overflow: hidden; isolation: isolate; transition: color .35s ease; }
.av-item + .av-item { border-left: 1px solid var(--line-1); }
.av-item::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #000; transform: scaleY(0); transform-origin: bottom; transition: transform .4s cubic-bezier(.22,.8,.24,1); }
.av-item:hover { color: #fff; }
.av-item:hover::before { transform: scaleY(1); }
:root[data-theme="dark"] .av-item::before { background: #fff; }
:root[data-theme="dark"] .av-item:hover { color: #000; }
.av-num { font-size: .72rem; font-weight: 800; letter-spacing: .08em; opacity: .45; }
.av-item h3 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; line-height: 1.25; color: inherit; }
.av-item p { font-size: .88rem; line-height: 1.5; opacity: .85; }
@media (max-width: 1100px) { .av-wrap { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .av-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .av-item:nth-child(3) { border-left: 0; }
    .av-item:nth-child(n+3) { border-top: 1px solid var(--line-1); }
}
@media (max-width: 560px) { .av-wrap { padding: 0 1.1rem; } .av-item { padding: 1rem .9rem; } }

/* ============================================================
   HERO — affichage mobile, façon carte « Actualités » :
   média en fond, voile sombre en bas, texte blanc par-dessus,
   lien « En savoir plus » fléché ; flèches/points sous la carte.
   S'applique seulement s'il y a des médias. Ordinateur inchangé.
   ============================================================ */
@media (max-width: 768px) {
    .hm-hero:has(.hm-hero-bg.has-slides) {
        min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr);
        padding: 6.25rem 1.25rem 3rem;
    }
    .hm-hero:has(.has-slides) .hm-hero-bg {
        grid-area: 1 / 1; position: relative; inset: auto; min-height: 440px;
        overflow: hidden; background: #111; isolation: isolate;
    }
    .hm-hero:has(.has-slides) .hm-hero-bg::before {
        display: block; z-index: 1;
        background: linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.05) 28%, rgba(0,0,0,.55) 58%, rgba(0,0,0,.88) 100%);
    }
    .hm-hero:has(.has-slides) .hm-hero-inner {
        grid-area: 1 / 1; align-self: end; z-index: 2; margin: 0; padding: 1.5rem 1.2rem 1.6rem;
    }
    .hm-hero:has(.has-slides) .hm-title {
        font-size: clamp(1.55rem, 7vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
        color: #fff; margin-bottom: .7rem;
    }
    .hm-hero:has(.has-slides) .hm-subtitle {
        font-size: .95rem; line-height: 1.6; color: rgba(255,255,255,.95); margin-bottom: 1.25rem;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .hm-hero:has(.has-slides) .hm-actions { flex-direction: row; align-items: center; }
    .hm-hero:has(.has-slides) #hmHeroBtn {
        display: inline-flex; align-items: center; gap: 1rem; width: auto; min-height: 0;
        padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
        font-size: .95rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #fff;
    }
    .hm-hero:has(.has-slides) #hmHeroBtn[hidden] { display: none; }
    .hm-hero:has(.has-slides) #hmHeroBtn::after {
        content: ""; width: 78px; height: 16px; flex: 0 0 78px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16'%3E%3Cline x1='0' y1='8' x2='76' y2='8' stroke='%233d9bff' stroke-width='2'/%3E%3Cpolyline points='68,1 77,8 68,15' fill='none' stroke='%233d9bff' stroke-width='2'/%3E%3C/svg%3E") no-repeat center / contain;
        transition: transform .25s ease;
    }
    .hm-hero:has(.has-slides) #hmHeroBtn:active::after { transform: translateX(6px); }
    .hm-slider-nav { position: static; grid-row: 2; transform: none; justify-content: center; margin: .85rem auto 0; }
    .hm-slider-btn { width: 34px; height: 34px; box-shadow: none; border-color: var(--line-1, rgba(0,0,0,.12)); }
    .hm-slider-dot { background: var(--line-1, #e2e8f0); }
}

/* ============================================================
   CE QUE NOUS OFFRONS — mobile : parcours vertical compact
   (pastille icône + ligne de liaison à gauche, texte à droite)
   ============================================================ */
@media (max-width: 620px) {
    .hm-head:has(+ .hm-steps) { margin-bottom: 1.75rem; text-align: left; }
    .hm-head:has(+ .hm-steps) .hm-h2 { font-size: 1.85rem; }
    .hm-steps { grid-template-columns: 1fr; gap: 0; }
    .hm-steps::before { display: none; }
    .hm-step:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line-1, #e2e8f0); }
    .hm-step {
        display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 1rem;
        text-align: left; padding: 0 0 1.5rem;
    }
    .hm-step:last-child { padding-bottom: 0; }
    .hm-step-num {
        grid-row: 1 / span 2; width: 44px; height: 44px; margin: 0;
        border-radius: 12px; box-shadow: none; background: #04326d;
        font-size: 0; color: transparent;   /* le numéro passe à droite, l'icône prend la pastille */
    }
    .hm-step-ico { position: static; width: auto; height: auto; border: 0; box-shadow: none; background: none; color: #fff; }
    .hm-step-ico i, .hm-step-ico svg { width: 20px; height: 20px; }
    .hm-step-title { align-self: end; margin: .1rem 0 .3rem; font-size: 1.02rem; }
    .hm-step-title::before {
        content: "0" counter(hmstep); counter-increment: hmstep;
        display: block; margin-bottom: .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: #2563eb;
    }
    .hm-steps { counter-reset: hmstep; }
    .hm-step-text { font-size: .88rem; line-height: 1.55; }
}

/* Mobile : moins d'espace entre le slider et « Ce Que Nous Offrons » */
@media (max-width: 768px) {
    .hm-hero:has(.hm-hero-bg.has-slides) { padding-bottom: .5rem; }
    .hm-hero + .hm-section { padding-top: 1.25rem; }
}

/* Mobile : flèches et points posés sur le média, en haut à droite */
@media (max-width: 768px) {
    .hm-hero:has(.has-slides) .hm-slider-nav {
        grid-area: 1 / 1; align-self: end; justify-self: end; z-index: 3;
        margin: 0 .8rem .8rem 0; gap: .4rem; padding: .25rem; border-radius: 50px;
        background: rgba(0,0,0,.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    }
    .hm-hero:has(.has-slides) .hm-slider-btn { width: 30px; height: 30px; background: rgba(255,255,255,.92); border: 0; }
    .hm-hero:has(.has-slides) .hm-slider-btn svg { width: 16px; height: 16px; }
    .hm-hero:has(.has-slides) .hm-slider-dot { background: rgba(255,255,255,.55); border-color: transparent; }
    .hm-hero:has(.has-slides) .hm-slider-dot.is-active { background: #fff; border-color: #fff; }
    .hm-hero + .hm-section { padding-top: 2.25rem; }
    /* place pour les contrôles sous le bouton « En savoir plus » */
    .hm-hero:has(.has-slides) .hm-hero-inner { padding-bottom: 3.6rem; }
}

/* Mobile : contrôles du slider — style épuré (contour fin, barres) */
@media (max-width: 768px) {
    .hm-hero:has(.has-slides) .hm-slider-nav { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; gap: .55rem; }
    .hm-hero:has(.has-slides) .hm-slider-btn {
        width: 32px; height: 32px; border-radius: 4px;
        background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.7); color: #fff;
        transition: background .2s ease, color .2s ease;
    }
    .hm-hero:has(.has-slides) .hm-slider-btn:active { background: #fff; color: #000; }
    .hm-hero:has(.has-slides) .hm-slider-dots { gap: .3rem; padding: 0 .15rem; }
    .hm-hero:has(.has-slides) .hm-slider-dot { width: 12px; height: 3px; border-radius: 2px; border: 0; background: rgba(255,255,255,.45); }
    .hm-hero:has(.has-slides) .hm-slider-dot.is-active { width: 24px; background: #fff; }
}

/* Mobile : média du slider sur toute la largeur de l'écran (bord à bord) */
@media (max-width: 768px) {
    .hm-hero:has(.hm-hero-bg.has-slides) { padding-left: 0; padding-right: 0; }
    .hm-hero:has(.has-slides) .hm-hero-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
}


/* ============================================================
   QUI SOMMES-NOUS — version éditoriale, sans icônes :
   texte à gauche, photo à droite avec bloc chiffre,
   mission en citation, valeurs numérotées sur filets.
   ============================================================ */
.qs {
    --qs-bg: #ffffff; --qs-ink: #0f172a; --qs-text: #475063; --qs-soft: #7a8292;
    --qs-line: #dfe3e8; --qs-accent: #0b2552;
    padding: clamp(4rem, 8vw, 7rem) 0;
    background: var(--qs-bg);
    color: var(--qs-ink);
}
:root[data-theme="dark"] .qs {
    --qs-bg: #121418; --qs-ink: #f2f3f5; --qs-text: rgba(255,255,255,.78); --qs-soft: rgba(255,255,255,.52);
    --qs-line: rgba(255,255,255,.14); --qs-accent: #c9d6ee;
}
.qs-wrap {
    max-width: 1240px; margin: 0 auto; padding: 0 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "body media";
    column-gap: clamp(2.5rem, 6vw, 6rem);
    row-gap: clamp(3rem, 6vw, 4.5rem);
    align-items: center;
}

/* Texte */
.qs-body { grid-area: body; }
.qs-kicker {
    display: flex; align-items: center; gap: .9rem;
    font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
    color: var(--qs-soft);
}
.qs-kicker::before { content: ''; width: 40px; height: 1px; background: currentColor; }
.qs-title {
    margin: 1.1rem 0 1.4rem;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.8vw, 3.9rem);
    font-weight: 700; letter-spacing: -.035em; line-height: 1.02;
    color: var(--qs-ink);
}
.qs-lead {
    max-width: 34em;
    font-size: clamp(1.02rem, 1.35vw, 1.15rem); line-height: 1.75;
    color: var(--qs-text);
}
.qs-mission {
    margin: 2.25rem 0 0; padding: .25rem 0 .25rem 1.5rem;
    border-left: 2px solid var(--qs-accent);
}
.qs-label {
    display: block; margin-bottom: .6rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    color: var(--qs-accent);
}
.qs-mission p {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.08rem, 1.5vw, 1.25rem); font-weight: 500; line-height: 1.6;
    color: var(--qs-ink);
}

/* Photo */
.qs-media { grid-area: media; position: relative; margin: 0; align-self: stretch; min-height: 420px; }
.qs-media img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center 40%;
    border-radius: 4px;
}
.qs-stat {
    position: absolute; left: 0; bottom: 0;
    display: flex; flex-direction: column; gap: .35rem;
    min-width: 190px; padding: 1.4rem 1.6rem;
    background: var(--qs-accent); color: #fff;
    border-radius: 0 4px 0 4px;
}
:root[data-theme="dark"] .qs-stat { color: #0b1220; }
.qs-stat strong { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.qs-stat span { font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }

/* Tablette */
@media (max-width: 900px) {
    .qs-wrap {
        grid-template-columns: 1fr;
        grid-template-areas: "body" "media";
        row-gap: 2.5rem;
    }
    .qs-media { min-height: 0; aspect-ratio: 16 / 10; }
}

/* Mobile */
@media (max-width: 560px) {
    .qs { padding: 3rem 0 3.25rem; }
    .qs-wrap { padding: 0 1.25rem; row-gap: 2rem; }
    .qs-title { font-size: 2.2rem; margin: .9rem 0 1rem; }
    .qs-lead { font-size: 1rem; line-height: 1.7; }
    .qs-mission { margin-top: 1.6rem; padding-left: 1.1rem; }
    .qs-mission p { font-size: 1.02rem; }
    .qs-media { aspect-ratio: 4 / 3; }
    .qs-stat { min-width: 0; padding: .9rem 1.1rem; }
    .qs-stat strong { font-size: 1.9rem; }
    .qs-stat span { font-size: .62rem; }
}

/* Espacement resserré entre « Qui sommes-nous » et « Nos secteurs » */
.qs { padding-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.qs + .sx { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
@media (max-width: 560px) { .qs { padding-bottom: 2rem; } .qs + .sx { padding-top: 1.25rem; } }
