
html {
    /* scroll-behavior intentionally NOT set here — whitepaper-sidebar.js drives
       all TOC scrolling via window.scrollTo({behavior:'smooth'}).
       Setting scroll-behavior:smooth on html creates a competing CSS animation
       that fights the JS scroll and causes it to stop mid-page.
       scroll-padding-top is kept as fallback for native anchor jumps
       (direct URL hashes, browser back/forward). */
    scroll-padding-top: 160px;
}
#whitepaper3_div .modal-dialog {
    max-width: 600px !important;
}

#whitepaper3_div .modal-body.body-news:before { display: none !important; }

#whitepaper3_div .padd-0-3 img { 
    -webkit-box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.3);
    -moz-box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.3);
    box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.3);
    height: 200px;
    }

#whitepaper3_div .padd-0-3 { 
    
    margin-top: 0px;
}
#whitepaper3_div .padd-submit {
    padding: 0px 20px !important;
}
#whitepaper3_div p { width: 100% !important }
#whitepaper3_div .wpcf7-validation-errors {
    position: relative;
    color: red !important;
    margin-top: 10px !important;
    width: 90% !important;
}

#whitepaper3_div input {margin: 0px !important;}

#whitepaper3_div button#sus_submit {
    height: 40px;
    color: #ffffff;
    background: #053158;
    border:.09em solid #053158;
    font-size: 16px;
    padding: 10px 15px;
    margin-left: 0px;
    border-radius: 0px;
    float: left;
    width: 30%;
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    border-radius: 0px  3px  3px  0px;
}
#whitepaper3_div .suscribe-input input  {
    border-radius: 3px  0px  0px  3px;
}
#whitepaper3_div .modal-dialog {
    max-width: 600px !important;
}
#whitepaper3_div .modal-body.body-news:before { display: none !important; }

#whitepaper3_div .padd-0-3 img { 
-webkit-box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.3);
box-shadow: 0px 0px 3px 2px rgba(0,0,0,0.3);
height: 200px;
}
#whitepaper3_div .padd-0-3 { 
    
    margin-top: 20px;
}
#whitepaper3_div p { width: 100% !important }
#whitepaper3_div .wpcf7-validation-errors {
    position: relative;
    color: red !important;
    margin-top: 40px !important;
    width: 90% !important;
}
#whitepaper3_div input { margin-bottom: 0px !important }
#whitepaper3_div form.sent .sent-div {
    display: none;
}
#whitepaper3_div form.sent .btn-down-wp { display: block !important; }
#whitepaper3_div .padd-0 { 
    padding: 0px !important;
    
    margin-top: 20px;
}
@media (min-width: 768px){
    #whitepaper3_div .padd-0 { margin-left: 30px; }
}
@media (max-width: 767px){
    p.p2 { margin-bottom: 0px !important; }
    #whitepaper3_div .padd-0 {
    margin: 0px 30px;
}
#whitepaper3_div .padd-0-3 {
    margin-bottom: 20px;
}
}
#whitepaper3_div input[type="submit"] { display: block; }
.submit-btn-wp { margin-bottom: 20px !important; width: 100%; margin-top: 20px; }
@media (min-width: 768px) {
    #whitepaper3_div form.wpcf7-form.invalid {
    width: auto !important;
    margin: 0px  !important;
    text-align: center;
    position: relative;
    min-height: auto !important;
}
}
#whitepaper3_div .witetexte{
    margin-top: 3rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 1.6rem;
       color: #063259 !important; 
}
  #whitepaper3_div .whitep-p  a:hover {
    color:#ffffff;
  }
#whitepaper3_div .wpp{
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 16px;  
    color: #053158;
}
  #whitepaper3_div .bwp {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
#whitepaper3_div .imgx {
    width: 75%;
    margin: auto;
}
#whitepaper3_div .btnx{
    position: absolute;
    right: 0.5rem;
    z-index: 100;
    top: 0.7rem;
    text-align: center;
}


