/*
Theme Name:   Woodmart Child - Rudy Couvreur
Theme URI:    https://rudycouvreur.fr/
Description:  Child theme Woodmart pour Rudy Couvreur (couvreur en Charente / Charente-Maritime). Définit les design tokens partagés (couleurs, typographie, espacements) et les classes utilitaires utilisées par tous les livrables (Elementor, Woodmart HTML Blocks).
Author:       Wordpress-creation (Evann)
Author URI:   https://wordpress-creation.fr/
Template:     woodmart
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  woodmart-child
*/

/* =========================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   Sources : palette extraite de https://www.wordpress-testing.com
   (Tailwind blue-600 / amber-500 / slate-900 confirmés via fetch).
   TOUTES les autres feuilles (header/footer HTML, Elementor JSON)
   référencent ces variables. NE PAS RENOMMER.
   ========================================================= */
:root {
    /* ----- Couleurs marque ----- */
    --brand-primary: #2563eb;          /* Bleu professionnel (CTA principal, liens, accents) */
    --brand-primary-dark: #1d4ed8;     /* Hover du primary */
    --brand-primary-light: #dbeafe;    /* Backgrounds très clairs / surlignages */
    --brand-accent: #f59e0b;           /* Orange chaud (étoiles avis, badges "Garantie") */
    --brand-accent-dark: #d97706;      /* Hover de l'accent */

    /* ----- Texte ----- */
    --text-dark: #0f172a;              /* slate-900 — titres */
    --text-body: #334155;              /* slate-700 — paragraphes */
    --text-muted: #64748b;             /* slate-500 — texte secondaire */
    --text-light: #ffffff;             /* sur fonds sombres */

    /* ----- Fonds ----- */
    --bg-light: #ffffff;
    --bg-soft: #f8fafc;                /* slate-50 — sections alternées */
    --bg-muted: #f1f5f9;               /* slate-100 — cards background */
    --bg-dark: #0f172a;                /* slate-900 — sections sombres */
    --bg-dark-soft: #1e293b;           /* slate-800 — cards sur fond sombre */

    /* ----- Bordures ----- */
    --border-light: #e2e8f0;           /* slate-200 */
    --border-default: #cbd5e1;         /* slate-300 */

    /* ----- Typographie ----- */
    --font-heading: "Poppins", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    /* Tailles fluides (clamp pour responsive doux) */
    --fs-xs: 0.8125rem;                /* 13px */
    --fs-sm: 0.9375rem;                /* 15px */
    --fs-base: 1rem;                   /* 16px */
    --fs-lg: 1.125rem;                 /* 18px */
    --fs-xl: 1.25rem;                  /* 20px */
    --fs-2xl: clamp(1.5rem, 2.5vw, 1.875rem);   /* h3 */
    --fs-3xl: clamp(1.875rem, 3.2vw, 2.5rem);   /* h2 */
    --fs-4xl: clamp(2.25rem, 4.5vw, 3.5rem);    /* h1 / hero */

    --lh-tight: 1.15;
    --lh-snug: 1.35;
    --lh-normal: 1.6;

    /* ----- Espacements (échelle modulaire) ----- */
    --space-xs: 0.5rem;                /* 8px */
    --space-sm: 1rem;                  /* 16px */
    --space-md: 1.5rem;                /* 24px */
    --space-lg: 2.5rem;                /* 40px */
    --space-xl: 4rem;                  /* 64px */
    --space-2xl: 5rem;                 /* 80px — padding vertical section standard */
    --space-3xl: 7rem;                 /* 112px — padding hero */

    /* ----- Rayons ----- */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    /* ----- Ombres ----- */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16);

    /* ----- Transitions ----- */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.25s ease-out;
    --transition-slow: 0.45s ease-out;

    /* ----- Container ----- */
    --container-max: 1240px;
    --container-padding: 1.25rem;
}

/* =========================================================
   2. RESET MINIMAL / GLOBAL STYLES
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--text-body);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.heading-xl, .heading-lg, .heading-md, .heading-sm {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: var(--lh-tight);
    font-weight: var(--fw-bold);
    margin: 0 0 var(--space-md);
}

p {
    margin: 0 0 var(--space-md);
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--brand-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   3. CLASSES UTILITAIRES PARTAGÉES
   Référencées par : header.html, footer.html, JSON Elementor.
   ========================================================= */

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* ---- Sections ---- */
.section {
    padding-block: var(--space-2xl);
}

.section--sm {
    padding-block: var(--space-xl);
}

