/**
 * Stylesheets pour TurfMaster 2026 Template
 * Optimisation UX, Glassmorphism, Responsive et Performances
 */

/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
   :root {
    /* Couleurs Prémium Turf : Vert profond & Or */
    --color-primary: #0F2417; /* Vert Foret Profond */
    --color-primary-light: #1A3E28;
    --color-accent: #D4AF37; /* Or métallique */
    --color-accent-hover: #F3E5AB;
    --color-text: #2C3531;
    --color-text-muted: #6B7280;
    --color-background: #FAFAFA;
    --color-card-bg: #FFFFFF;
    --color-border: #E5E7EB;
    
    /* Typographie Google Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Espacements (Système d'unité 8px) */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    /* Effets & UX 2026 */
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
}

/* Dark Mode Automatique si supporté ou via classe */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #0A0F0D;
        --color-card-bg: #121A16;
        --color-text: #E5E7EB;
        --color-text-muted: #9CA3AF;
        --color-border: #1F2937;
        --glass-bg: rgba(15, 36, 23, 0.75);
        --glass-border: rgba(255, 255, 255, 0.1);
        --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.5);
    }
}

/* =========================================
   RESET & TYPOGRAPHY
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

@media (prefers-color-scheme: dark) {
    h1, h2, h3, h4, h5, h6 {
        color: var(--color-accent);
    }
}

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

a:hover {
    color: var(--color-accent);
}

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

li {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* =========================================
   UI COMPONENTS
   ========================================= */
/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
}

@media (prefers-color-scheme: dark) {
    .btn-outline {
        border-color: var(--color-accent);
        color: var(--color-accent);
    }
    .btn-outline:hover {
        background-color: var(--color-accent);
        color: var(--color-primary);
    }
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: rgba(212, 175, 55, 0.15);
    color: var(--color-accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (prefers-color-scheme: light) {
    .badge {
        color: var(--color-primary-light);
        background-color: rgba(15, 36, 23, 0.1);
    }
}

/* =========================================
   HEADER & NAVIGATION (GLASSMORPHISM)
   ========================================= */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.glass-header.scrolled {
    padding: 0;
    box-shadow: var(--shadow-glass);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

@media (prefers-color-scheme: dark) {
    .logo { color: #fff; }
}

.logo .accent-color {
    color: var(--color-accent);
}

/* Menu principal */
.main-nav {
    display: flex;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown .chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.dropdown:hover .chevron, .dropdown.active .chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    min-width: 220px;
    background: var(--color-card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--color-border);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

.dropdown-menu li a:hover {
    background: rgba(212, 175, 55, 0.05);
    color: var(--color-accent);
    padding-left: 2rem; /* effet de décalage au hover */
}

/* Actions utiles (Mobile menu) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger, .hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    position: absolute;
    transition: var(--transition-smooth);
}

.hamburger { top: 50%; transform: translateY(-50%); }
.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* =========================================
   READING PROGRESS BAR
   ========================================= */
#read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    width: 0%;
    z-index: 1002;
    transition: width 0.1s ease-out;
}

/* =========================================
   HERO SECTION ARTICLE
   ========================================= */
main {
    padding-top: 120px;
}

.post-hero {
    margin-bottom: var(--space-xl);
}

.hero-container {
    text-align: center;
    max-width: 900px;
    margin-bottom: var(--space-lg);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.post-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--space-md);
    letter-spacing: -1px;
}

.post-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 0 var(--space-md);
}

.hero-image {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1);
}

.image-caption {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* =========================================
   CONTENU & SIDEBAR (LAYOUT GRID)
   ========================================= */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
}

/* Typographie et styles du contenu SEO */
.post-content {
    font-size: 1.125rem;
    color: var(--color-text);
}

.post-content h2 {
    font-size: 2rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    position: relative;
    padding-bottom: 0.5rem;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: var(--space-lg);
}

.post-content p {
    margin-bottom: var(--space-md);
}

.keyword-density {
    font-weight: 600;
    color: var(--color-primary);
}
@media(prefers-color-scheme: dark) {
    .keyword-density { color: var(--color-accent); }
}

.inline-link {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    font-weight: 500;
}

.inline-link:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.premium-quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
    padding: var(--space-md) var(--space-lg);
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-lg) 0;
    font-style: italic;
}
@media (prefers-color-scheme: dark) {
    .premium-quote { color: #fff; }
}

.styled-list {
    margin: var(--space-md) 0 var(--space-md) var(--space-md);
}

.styled-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.styled-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* Call To Action Inside Content */
.interactive-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.interactive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--color-accent);
}

