/*
Theme Name: Forêt Chantier
Template: generatepress
Version: 1.0
Description: Child theme for Matériaux et Chantiers — forest-canopy palette, warm-editorial typography, sig-A left sidebar layout.
*/

/* =============================================
   SELF-HOSTED FONTS
   ============================================= */
@font-face {
    font-family: 'Raleway';
    src: url('assets/fonts/Raleway-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Raleway';
    src: url('assets/fonts/Raleway-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lora';
    src: url('assets/fonts/Lora-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lora';
    src: url('assets/fonts/Lora-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lora';
    src: url('assets/fonts/Lora-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* =============================================
   PALETTE — forest-canopy
   primary: #006D77
   secondary: #83C5BE
   accent: #2D9F93
   surface: #EDF6F9
   background: #FFFFFF
   text: #001219
   text-secondary: #4A5568
   border: #D1E7E4
   ============================================= */

/* =============================================
   BASE
   ============================================= */
body {
    background-color: #FFFFFF;
    color: #001219;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    line-height: 1.8;
}

a {
    color: #006D77;
}
a:hover {
    color: #2D9F93;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: #001219;
    line-height: 1.3;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: #EDF6F9;
    border-bottom: 2px solid #83C5BE;
    padding: 1rem 0;
}

.site-logo img {
    max-height: 65px;
    width: auto;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-navigation,
.main-navigation ul ul {
    background: #006D77;
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
    color: #EDF6F9;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
}

.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a {
    color: #83C5BE;
    background: rgba(0,0,0,0.15);
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    background: #2D9F93;
    color: #FFFFFF;
}

.main-navigation ul ul {
    background: #004D54;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar .widget {
    background: #EDF6F9;
    border: 1px solid #D1E7E4;
    border-radius: 4px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sidebar .widget-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: #006D77;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #83C5BE;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar .widget ul li a {
    color: #001219;
}

.sidebar .widget ul li a:hover {
    color: #006D77;
}

/* Tag cloud */
.sidebar .widget .tagcloud a {
    background: #D1E7E4;
    color: #001219;
    border: none;
    border-radius: 3px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem !important;
    padding: 0.2rem 0.5rem;
    display: inline-block;
    margin: 0.2rem 0.1rem;
    transition: background 0.2s;
}

.sidebar .widget .tagcloud a:hover {
    background: #006D77;
    color: #FFFFFF;
}

/* =============================================
   CONTENT / ARTICLE
   ============================================= */
.inside-article {
    background: #FFFFFF;
}

.entry-title a {
    color: #001219;
}

.entry-title a:hover {
    color: #006D77;
}

.entry-meta,
.entry-meta a {
    color: #4A5568;
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
}

.entry-content a {
    color: #006D77;
    text-decoration: underline;
    text-decoration-color: #83C5BE;
}

.entry-content a:hover {
    color: #2D9F93;
}

/* =============================================
   FOOTER — 2-col-dark
   ============================================= */
.site-footer {
    background: #001219;
    color: #EDF6F9;
}

.footer-widgets,
#footer-widgets {
    background: #001219 !important;
    color: #EDF6F9 !important;
}

.footer-widgets .widget-title {
    color: #83C5BE;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    border-bottom: 1px solid #2D9F93;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.footer-widgets a,
#footer-widgets a {
    color: #EDF6F9 !important;
    text-decoration: none;
}
.footer-widgets a:hover {
    color: #83C5BE;
}

.footer-widgets .widget ul li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.3rem 0;
}

.site-info {
    background: #001219;
    border-top: 1px solid #006D77;
    color: #83C5BE;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
}

.site-info a {
    color: #2D9F93;
}

.site-info a:hover {
    color: #83C5BE;
}

/* =============================================
   BUTTONS
   ============================================= */
button,
input[type="submit"],
a.button,
a.wp-block-button__link {
    background: #006D77;
    color: #FFFFFF;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    border-radius: 3px;
}

button:hover,
input[type="submit"]:hover,
a.button:hover {
    background: #2D9F93;
    color: #FFFFFF;
}

/* =============================================
   SEARCH
   ============================================= */
.search-form input[type="search"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #FFFFFF !important;
    color: #001219 !important;
    border: 1px solid #D1E7E4 !important;
    border-radius: 3px 0 0 3px !important;
}

body .search-form .search-submit {
    background: #006D77 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 0 3px 3px 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    min-width: 44px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    display: inline-block !important;
    visibility: visible !important;
    overflow: visible !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

body .search-form .search-submit:hover {
    background: #2D9F93;
}

/* =============================================
   SEARCH WEBKIT RESET
   ============================================= */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination .page-numbers {
    font-family: 'Raleway', sans-serif;
}

.pagination .current {
    background: #006D77;
    color: #FFFFFF;
}

/* =============================================
   SCREEN READER
   ============================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =============================================
   MISC
   ============================================= */
img { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }

/* =============================================
   MOBILE HEADER
   ============================================= */
@media (max-width: 1024px) {
    nav#mobile-header {
        position: relative;
        background-color: #001219 !important;
    }
    nav#mobile-header .site-logo.mobile-header-logo img {
        max-height: 50px;
        width: auto;
    }
    nav#mobile-header button.menu-toggle {
        position: absolute !important;
        color: #EDF6F9 !important;
        right: 0 !important;
        height: 50px !important;
        overflow: hidden !important;
        top: 0 !important;
        margin: 0 !important;
    }
}

/* =============================================
   MOBILE SEARCH
   ============================================= */
@media (max-width: 768px) {
    .search-form .search-field {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    body .search-form .search-submit {
        background-color: #006D77 !important;
        color: #FFFFFF !important;
        border: none !important;
        border-radius: 0 3px 3px 0 !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        min-width: 44px !important;
        min-height: 36px !important;
        padding: 6px 12px !important;
        display: inline-block !important;
        visibility: visible !important;
        overflow: visible !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
}

/* =============================================
   MOBILE FOOTER LINKS
   ============================================= */
@media (max-width: 768px) {
    #footer-widgets a,
    .footer-widgets a,
    .footer-widgets .widget a {
        color: #EDF6F9 !important;
        text-decoration: none;
    }
    .footer-widgets .widget-title {
        color: #83C5BE !important;
    }
}

/* =============================================
   MOBILE LOGO CONTRAST
   ============================================= */
@media (max-width: 1024px) {
    nav#mobile-header .site-logo.mobile-header-logo a {
        display: block;
        border: 2px solid #83C5BE;
        border-radius: 4px;
        padding: 4px;
        background: #EDF6F9;
    }
    nav#mobile-header .site-logo.mobile-header-logo img {
        display: block;
    }
}

/* =============================================
   MOBILE OVERFLOW FIX
   ============================================= */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 1024px) {
    #right-sidebar {
        width: 100% !important;
        float: none !important;
        clear: both !important;
    }
    .widget-area.sidebar {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .widget-area .widget {
        padding: 20px 15px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .widget-area .widget * {
        max-width: 100% !important;
        word-break: break-word;
    }
}

/* =============================================
   SEARCH INPUT — COMPREHENSIVE OVERRIDE
   ============================================= */
input[type='search'],
.search-form input[type='search'],
.widget_search input[type='search'],
.search-field,
.wp-block-search__input {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #FFFFFF !important;
    color: #001219 !important;
    border: 1px solid #D1E7E4 !important;
    border-radius: 3px !important;
    padding: 8px 10px !important;
    font-family: 'Lora', Georgia, serif !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
}

input[type='search']:focus,
.search-form input[type='search']:focus,
.wp-block-search__input:focus {
    background-color: #FFFFFF !important;
    border-color: #006D77 !important;
    outline: 2px solid rgba(0, 109, 119, 0.3) !important;
    box-shadow: none !important;
}

.wp-block-search__button {
    background: #006D77 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 0 3px 3px 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    min-width: 44px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    display: inline-block !important;
    cursor: pointer !important;
}

/* =============================================
   MOBILE LOGO — REINFORCED VISIBILITY
   ============================================= */
@media (max-width: 1024px) {
    nav#mobile-header {
        min-height: 60px !important;
    }
    nav#mobile-header .inside-navigation {
        min-height: 60px !important;
        align-items: center !important;
    }
    nav#mobile-header .site-logo.mobile-header-logo {
        display: flex !important;
        align-items: center !important;
        padding: 5px 10px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    nav#mobile-header .site-logo.mobile-header-logo img {
        display: block !important;
        max-height: 48px !important;
        width: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #FFFFFF !important;
        padding: 3px !important;
        border-radius: 3px !important;
    }
}

/* =============================================
   DESKTOP NAV — PREVENT WRAPPING
   ============================================= */
#site-navigation .main-nav ul > li {
    float: left !important;
    white-space: nowrap !important;
}
#site-navigation .main-nav ul li a,
#site-navigation .main-nav ul li span {
    white-space: nowrap !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 13px !important;
}

/* =============================================
   H1 — OVERRIDE GP DYNAMIC WEIGHT
   ============================================= */
h1 {
    font-weight: 700 !important;
}
.homepage-hero h1 {
    font-weight: 700 !important;
    font-size: 40px !important;
}

/* === hero ghost text fix (2026-06-13) === */
.homepage-hero img {
  opacity: 0 !important;
}

/* === mobile logo bordered box fix (2026-06-13) === */
nav#mobile-header .site-logo.mobile-header-logo a {
  border: none !important;
  border-radius: 0 !important;
}
