/* ============================================================
   main.css - Styles globaux Le Petit Trader
   Inclus sur toutes les pages via includes/head.php
   ============================================================ */

/* = TOKENS = */
:root {
    --noir: #0D1117;
    --bleu-nuit: #1C2B3A;
    --or: #C8A96E;
    --or-pale: #E8D9BC;
    --blanc: #F0EDE6;
    --gris-clair: #E8E4DC;
    --gris-texte: #6B6B6B;
    --corps: #2C2C2C;
    --serif: 'IBM Plex Serif', Georgia, serif;
    --sans: 'Inter', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', monospace;
    --max: 1140px;
    --gap: clamp(3rem, 6vw, 6rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--blanc);
    color: var(--corps);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* = LAYOUT = */
.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.section {
    padding: var(--gap) 0;
}

.section--dark {
    background: var(--bleu-nuit);
    color: var(--blanc);
}

.section--noir {
    background: var(--noir);
    color: var(--blanc);
}

.section--gris {
    background: var(--gris-clair);
}



/* = NAV = */
nav[role="navigation"] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 1);
    border-bottom: 1px solid rgba(200, 169, 110, 0.15);
}

.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-block {
    display: flex;
    align-items: center;
    line-height: 1;
}

.logo-img {
    height: 64px;
    width: auto;
    display: block;
}

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

    .nav-links a {
        font-size: 0.78rem;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: rgba(240, 237, 230, 0.65);
        transition: color 0.2s;
    }

        .nav-links a:hover {
            color: var(--or);
        }

.nav-cta {
    background: var(--or) !important;
    color: var(--noir) !important;
    padding: 0.45rem 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 2px;
    transition: background 0.2s !important;
}

    .nav-cta:hover {
        background: var(--or-pale) !important;
        color: var(--noir) !important;
    }

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

    .nav-burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--blanc);
        transition: all 0.25s;
    }

    .nav-burger.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-burger.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-burger.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* Drawer mobile */
.nav-drawer {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.98);
    z-index: 99;
    flex-direction: column;
    padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
    gap: 0;
    overflow-y: auto;
}

    .nav-drawer.open {
        display: flex;
    }

    .nav-drawer a {
        font-size: 1.1rem;
        font-weight: 400;
        letter-spacing: 0.04em;
        color: rgba(240, 237, 230, 0.75);
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        transition: color 0.2s;
    }

        .nav-drawer a:hover {
            color: var(--or);
        }

    .nav-drawer .drawer-cta {
        margin-top: 2rem;
        background: var(--or);
        color: var(--noir);
        text-align: center;
        font-weight: 600;
        padding: 1rem;
        border-radius: 2px;
        border-bottom: none;
        font-size: 0.9rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }


/* = MISE EN GARDE = */
.mise-en-garde {
    background: var(--noir);
    border-top: 1px solid rgba(200, 169, 110, 0.1);
    padding: 2rem 0;
}

    .mise-en-garde p {
        font-size: 0.73rem;
        line-height: 1.75;
        color: rgba(240, 237, 230, 0.3);
        max-width: 920px;
    }


/* = FOOTER = */
footer {
    background: var(--noir);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 2.5rem 0;
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo-name {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(240,237,230,0.35);
}

    .footer-logo-name span {
        color: var(--or);
    }

.footer-logo-baseline {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.62rem;
    color: rgba(200,169,110,0.35);
    margin-top: 0.2rem;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    list-style: none;
    justify-content: center;
}

    .footer-links a {
        font-size: 0.76rem;
        color: rgba(240, 237, 230, 0.3);
        transition: color 0.2s;
    }

        .footer-links a:hover {
            color: var(--or);
        }

.footer-copy {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: rgba(240, 237, 230, 0.18);
}



/* = TYPOGRAPHIE COMMUNE = */
/* Utilise sur les pages intrieures (hors accueil) */
/* = TYPOGRAPHIE COMMUNE = */
.section-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--or);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 300;
    line-height: 1.28;
    margin-bottom: 1.5rem;
}

