/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #2563eb;
    --text: #1e293b;
    --muted: #64748b;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --radius: 8px;
    --max-w: 1100px;
    --content-w: 740px;
}
body { font-family: system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); line-height: 1.65; }
a { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* ── Nav ── */
.site-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 510; /* > overlay (490) pour que le tiroir reste cliquable */
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.logo-qcms-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 7px; display: block; }
.logo-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }

/* Hamburger — caché sur desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: .45rem;
    background: none;
    border: none;
    flex-shrink: 0;
    z-index: 520;
    position: relative;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sub-toggle — caché sur desktop */
.sub-toggle { display: none; }

/* Menu principal (desktop : flex horizontal) */
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-left: auto; /* pousse le menu vers la droite */
    flex-wrap: wrap;
}
.nav-menu > li { position: relative; list-style: none; }
.nav-menu > li > a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    padding: .45rem .8rem;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a { background: #f1f5f9; color: var(--primary); }
.nav-menu > li.active > a { font-weight: 600; }

/* Flèche ▾ sur les parents desktop */
.nav-menu > li.has-children > a::after {
    content: '▾';
    font-size: .6rem;
    margin-left: .3rem;
    opacity: .5;
    vertical-align: middle;
}

/* Dropdown desktop — niveau 2 (apparaît sous le top-nav) */
.sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: .35rem 0;
    min-width: 210px;
    box-shadow: 0 6px 20px rgba(0,0,0,.10);
    list-style: none;
    z-index: 100;
}
.nav-menu > li:hover > .sub-menu { display: block; }
.sub-menu li { list-style: none; position: relative; }
.sub-menu a {
    display: block;
    padding: .55rem 1rem;
    color: var(--text);
    font-size: .875rem;
    text-decoration: none;
    transition: background .12s;
    border-bottom: 1px solid var(--border);
}
.sub-menu li:last-child > a { border-bottom: none; }
.sub-menu a:hover { background: #f1f5f9; color: var(--primary); }

/* Flèche › sur les items parents dans les sous-menus */
.sub-menu li.has-children > a::after {
    content: '›';
    float: right;
    margin-left: .5rem;
    opacity: .5;
    font-size: 1rem;
    line-height: 1;
}

/* Flyout niveau 3+ : apparaît à droite du parent */
.sub-menu .sub-menu {
    display: none;
    position: absolute;
    top: -3px;         /* aligne avec la bordure top */
    left: 100%;
    border-top: 2px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    box-shadow: 4px 4px 20px rgba(0,0,0,.10);
}
.sub-menu li:hover > .sub-menu { display: block; }

/* Flyout ouvert par JS (desktop hover fiable + débordement viewport) */
.sub-menu .sub-menu.js-open { display: block; }
.sub-menu li.flyout-left > .sub-menu {
    left: auto;
    right: 100%;
    border-radius: var(--radius) 0 var(--radius) var(--radius);
}

/* Overlay (drawer backdrop) */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 490;
}
.nav-overlay.open { display: block; animation: navFadeIn .22s ease; }
@keyframes navFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Main ── */
#main { max-width: var(--max-w); margin: 0 auto; padding: 2.5rem 1.5rem; min-height: 60vh; }

/* ── Hero ── */
.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .75rem; }
.hero .subtitle { color: var(--muted); font-size: 1.1rem; }

/* ── Page content ── */
.page-content, .single-post { max-width: var(--content-w); margin: 0 auto; }
.page-header h1, .post-header h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .75rem; }
.content-body, .post-body { margin-top: 1.5rem; }
.content-body h2, .post-body h2 { font-size: 1.4rem; margin: 1.75rem 0 .75rem; }
.content-body h3, .post-body h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.content-body p, .post-body p { margin-bottom: 1rem; }
.content-body ul, .post-body ul, .content-body ol, .post-body ol { margin: .75rem 0 1rem 1.5rem; }

/* ── Blog listing ── */
.blog-listing .page-header { margin-bottom: 1.5rem; }
.category-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.category-nav a { background: #e2e8f0; padding: .3rem .75rem; border-radius: 999px; color: var(--text); text-decoration: none; font-size: .85rem; }
.category-nav a:hover { background: var(--primary); color: #fff; }
.posts-list { display: grid; gap: 1.25rem; }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.post-card h2, .post-card h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.post-card h2 a, .post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--primary); }
.post-meta { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; display: flex; gap: .75rem; }
.cat-link { color: var(--primary); }
.excerpt { color: var(--muted); font-size: .9rem; margin: .4rem 0; }
.read-more { font-size: .85rem; color: var(--primary); text-decoration: none; }
.read-more:hover { text-decoration: underline; }

/* ── Latest posts grid ── */
.latest-posts { margin-top: 3rem; }
.latest-posts h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

/* ── Post ── */
.post-meta time { display: block; color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.post-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Buttons ── */
.btn { display: inline-block; padding: .6rem 1.2rem; border-radius: 6px; text-decoration: none; font-size: .9rem; font-weight: 500; }
a.btn, button.btn { background: var(--primary); color: #fff; border: none; cursor: pointer; }
a.btn:hover, button.btn:hover { opacity: .9; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); background: #fff; margin-top: 4rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 1.5rem; color: var(--muted); font-size: .875rem; }

/* ── Error page ── */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 2rem; margin-bottom: 1rem; }

/* ── Pagination ── */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 2rem 0; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .6rem; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--text); text-decoration: none; font-size: .875rem; transition: background .15s; }
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; pointer-events: none; }
/* ── Category editorial blocks ── */
.cat-content { background: var(--bg); border-radius: 8px; padding: 1.5rem 1.75rem; margin: 1.5rem 0; line-height: 1.75; }
.cat-content h2, .cat-content h3 { color: var(--primary); }

