/*
Theme Name:     Revogroup (Astra Child)
Theme URI:      https://revogroup.be/
Description:    Thème enfant Astra pour le site corporate Revogroup. Stabilise les personnalisations (palette, typographie, mise en page) sans modifier le thème parent Astra. Auteur : webmaster Revogroup.
Author:         Revogroup
Author URI:     https://revogroup.be/
Template:       astra
Version:        1.0.0
License:        GNU General Public License v2 or later
License URI:    https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    astra-child
*/

/* =========================================================
   1. PALETTE & VARIABLES — Charte Revogroup 2026
   ========================================================= */
:root {
    /* Couleur primaire — bleu marine institutionnel */
    --rg-primary:        #1E3A5F;
    --rg-primary-dark:   #122847;
    --rg-primary-light:  #2C5586;

    /* Accent — orange/brique faisant écho au logo Revoroof */
    --rg-accent:         #D94A2C;
    --rg-accent-dark:    #B83D24;
    --rg-accent-light:   #F26B4A;

    /* Vert — pour les rappels Green Power et CTA secondaires */
    --rg-green:          #4A8A60;

    /* Neutres */
    --rg-text:           #1A1A1A;
    --rg-text-muted:     #6B7280;
    --rg-bg:             #FFFFFF;
    --rg-bg-alt:         #F5F7FA;
    --rg-bg-dark:        #1E3A5F;
    --rg-border:         #E5E7EB;

    /* Typographie — fluide */
    --rg-font-body:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --rg-font-heading:   'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

    /* Tailles fluides (clamp pour responsive) */
    --rg-h1:             clamp(2.5rem, 4vw + 1rem, 4rem);     /* 40px → 64px */
    --rg-h2:             clamp(2rem, 3vw + 1rem, 3rem);       /* 32px → 48px */
    --rg-h3:             clamp(1.5rem, 2vw + 0.75rem, 2rem);  /* 24px → 32px */
    --rg-body:           clamp(1rem, 0.25vw + 0.95rem, 1.0625rem);
    --rg-small:          0.875rem;

    /* Espacement */
    --rg-section-padding: clamp(3rem, 5vw, 6rem);
    --rg-radius:          8px;
    --rg-radius-lg:       16px;

    /* Ombre */
    --rg-shadow-sm:      0 1px 2px rgba(30, 58, 95, 0.08);
    --rg-shadow:         0 4px 16px rgba(30, 58, 95, 0.10);
    --rg-shadow-lg:      0 12px 32px rgba(30, 58, 95, 0.14);

    /* Transitions */
    --rg-transition:     200ms ease;
}

/* =========================================================
   2. RESET LÉGER & BASE
   ========================================================= */
