/*
Theme Name:   Astra Child - ED Mat pro
Template:     astra
Version:      2.0.0
Text Domain:  astra-child
*/

/* === Variables charte === */
:root {
    --edm-primary: #0C5279;
    --edm-secondary: #123A4A;
    --edm-accent: #2F8DB8;
    --edm-btn-bg: #1E5E7A;
    --edm-btn-h: #123A4A;
    --edm-bg-sec: #F4F6F8;
    --edm-txt-main: #2B2E30;
    --edm-txt-sec: #6B6F73;
    --edm-border: #E5E8EC;
}

/* === Masquer site title (puisqu'on a un logo) === */
.site-title, .site-description, .ast-site-title-wrap { display: none !important; }
.site-logo-img img, .custom-logo-link img, .ast-site-identity img.custom-logo {
    max-height: 60px !important; width: auto !important; height: auto !important;
}

/* === FIX MENU : background blanc + texte sombre lisible PARTOUT === */

.main-header-menu > li > a, .main-navigation .main-header-menu > li > a,
.ast-builder-menu-1 .main-header-menu > li > a,
.ast-header-builder-menu .menu-link, .ast-header-account-wrap a,
#ast-hf-menu-1 > li > a {
    color: var(--edm-secondary) !important;
}
.main-header-menu > li > a:hover, .main-header-menu > li.current-menu-item > a,
.ast-header-builder-menu .menu-link:hover, .ast-header-builder-menu .current-menu-item .menu-link {
    color: var(--edm-primary) !important;
}
.ast-cart-menu-wrap a, .ast-edit-profile-icon-wrap a {
    color: var(--edm-secondary) !important;
}
.ast-cart-menu-wrap .ahfb-svg-iconset, .ast-edit-profile-icon-wrap .ahfb-svg-iconset {
    fill: var(--edm-secondary) !important;
}
/* Overrides au cas où Astra force transparent header */



/* === Sous-menus header === */
.main-header-menu .sub-menu, nav.main-navigation .sub-menu,
.ast-builder-menu .sub-menu, .ast-header-builder-menu .sub-menu {
    background-color: #FFFFFF !important;
    border-top: 2px solid var(--edm-primary) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10) !important;
}
.main-header-menu .sub-menu a, nav.main-navigation .sub-menu a,
.ast-builder-menu .sub-menu a, .ast-header-builder-menu .sub-menu a {
    color: var(--edm-secondary) !important;
    background-color: transparent !important;
    text-transform: none !important;
}
.main-header-menu .sub-menu a:hover, nav.main-navigation .sub-menu a:hover {
    color: var(--edm-primary) !important;
    background-color: var(--edm-bg-sec) !important;
}

/* === Prix HT/TTC === */
.edm-price-block { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; line-height: 1.3; }
.edm-price-ht { color: var(--edm-primary); font-weight: 700; }
.edm-price-ttc { color: var(--edm-txt-sec); font-weight: 500; font-size: 0.92em; }
.edm-price-ttc-sep { color: var(--edm-txt-sec); opacity: 0.6; }
.edm-price-block small { font-size: 0.7em; font-weight: 600; letter-spacing: 0.04em; opacity: 0.85; margin-left: 1px; }
.edm-price-old { opacity: 0.55; }

/* === Catégories : masquer compteur === */
.woocommerce ul.products li.product-category .count,
.woocommerce ul.products li.product-category mark.count { display: none !important; }