/* ══ Layouts avec barre latérale ═══════════════════════════════════════════ */

/* Conteneur avec sidebar — remplace #main pour les pages qui en ont une */
#main.with-sidebar {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    min-height: 60vh;
    display: grid;
    gap: 2.5rem;
    align-items: start;
}
#main.with-sidebar.layout-sidebar-right { grid-template-columns: 1fr 300px; }
#main.with-sidebar.layout-sidebar-left  { grid-template-columns: 300px 1fr; }
#main.with-sidebar.layout-sidebar-left  .main-content { order: 2; }
#main.with-sidebar.layout-sidebar-left  .sidebar       { order: 1; }

/* Reset padding/max-width quand le contenu est dans .main-content */
#main.with-sidebar .main-content > .page-content,
#main.with-sidebar .main-content > .single-post,
#main.with-sidebar .main-content > .blog-listing { max-width: none; }

@media (max-width: 820px) {
    #main.with-sidebar { display: block; }
    #main.with-sidebar .main-content { order: 1 !important; }
    #main.with-sidebar .sidebar      { order: 2 !important; margin-top: 2rem; }
}

/* ── Sidebar styles ─────────────────────────────────────────────────────── */
.sidebar { min-width: 0; }

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.sidebar-widget-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary);
}

.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li {
    padding: .4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text); text-decoration: none; transition: color .12s; }
.sidebar-list a:hover { color: var(--primary); }

.sidebar-search {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 7px;
    overflow: hidden;
}
.sidebar-search:focus-within { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.sidebar-search input {
    flex: 1; border: none !important; outline: none !important;
    padding: .5rem .75rem; font-size: .875rem; color: var(--text);
    min-width: 0;
}
.sidebar-search button {
    padding: .5rem .7rem;
    background: var(--primary); color: #fff;
    border: none; cursor: pointer;
    font-size: .85rem; transition: opacity .12s;
}
.sidebar-search button:hover { opacity: .88; }

/* ══ Homepage template ══════════════════════════════════════════════════════ */

/* Reset du main sur la home : les sections gèrent leur propre layout */
body.page-home #main { max-width: none; margin: 0; padding: 0; min-height: 0; }

/* ── Héro ─────────────────────────────────────────────────────────────────── */
.hp-hero {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; text-align: center;
    background: #1e293b; /* fallback sans image */
}
.hp-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    transform: scale(1.02); /* léger zoom évite le bord blanc au resize */
}
.hp-hero-overlay { position: absolute; inset: 0; }
.hp-hero-content {
    position: relative; z-index: 1;
    max-width: 820px; padding: 3.5rem 1.5rem; width: 100%;
}
.hp-hero-h1 {
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    font-weight: 800; color: #fff; margin-bottom: 1rem;
    line-height: 1.12;
    text-shadow: 0 2px 16px rgba(0,0,0,.45);
    letter-spacing: -.01em;
}
.hp-hero-sub {
    font-size: clamp(.95rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.88); margin-bottom: 2rem;
    line-height: 1.65; text-shadow: 0 1px 8px rgba(0,0,0,.3);
    max-width: 620px; margin-left: auto; margin-right: auto;
}
.hp-hero-cta {
    display: inline-block; padding: .85rem 2.25rem;
    background: var(--primary); color: #fff;
    border-radius: 8px; font-weight: 700; font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(0,0,0,.28);
    transition: opacity .15s, transform .15s;
}
.hp-hero-cta:hover { opacity: .9; transform: translateY(-2px); }

/* ── Sections communes ────────────────────────────────────────────────────── */
.hp-inner { max-width: var(--max-w); margin: 0 auto; padding: 4rem 1.5rem; }
.hp-section-hd {
    display: flex; align-items: baseline;
    justify-content: space-between; gap: 1rem;
    margin-bottom: 1.75rem; flex-wrap: wrap;
}
.hp-section-title { font-size: clamp(1.3rem, 2.5vw, 1.85rem); font-weight: 800; color: var(--text); }
.hp-section-cta { font-size: .875rem; color: var(--primary); text-decoration: none; font-weight: 600; white-space: nowrap; }
.hp-section-cta:hover { text-decoration: underline; }

/* ── Section contenu ─────────────────────────────────────────────────────── */
.hp-section-content { background: #fff; }
.hp-content-body { max-width: var(--content-w); margin: 0 auto; }
.hp-content-body h2 { font-size: 1.4rem; margin: 1.75rem 0 .75rem; }
.hp-content-body h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.hp-content-body p  { margin-bottom: 1rem; }
.hp-content-body ul,
.hp-content-body ol { margin: .75rem 0 1rem 1.5rem; }

/* ── Section articles ────────────────────────────────────────────────────── */
.hp-section-posts { background: var(--bg); }
.hp-posts-grid {
    display: grid;
    grid-template-columns: repeat(var(--hp-cols, 3), 1fr);
    gap: 1.5rem;
}
@media (max-width: 900px) { .hp-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hp-posts-grid { grid-template-columns: 1fr; } }

.hp-post-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: box-shadow .18s, transform .18s;
}
.hp-post-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,.09); transform: translateY(-2px); }
.hp-post-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg); }
.hp-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.hp-post-card:hover .hp-post-thumb img { transform: scale(1.04); }
.hp-post-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; gap: .45rem; }
.hp-post-meta { display: flex; align-items: center; gap: .5rem; font-size: .77rem; color: var(--muted); flex-wrap: wrap; }
.hp-post-cat { color: var(--primary); text-decoration: none; font-weight: 600; }
.hp-post-cat:hover { text-decoration: underline; }
.hp-post-title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.hp-post-title a { color: var(--text); text-decoration: none; }
.hp-post-title a:hover { color: var(--primary); }
.hp-post-excerpt { font-size: .875rem; color: var(--muted); line-height: 1.6; flex: 1; }
.hp-post-read { font-size: .82rem; color: var(--primary); text-decoration: none; font-weight: 600; margin-top: auto; }
.hp-post-read:hover { text-decoration: underline; }

