/*
Theme Name: Auto-École Dreux Blog
Theme URI: https://auto-ecole-dreux.fr/blog/
Template: kadence
Description: Thème enfant Kadence personnalisé pour le blog Auto-École Dreux. Reprend le header, footer et design du site principal.
Author: Nexiagence
Author URI: https://auto-ecole-dreux.fr
Version: 1.1
*/

/* =============================================
   IMPORT — Mêmes polices que le site principal
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* =============================================
   DESIGN TOKENS — Identiques au site principal
   ============================================= */
:root {
    --bg-primary: #050a18;
    --bg-secondary: #080e24;
    --bg-tertiary: #0c1430;
    --bg-card: rgba(12, 20, 48, 0.65);
    /* Slightly darker for better contrast */
    --bg-glass: rgba(15, 25, 55, 0.45);
    --accent: #4f8cff;
    --accent-light: #7aadff;
    --accent-glow: rgba(79, 140, 255, 0.4);
    --gradient-main: linear-gradient(135deg, #4f8cff, #a855f7, #06b6d4);
    --gradient-cta: linear-gradient(135deg, #ff7a2e, #ff5722, #ff9800);
    --text-primary: #e8edf5;
    --text-secondary: #a0b0cc;
    --text-muted: #5e7091;
    --border-subtle: rgba(79, 140, 255, 0.1);
    --border-light: rgba(79, 140, 255, 0.15);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* =============================================
   GLOBAL OVERRIDES & DARK THEME ENFORCEMENT
   ============================================= */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: var(--bg-primary) !important;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Force removal of white backgrounds from Kadence containers */
.site,
#wrapper,
.site-container,
.content-container,
.content-inner,
.content-bg,
.entry-content,
.entry-hero,
.kadence-content-width,
.site-middle,
.content-area {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Hide Kadence default header & footer */
.site-header,
header.site-header,
#masthead,
.kadence-header,
.site-header-wrap,
.site-footer,
footer.site-footer,
#colophon,
.kadence-footer,
.site-footer-wrap {
    display: none !important;
}

/* =============================================
   CUSTOM HEADER
   ============================================= */
.ae-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1200px;
    z-index: 9999;
    background: rgba(8, 14, 36, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    height: 64px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ae-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 100%;
}

.ae-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.ae-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    color: white;
}

.ae-logo-text .ae-logo-main {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.ae-logo-text .ae-logo-sub {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.ae-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.ae-nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.ae-nav a:hover {
    color: var(--text-primary);
    background: rgba(79, 140, 255, 0.08);
}

.ae-nav a.ae-cta {
    background: var(--gradient-cta);
    color: white;
    font-weight: 700;
    padding: 8px 20px;
    box-shadow: 0 4px 16px rgba(255, 122, 46, 0.25);
}

.ae-nav a.ae-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 122, 46, 0.4);
}

/* Burger menu */
.ae-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.ae-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .ae-burger {
        display: flex;
    }

    .ae-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        height: 100vh;
        background: rgba(8, 14, 36, 0.98);
        backdrop-filter: blur(30px);
        padding: 100px 32px 40px;
        z-index: 9998;
    }

    .ae-nav.open {
        display: block;
    }

    .ae-nav ul {
        flex-direction: column;
        gap: 8px;
    }

    .ae-nav a {
        display: block;
        padding: 14px 20px;
        font-size: 1.1rem;
    }
}

/* =============================================
   CUSTOM FOOTER
   ============================================= */
.ae-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 80px 0 32px;
    margin-top: 80px;
}

.ae-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.ae-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .ae-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .ae-footer-grid {
        grid-template-columns: 1fr;
    }
}

.ae-footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.ae-footer-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.ae-footer h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.ae-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ae-footer ul li {
    margin-bottom: 10px;
}

.ae-footer ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.3s ease;
}

.ae-footer ul a:hover {
    color: var(--accent-light);
}

.ae-footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* =============================================
   CONTENT & ARTICLES STYLE
   ============================================= */
/* Main wrapper padding handled by layout, but verify top padding */
#wrapper,
.site,
.site-container {
    padding-top: 140px;
}

/* Force dark card style on articles */
article,
.entry,
.post {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(79, 140, 255, 0.05);
    border-color: var(--border-light);
}

/* Typography corrections for dark mode */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.entry-title a {
    color: var(--text-primary) !important;
    font-family: 'Outfit', sans-serif !important;
}

.entry-title a:hover {
    color: var(--accent-light) !important;
}

p,
li,
.entry-content {
    color: var(--text-secondary) !important;
    background: transparent !important;
}

/* Links */
a {
    color: var(--accent-light);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

/* Metadata */
.entry-meta,
.post-date,
.author-name,
.cat-links {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
}

/* Sidebar Widgets */
.widget-area .widget,
.sidebar .widget {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    color: var(--text-primary) !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* =============================================
   CATEGORY PILLS BAR
   ============================================= */
.ae-categories-bar {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1200px;
    z-index: 9998;
    background: rgba(8, 14, 36, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    transition: all 0.4s ease;
}

.ae-categories-inner {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    /* Avoid scrollbar overlap visual */
}

.ae-categories-inner::-webkit-scrollbar {
    display: none;
}

.ae-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(79, 140, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ae-cat-pill:hover {
    color: var(--text-primary);
    background: rgba(79, 140, 255, 0.15);
    border-color: rgba(79, 140, 255, 0.3);
    transform: translateY(-2px);
}

.ae-cat-pill.active {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.25), rgba(168, 85, 247, 0.15));
    border-color: rgba(79, 140, 255, 0.4);
    color: var(--accent-light);
    box-shadow: 0 4px 20px rgba(79, 140, 255, 0.15);
}

.ae-cat-pill i {
    font-size: 0.78rem;
    opacity: 0.8;
}

.ae-cat-pill.active i {
    opacity: 1;
}

.ae-cat-count {
    background: rgba(79, 140, 255, 0.2);
    color: var(--accent-light);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .ae-categories-bar {
        top: 84px;
        width: 96%;
        padding: 10px 14px;
        border-radius: var(--radius-md);
    }

    .ae-cat-pill {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    #wrapper,
    .site,
    .site-container {
        padding-top: 150px;
    }
}

/* Floating contact button */
.ae-contact-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-cta);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(255, 122, 46, 0.4);
    transition: all 0.3s ease;
}

.ae-contact-float:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 40px rgba(255, 122, 46, 0.5);
    color: white;
}