/* === Thèmes saisonniers (shortcode) === */
.edm-themes-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    max-width: 1000px; margin: 0 auto;
}
@media (max-width: 700px) { .edm-themes-grid { grid-template-columns: 1fr; } }
.edm-theme-card {
    display: flex; align-items: flex-end; justify-content: center;
    aspect-ratio: 16/10; background-size: cover; background-position: center;
    border-radius: 8px; overflow: hidden; text-decoration: none;
    transition: transform 0.25s ease;
}
.edm-theme-card:hover { transform: translateY(-3px); }
.edm-theme-overlay { width: 100%; padding: 20px; text-align: center; color: #FFFFFF; }
.edm-theme-overlay h3 {
    color: #FFFFFF !important; font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem; font-weight: 700; margin: 0 0 4px;
    text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.edm-theme-cta { font-size: 0.85rem; font-weight: 600; color: #FFFFFF; opacity: 0.95; }




/* === v2.3 : Espace menu réduit haut + bas === */
/* Réduit le padding de la rangée du menu */
.ast-builder-menu, .ast-header-builder-menu, .main-navigation {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
/* Réduit le padding sur les items du menu (haut/bas seulement) */
.main-header-menu > li > a, .ast-header-builder-menu .menu-link {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}
/* Réduit le padding bas de la primary header bar */
.ast-primary-header-bar, .site-primary-header-wrap {
    padding-bottom: 4px !important;
}
/* Marge nulle entre header et contenu */
.site-header { margin-bottom: 0 !important; }
#content, .site-content { margin-top: 0 !important; padding-top: 0 !important; }


/* === v3 : Fix réel header (logo + padding branding) === */
/* Forcer max-height logo via selecteur de haute spécificité */
.site-header .ast-site-identity img.custom-logo,
.site-header .site-branding .custom-logo-link img,
.site-header .site-logo-img img.custom-logo {
    max-height: 50px !important;
    height: auto !important;
    width: auto !important;
}
/* Réduire le padding autour du logo dans branding */
.site-header .site-branding.ast-site-identity {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}
/* Réduire la hauteur de la rangée menu en évitant le stretch */
.site-header .ast-builder-menu-1, .site-header .ast-builder-menu {
    align-items: center !important;
}
.site-header .main-header-bar-navigation, .site-header .site-navigation,
.site-header .main-navigation, .site-header #ast-hf-menu-1 {
    align-items: center !important;
    align-self: center !important;
}
/* Padding rangée primary plus serré */
.ast-primary-header-bar, .site-primary-header-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* === v3 CF7 styling ED Mat pro === */
.wpcf7 { max-width: 700px; margin: 0 auto; }
.wpcf7 .edm-cf7-row { margin-bottom: 18px; }
.wpcf7 label { display: block; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.95rem; color: #123A4A; margin-bottom: 6px; }
.wpcf7 .required { color: #c0392b; }
.wpcf7 .edm-cf7-help { display: block; font-size: 0.8rem; color: #6B6F73; font-weight: 400; margin-top: 4px; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 input[type=file], .wpcf7 textarea { width: 100%; padding: 10px 14px; border: 1px solid #E5E8EC; border-radius: 4px; font-family: 'Open Sans', sans-serif; font-size: 0.95rem; color: #2B2E30; background: #FFFFFF; }
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: #0C5279; outline: none; box-shadow: 0 0 0 3px rgba(12,82,121,0.1); }
.wpcf7 textarea { resize: vertical; min-height: 120px; }
.wpcf7 input[type=file] { padding: 6px; background: #F4F6F8; }
.wpcf7 .edm-cf7-submit { text-align: center; margin-top: 24px; }
.wpcf7 input[type=submit] { background: #1E5E7A !important; color: #FFFFFF !important; padding: 12px 30px !important; font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; font-size: 0.95rem !important; border: 0 !important; border-radius: 4px !important; cursor: pointer; }
.wpcf7 input[type=submit]:hover { background: #123A4A !important; }
.wpcf7 .wpcf7-response-output { border-radius: 6px; padding: 14px 18px; margin: 20px 0 0; font-size: 0.95rem; }
.wpcf7-mail-sent-ok .wpcf7-response-output { background: #E3F4E1; border: 1px solid #6CB76E; color: #2D5E2F; }
.wpcf7-validation-errors .wpcf7-response-output, .wpcf7-mail-sent-ng .wpcf7-response-output { background: #FBE9E7; border: 1px solid #E89884; color: #8B2D1A; }
.wpcf7-not-valid-tip { color: #c0392b !important; font-size: 0.85rem; margin-top: 4px; display: block; }