/* ── Section catégories ──────────────────────────────────────────────────── */
.hp-section-cats { background: #fff; }
.hp-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.hp-cat-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 1.5rem 1rem; border: 1.5px solid var(--border); border-radius: 12px;
    text-decoration: none; color: var(--text); background: #fff;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.hp-cat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 18px rgba(37,99,235,.1);
    transform: translateY(-3px);
}
.hp-cat-img { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px; margin-bottom: .85rem; }
.hp-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.hp-cat-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.hp-cat-name { font-weight: 700; font-size: .93rem; color: var(--text); }
.hp-cat-desc { font-size: .77rem; color: var(--muted); line-height: 1.5; margin-top: .3rem; }

/* ── Bandeau CTA ─────────────────────────────────────────────────────────── */
.hp-cta-inner { text-align: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hp-cta-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: .75rem; }
.hp-cta-text {
    font-size: 1rem; opacity: .88; margin-bottom: 1.75rem;
    max-width: 580px; margin-left: auto; margin-right: auto; line-height: 1.7;
}
.hp-cta-btn {
    display: inline-block; padding: .8rem 2.1rem;
    border: 2px solid; border-radius: 8px;
    font-weight: 700; font-size: 1rem; text-decoration: none;
    transition: opacity .15s, transform .15s;
}
.hp-cta-btn:hover { opacity: .85; transform: translateY(-2px); }

/* ── Cache bust : version générée automatiquement ─────────────────────── */

/* ══ NAV RESPONSIVE (mobile ≤ 900px) ═══════════════════════════════════════ */
@media (max-width: 900px) {

    /* Hauteur header mobile */
    .nav-inner { padding: 0 .85rem; }

    /* Hamburger visible */
    .nav-toggle { display: flex; }

    /* Sub-toggle visible (accordéon) */
    .sub-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 46px;
        background: rgba(0,0,0,.04);
        border: none;
        border-left: 1px solid var(--border);
        cursor: pointer;
        color: var(--muted);
        font-size: .95rem;
        flex-shrink: 0;
        transition: background .15s, color .15s;
        padding: 0;
    }
    .sub-toggle:hover,
    .sub-toggle[aria-expanded="true"] { background: rgba(0,0,0,.08); color: var(--primary); }

    /* ══ Tiroir coulissant (drawer) ══ */
    .nav-menu {
        /* Toujours dans le DOM, décalé hors écran par défaut */
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(290px, 82vw);
        background: #fff;
        flex-direction: column;
        padding-top: 60px; /* hauteur header */
        padding-bottom: 2rem;
        z-index: 500;
        box-shadow: 6px 0 32px rgba(0,0,0,.15);
        border-right: 1px solid var(--border);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        gap: 0;
        flex-wrap: nowrap;
        margin-left: 0;
    }
    .nav-menu.open { transform: translateX(0); }

    /* Items de premier niveau */
    .nav-menu > li {
        border-bottom: 1px solid var(--border);
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }
    .nav-menu > li > a {
        flex: 1;
        padding: .85rem 1.25rem;
        font-size: .95rem;
        border-radius: 0;
        background: none;
    }
    .nav-menu > li.active > a {
        color: var(--primary);
        background: #eff6ff;
        border-left: 3px solid var(--primary);
        padding-left: calc(1.25rem - 3px);
    }
    /* Pas de flèche ▾ sur mobile (remplacée par le bouton sub-toggle) */
    .nav-menu > li.has-children > a::after { display: none; }

    /* Sous-menus → accordéon (fermés par défaut) */
    .nav-menu .sub-menu {
        position: static;
        display: none;
        flex-direction: column;
        flex-basis: 100%;
        width: 100%;
        border: none;
        border-top: 1px solid var(--border);
        box-shadow: none;
        border-radius: 0;
        background: #f8fafc;
        padding: 0;
        min-width: 0;
    }
    .nav-menu .sub-menu.open { display: flex; }
    .nav-menu .sub-menu li {
        border-bottom: 1px solid var(--border);
        list-style: none;
    }
    .nav-menu .sub-menu li:last-child { border-bottom: none; }
    .nav-menu .sub-menu a {
        padding: .65rem 1.25rem .65rem 2rem;
        color: var(--muted);
        font-size: .875rem;
        border-bottom: none;
    }
    .nav-menu .sub-menu a:hover { background: #e0e7ff; color: var(--primary); }

    /* Sous-menus profonds (niveau 3+) : indentation progressive */
    .nav-menu .sub-menu .sub-menu li a { padding-left: 3.25rem; }
    .nav-menu .sub-menu .sub-menu .sub-menu li a { padding-left: 4.25rem; }

    /* Flex pour les items parents au sein des sous-menus (sub-toggle aligné) */
    .nav-menu .sub-menu li.has-children {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }
    .nav-menu .sub-menu li.has-children > a { flex: 1; }
    .nav-menu .sub-menu li.has-children > .sub-menu { flex-basis: 100%; width: 100%; }

    /* Cacher la flèche › sur mobile (remplacée par le bouton sub-toggle) */
    .sub-menu li.has-children > a::after { display: none; }

    /* ══ Hamburger à DROITE ══ */
    .hamburger-right .nav-inner { flex-direction: row-reverse; }
    .hamburger-right .site-logo { margin-right: auto; }
    .hamburger-right .nav-toggle { margin-left: .3rem; }
    .hamburger-right .nav-menu {
        left: auto;
        right: 0;
        transform: translateX(100%);
        box-shadow: -6px 0 32px rgba(0,0,0,.15);
        border-right: none;
        border-left: 1px solid var(--border);
    }
    .hamburger-right .nav-menu.open { transform: translateX(0); }
}