.section--lg {
    padding-block: var(--space-3xl);
}

.section--soft {
    background-color: var(--bg-soft);
}

.section--muted {
    background-color: var(--bg-muted);
}

.section--dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
    color: var(--text-light);
}

.section--dark .text-muted {
    color: #cbd5e1;
}

/* ---- Headings utilitaires ---- */
.heading-xl { font-size: var(--fs-4xl); font-weight: var(--fw-black); letter-spacing: -0.02em; }
.heading-lg { font-size: var(--fs-3xl); font-weight: var(--fw-bold);  letter-spacing: -0.015em; }
.heading-md { font-size: var(--fs-2xl); font-weight: var(--fw-semibold); }
.heading-sm { font-size: var(--fs-xl);  font-weight: var(--fw-semibold); }

/* ---- Texte ---- */
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--brand-accent); }
.text-primary   { color: var(--brand-primary); }
.text-center    { text-align: center; }
.text-lead      { font-size: var(--fs-lg); line-height: var(--lh-normal); color: var(--text-body); }

/* ---- Boutons ---- */
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    line-height: 1.2;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base),
                transform var(--transition-fast),
                box-shadow var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--text-light) !important;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-primary-dark);
    color: var(--text-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--brand-accent);
    color: var(--text-light) !important;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--brand-accent-dark);
    color: var(--text-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background-color: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background-color: var(--brand-primary);
    color: var(--text-light) !important;
}

.section--dark .btn-ghost {
    color: var(--text-light);
    border-color: var(--text-light);
}

.section--dark .btn-ghost:hover {
    background-color: var(--text-light);
    color: var(--brand-primary);
}

/* ---- Grilles ---- */
.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- Cards ---- */
.card {
    background-color: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: transform var(--transition-base),
                box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card--soft {
    background-color: var(--bg-soft);
    box-shadow: none;
}

.card--dark {
    background-color: var(--bg-dark-soft);
    border-color: #334155;
    color: var(--text-light);
}

.card__icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--brand-primary-light);
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background-color: var(--brand-primary-light);
    color: var(--brand-primary);
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge--accent {
    background-color: #fef3c7;
    color: var(--brand-accent-dark);
}

/* ---- Helpers ---- */
.stack > * + * { margin-top: var(--space-md); }
.stack-sm > * + * { margin-top: var(--space-sm); }
.stack-lg > * + * { margin-top: var(--space-lg); }

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   4. ANIMATIONS D'ENTRÉE (utilisées par Elementor via classes
   ou keyframes équivalentes côté widgets natifs).
   ========================================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.anim-fade-in    { animation: fadeIn   0.6s ease-out both; }
.anim-fade-up    { animation: fadeInUp 0.6s ease-out both; }
.anim-fade-left  { animation: fadeInLeft  0.6s ease-out both; }
.anim-fade-right { animation: fadeInRight 0.6s ease-out both; }

/* Stagger : combiner avec .anim-fade-up et data-delay côté Elementor */
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .anim-fade-in,
    .anim-fade-up,
    .anim-fade-left,
    .anim-fade-right {
        animation: none !important;
    }
}

/* =========================================================
   5. BREAKPOINTS RESPONSIVE
   mobile  : < 768
   tablet  : 768 - 1024
   laptop  : 1024 - 1366
   desktop : > 1366
   ========================================================= */

/* Tablet et moins */
@media (max-width: 1024px) {
    :root {
        --space-2xl: 4rem;
        --space-3xl: 5rem;
    }

    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --space-2xl: 3rem;
        --space-3xl: 4rem;
        --container-padding: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
        padding: 0.95rem 1.5rem;
    }

    .card {
        padding: var(--space-md);
    }
}

/* Laptop (1024 - 1366) — réglages fins éventuels */
@media (min-width: 1024px) and (max-width: 1366px) {
    :root {
        --container-max: 1140px;
    }
}

/* =========================================================
   6. OVERRIDES WOODMART CIBLÉS (légers)
   ========================================================= */

/* Harmonise les boutons Woodmart natifs avec le brand */
.btn.btn-color-primary,
.wd-btn-color-primary {
    background-color: var(--brand-primary) !important;
    color: var(--text-light) !important;
}

.btn.btn-color-primary:hover,
.wd-btn-color-primary:hover {
    background-color: var(--brand-primary-dark) !important;
}

/* Liens du menu Woodmart : couleur dark par défaut */
.whb-main-header .wd-nav > li > a {
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
}

.whb-main-header .wd-nav > li > a:hover {
    color: var(--brand-primary);
}
