:root {
    /* Palette Pleine Nuit — DA nocturne dark (bleu nuit / crème / laiton) */
    --primary: #C9A24B;
    --primary-color: #C9A24B;
    --primary-dark: #B5903E;
    --secondary: #1A2C4E;
    --secondary-color: #1A2C4E;
    --accent: #C9A24B;
    --on-primary: #11203F;
    --text: #F4EFE6;
    --text-light: #9AA3B5;
    --bg: #11203F;
    --bg-alt: #1A2C4E;
    --surface: #1A2C4E;
    --fill: #22344F;
    --white: #FFFFFF;
    --border: #2E4163;
    --container: 1200px;
    --font-serif: 'Fraunces', serif;
    --font-sans: 'Inter', sans-serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Header */
.main-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
}

/* Sous-menu Outils (dropdown header) */
.nav-menu .has-submenu { position: relative; }
.nav-menu .submenu-toggle { cursor: pointer; }
.nav-menu .submenu-toggle::after { content: "\25BE"; font-size: .7em; margin-left: .35rem; vertical-align: middle; }
.nav-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    margin-top: .5rem;
    padding: .4rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 0;
    z-index: 1100;
}
.nav-menu .has-submenu:hover .submenu,
.nav-menu .has-submenu.open .submenu { display: flex; }
.nav-menu .submenu li { width: 100%; }
.nav-menu .submenu a { display: block; padding: .55rem 1.2rem; font-size: .9rem; white-space: nowrap; }
.nav-menu .submenu a:hover { background: var(--fill); color: var(--primary); }

/* Hero */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--bg) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* Sleep Widget */
.sleep-widget {
    margin-top: -3rem;
    z-index: 10;
    position: relative;
    padding: 0;
}

.widget-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.widget-content {
    text-align: center;
}

.widget-form {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    margin: 2rem 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.sleep-results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.times-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.time-pill {
    background: var(--fill);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.time-pill strong {
    font-size: 1.5rem;
    color: var(--primary);
}

.time-pill span {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
}

/* Cards Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    height: 220px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.5s ease;
}

.article-card:hover .article-image img {
    scale: 1.05;
}

.article-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.article-meta {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.article-body h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.article-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
    background: #0C1A33;
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-info p {
    margin-top: 1rem;
    opacity: 0.7;
    max-width: 300px;
}

.footer-links h4, .footer-legal h4 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

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

.footer-links a, .footer-legal a {
    opacity: 0.7;
}

.footer-links a:hover, .footer-legal a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .article-layout {
        flex-direction: column;
    }
    
    .product-sidebar {
        width: 100% !important;
        position: static !important;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu.active {
        display: flex;
    }

    /* Sous-menu Outils en mode mobile : statique, déplié sous le label */
    .nav-menu .submenu {
        position: static;
        min-width: 0;
        margin-top: .35rem;
        padding: .25rem 0 .25rem 1rem;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .nav-menu .has-submenu:hover .submenu { display: none; }
    .nav-menu .has-submenu.open .submenu { display: flex; }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .widget-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 2.2rem;
    }
}

/* Article Page Styling */
.article-header {
    padding: 5rem 0 3rem;
    text-align: center;
}

.article-header .category {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.article-header h1 {
    font-size: 3.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.article-featured-image {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.article-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.article-content {
    flex: 1;
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 750px;
}

.article-content h2, .article-content h3 {
    margin-top: 2.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    font-style: italic;
    margin: 2rem 0;
    color: var(--primary-dark);
}

.article-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style: disc;
}

/* Sidebar & Affiliate Widget */
.product-sidebar {
    width: 350px;
    position: sticky;
    top: 100px;
}

.product-widget {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.product-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 0.25rem;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-item {
    background: var(--fill);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
}

.product-badge {
    position: absolute;
    top: -10px;
    left: 15px;
    background: var(--primary);
    color: var(--on-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.product-info {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.product-info strong {
    font-size: 1.1rem;
}

.product-price {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.affiliate-disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    line-height: 1.4;
}