/* =====================================================================
   DA « Connecteur e-commerce » : illustré, dessin animé, câbles qui relient
   Marine #14213D · Bleu #2F6BFF · Turquoise #13C4A3 · Orange #FF8A3D
   Jaune #FFD23F · Crème #FFF8EE · Gris-bleu #E6ECF7
   Polices conseillées (onglet Polices) : Baloo 2 (titres), Nunito (texte)
   ===================================================================== */

/* ═══════════════════════════════════════════════════════════════════════
   Thème « gestion » · logiciel-gestion.fr · DA « Atelier de gestion »
   Papier découpé isométrique : encre, papier, pierre + 5 couleurs de famille
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --lg-ink: #1E2235; --lg-paper: #F6F3EC; --lg-stone: #E5E0D5; --lg-white: #FFFFFF;
    --lg-emerald: #0FA37F; --lg-coral: #FF6F59; --lg-saffron: #F5B83D; --lg-azure: #3D6FE0; --lg-lilac: #8E7CF3;
    --lg-ink-2: #4A4F66; --lg-azure-d: #2A55BD;
    --primary: var(--lg-azure); --text: var(--lg-ink); --muted: var(--lg-ink-2); --bg: var(--lg-paper); --border: var(--lg-stone);
    --radius: 14px; --max-w: 1200px; --content-w: 900px;
    --lg-shadow: 6px 6px 0 var(--lg-stone);
}
body { font-family: var(--font-body, 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif); color: var(--lg-ink); font-size: 1.05rem; line-height: 1.72;
    background-color: var(--lg-paper);
    background-image: radial-gradient(rgba(30,34,53,.07) 1px, transparent 1.2px);
    background-size: 22px 22px; }
h1, h2, h3, h4, .logo-name, .hp-hero-h1 { font-family: var(--font-heading, 'Bricolage Grotesque', system-ui, sans-serif); color: var(--lg-ink); letter-spacing: -.015em; }
a { color: var(--lg-azure-d); text-underline-offset: 3px; }
a:hover { color: var(--lg-ink); }
::selection { background: var(--lg-saffron); color: var(--lg-ink); }

/* ── En-tête : bande de papier blanc posée sur le plateau ── */
.site-nav { background: var(--lg-white); border-bottom: 2px solid var(--lg-ink); box-shadow: 0 5px 0 var(--lg-stone); }
.nav-inner { height: 72px; }
.site-logo { gap: .6rem; }
.lg-logo { width: 44px; height: 44px; flex-shrink: 0; transition: transform .3s; }
.site-logo:hover .lg-logo { transform: translateY(-2px) rotate(-4deg); }
.lg-logo-wing { transform-box: fill-box; transform-origin: 20% 90%; animation: lgFlap 3.2s ease-in-out infinite; }
@keyframes lgFlap { 0%, 80%, 100% { transform: rotate(0); } 88% { transform: rotate(-14deg); } }
.logo-name { font-size: 1.22rem; font-weight: 800; color: var(--lg-ink); }
.logo-name .lg-tld { color: var(--lg-coral); }
.nav-menu > li > a, .nav-menu > li > .nav-label { font-weight: 600; color: var(--lg-ink); border-radius: 10px; }
.nav-menu > li > a:hover, .nav-menu > li.active > a { background: var(--lg-paper); color: var(--lg-ink); box-shadow: inset 0 -3px 0 var(--lg-saffron); }
@media (min-width: 901px) {
    .sub-menu { border: 2px solid var(--lg-ink); border-top: 2px solid var(--lg-ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--lg-stone); padding: .4rem; }
    .sub-menu a { border-radius: 9px; border-bottom: none; font-weight: 600; }
    .sub-menu a:hover { background: var(--lg-paper); color: var(--lg-ink); box-shadow: inset 4px 0 0 var(--lg-emerald); }
}
.lg-nav-cta { margin-left: auto; white-space: nowrap; background: var(--lg-coral); color: var(--lg-ink); font-weight: 700; text-decoration: none; padding: .55rem 1.1rem; border: 2px solid var(--lg-ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--lg-ink); transition: transform .15s, box-shadow .15s; }
.lg-nav-cta:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--lg-ink); color: var(--lg-ink); }
@media (max-width: 900px) { .lg-nav-cta { padding: .4rem .75rem; font-size: .85rem; } }
@media (max-width: 480px) { .lg-nav-cta { display: none; } }

/* ── Gabarits ── */
#main { padding: 2.5rem 1.5rem 4rem; }
.page-content, .single-post { max-width: var(--content-w); }
.page-header h1, .post-header h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.1; font-weight: 800; }