body {
    font-family: var(--rg-font-body);
    font-size: var(--rg-body);
    line-height: 1.65;
    color: var(--rg-text);
    background: var(--rg-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.wp-block-heading {
    font-family: var(--rg-font-heading);
    font-weight: 700;
    line-height: 1.15;
    color: var(--rg-text);
    margin-bottom: 0.75em;
}

h1, .entry-title { font-size: var(--rg-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--rg-h2); letter-spacing: -0.015em; }
h3 { font-size: var(--rg-h3); letter-spacing: -0.01em; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rg-text-muted); }

p { margin-bottom: 1.25em; }
strong { font-weight: 600; }

/* Liens — focus accessible */
a {
    color: var(--rg-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 1px;
    transition: color var(--rg-transition);
}
a:hover { color: var(--rg-accent); }
a:focus-visible {
    outline: 3px solid var(--rg-accent-light);
    outline-offset: 2px;
    border-radius: 2px;
}

/* =========================================================
   3. HEADER — Logo + nav + CTA "Demander un devis"
   ========================================================= */
.ast-primary-header-bar {
    background: var(--rg-bg);
    border-bottom: 1px solid var(--rg-border);
    transition: box-shadow var(--rg-transition);
}
.ast-primary-header-bar.is-sticky { box-shadow: var(--rg-shadow); }

.ast-site-identity .site-logo-img img { max-height: 48px; width: auto; }

.main-header-menu > .menu-item > a {
    font-weight: 500;
    color: var(--rg-text);
    padding: 0.5rem 1rem;
    border-radius: var(--rg-radius);
    transition: all var(--rg-transition);
}
.main-header-menu > .menu-item > a:hover,
.main-header-menu > .current-menu-item > a {
    color: var(--rg-primary);
    background: var(--rg-bg-alt);
}

/* CTA "Demander un devis" — bouton primaire dans le header */
.menu-cta a,
.ast-header-button-1 {
    background: var(--rg-accent) !important;
    color: #fff !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: var(--rg-radius);
    font-weight: 600;
    text-decoration: none !important;
    transition: all var(--rg-transition);
}
.menu-cta a:hover,
.ast-header-button-1:hover {
    background: var(--rg-accent-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--rg-shadow);
}

/* =========================================================
   4. BOUTONS — Système unifié
   ========================================================= */
.wp-block-button__link,
.kb-button,
.button,
button:not(.menu-toggle):not(.wp-block-search__button) {
    font-family: var(--rg-font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--rg-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--rg-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Bouton primaire (orange brique) */
.wp-block-button__link,
.kb-button.kb-btn-style-fill {
    background: var(--rg-accent);
    color: #fff;
}
.wp-block-button__link:hover,
.kb-button.kb-btn-style-fill:hover {
    background: var(--rg-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--rg-shadow);
    color: #fff;
}

/* Bouton secondaire (outline blanc — sur fond sombre) */
.is-style-outline .wp-block-button__link,
.kb-button.kb-btn-style-outline {
    background: transparent;
    color: var(--rg-primary);
    border-color: var(--rg-primary);
}
.is-style-outline .wp-block-button__link:hover {
    background: var(--rg-primary);
    color: #fff;
}

/* =========================================================
   5. HERO — Refonte radicale
   ========================================================= */
.hero-revogroup {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--rg-primary);
    color: #fff;
}
.hero-revogroup::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(18, 40, 71, 0.85) 0%,
        rgba(30, 58, 95, 0.65) 100%);
    z-index: 1;
}
.hero-revogroup__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-revogroup__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-revogroup__content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: var(--rg-section-padding) 2rem;
}
.hero-revogroup__title {
    color: #fff;
    font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.hero-revogroup__subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1.125rem, 1vw + 1rem, 1.375rem);
    line-height: 1.5;
    margin-bottom: 2rem;
    max-width: 560px;
}
.hero-revogroup__ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-revogroup__ctas .button-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    background: transparent;
}
.hero-revogroup__ctas .button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* =========================================================
   6. SECTIONS — Espacement & alternance
   ========================================================= */
.entry-content > .wp-block-group,
.entry-content > .kb-row-layout-wrap {
    padding-top: var(--rg-section-padding);
    padding-bottom: var(--rg-section-padding);
}

/* Section sombre */
.has-rg-primary-background-color,
.kb-row-layout-wrap.has-background-color-bg-dark {
    background: var(--rg-bg-dark) !important;
    color: #fff;
}
.has-rg-primary-background-color *:not(a):not(button),
.kb-row-layout-wrap.has-background-color-bg-dark h1,
.kb-row-layout-wrap.has-background-color-bg-dark h2,
.kb-row-layout-wrap.has-background-color-bg-dark h3,
.kb-row-layout-wrap.has-background-color-bg-dark p {
    color: #fff !important;
}

/* Section claire alternative */
.has-rg-bg-alt-background-color {
    background: var(--rg-bg-alt) !important;
}

/* =========================================================
   7. CARTES — Domaines d'expertise, offres d'emploi
   ========================================================= */