/* =============================================================================
   WHITEPAPER SIDEBAR TEMPLATE — Two-column layout
   Scoped under .whitepaper-template to avoid conflicts with global styles.
   ============================================================================= */

.whitepaper-template {
    --wp-navy:   #0a1628;
    --wp-gold:   #c9a84c;
    --wp-black:  #0d0d0d;
    --wp-white:  #ffffff;
}

/* Two-column grid: article left, sidebar right */
.whitepaper-template .wp-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

/* Left column */
.whitepaper-template .wp-article {
    min-width: 0; /* prevent overflow in grid */
}

/* Right column — sticky sidebar */
.whitepaper-template .wp-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Individual widget wrapper */
.whitepaper-template .wp-sidebar-widget {
    background: #f8f8f6;
    border: 1px solid #e5e5e0;
    padding: 1.5rem;
}

/* Widget title */
.whitepaper-template .wp-sidebar-widget-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp-navy);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e0;
}

/* TOC block */
.whitepaper-template .wp-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.whitepaper-template .wp-toc li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e5e0;
    font-size: 0.875rem;
}

.whitepaper-template .wp-toc li:last-child {
    border-bottom: none;
}

.whitepaper-template .wp-toc-num {
    color: #999;
    font-size: 0.75rem;
    min-width: 1rem;
    flex-shrink: 0;
}

.whitepaper-template .wp-toc a {
    color: var(--wp-navy);
    text-decoration: none;
    line-height: 1.4;
}

.whitepaper-template .wp-toc a:hover {
    color: var(--wp-gold);
    text-decoration: underline;
}

/* Latest whitepapers block */
.whitepaper-template .wp-latest-whitepapers {
    list-style: none;
    margin: 0;
    padding: 0;
}

.whitepaper-template .wp-latest-whitepapers li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e5e0;
    font-size: 0.875rem;
}

.whitepaper-template .wp-latest-whitepapers li:last-child {
    border-bottom: none;
}

.whitepaper-template .wp-latest-whitepapers a {
    color: var(--wp-navy);
    text-decoration: none;
}

.whitepaper-template .wp-latest-whitepapers a::after {
    content: ' →';
}

.whitepaper-template .wp-latest-whitepapers a:hover {
    color: var(--wp-gold);
}

/* Dark CTA block */
.whitepaper-template .wp-dark-cta {
    background: var(--wp-navy);
    color: var(--wp-white);
    padding: 1.5rem;
}

.whitepaper-template .wp-dark-cta h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wp-white);
    margin: 0 0 1rem 0;
}

.whitepaper-template .wp-dark-cta p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.85);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.whitepaper-template .wp-cta-btn {
    display: block;
    text-align: center;
    background: var(--wp-gold);
    color: var(--wp-navy);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
}

.whitepaper-template .wp-cta-btn:hover {
    background: #b8973e;
    color: var(--wp-navy);
    text-decoration: none;
}

/* Dark CTA widget — override the widget wrapper background when inside .wp-dark-cta */
.whitepaper-template .wp-sidebar-widget:has(.wp-dark-cta) {
    background: transparent;
    border: none;
    padding: 0;
}

/* Post title */
.whitepaper-template .wp-post-title {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* Breadcrumb */
.whitepaper-template .wp-breadcrumb {
    margin-top: 1rem;
}

/* Responsive — single column below 768px */
@media (max-width: 767px) {
    .whitepaper-template .wp-content-grid {
        grid-template-columns: 1fr;
    }

    .whitepaper-template .wp-sidebar {
        position: static;
    }
}


/* =============================================================================
   WHITEPAPER ARTICLE HEADER (ACF-driven)
   ============================================================================= */

.whitepaper-template .wp-article-header {
    padding: 2.5rem 0 2rem;
    max-width: 720px;
}

/* Meta label — "WHITEPAPER · BPO & MANAGED SERVICES · MYCENA SECURITY SOLUTIONS" */
.whitepaper-template .wp-meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp-navy);
    margin: 0 0 0.75rem;
}