/* ── Texte courant ── */
.content-body p, .post-body p, .cat-content p, .blog-content p { margin: 0 0 1.05rem; }
.content-body > p:first-child, .post-body > p:first-child { font-size: 1.15rem; line-height: 1.7; }
.content-body h2, .post-body h2, .cat-content h2, .blog-content h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin: 2.6rem 0 .85rem; line-height: 1.18; font-weight: 800; position: relative; padding-left: 2.1rem; }
.content-body h2::before, .post-body h2::before, .cat-content h2::before, .blog-content h2::before { content: ''; position: absolute; left: 0; top: .28em; width: 1.25rem; height: 1.25rem;
    background: conic-gradient(from 30deg, var(--lg-azure) 0 120deg, var(--lg-emerald) 120deg 240deg, var(--lg-saffron) 240deg 360deg);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.content-body h3, .post-body h3, .cat-content h3, .blog-content h3 { font-size: 1.24rem; margin: 1.7rem 0 .5rem; font-weight: 700; }
.content-body h3::before, .post-body h3::before, .cat-content h3::before, .blog-content h3::before { content: ''; display: inline-block; width: .8em; height: 4px; margin-right: .55em; border-radius: 2px; background: var(--lg-coral); vertical-align: .3em; }
.content-body strong, .post-body strong, .cat-content strong, .blog-content strong { font-weight: 700; color: var(--lg-ink); background: linear-gradient(transparent 62%, rgba(245,184,61,.38) 62%); }
.content-body strong a, .post-body strong a, .cat-content strong a { color: var(--lg-azure-d); text-decoration: underline; text-decoration-thickness: 2px; }
.content-body em, .post-body em { color: #33384F; }
.content-body > ul, .post-body > ul { padding-left: .2rem; list-style: none; }
.content-body > ul > li, .post-body > ul > li { position: relative; padding-left: 1.4rem; margin-bottom: .4rem; }
.content-body > ul > li::before, .post-body > ul > li::before { content: ''; position: absolute; left: 0; top: .62em; width: .55rem; height: .55rem; background: var(--lg-emerald); transform: rotate(45deg); }

/* ── Infographies SVG : carte de papier posée ── */
.lg-svg { margin: 2.2rem 0 2.4rem; }
.lg-svg svg { display: block; width: 100%; height: auto; filter: drop-shadow(7px 7px 0 var(--lg-stone)); }
.lg-svg figcaption { margin-top: .75rem; font-size: .9rem; color: var(--muted); text-align: center; font-weight: 600; }

/* ── Encadré « Bon réflexe » ── */
.lg-note { background: var(--lg-white); border: 2px solid var(--lg-ink); border-left: 10px solid var(--lg-emerald); border-radius: 14px; padding: 1.1rem 1.3rem .2rem; margin: 1.8rem 0; box-shadow: var(--lg-shadow); }

/* ── Tableaux ── */
.content-body table, .post-body table, .cat-content table, .blog-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6rem 0 2rem; background: var(--lg-white); border: 2px solid var(--lg-ink); border-radius: 14px; overflow: hidden; font-size: .98rem; box-shadow: var(--lg-shadow); }
.content-body th, .post-body th, .cat-content th, .blog-content th { background: var(--lg-ink); color: var(--lg-white); text-align: left; padding: .8rem 1rem; font-family: var(--font-heading, 'Bricolage Grotesque', system-ui, sans-serif); font-weight: 700; }
.content-body td, .post-body td, .cat-content td, .blog-content td { padding: .75rem 1rem; border-top: 1px solid var(--lg-stone); vertical-align: top; }
.content-body tr:nth-child(even) td, .post-body tr:nth-child(even) td, .cat-content tr:nth-child(even) td, .blog-content tr:nth-child(even) td { background: #FBFAF6; }
.content-body td:first-child, .post-body td:first-child, .cat-content td:first-child, .blog-content td:first-child { font-weight: 700; width: 36%; }
@media (max-width: 640px) { .content-body table, .post-body table, .cat-content table, .blog-content table { display: block; overflow-x: auto; } }

/* ── FAQ ── */
.content-body details, .post-body details, .cat-content details, .blog-content details { background: var(--lg-white); border: 2px solid var(--lg-ink); border-radius: 14px; margin: .75rem 0; padding: 0 1.15rem; box-shadow: 4px 4px 0 var(--lg-stone); transition: box-shadow .2s; }
.content-body details[open], .post-body details[open], .cat-content details[open], .blog-content details[open] { box-shadow: 6px 6px 0 var(--lg-lilac); }
.content-body summary, .post-body summary, .cat-content summary, .blog-content summary { cursor: pointer; font-weight: 700; padding: .95rem 2.2rem .95rem 0; list-style: none; position: relative; }
.content-body summary::-webkit-details-marker, .post-body summary::-webkit-details-marker, .cat-content summary::-webkit-details-marker, .blog-content summary::-webkit-details-marker { display: none; }
.content-body summary::after, .post-body summary::after, .cat-content summary::after, .blog-content summary::after { content: '+'; position: absolute; right: 0; top: .7rem; width: 1.65rem; height: 1.65rem; line-height: 1.5rem; text-align: center; border-radius: 8px; background: var(--lg-saffron); border: 2px solid var(--lg-ink); font-weight: 800; }
.content-body details[open] summary::after, .post-body details[open] summary::after, .cat-content details[open] summary::after, .blog-content details[open] summary::after { content: '−'; background: var(--lg-emerald); color: var(--lg-white); }
.content-body details p, .post-body details p, .cat-content details p, .blog-content details p { padding-bottom: .9rem; }

/* ── Héros des pages, rubriques et blog : image + voile papier à gauche ── */
.lg-hero { position: relative; width: 100vw; margin: -2.5rem calc(50% - 50vw) 2.2rem; min-height: clamp(320px, 36vw, 470px); display: flex; align-items: center; overflow: hidden; background: var(--lg-stone); border-bottom: 2px solid var(--lg-ink); }
.lg-hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 2; background: linear-gradient(90deg, var(--lg-emerald) 0 20%, var(--lg-lilac) 20% 40%, var(--lg-saffron) 40% 60%, var(--lg-azure) 60% 80%, var(--lg-coral) 80% 100%); }
.lg-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; display: block; }
.lg-hero.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(246,243,236,.97) 0%, rgba(246,243,236,.9) 34%, rgba(246,243,236,.45) 58%, rgba(246,243,236,0) 78%); }
.lg-hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem 2.6rem; }
.lg-hero .page-header, .lg-hero .post-header { max-width: 600px; margin: 0; }
.lg-hero h1 { color: var(--lg-ink) !important; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; margin: 0 0 .8rem; font-weight: 800; }
.lg-hero .cat-description, .lg-hero .lg-sub { color: var(--lg-ink-2); font-size: 1.12rem; max-width: 540px; }
.lg-hero.no-img { min-height: 0; background: var(--lg-white); }
.lg-hero.no-img .lg-hero-inner { padding: 2.6rem 1.5rem 2.2rem; }
#main.with-sidebar .lg-hero { width: auto; margin-left: 0; margin-right: 0; border-radius: 18px; }
@media (max-width: 760px) {
  .lg-hero { min-height: 360px; align-items: flex-end; }
  .lg-hero.has-img::after { background: linear-gradient(0deg, rgba(246,243,236,.98) 0%, rgba(246,243,236,.9) 48%, rgba(246,243,236,.25) 100%); }
  .lg-hero-inner { padding: 2rem 1rem 1.7rem; }
}

