/*
Theme Name: Astra Child - RacingZone Style
Theme URI: https://docteur-durand.fr/
Description: Astra Child theme styled to match RacingZone.fr design.
Author: Antigravity
Author URI: https://docteur-durand.fr/
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

:root {
    --ast-global-color-0: #DD183B;
    --ast-global-color-1: #ec133b;
    --ast-global-color-2: #0F172A;
    --ast-global-color-3: #3A3A3A;
    --ast-global-color-4: #FFFFFF;
    --ast-global-color-5: #f6f4f4;
    --ast-global-color-6: #140609;
    --ast-global-color-7: #FFD1BF;
    --ast-global-color-8: #222222;
    --ast-border-color: var(--ast-global-color-7);
    --ast-normal-container-width: 1300px;
    --ast-narrow-container-width: 900px;
}

body {
    background-color: #eef1f4 !important;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    color: var(--ast-global-color-3);
    font-size: 17px;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .entry-title, .site-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500;
}

/* Hide Astra default header since we use the modern RacingZone header */
#masthead, .site-header {
    display: none !important;
}

/* Header Styles - Matching racingzone.fr */
.ecm-hdr {
    background: #fff;
    border-bottom: 1px solid #e6e8ec;
    position: relative;
    z-index: 999;
}
.ecm-hdr * {
    box-sizing: border-box;
}
.ecm-hdr-top {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
}
.ecm-hdr-soc {
    display: flex;
    gap: 16px;
    align-items: center;
}
.ecm-hdr-soc a {
    color: #26303a;
    display: inline-flex;
    text-decoration: none;
    transition: color .15s;
}
.ecm-hdr-soc a:hover {
    color: #a30000;
}
.ecm-hdr-soc svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.ecm-hdr-brand {
    justify-self: center;
    text-align: center;
    text-decoration: none;
    line-height: .92;
}
.ecm-hdr-brand .l1 {
    display: block;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: .14em;
    color: #a30000;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}
.ecm-hdr-brand .l2 {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4em;
    color: #454f5e;
    margin-top: 4px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}
.ecm-hdr-act {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 14px;
}
.ecm-hdr-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    padding: 8px 4px;
    text-decoration: none;
    transition: color .15s;
}
.ecm-hdr-login:hover {
    color: #5468b8;
}
.ecm-hdr-login svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}
.ecm-hdr-div {
    width: 1px;
    height: 26px;
    background: #e6e8ec;
}
.ecm-hdr-sub {
    background: #a30000 !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
.ecm-hdr-sub:hover {
    background: #5468b8 !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(115,137,196,0.45) !important;
    transform: translateY(-1px) !important;
}
.ecm-burger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    cursor: pointer;
    color: #1d2327;
    padding: 6px;
    margin-left: 2px;
}
.ecm-burger:hover {
    color: #5468b8;
}
.ecm-burger svg {
    width: 26px;
    height: 26px;
}
.ecm-hdr-nav {
    border-top: 1px solid #e6e8ec;
}
.ecm-hdr-nav ul {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 34px;
    padding: 0 24px;
    list-style: none;
}
.ecm-hdr-nav li {
    margin: 0;
    position: relative;
}
.ecm-hdr-nav a {
    position: relative;
    display: block;
    text-decoration: none;
    color: #1d2327;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 2px;
    transition: color .18s;
}
.ecm-hdr-nav a:hover {
    color: #5b71ad;
}
.ecm-hdr-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    height: 2px;
    background: #a30000;
    transform: scaleX(0);
    transition: transform .18s;
}
.ecm-hdr-nav a:hover::after {
    transform: scaleX(1);
}

/* Mobile Drawer */
.ecm-mnav {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease, visibility 0s .28s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ecm-mnav.is-open {
    transform: none;
    visibility: visible;
    opacity: 1;
    transition: transform .28s ease, opacity .28s ease;
}
.ecm-mnav * {
    box-sizing: border-box;
}
.ecm-mnav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eef0f3;
}
.ecm-mnav-brand {
    text-decoration: none;
    line-height: .92;
}
.ecm-mnav-brand .l1 {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .1em;
    color: #a30000;
}
.ecm-mnav-brand .l2 {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .28em;
    color: #454f5e;
    margin-top: 3px;
}
.ecm-mnav-close {
    background: none;
    border: 0;
    cursor: pointer;
    color: #1d2327;
    padding: 6px;
    display: inline-flex;
}
.ecm-mnav-close svg {
    width: 26px;
    height: 26px;
}
.ecm-mnav-body {
    padding: 4px 0;
}
.ecm-mnav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ecm-mnav-menu li {
    margin: 0;
    border-bottom: 1px solid #f2f3f5;
}
.ecm-mnav-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 22px;
    text-decoration: none;
    color: #1d2327;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
}
.ecm-mnav-menu a:hover {
    color: #5468b8;
    background: #f7f8fb;
}
.ecm-mnav-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    margin-top: auto;
}
.ecm-mnav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #d8dde8;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    padding: 13px 18px;
    text-decoration: none;
}
.ecm-mnav-sub {
    background: #a30000;
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 18px;
    text-align: center;
    text-decoration: none;
}
.ecm-mnav-soc {
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 2px 22px 30px;
}
.ecm-mnav-soc a {
    color: #5a6474;
    display: inline-flex;
    text-decoration: none;
}
.ecm-mnav-soc svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
html.ecm-mnav-lock, html.ecm-mnav-lock body {
    overflow: hidden;
}

