/*
Theme Name: Le Tablier Gourmand
Template: generatepress
Version: 1.0.0
Description: L'art de la boulangerie artisanale
Text Domain: tablier-gourmand
*/

/* ====================================================================
   ONLY rules for elements GP does not control via option keys.
   Each rule documents the specific GP gap it addresses.
   ==================================================================== */

/* --- Fix 1: Mobile column container negative margin ---
   GP blog uses .generate-columns-container{margin-left:-35px} for gutters.
   The reset rule requires body class .generate-columns-activated, which
   the scrub mu-plugin removes. This replicates the @media(max-width:767px) reset. */
@media (max-width: 767px) {
    .generate-columns-container {
        margin-left: 0;
        margin-right: 0;
    }
    .generate-columns-container .generate-columns,
    .generate-columns-container > * {
        padding-left: 0;
    }
    .generate-columns-container .page-header,
    .generate-columns-container > .paging-navigation {
        margin-left: 0;
    }
}

/* --- Fix 2: Mobile header colors ---
   GP Menu Plus has no option keys for #mobile-header element colors. */
#mobile-header {
    background-color: #FFFFFF;
}
#mobile-header .menu-toggle {
    color: #1A2E05;
}
#mobile-header .menu-toggle .gp-icon svg {
    fill: #1A2E05;
}
#mobile-header .menu-toggle:hover .gp-icon svg,
#mobile-header .menu-toggle:focus .gp-icon svg {
    fill: #4D7C0F;
}

/* --- Fix 3: Mobile menu items styling ---
   GP Menu Plus has no option keys for mobile expanded menu item
   font-weight, padding, or separators. */
#mobile-header .main-nav ul li a {
    color: #1A2E05;
    background-color: #FFFFFF;
    padding: 14px 25px;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #D9F0B4;
}
#mobile-header .main-nav ul li a:hover {
    color: #4D7C0F;
    background-color: #F7FEE7;
}

/* --- Fix 4: Search button SVG ---
   GP SVG icons in buttons lack fill:currentColor. */
.search-submit svg,
.search-form .search-submit svg,
#mobile-header .search-submit svg {
    fill: currentColor;
}

/* --- Fix 5: Fluent Forms button ---
   Fluent Forms may use default blue button styling. Override with site palette. */
.ff-btn-submit,
.fluentform .ff-btn-submit,
.frm-fluent-form .ff-btn-submit {
    background-color: #4D7C0F !important;
    color: #FFFFFF !important;
    border: none !important;
}
.ff-btn-submit:hover,
.ff-btn-submit:focus,
.fluentform .ff-btn-submit:hover,
.fluentform .ff-btn-submit:focus {
    background-color: #3A5D0B !important;
    color: #FFFFFF !important;
}

/* --- Fix 6: Mobile logo sizing ---
   GP sets height:60px via inline CSS. Override for proper display. */
#mobile-header .mobile-header-logo img {
    height: 50px;
    max-width: 250px;
    width: auto;
}

/* --- Fix 7: Hide top bar on mobile ---
   Saves vertical space above the fold. */
@media (max-width: 1024px) {
    .top-bar {
        display: none;
    }
    .homepage-h1-bar {
        display: none;
    }
}

/* --- Fix 8: Read-more link styling ---
   GP has no option keys for read-more link appearance. */
.read-more,
a.read-more {
    display: inline-block;
    color: #4D7C0F;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-bottom: 2px solid #4D7C0F;
    padding-bottom: 2px;
}
.read-more:hover,
a.read-more:hover {
    color: #3A5D0B;
    border-color: #3A5D0B;
}

/* --- Fix 9: Pagination link styling ---
   GP has no option keys for pagination link weight/color. */
.nav-links a,
.paging-navigation a {
    font-weight: 600;
    color: #4D7C0F;
}
.nav-links a:hover,
.paging-navigation a:hover {
    color: #3A5D0B;
}

/* --- Fix 10: Search elements sizing ---
   GP has no option keys for search input width or button tap target size. */
.search-field {
    min-width: 200px;
    padding: 8px 12px;
    font-size: 15px;
}
.search-submit {
    padding: 8px 15px;
    min-width: 44px;
    min-height: 44px;
}
@media (max-width: 1024px) {
    .search-field {
        min-width: 0;
        width: 100%;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 3px;
        font-size: 16px;
        padding: 10px 12px;
        border: 1px solid #D9F0B4;
        background-color: #FFFFFF;
        color: #1A2E05;
    }
    .search-submit {
        -webkit-appearance: none;
        appearance: none;
        background-color: #4D7C0F;
        color: #FFFFFF;
        border: none;
        border-radius: 3px;
        padding: 10px 15px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* --- Fix 11: Post content vertical rhythm ---
   GP has no option keys for internal post element spacing. */
.entry-header {
    margin-bottom: 15px;
}
.entry-summary,
.entry-content {
    margin-bottom: 15px;
}
.entry-meta {
    margin-bottom: 10px;
}
.post-image {
    margin-bottom: 15px;
}

/* --- Fix 12: Mobile font sizes ---
   GP has no mobile body/widget/footer font size option keys. */
@media (max-width: 1024px) {
    body,
    .sidebar .widget,
    .footer-widgets,
    .site-info {
        font-size: 16px;
    }
}

/* --- Fix 13: Mobile viewport overflow prevention ---
   Prevents any child element from causing horizontal scrollbar. */
@media (max-width: 1024px) {
    body,
    .site {
        overflow-x: hidden;
    }
    .inside-article,
    #primary,
    .site-main > * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* --- Fix 14: Pagination styling ---
   GP has no option keys for pagination number/button appearance. */
.page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    font-weight: 600;
    font-size: 15px;
    color: #4D7C0F;
    text-decoration: none;
    border: 1px solid #D9F0B4;
    border-radius: 4px;
    background: #FFFFFF;
}
.page-numbers.current {
    background-color: #4D7C0F;
    color: #FFFFFF;
    border-color: #4D7C0F;
}
a.page-numbers:hover {
    background-color: #F7FEE7;
    color: #3A5D0B;
    border-color: #4D7C0F;
}
.nav-links {
    text-align: center;
    padding: 10px 0;
}

.menu-toggle .mobile-menu { display: none; }

/* Fix sidebar ghost space — force full width */
.no-sidebar .site-content .content-area {
    width: 100% !important;
    float: none !important;
}
.no-sidebar .is-right-sidebar,
.no-sidebar .is-left-sidebar {
    display: none !important;
}
.no-sidebar #right-sidebar,
.no-sidebar #left-sidebar {
    display: none !important;
}