.section--dark .section-title, .section--noir .section-title {
    color: var(--blanc);
}

.section-title em {
    font-style: italic;
    color: var(--or);
}

.section-body {
    font-size: 0.95rem;
    line-height: 1.85;
}

.section--dark .section-body {
    color: rgba(240,237,230,0.72);
}



/* = BOUTONS COMMUNS = */
/* = BOUTONS = */
.btn-primary {
    background: var(--or);
    color: var(--noir);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.9rem 1.75rem;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}

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

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--corps);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.85rem 1.75rem;
    border-radius: 2px;
    border: 1px solid var(--gris-clair);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

    .btn-secondary:hover {
        border-color: var(--or);
        color: var(--or);
        text-decoration: none;
    }

.btn-ghost {
    background: transparent;
    color: rgba(240,237,230,0.72);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.9rem 1.75rem;
    border-radius: 2px;
    border: 1px solid rgba(240,237,230,0.22);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

    .btn-ghost:hover {
        border-color: var(--or);
        color: var(--or);
    }

.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-ctas .btn-primary,
.hero-ctas .btn-ghost {
    text-align: center;
}



/* = RESPONSIVE = */
@media (max-width: 900px) {
    .methode-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}



@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-panel {
        display: none;
    }

    .constat-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    .accordeon-body {
        padding-left: 0;
    }

    .programme-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-ctas {
        flex-direction: column;
    }

    .btn-primary,
    .btn-ghost {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none !important;
    }
}

.nav-links > li {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(240,237,230,0.65);
    transition: color 0.2s;
    padding: 0;
}

    .nav-dropdown-toggle:hover, .nav-dropdown-toggle.active {
        color: var(--or);
    }

    .nav-dropdown-toggle svg {
        transition: transform 0.2s;
        width: 10px;
        height: 10px;
        fill: currentColor;
    }

    .nav-dropdown-toggle.open svg {
        transform: rotate(180deg);
    }

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%);
    background: #1C2B3A;
    border: 1px solid rgba(200,169,110,0.18);
    border-radius: 3px;
    min-width: 220px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

    .nav-dropdown.open {
        display: block;
    }

    .nav-dropdown a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1.25rem;
        font-size: 0.8rem;
        font-weight: 400;
        letter-spacing: 0.03em;
        text-transform: none;
        color: rgba(240,237,230,0.72);
        border-bottom: 1px solid rgba(255,255,255,0.05);
        transition: background 0.15s,color 0.15s;
        text-decoration: none;
    }

        .nav-dropdown a:last-child {
            border-bottom: none;
        }

        .nav-dropdown a:hover {
            background: rgba(200,169,110,0.08);
            color: var(--or);
        }

        .nav-dropdown a.active {
            color: var(--or);
        }

.nav-dropdown-badge {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(200,169,110,0.12);
    color: rgba(200,169,110,0.6);
    border: 1px solid rgba(200,169,110,0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

.drawer-section-toggle {
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(240,237,230,0.75);
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

    .drawer-section-toggle svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
        transition: transform 0.2s;
    }

    .drawer-section-toggle.open svg {
        transform: rotate(180deg);
    }

.drawer-submenu {
    display: none;
    padding: 0.5rem 0 0.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

    .drawer-submenu.open {
        display: block;
    }

    .drawer-submenu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.92rem;
        color: rgba(240,237,230,0.55);
        padding: 0.6rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        transition: color 0.2s;
        text-decoration: none;
    }

        .drawer-submenu a:last-child {
            border-bottom: none;
        }

        .drawer-submenu a:hover {
            color: var(--or);
        }

.drawer-badge {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    background: rgba(200,169,110,0.1);
    color: rgba(200,169,110,0.5);
    border: 1px solid rgba(200,169,110,0.2);
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
}
