/*
Theme Name: Chiffre Net
Template: generatepress
Version: 1.0.0
Description: Custom theme for Tech & Stratégie PME
*/

:root {
  --primary: #4D7C0F;
  --secondary: #65A30D;
  --accent: #84CC16;
  --surface: #F7FEE7;
  --text-color: #1A2E05;
  --text-secondary: #4B5563;
  --border-color: #D9F0B4;
}

body,
p,
li,
.entry-content {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
}

h1, h2, h3, h4, h5, h6,
.site-title,
.main-navigation a,
.widget-title {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
}

/* Front-page visible H1 */
.site-tagline-heading {
    display: block;
    text-align: left;
    padding: 0;
    font-size: 1.8rem;
    color: inherit;
    margin: 0 0 1rem 0;
}

/* Homepage author-intro hero */
.author-intro-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: var(--surface);
    border-radius: 8px;
}
.author-intro-hero__portrait {
    border-radius: 50%;
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    object-fit: cover;
}
.author-intro-hero__text p {
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
}
.author-intro-hero__cta {
    display: inline-block;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid var(--primary);
}
.author-intro-hero__cta:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}
@media (max-width: 600px) {
    .author-intro-hero {
        flex-direction: column;
        text-align: center;
    }
}

/* Homepage post grid — "Sur le blog" section */
.blog-teaser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0 2rem 0;
}
.blog-teaser-grid__card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}
.blog-teaser-grid__card h3 {
    margin: 0.75rem 0 0.4rem 0;
    font-size: 1.05rem;
}
.blog-teaser-grid__card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
@media (max-width: 600px) {
    .blog-teaser-grid {
        grid-template-columns: 1fr;
    }
}

/* Avatar-centered About page layout */
.avatar-centered {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Search widget styling — classic + block */
.search-field,
.wp-block-search__input {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.95em;
  width: 100%;
  background: #fff;
  color: var(--text-color);
}

.search-form .search-submit,
.search-submit,
.wp-block-search__button {
  background: #4D7C0F !important;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.95em;
  cursor: pointer;
}

.search-form .search-submit:hover,
.search-submit:hover,
.wp-block-search__button:hover {
  opacity: 0.85;
}

/* Submit-button palette rule */
body button.wpforms-submit,
body .wpcf7-submit,
body .ff-btn-submit {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}
body button.wpforms-submit:hover,
body .wpcf7-submit:hover,
body .ff-btn-submit:hover {
  filter: brightness(0.9) !important;
}

/* Footer 3-col-dark widget styling */
#footer-widgets {
    background-color: #1A2E05;
    color: #E5E7EB;
}
#footer-widgets .widget-title,
#footer-widgets .widgettitle,
#footer-widgets p.widget-title {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}
#footer-widgets a {
    color: #E5E7EB;
    text-decoration: none;
}
#footer-widgets a:hover {
    color: #ffffff;
    text-decoration: underline;
}
.copyright-bar,
#site-footer .inside-top-bar {
    background-color: #14210a;
    color: #cbd5c0;
}

/* Mobile header hamburger alignment fix (GP Menu Plus) */
@media (max-width: 768px) {
    #mobile-header .inside-navigation {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        position: relative;
        padding-right: 0 !important;
    }
    #mobile-header .site-logo.mobile-header-logo {
        flex: 0 0 auto;
        max-width: 55%;
        overflow: hidden;
        order: 1;
    }
    #mobile-header .site-logo.mobile-header-logo img {
        max-width: 100%;
        height: 40px;
        width: auto;
    }
    #mobile-header button.menu-toggle {
        flex: 0 0 auto;
        order: 2;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    #mobile-header #mobile-menu.main-nav {
        order: 3;
        flex: 0 0 100%;
    }
    #mobile-header .inside-navigation::before {
        content: "Décoder le numérique, sans jargon";
        position: absolute;
        right: 58px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        font-style: italic;
        color: var(--text-secondary);
        max-width: 140px;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
    }
}
