/* ==========================================================================
   Outils SEO (.out-) + Ressources SEO (.res-) — Design System Twaino
   ========================================================================== */

/* ---- Full-width reset for GeneratePress ---- */
body.single-outils #page.grid-container,
body.single-ressources #page.grid-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}
body.single-outils .site-content,
body.single-ressources .site-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Critical: .out-wrapper/.res-wrapper must be width:100% inside flex parent */
.out-wrapper, .res-wrapper {
    width: 100% !important;
    font-family: 'Roboto', sans-serif;
    color: #575760;
    line-height: 1.7;
    overflow-x: clip;
}

/* ---- Hero ---- */
.out-hero, .res-hero {
    background: linear-gradient(135deg, #010643 0%, #0a1a5c 50%, #0099bc 100%);
    color: #fff;
    padding: 60px 0;
    width: 100%;
}
.out-hero-inner, .res-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 40px;
}
.out-hero-logo img, .res-hero-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
}
.out-hero-title, .res-hero-title {
    font-size: 36px;
    font-weight: 300;
    margin: 0 0 8px;
    color: #fff;
}
.out-hero-company, .res-hero-company {
    font-size: 18px;
    opacity: 0.85;
    margin: 0 0 12px;
}
.out-hero-desc, .res-hero-desc {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 20px;
    max-width: 600px;
}
.out-hero-actions, .res-hero-actions {
    margin-top: 16px;
}

/* ---- Buttons ---- */
.out-btn-primary, .res-btn-primary {
    display: inline-block;
    background: #56aea4;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background 0.2s, transform 0.2s;
}
.out-btn-primary:hover, .res-btn-primary:hover {
    background: #3d9e94;
    transform: translateY(-1px);
}
.out-btn-outline, .res-btn-outline {
    display: inline-block;
    border: 2px solid #56aea4;
    color: #56aea4 !important;
    padding: 10px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    background: transparent;
    transition: background 0.2s;
}
.out-btn-outline:hover, .res-btn-outline:hover {
    background: rgba(86, 174, 164, 0.1);
}
.out-btn-full, .res-btn-full {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* ---- Meta bar ---- */
.out-meta-bar, .res-meta-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
}
.out-meta-inner, .res-meta-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.out-meta-item, .res-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.out-meta-label, .res-meta-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 500;
}
.out-meta-value, .res-meta-value {
    font-size: 14px;
    font-weight: 500;
    color: #010643;
}

/* ---- Main layout: 2 columns ---- */
.out-main, .res-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.out-content, .res-content {
    flex: 1;
    min-width: 0;
}
.out-sidebar, .res-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

/* ---- Sidebar card ---- */
.out-sidebar-card, .res-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.out-sidebar-logo, .res-sidebar-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto 16px;
}
.out-sidebar-label, .res-sidebar-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
}
.out-sidebar-tags, .res-sidebar-tags {
    margin-top: 16px;
}
.out-tag, .res-tag {
    display: inline-block;
    background: #f0faf9;
    color: #56aea4;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin: 4px 4px 0 0;
}

/* ---- Sections ---- */
.out-section, .res-section {
    margin-bottom: 40px;
}
.out-section h2, .res-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #010643;
    margin: 0 0 16px;
}
.out-description, .res-description,
.out-about, .res-about {
    font-size: 16px;
    line-height: 1.8;
}
.out-description img, .res-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ---- Featured image ---- */
.out-featured-img, .res-featured-img {
    margin-bottom: 32px;
}
.out-featured-img img, .res-featured-img img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* ---- Gallery ---- */
.out-gallery, .res-gallery {
    display: grid;
    gap: 12px;
}
.out-gallery.cols-1, .res-gallery.cols-1 { grid-template-columns: 1fr; }
.out-gallery.cols-2, .res-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.out-gallery.cols-3, .res-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.out-gallery-item img, .res-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* ---- Videos ---- */
.out-video-embed, .res-video-embed {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
}
.out-video-embed iframe, .res-video-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* ---- Social links ---- */
.out-social-links, .res-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.out-social-link, .res-social-link {
    display: inline-block;
    padding: 6px 14px;
    background: #f7f8f9;
    border-radius: 6px;
    font-size: 13px;
    color: #575760 !important;
    text-decoration: none;
    transition: background 0.2s;
}
.out-social-link:hover, .res-social-link:hover {
    background: #e2e8f0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .out-hero-inner, .res-hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .out-hero-title, .res-hero-title {
        font-size: 28px;
    }
    .out-main, .res-main {
        flex-direction: column;
    }
    .out-sidebar, .res-sidebar {
        width: 100%;
        position: static;
    }
    .out-meta-inner, .res-meta-inner {
        gap: 20px;
    }
    .out-gallery.cols-3, .res-gallery.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