.kb-info-box-wrap,
.expertise-card,
.job-card {
    background: #fff;
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-lg);
    padding: 2rem;
    transition: all var(--rg-transition);
    box-shadow: var(--rg-shadow-sm);
}
.kb-info-box-wrap:hover,
.expertise-card:hover,
.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rg-shadow);
    border-color: var(--rg-primary-light);
}

/* Logos uniformisés dans les cartes domaines */
.expertise-card .logo-marque {
    max-height: 80px;
    width: auto;
    margin-bottom: 1.5rem;
}

/* =========================================================
   8. CHIFFRES CLÉS
   ========================================================= */
.rg-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
}
.rg-stats__number {
    font-family: var(--rg-font-heading);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.03em;
}
.rg-stats__label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

/* =========================================================
   9. FAQ — Accordéons propres
   ========================================================= */
.wp-block-kadence-accordion .kt-accordion-pane {
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.wp-block-kadence-accordion .kt-blocks-accordion-header {
    padding: 1.25rem 1.5rem;
    background: #fff;
    color: var(--rg-text);
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: background var(--rg-transition);
}
.wp-block-kadence-accordion .kt-blocks-accordion-header:hover {
    background: var(--rg-bg-alt);
}
.wp-block-kadence-accordion .kt-accordion-pane-active .kt-blocks-accordion-header {
    background: var(--rg-primary);
    color: #fff;
}

/* =========================================================
   10. FORMULAIRES KADENCE
   ========================================================= */
.kb-form .kb-form-field input[type="text"],
.kb-form .kb-form-field input[type="email"],
.kb-form .kb-form-field input[type="tel"],
.kb-form .kb-form-field textarea {
    background: #fff;
    border: 1.5px solid var(--rg-border);
    border-radius: var(--rg-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--rg-font-body);
    transition: border-color var(--rg-transition);
    width: 100%;
}
.kb-form .kb-form-field input:focus,
.kb-form .kb-form-field textarea:focus {
    border-color: var(--rg-primary);
    outline: 2px solid var(--rg-primary-light);
    outline-offset: 2px;
}
.kb-form .kb-form-field label {
    font-weight: 500;
    margin-bottom: 0.375rem;
    display: block;
}

/* RGPD checkbox */
.kb-form .gdpr-consent {
    font-size: 0.875rem;
    color: var(--rg-text-muted);
    margin: 1rem 0;
}

/* =========================================================
   11. FOOTER — 4 colonnes + barre légale
   ========================================================= */
.site-footer.ast-footer {
    background: var(--rg-bg-dark);
    color: rgba(255, 255, 255, 0.85);
    padding-top: 3rem;
}
.site-footer h3, .site-footer h4 {
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.site-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.site-footer a:hover {
    color: var(--rg-accent-light);
    text-decoration: underline;
}
.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.25rem 0;
    margin-top: 2.5rem;
    font-size: 0.875rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
}
.footer-bar a { color: rgba(255, 255, 255, 0.8); }

/* =========================================================
   12. ANIMATIONS subtiles au scroll
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
    .rg-fade-in {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 600ms ease, transform 600ms ease;
    }
    .rg-fade-in.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   13. RESPONSIVE — mobile breakpoint
   ========================================================= */
@media (max-width: 768px) {
    .hero-revogroup { min-height: 70vh; }
    .hero-revogroup__content { padding: 4rem 1.5rem; }
    .hero-revogroup__ctas { flex-direction: column; align-items: stretch; }
    .hero-revogroup__ctas .button { justify-content: center; }
    .rg-stats { gap: 1.5rem; }
    .rg-stats__number { font-size: 2.5rem; }
}

/* =========================================================
   14. ACCESSIBILITÉ — focus, contraste, skip link
   ========================================================= */
.skip-link.screen-reader-text:focus {
    background: var(--rg-accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--rg-radius);
    font-weight: 600;
}
*:focus-visible {
    outline: 3px solid var(--rg-accent-light);
    outline-offset: 2px;
}