/* =========================================
   SIDEBAR & AUTHOR ZONE
   ========================================= */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.sidebar-title {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: var(--space-md);
}

.author-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-soft);
}

.author-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
}

.author-name {
    margin: 0;
    font-size: 1.1rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
}

.author-bio {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
}

.author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    color: var(--color-text);
    transition: var(--transition-smooth);
}
@media (prefers-color-scheme: dark) {
    .author-social a { background: rgba(255,255,255,0.05); fill: #fff; }
}

.author-social a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.author-social a:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Trending Widget */
.trending-list li a {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.trending-list li:last-child a {
    border-bottom: none;
}

.trending-list li a:hover {
    padding-left: 0.5rem;
    color: var(--color-primary);
}

@media (prefers-color-scheme: dark) {
    .trending-list li a:hover { color: var(--color-accent); }
}

.trend-rank {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: rgba(212, 175, 55, 0.3);
    font-weight: 800;
}

.trend-title {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* =========================================
   NEWSLETTER SECTION
   ========================================= */
.newsletter-section {
    padding: var(--space-xl) 0;
    background: var(--color-primary);
    color: #fff;
    margin-top: var(--space-xl);
}

.newsletter-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    background: var(--color-primary-light);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

/* Background gradient effect */
.newsletter-box::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 60%);
    opacity: 0.15;
    border-radius: 50%;
}

.newsletter-content h2 {
    color: #fff;
    font-size: 2.5rem;
}

.newsletter-content p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    max-width: 400px;
}

.decorative-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

.newsletter-form input {
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.newsletter-form input:focus {
    border-color: var(--color-accent);
    background: rgba(255,255,255,0.1);
}

.form-disclaimer {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

/* =========================================
   FOOTER SEO OPTIMISÉ
   ========================================= */
.site-footer {
    background-color: #0A140F; /* Ultra dark green */
    color: rgba(255,255,255,0.7);
    padding: var(--space-xl) 0 var(--space-md);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo .logo-text { color: #fff; }

.brand-desc {
    margin: var(--space-md) 0;
    max-width: 300px;
}

.warning-banner {
    background: rgba(255, 59, 48, 0.1);
    border-left: 3px solid #FF3B30;
    padding: 1rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 1rem;
}

.warning-banner strong {
    color: #FF3B30;
    display: block;
    margin-bottom: 0.25rem;
}

.warning-banner a {
    color: #FF3B30;
    text-decoration: underline;
}

.footer-heading {
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    font-size: 0.85rem;
}

.social-footer {
    display: flex;
    gap: 1rem;
}

.social-footer a {
    color: #fff;
    font-weight: 600;
}

.social-footer a:hover {
    color: var(--color-accent);
}

/* =========================================
   ANIMATIONS & MICRO-INTERACTIONS 2026
   ========================================= */
.animate-on-scroll {
    opacity: 0;
    will-change: transform, opacity;
}

.fade-up {
    transform: translateY(30px);
}

.fade-left {
    transform: translateX(30px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* =========================================
   RESPONSIVE DESIGN (MOBILE FIRST OVERRIDES)
   ========================================= */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide for mobile by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: var(--space-md);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.mobile-active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .btn-outline {
        display: none; /* Hide header CTA on very small screens */
    }

    .newsletter-box {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .interactive-card {
        flex-direction: column;
        text-align: center;
    }
}