/* ── En-tête d'article + illustration en carte ── */
.lg-posthead { position: relative; width: 100vw; margin: -2.5rem calc(50% - 50vw) 0; background: var(--lg-white); border-bottom: 2px solid var(--lg-ink); padding: 3rem 0 6.5rem; --lg-cat: var(--lg-azure); }
.lg-posthead::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--lg-cat); }
.lg-posthead-inner { max-width: var(--content-w); margin: 0 auto; padding: 0 1.5rem; }
.lg-cat--facturation-comptabilite { --lg-cat: var(--lg-emerald); }
.lg-cat--gestion-commerciale-crm { --lg-cat: var(--lg-lilac); }
.lg-cat--stocks-achats { --lg-cat: var(--lg-saffron); }
.lg-cat--erp-pilotage { --lg-cat: var(--lg-azure); }
.lg-cat--logiciels-par-metier { --lg-cat: var(--lg-coral); }
.lg-cat--choisir-deployer { --lg-cat: var(--lg-ink); }
.lg-kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lg-ink); background: var(--lg-paper); border: 2px solid var(--lg-ink); border-radius: 8px; padding: .2rem .65rem; margin-bottom: 1rem; box-shadow: 3px 3px 0 var(--lg-cat); }
.lg-posthead .post-meta { color: var(--muted); font-weight: 600; font-size: .88rem; gap: .4rem 1.2rem; }
.lg-cover { max-width: var(--content-w); margin: -4.6rem auto 1.4rem; position: relative; z-index: 1; padding: 0; }
.lg-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 2px solid var(--lg-ink); border-radius: 20px; box-shadow: 10px 10px 0 var(--lg-stone); background: var(--lg-white); }
.single-post .lg-posthead + .lg-breadcrumb { margin-top: 1.4rem; }

/* ── Fil d'Ariane ── */
.lg-breadcrumb { margin: -.6rem 0 1.8rem; font-size: .86rem; font-weight: 600; color: var(--muted); }
.lg-breadcrumb ol, .lg-breadcrumb ul { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin: 0; padding: 0; }
.lg-breadcrumb a { color: var(--lg-azure-d); text-decoration: none; }
.lg-breadcrumb a:hover { text-decoration: underline; }

