/* =========================================================
   SHB Ingénierie — feuille de style partagée
   (en-tête, navigation, pied de page, pages de contenu)
   ========================================================= */
:root {
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #475569;
    --border-light: #E2E8F0;
    --accent: #0284C7;
    --accent-dark: #0369A1;
    --accent-light: #E0F2FE;
    --orange: #E05A1B;
    --navy: #0B1120;
    --font-head: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --radius: 12px;
    --shadow-float: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
}

/* ---------- Base (pages générées) ---------- */
:where(.shb-page) *, :where(.shb-page) *::before, :where(.shb-page) *::after { box-sizing: border-box; margin: 0; padding: 0; }
.shb-page { margin: 0; font-family: var(--font-body); color: var(--text-main); background: var(--bg-body); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:where(.shb-page) :where(h1, h2, h3, h4) { font-family: var(--font-head); line-height: 1.2; letter-spacing: -0.02em; }
:where(.shb-page) a { color: inherit; text-decoration: none; }
:where(.shb-page) img { max-width: 100%; height: auto; display: block; }
html { scroll-behavior: smooth; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: #0F172A; padding: 8px 16px; z-index: 1000; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Bandeau supérieur ---------- */
.sh-topbar { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; color: #94A3B8; font-family: 'Inter', sans-serif; }
.sh-topbar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 16px; }
.sh-topbar a, .sh-topbar span { display: inline-flex; align-items: center; gap: 6px; color: #94A3B8; text-decoration: none; font-weight: 500; }
.sh-topbar a:hover { color: #FFFFFF; }
.sh-topbar svg { width: 15px; height: 15px; flex-shrink: 0; }
.sh-topbar-right { display: flex; gap: 24px; }

/* ---------- En-tête & navigation ---------- */
.sh-header { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.05); position: sticky; top: 0; z-index: 100; font-family: 'Inter', sans-serif; }
.sh-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.sh-logo img { height: 46px; width: auto; display: block; }
.sh-nav { display: flex; align-items: center; gap: 6px; }
.sh-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.sh-nav > ul > li { position: relative; }
.sh-nav-top { display: inline-flex; align-items: center; gap: 4px; color: #CBD5E1; font-size: 0.92rem; font-weight: 500; padding: 10px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none; }
.sh-nav-top:hover, .sh-nav-top.is-active { color: #FFFFFF; }
.sh-nav-top .chev { width: 10px; height: 10px; transition: transform .2s ease; }
.sh-dropdown { position: absolute; top: 100%; left: 0; min-width: 300px; background: #FFFFFF; border: 1px solid var(--border-light); border-radius: 12px; box-shadow: 0 24px 48px -12px rgba(15,23,42,.25); padding: 12px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease; z-index: 120; }
.sh-dropdown.mega { min-width: 620px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.sh-nav > ul > li:hover .sh-dropdown, .sh-nav > ul > li:focus-within .sh-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.sh-dropdown .dd-title { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding: 8px 10px 4px; }
.sh-dropdown ul { list-style: none; margin: 0; padding: 0; }
.sh-dropdown a { display: block; padding: 7px 10px; border-radius: 6px; color: #0F172A; font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.sh-dropdown a:hover { background: var(--accent-light); color: var(--accent-dark); }
.sh-dropdown a.dd-hub { font-weight: 700; }
.sh-cta { display: inline-flex; align-items: center; padding: 10px 18px; background: linear-gradient(135deg, #E05A1B, #C2410C); color: #fff !important; border-radius: 8px; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; text-decoration: none; box-shadow: 0 4px 12px rgba(224,90,27,.3); white-space: nowrap; }
.sh-cta:hover { background: linear-gradient(135deg, #D44F15, #9A3409); }
.sh-burger { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; background: transparent; border: none; cursor: pointer; padding: 8px; }
.sh-burger span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: all .3s ease; }

/* ---------- Pied de page ---------- */
.sh-footer { background: #FFFFFF; border-top: 1px solid var(--border-light); padding: 56px 0 28px; font-family: 'Inter', sans-serif; color: var(--text-main); }
.sh-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; }
.sh-footer h2 { font-family: var(--font-head); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 14px; }
.sh-footer ul { list-style: none; margin: 0; padding: 0; }
.sh-footer li { margin-bottom: 8px; }
.sh-footer li a { color: var(--text-muted); font-size: 0.88rem; text-decoration: none; }
.sh-footer li a:hover { color: var(--accent-dark); }
.sh-footer-brand img { width: 48px; height: 48px; border-radius: 8px; margin-bottom: 12px; }
.sh-footer-brand strong { font-family: var(--font-head); font-size: 1.05rem; display: block; margin-bottom: 6px; }
.sh-footer-brand address { font-style: normal; font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.sh-footer-brand address a { color: var(--text-muted); text-decoration: none; }
.sh-footer-brand address a:hover { color: var(--accent-dark); }
.sh-footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid #F1F5F9; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: #94A3B8; }
.sh-footer-bottom a { color: #94A3B8; text-decoration: none; margin-left: 16px; }
.sh-footer-bottom a:hover { color: var(--text-main); }

/* ---------- Boutons ---------- */
.shb-page .btn-primary, .shb-page .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 8px; font-family: var(--font-head); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: all .2s ease; cursor: pointer; border: none; }
.shb-page .btn-primary { background: linear-gradient(135deg, #E05A1B, #C2410C); color: #fff !important; box-shadow: 0 4px 12px rgba(224,90,27,.3); }
.shb-page .btn-primary:hover { background: linear-gradient(135deg, #D44F15, #9A3409); transform: translateY(-2px); }
.shb-page .btn-ghost { background: rgba(255,255,255,.06); color: #E2E8F0 !important; border: 1px solid rgba(255,255,255,.18); }
.shb-page .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Fil d'Ariane ---------- */
.breadcrumb { background: var(--navy); padding-top: 18px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; color: #64748B; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: #475569; }
.breadcrumb a { color: #94A3B8; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current] { color: #CBD5E1; }

/* ---------- Hero des pages profondes ---------- */
.shb-page .page-hero { background: var(--navy); color: #fff; padding: 34px 0 64px; position: relative; overflow: hidden; }
.shb-page .page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(2,132,199,.18) 0%, transparent 55%); pointer-events: none; }
.shb-page .page-hero .container { position: relative; }
.shb-page .page-hero .badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: rgba(56,189,248,.15); color: #38BDF8; font-family: monospace; font-size: 0.8rem; border-radius: 20px; margin-bottom: 20px; font-weight: 600; border: 1px solid rgba(56,189,248,.3); text-transform: uppercase; letter-spacing: .04em; }
.shb-page .page-hero .badge::before { content: ''; width: 8px; height: 8px; background: #38BDF8; border-radius: 50%; box-shadow: 0 0 8px #38BDF8; }
.shb-page .page-hero h1 { font-size: 2.75rem; font-weight: 800; max-width: 900px; margin-bottom: 18px; }
.shb-page .page-hero .lead { font-size: 1.12rem; color: #94A3B8; max-width: 820px; line-height: 1.7; margin-bottom: 30px; }
.shb-page .page-hero .lead strong { color: #E2E8F0; }
.shb-page .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.shb-page .hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; list-style: none; }
.shb-page .hero-chips li { font-size: 0.82rem; color: #CBD5E1; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); padding: 6px 12px; border-radius: 999px; }

/* ---------- Corps d'article ---------- */
.shb-page .page-body { padding: 56px 0 24px; }
.shb-page .page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.shb-page .prose { font-size: 1.02rem; color: #1E293B; }
.shb-page .prose > * + * { margin-top: 1.05em; }
.shb-page .prose h2 { font-size: 1.75rem; margin-top: 2.1em; color: var(--text-main); scroll-margin-top: 100px; }
.shb-page .prose h2:first-child { margin-top: 0; }
.shb-page .prose h3 { font-size: 1.22rem; margin-top: 1.6em; color: var(--text-main); }
.shb-page .prose p { color: #334155; }
.shb-page .prose a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: rgba(3,105,161,.3); text-underline-offset: 3px; }
.shb-page .prose a:hover { text-decoration-color: var(--accent-dark); }
.shb-page .prose ul, .shb-page .prose ol { padding-left: 1.3em; color: #334155; }
.shb-page .prose li { margin: .4em 0; }
.shb-page .prose li::marker { color: var(--accent); }
.shb-page .prose strong { color: var(--text-main); }
.shb-page .prose table { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: #fff; border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.shb-page .prose table thead { background: #F1F5F9; }
.shb-page .prose th, .shb-page .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.shb-page .prose th { font-family: var(--font-head); font-size: 0.85rem; color: var(--text-main); }
.shb-page .prose tr:last-child td { border-bottom: 0; }
.shb-page .callout { background: var(--accent-light); border: 1px solid #BAE6FD; border-left: 4px solid var(--accent); border-radius: 10px; padding: 18px 20px; color: #0C4A6E; }
.shb-page .callout p { color: #0C4A6E; }
.shb-page .callout.warn { background: #FFF7ED; border-color: #FED7AA; border-left-color: var(--orange); color: #7C2D12; }
.shb-page .callout.warn p { color: #7C2D12; }
.shb-page .figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-float); }
.shb-page .figure figcaption { font-size: 0.82rem; color: var(--text-muted); padding: 10px 14px; background: #fff; }
.shb-page .updated { font-size: 0.82rem; color: #64748B; }

/* ---------- Encadré latéral ---------- */
.shb-page .aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.shb-page .aside-card { background: #fff; border: 1px solid var(--border-light); border-radius: 14px; padding: 22px; box-shadow: 0 4px 20px rgba(0,0,0,.03); }
.shb-page .aside-card h2 { font-size: 1.05rem; margin-bottom: 10px; }
.shb-page .aside-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.shb-page .aside-card .btn-primary { width: 100%; }
.shb-page .aside-card ul { list-style: none; }
.shb-page .aside-card li a { display: block; padding: 7px 0; font-size: 0.9rem; color: var(--text-muted); border-bottom: 1px solid #F1F5F9; }
.shb-page .aside-card li:last-child a { border-bottom: 0; }
.shb-page .aside-card li a:hover, .shb-page .aside-card li a[aria-current] { color: var(--accent-dark); font-weight: 600; }
.shb-page .aside-contact { font-size: 0.88rem; color: var(--text-muted); line-height: 1.8; }
.shb-page .aside-contact a { color: var(--text-main); font-weight: 600; }

/* ---------- FAQ ---------- */
.shb-page .faq { padding: 24px 0 40px; }
.shb-page .faq h2 { font-size: 1.75rem; margin-bottom: 20px; }
.shb-page .faq details { background: #fff; border: 1px solid var(--border-light); border-radius: 10px; margin-bottom: 10px; }
.shb-page .faq summary { cursor: pointer; padding: 16px 20px; font-family: var(--font-head); font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.shb-page .faq summary::-webkit-details-marker { display: none; }
.shb-page .faq summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.shb-page .faq details[open] summary::after { content: '–'; }
.shb-page .faq .faq-a { padding: 0 20px 18px; color: #334155; font-size: 0.97rem; }
.shb-page .faq .faq-a a { color: var(--accent-dark); text-decoration: underline; }

/* ---------- Pages liées ---------- */
.shb-page .related { padding: 20px 0 64px; }
.shb-page .related h2 { font-size: 1.5rem; margin-bottom: 20px; }
.shb-page .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shb-page .related-card { background: #fff; border: 1px solid var(--border-light); border-radius: 12px; padding: 22px; transition: all .2s ease; display: flex; flex-direction: column; gap: 8px; }
.shb-page .related-card:hover { border-color: #93C5FD; transform: translateY(-3px); box-shadow: var(--shadow-float); }
.shb-page .related-card span { font-family: monospace; font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.shb-page .related-card strong { font-family: var(--font-head); font-size: 1.05rem; }
.shb-page .related-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Grille de liens « expertises » (pages hub) ---------- */
.expertise-links { padding: 56px 0; background: #fff; border-top: 1px solid var(--border-light); }
.expertise-links .section-head { max-width: 760px; margin-bottom: 28px; }
.expertise-links h2 { font-family: var(--font-head); font-size: 2rem; margin-bottom: 10px; }
.expertise-links .section-head p { color: var(--text-muted); }
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; }
.expertise-grid a { display: block; height: 100%; background: var(--bg-body); border: 1px solid var(--border-light); border-radius: 12px; padding: 18px 20px; text-decoration: none; color: var(--text-main); transition: all .2s ease; }
.expertise-grid a:hover { border-color: #93C5FD; background: #fff; box-shadow: var(--shadow-float); }
.expertise-grid strong { display: block; font-family: var(--font-head); font-size: 1rem; margin-bottom: 4px; }
.expertise-grid span { font-size: 0.86rem; color: var(--text-muted); line-height: 1.5; display: block; }
.seo-text { max-width: 860px; margin-top: 32px; color: var(--text-muted); font-size: 0.98rem; }
.seo-text p + p { margin-top: 12px; }
.seo-text a { color: var(--accent-dark); text-decoration: underline; }

/* ---------- Bandeau logos ---------- */
.shb-page .logos-band { background: var(--bg-body); padding: 28px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); overflow: hidden; }
.shb-page .logos-track { display: flex; align-items: center; gap: 56px; width: max-content; animation: shb-marquee 40s linear infinite; }
.shb-page .logos-band:hover .logos-track { animation-play-state: paused; }
.shb-page .logos-track img { height: 40px; width: auto; filter: grayscale(100%) opacity(60%); }
.shb-page .logos-track img.lg { height: 52px; }
@keyframes shb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logos-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }

/* ---------- Formulaire ---------- */
.shb-page .contact-section { background: #fff; padding: 64px 0 48px; border-top: 1px solid var(--border-light); }
.shb-page .contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; background: #F8FAFC; border: 1px solid var(--border-light); border-radius: 20px; padding: 48px; }
.shb-page .contact-info h2 { font-size: 2rem; font-weight: 800; margin-bottom: 18px; }
.shb-page .contact-info p { color: var(--text-muted); margin-bottom: 26px; }
.shb-page .contact-perks { list-style: none; }
.shb-page .contact-perks li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; font-weight: 600; margin-bottom: 14px; }
.shb-page .contact-perks li::before { content: '✓'; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
.shb-page .shb-form { background: #fff; padding: 36px; border-radius: 16px; border: 1px solid var(--border-light); }
.shb-page .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shb-page .form-group { margin-bottom: 18px; }
.shb-page .form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: #334155; margin-bottom: 7px; font-family: var(--font-head); }
.shb-page .form-input { width: 100%; padding: 13px 15px; background: #F8FAFC; border: 1px solid #CBD5E1; border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem; color: var(--text-main); }
.shb-page .form-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(2,132,199,.2); }
.shb-page textarea.form-input { resize: vertical; min-height: 110px; }
.shb-page .form-submit { width: 100%; padding: 15px; font-size: 1.02rem; }
.shb-page .form-note { text-align: center; font-size: 0.8rem; color: #94A3B8; margin-top: 14px; }
.shb-page .form-hp { position: absolute; left: -9999px; }
@keyframes shb-spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .sh-nav-top { padding: 10px 8px; font-size: 0.88rem; }
    .sh-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .sh-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 992px) {
    .sh-topbar-left { display: none; }
    .sh-topbar .container { justify-content: center; }
    .sh-burger { display: flex; }
    .sh-nav { display: none; position: fixed; top: 112px; left: 0; right: 0; bottom: 0; background: var(--navy); padding: 16px 24px 40px; overflow-y: auto; flex-direction: column; align-items: stretch; }
    .sh-nav.is-open { display: flex; }
    .sh-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
    .sh-nav > ul > li { border-bottom: 1px solid rgba(255,255,255,.07); }
    .sh-nav-top { width: 100%; justify-content: space-between; font-size: 1.05rem; padding: 14px 4px; }
    .sh-dropdown, .sh-dropdown.mega { position: static; opacity: 1; visibility: visible; transform: none; display: none; min-width: 0; box-shadow: none; border: 0; background: transparent; padding: 0 0 12px; grid-template-columns: 1fr; }
    .sh-nav > ul > li.is-open .sh-dropdown { display: block; }
    .sh-nav > ul > li.is-open .chev { transform: rotate(180deg); }
    .sh-dropdown a { color: #CBD5E1; padding: 8px 10px; }
    .sh-dropdown a:hover { background: rgba(255,255,255,.06); color: #fff; }
    .sh-dropdown .dd-title { color: #38BDF8; }
    .sh-cta { margin-top: 20px; justify-content: center; padding: 14px; }
    .sh-burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .sh-burger.is-open span:nth-child(2) { opacity: 0; }
    .sh-burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .shb-page .page-hero h1 { font-size: 2.1rem; }
    .shb-page .page-grid { grid-template-columns: 1fr; gap: 40px; }
    .shb-page .aside { position: static; }
    .shb-page .related-grid, .expertise-grid { grid-template-columns: 1fr 1fr; }
    .shb-page .contact-wrapper { grid-template-columns: 1fr; padding: 28px 20px; gap: 28px; }
    .shb-page .form-row { grid-template-columns: 1fr; }
    .shb-page .shb-form { padding: 22px; }
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .sh-topbar-right { gap: 14px; }
    .shb-page .page-hero { padding: 24px 0 44px; }
    .shb-page .page-hero h1 { font-size: 1.75rem; }
    .shb-page .prose h2, .shb-page .faq h2 { font-size: 1.45rem; }
    .shb-page .related-grid, .expertise-grid { grid-template-columns: 1fr; }
    .sh-footer-grid { grid-template-columns: 1fr 1fr; }
    .shb-page .contact-info h2, .expertise-links h2 { font-size: 1.6rem; }
}