/* Main H1 title */
.whitepaper-template .wp-post-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--wp-black);
    margin: 0 0 1rem;
}

/* Italic subtitle */
.whitepaper-template .wp-subtitle {
    font-size: 1.125rem;
    color: #444;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

/* Intro paragraph */
.whitepaper-template .wp-intro {
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

/* Tags row */
.whitepaper-template .wp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.whitepaper-template .wp-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wp-navy);
    background: #eef0f5;
    border: 1px solid #d0d4e0;
    padding: 0.35rem 0.75rem;
    border-radius: 2px;
}

/* Header buttons */
.whitepaper-template .wp-header-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.whitepaper-template .wp-btn-primary {
    display: inline-block;
    background: var(--wp-black);
    color: var(--wp-white);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.875rem 1.75rem;
    border: 2px solid var(--wp-black);
    transition: background 0.2s, color 0.2s;
}

.whitepaper-template .wp-btn-primary:hover {
    background: #333;
    color: var(--wp-white);
    text-decoration: none;
}

.whitepaper-template .wp-btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--wp-black);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.875rem 1.75rem;
    border: 2px solid var(--wp-black);
    transition: background 0.2s, color 0.2s;
}

.whitepaper-template .wp-btn-secondary:hover {
    background: var(--wp-black);
    color: var(--wp-white);
    text-decoration: none;
}

/* Divider between header and content grid */
.whitepaper-template .wp-header-divider {
    border: none;
    border-top: 1px solid #e0e0da;
    margin: 0 0 2rem;
}

/* =============================================================================
   KEY FIGURES WIDGET
   ============================================================================= */

.whitepaper-template .wp-key-figures {
    display: flex;
    flex-direction: column;
}

.whitepaper-template .wp-key-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 0.5rem;
    border-bottom: 1px solid #e5e5e0;
}

.whitepaper-template .wp-key-figure:last-child {
    border-bottom: none;
}

.whitepaper-template .wp-kf-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

/* Navy value colour */
.whitepaper-template .wp-kf-navy {
    color: var(--wp-navy);
}

/* Red value colour */
.whitepaper-template .wp-kf-red {
    color: #8b1a1a;
}

.whitepaper-template .wp-kf-label {
    display: block;
    font-size: 0.8rem;
    color: #555;
    line-height: 1.5;
    max-width: 200px;
}

/* Responsive */
@media (max-width: 767px) {
    .whitepaper-template .wp-article-header {
        padding: 1.5rem 0 1rem;
    }
}


/* =============================================================================
   FULL-PAGE GRID — header + content left, sidebar right from the top
   Replaces .wp-content-grid for the new layout where sidebar starts at header level
   ============================================================================= */

.whitepaper-template .wp-page-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
    padding-top: 8rem;
}

/* Left column wrapper */
.whitepaper-template .wp-main-col {
    min-width: 0;
}

/* Responsive — single column below 768px */
@media (max-width: 767px) {
    .whitepaper-template .wp-page-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll padding global — fallback values.
   Les valeurs exactes sont définies dynamiquement par whitepaper-sidebar.js
   (header height + 250px) pour que le titre H2 soit bien visible.
   Ce bloc sert de fallback si le JS n'est pas encore chargé. */
html {
    scroll-padding-top: 250px;
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 200px;
    }
}

/* Offset sur les titres pour le scroll natif (fallback).
   Sans !important pour laisser le JS surcharger dynamiquement. */
.whitepaper-template .wp-article h2[id],
.whitepaper-template .wp-article h3[id],
.whitepaper-template .wp-article h4[id] {
    scroll-margin-top: 250px;
}

@media (max-width: 767px) {
    .whitepaper-template .wp-article h2[id],
    .whitepaper-template .wp-article h3[id],
    .whitepaper-template .wp-article h4[id] {
        scroll-margin-top: 200px;
    }
}