/* ── Accueil ── */
body.page-home #main { padding: 0; }
.hp-hero { text-align: left; background: var(--lg-stone) !important; border-bottom: 2px solid var(--lg-ink); align-items: center; }
.hp-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 2; background: linear-gradient(90deg, var(--lg-emerald) 0 20%, var(--lg-lilac) 20% 40%, var(--lg-saffron) 40% 60%, var(--lg-azure) 60% 80%, var(--lg-coral) 80% 100%); }
.hp-hero .hp-hero-bg { transform: none; background-position: center right; background-size: cover; }
.hp-hero .hp-hero-overlay { display: block !important; background: linear-gradient(90deg, rgba(246,243,236,.97) 0%, rgba(246,243,236,.9) 36%, rgba(246,243,236,.4) 60%, rgba(246,243,236,0) 80%) !important; }
.hp-hero-content { max-width: var(--max-w); width: 100%; margin: 0 auto; padding: 3.5rem 1.5rem; }
.hp-hero-h1 { color: var(--lg-ink) !important; text-shadow: none !important; max-width: 640px; font-size: clamp(2.2rem, 5vw, 3.6rem) !important; line-height: 1.04 !important; font-weight: 800; }
.hp-hero-sub { color: var(--lg-ink-2) !important; text-shadow: none !important; margin-left: 0 !important; max-width: 560px; font-size: 1.18rem !important; }
.hp-hero-cta { background: var(--lg-coral) !important; color: var(--lg-ink) !important; border: 2px solid var(--lg-ink) !important; border-radius: 12px !important; font-weight: 700 !important; box-shadow: 5px 5px 0 var(--lg-ink) !important; transition: transform .15s, box-shadow .15s !important; }
.hp-hero-cta:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--lg-ink) !important; }
@media (max-width: 760px) { .hp-hero .hp-hero-overlay { background: rgba(246,243,236,.86) !important; } }
.hp-section-content { padding-top: 3rem; }
.hp-content-body { max-width: var(--content-w); margin: 0 auto; }
.hp-content-body h2 { font-size: clamp(1.55rem, 2.8vw, 2.05rem); margin: 2.7rem 0 .9rem; font-weight: 800; position: relative; padding-left: 2.1rem; }
.hp-content-body h2::before { content: ''; position: absolute; left: 0; top: .28em; width: 1.25rem; height: 1.25rem; background: conic-gradient(from 30deg, var(--lg-azure) 0 120deg, var(--lg-emerald) 120deg 240deg, var(--lg-saffron) 240deg 360deg); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hp-content-body h3 { font-size: 1.24rem; margin: 1.7rem 0 .5rem; }
.hp-content-body h3::before { content: ''; display: inline-block; width: .8em; height: 4px; margin-right: .55em; border-radius: 2px; background: var(--lg-coral); vertical-align: .3em; }
.hp-content-body p { margin: 0 0 1.05rem; }
.hp-content-body > p:first-child { font-size: 1.18rem; }
.hp-content-body strong { font-weight: 700; background: linear-gradient(transparent 62%, rgba(245,184,61,.38) 62%); }
.hp-content-body strong a { color: var(--lg-azure-d); text-decoration: underline; text-decoration-thickness: 2px; }
.hp-content-body table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6rem 0 2rem; background: var(--lg-white); border: 2px solid var(--lg-ink); border-radius: 14px; overflow: hidden; box-shadow: var(--lg-shadow); }
.hp-content-body th { background: var(--lg-ink); color: #fff; text-align: left; padding: .8rem 1rem; }
.hp-content-body td { padding: .75rem 1rem; border-top: 1px solid var(--lg-stone); vertical-align: top; }
.hp-content-body td:first-child { font-weight: 700; width: 36%; }
.hp-content-body details { background: #fff; border: 2px solid var(--lg-ink); border-radius: 14px; margin: .75rem 0; padding: 0 1.15rem; box-shadow: 4px 4px 0 var(--lg-stone); }
.hp-content-body summary { cursor: pointer; font-weight: 700; padding: .95rem 2.2rem .95rem 0; list-style: none; position: relative; }
.hp-content-body summary::-webkit-details-marker { display: none; }
.hp-content-body summary::after { content: '+'; position: absolute; right: 0; top: .7rem; width: 1.65rem; height: 1.65rem; line-height: 1.5rem; text-align: center; border-radius: 8px; background: var(--lg-saffron); border: 2px solid var(--lg-ink); font-weight: 800; }
.hp-content-body details[open] summary::after { content: '−'; background: var(--lg-emerald); color: #fff; }
@media (max-width: 640px) { .hp-content-body table { display: block; overflow-x: auto; } }
.hp-section-posts { padding-bottom: 3.5rem; }
.hp-section-title { font-weight: 800; }

/* ── Cartes (accueil, blog, rubriques) ── */
.hp-post-card, .post-card, .blog-cat-card, .post-list-item { background: var(--lg-white) !important; border: 2px solid var(--lg-ink) !important; border-radius: 16px !important; box-shadow: 6px 6px 0 var(--lg-stone) !important; transition: transform .18s, box-shadow .18s; overflow: hidden; }
.hp-post-card:hover, .post-card:hover, .blog-cat-card:hover, .post-list-item:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 var(--lg-saffron) !important; }
.hp-post-title a, .post-card h2 a, .post-card h3 a, .post-list-item h2 a { color: var(--lg-ink); text-decoration: none; font-family: var(--font-heading, 'Bricolage Grotesque', system-ui, sans-serif); }
.hp-post-cat { color: var(--lg-ink) !important; background: var(--lg-paper); border-radius: 6px; padding: .05rem .45rem; text-decoration: none; font-weight: 700; }
.read-more, .hp-post-read { font-weight: 700; color: var(--lg-azure-d); }
.posts-grid { grid-template-columns: repeat(var(--cat-cols, 3), minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card-thumb img, .hp-post-thumb img { aspect-ratio: 16/9; object-fit: cover; width: 100%; border-bottom: 2px solid var(--lg-ink); display: block; }
.post-card-body { padding: 1.05rem 1.2rem 1.2rem; }
.post-card-body h2 { font-size: 1.12rem; line-height: 1.3; margin-bottom: .45rem; }
.post-card-body p { font-size: .94rem; color: var(--muted); margin-bottom: .6rem; }
.blog-cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; margin: 2rem 0 2.6rem; }
@media (max-width: 900px) { .blog-cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .blog-cat-grid { grid-template-columns: 1fr; } }
.blog-cat-card { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--lg-ink); padding: 0 0 1.1rem; }
.blog-cat-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-bottom: 2px solid var(--lg-ink); }
.blog-cat-card strong { font-family: var(--font-heading, 'Bricolage Grotesque', system-ui, sans-serif); font-size: 1.25rem; padding: .7rem 1.1rem 0; }
.blog-cat-card span:not(.blog-cat-card-img) { color: var(--muted); font-size: .95rem; padding: 0 1.1rem; line-height: 1.5; }
.blog-cat-card em { font-style: normal; font-weight: 700; font-size: .82rem; margin: .2rem 1.1rem 0; align-self: flex-start; background: var(--lg-paper); border: 2px solid var(--lg-ink); border-radius: 8px; padding: .05rem .5rem; }
.cat-content, .blog-content { background: transparent; padding: 0; margin: 1.5rem auto; max-width: var(--content-w); line-height: 1.72; }
.cat-content-top, .blog-content-top { font-size: 1.12rem; }
.category-page, .blog-listing { max-width: var(--max-w); margin: 0 auto; }

/* ── Pagination ── */
.pagination .page-list { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; padding: 0; }
.pagination a, .page-btn { display: inline-flex; min-width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; border: 2px solid var(--lg-ink); border-radius: 10px; background: #fff; color: var(--lg-ink); text-decoration: none; font-weight: 700; box-shadow: 3px 3px 0 var(--lg-stone); }
.pagination a.active, .page-btn.active { background: var(--lg-ink) !important; color: #fff !important; }

/* ── Navigation entre articles ── */
.post-nav { border-top: 2px dashed var(--lg-stone) !important; }
.post-nav-item { background: #fff; border: 2px solid var(--lg-ink) !important; border-radius: 14px !important; box-shadow: 4px 4px 0 var(--lg-stone); }
.post-nav-item:hover { box-shadow: 6px 6px 0 var(--lg-saffron) !important; }

/* ── Formulaire de contact ── */
.content-body form { background: #fff; border: 2px solid var(--lg-ink); border-radius: 18px; padding: 1.6rem; box-shadow: 8px 8px 0 var(--lg-stone); max-width: 760px; margin: 1.5rem 0 2rem; }
.content-body form input, .content-body form textarea, .content-body form select { border: 2px solid var(--lg-stone) !important; border-radius: 10px !important; font: inherit; }
.content-body form input:focus, .content-body form textarea:focus, .content-body form select:focus { outline: none; border-color: var(--lg-azure) !important; box-shadow: 0 0 0 3px rgba(61,111,224,.18); }
.content-body form button, .content-body form [type=submit] { background: var(--lg-coral) !important; color: var(--lg-ink) !important; font-weight: 700; border: 2px solid var(--lg-ink) !important; border-radius: 12px !important; padding: .75rem 1.4rem; cursor: pointer; box-shadow: 4px 4px 0 var(--lg-ink); }

/* ── Pied de page ── */
.site-footer { background: var(--lg-ink); color: #CFCBD9; border-top: none; position: relative; margin-top: 4.5rem; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; background: linear-gradient(90deg, var(--lg-emerald) 0 20%, var(--lg-lilac) 20% 40%, var(--lg-saffron) 40% 60%, var(--lg-azure) 60% 80%, var(--lg-coral) 80% 100%); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: center; padding: 2rem 1.5rem; }
.site-footer p, .footer-inner { color: #CFCBD9; }
.lg-legal a { color: #CFCBD9; margin: 0 .25rem; }
.lg-legal a:hover { color: #fff; }
.lg-foot-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: #fff; }
.lg-foot-brand .lg-logo { width: 34px; height: 34px; }

/* ── Menu mobile ── */
@media (max-width: 900px) {
    .nav-inner { height: 64px; gap: .6rem; }
    .nav-menu { padding-top: 80px; background: var(--lg-white); }
    .nav-menu > li:hover > .sub-menu:not(.open) { display: none; }
    .nav-menu > li > a:hover, .nav-menu > li.active > a { background: var(--lg-paper); border-radius: 0; box-shadow: none; }
    .nav-menu .sub-menu a { color: var(--lg-ink); font-weight: 600; }
    .nav-toggle span { background: var(--lg-ink); }
    .hamburger-right .lg-nav-cta { margin-left: 0; }
    .nav-menu > li > .nav-label { flex: 1; padding: .85rem 1.25rem; font-size: .95rem; border-radius: 0; cursor: pointer; }
    .nav-menu > li.has-children > .nav-label::after { display: none; }
    .nav-menu > li > a, .nav-menu > li > .nav-label { text-align: left; display: block; flex: 1; }
    .nav-menu > li:not(.has-children) > a { width: 100%; }
    .nav-menu { align-items: stretch !important; }
    .nav-menu > li { width: 100%; }
}
@media (min-width: 901px) {
    .nav-menu > li.has-children > .sub-menu { top: 100%; margin-top: 0; }
    .nav-menu > li.has-children > .sub-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
    .nav-menu > li.has-children { padding-bottom: 6px; margin-bottom: -6px; }
    .nav-menu > li:focus-within > .sub-menu { display: block; }
    .nav-menu .sub-menu { min-width: 280px; }
    .nav-menu .sub-menu a { white-space: nowrap; }
}
.nav-menu > li > .nav-label { display: block; padding: .5rem .9rem; font-size: .92rem; cursor: default; user-select: none; }
.nav-menu > li.has-children > .nav-label::after { content: ' ▾'; font-size: .6rem; opacity: .7; }
.nav-menu > li:hover > .nav-label, .nav-menu > li:focus-within > .nav-label { background: var(--lg-paper); }
html, body { overflow-x: clip; }

/* ── Apparition au défilement (uniquement si JS actif et animations autorisées) ── */
@media (prefers-reduced-motion: no-preference) {
    html.lg-js .lg-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
    html.lg-js .lg-reveal.lg-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .lg-logo-wing { animation: none; } .hp-post-card, .post-card, .blog-cat-card, .lg-nav-cta { transition: none; } }

/* ── Sommaire automatique (extension sommaire-quietcms) ── */
.sqcms-toc { background: var(--lg-white) !important; border: 2px solid var(--lg-ink) !important; border-radius: 16px !important; box-shadow: 6px 6px 0 var(--lg-stone); padding: 1.1rem 1.4rem !important; margin: 1.6rem 0 2rem !important; }
.sqcms-toc-list { list-style: none; margin: 0; padding: 0; }
.sqcms-toc-item { margin: 0 !important; }
.sqcms-toc-item a { color: var(--lg-ink) !important; text-decoration: none; }
.sqcms-toc-item a:hover { color: var(--lg-azure-d) !important; text-decoration: underline; }
.sqcms-lvl-2 > a { font-weight: 700; }
.sqcms-lvl-3 { padding-left: 1.2rem !important; font-size: .95rem; }
.sqcms-toc-item, .sqcms-toc-item > a { padding-top: .12rem !important; padding-bottom: .12rem !important; line-height: 1.45 !important; min-height: 0 !important; }
.sqcms-toc-list .sqcms-toc-list { margin: .1rem 0 .3rem !important; }

/* ── Héros : illustration en fond derrière le H1, voile papier à gauche pour la lisibilité ── */
.lg-hero.has-img::after { background: linear-gradient(90deg, rgba(246,243,236,.96) 0%, rgba(246,243,236,.9) 30%, rgba(246,243,236,.55) 52%, rgba(246,243,236,.1) 72%, rgba(246,243,236,0) 85%); }
.hp-hero .hp-hero-overlay { background: linear-gradient(90deg, rgba(246,243,236,.96) 0%, rgba(246,243,236,.9) 30%, rgba(246,243,236,.55) 52%, rgba(246,243,236,.1) 72%, rgba(246,243,236,0) 85%) !important; }
.lg-hero h1, .hp-hero-h1 { text-shadow: 0 0 18px rgba(246,243,236,.9), 0 0 4px rgba(246,243,236,.8) !important; }