@media (max-width: 820px) {
    .ecm-hdr-top {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        padding: 12px 16px;
    }
    .ecm-hdr-soc, .ecm-hdr-login, .ecm-hdr-div, .ecm-hdr-nav {
        display: none !important;
    }
    .ecm-hdr-brand {
        justify-self: start;
    }
    .ecm-hdr-brand .l1 {
        font-size: 22px;
        letter-spacing: .1em;
    }
    .ecm-hdr-brand .l2 {
        font-size: 10px;
        letter-spacing: .28em;
    }
    .ecm-hdr-sub {
        padding: 9px 14px;
        font-size: 14px;
    }
    .ecm-burger {
        display: inline-flex !important;
    }
}
@media (min-width: 821px) {
    .ecm-mnav {
        display: none !important;
    }
}

/* Page Container & Background */
.site-content {
    background-color: #eef1f4 !important;
    padding-top: 30px;
    padding-bottom: 50px;
}
.ast-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 3-column Blog Grid */
.ast-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
    align-items: stretch;
}
.ast-article-post {
    width: 33.333333%;
    padding: 0 12px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box;
}
@media (max-width: 921px) {
    .ast-article-post {
        width: 50% !important;
    }
}
@media (max-width: 600px) {
    .ast-article-post {
        width: 100% !important;
    }
}

/* Card Styling - Exactly matching racingzone */
.ast-article-inner {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    transition: box-shadow .2s ease, transform .2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ast-article-post:hover .ast-article-inner {
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
    transform: translateY(-4px);
}
.post-thumb {
    margin: 0 !important;
    overflow: hidden;
    position: relative;
    background: #eef1f4;
}
.post-thumb img, img.wp-post-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.ast-article-post:hover .post-thumb img {
    transform: scale(1.05);
}
.post-content {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.cat-links {
    margin-bottom: 10px;
    display: block;
}
.cat-links a {
    display: inline-block;
    background: #fdecec !important;
    color: #c1121f !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.7;
    transition: background .15s, color .15s;
}
.cat-links a:hover {
    background: #c1121f !important;
    color: #fff !important;
}
.entry-title {
    font-size: 1.16rem !important;
    line-height: 1.32 !important;
    margin: 0 0 8px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
}
.entry-title a {
    color: #1a1f2b !important;
    text-decoration: none;
    transition: color .15s;
}
.entry-title a:hover {
    color: #c1121f !important;
}
.entry-meta {
    font-size: 13px;
    color: #9aa1ac;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.entry-meta a {
    color: #9aa1ac !important;
    text-decoration: none;
}
.entry-meta a:hover {
    color: #c1121f !important;
}
.ast-excerpt-container {
    color: #5a6270;
    font-size: .92rem;
    line-height: 1.5;
    margin-top: auto;
}
.ast-excerpt-container p {
    margin-bottom: 0;
}

/* First/Hero article on homepage (Desktop) */
@media (min-width: 922px) {
    body.home .ast-row > article.ast-article-post:first-child {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 34px !important;
    }
    body.home article:first-child .ast-article-inner {
        display: grid !important;
        grid-template-columns: 1.25fr 1fr;
        column-gap: 28px;
        align-items: center;
        border-radius: 16px;
    }
    body.home article:first-child .post-thumb {
        height: 100%;
        min-height: 360px;
    }
    body.home article:first-child .post-thumb img {
        height: 100%;
        min-height: 360px;
        aspect-ratio: 16/10;
        object-fit: cover;
    }
    body.home article:first-child .post-content {
        padding: 30px 34px 30px 0;
        justify-content: center;
    }
    body.home article:first-child .entry-title {
        font-size: 1.95rem !important;
        line-height: 1.2 !important;
        margin-top: 10px !important;
        margin-bottom: 14px !important;
    }
    body.home article:first-child .ast-excerpt-container {
        font-size: 1rem;
        line-height: 1.55;
    }
}

/* Pagination */
.ast-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 24px;
    width: 100%;
}
.ast-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e3e6ec;
    color: #1a1f2b;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s;
}
.ast-pagination .page-numbers.current, .ast-pagination .page-numbers:hover {
    background: #a30000 !important;
    color: #fff !important;
    border-color: #a30000 !important;
}

/* Footer matching racingzone */
.site-footer {
    background: #fff !important;
    border-top: 1px solid #e6e8ec;
    color: #5a6474;
    font-size: 14px;
    padding: 24px 0;
}
.site-footer .site-below-footer-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.site-footer a {
    color: #5a6474;
    text-decoration: none;
    transition: color .15s;
}
.site-footer a:hover {
    color: #a30000;
}
.footer-menu-list {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Single Post styling */
.single-post .site-content {
    background-color: #fff !important;
}
.single-post .ast-article-single {
    max-width: 860px;
    margin: 0 auto;
    padding: 2em 1em;
}
.single-post .entry-title {
    font-size: 2.2rem !important;
    line-height: 1.25 !important;
    margin-bottom: 16px !important;
}
.single-post .post-thumb img {
    border-radius: 12px;
    margin-bottom: 24px;
}
blockquote {
    margin: 26px 0;
    padding: 16px 24px;
    border-left: 4px solid #7389c4;
    background: #f7f9fd;
    border-radius: 0 10px 10px 0;
    font-size: 1.14em;
    line-height: 1.5;
    font-style: italic;
    color: #2b3442;
}
