/* ══════════════════════════════════════════════════════════
   Arbolane — Styles communs à toutes les pages
   ══════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0F3D2E;
    --primary-dark: #0B2E23;
    --primary-light: #165340;
    --secondary: #121212;
    --accent: #C9A24D;
    --background: #F5F2ED;
    --surface: #FFFFFF;
    --surface-alt: #EEE8E0;
    --text-primary: #121212;
    --text-secondary: #374151;
    --text-disabled: #9CA3AF;
    --divider: #E1D9CF;
    --border: #D6CBBF;
    --success: #166534;
    --success-light: #DCFCE7;
    --error: #991B1B;
    --warning: #B45309;
    --info: #1E40AF;
    --radius-sm: 4px;
    --radius: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    font-family: "Fraunces", Georgia, serif;
    color: var(--primary);
    line-height: 1.2;
}

h1 { font-weight: 700; letter-spacing: -0.2px; }
h2 { font-weight: 700; letter-spacing: -0.1px; }
h3 { font-weight: 650; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--primary-dark); }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ────────────────────────────────────────── */
nav {
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    border-bottom: 1px solid var(--divider);
}

nav .nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.nav-logo img {
    height: 48px;
    width: auto;
}

.nav-logo span {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }

.nav-links .nav-cta {
    background: var(--accent);
    color: var(--secondary);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
}

.nav-links .nav-cta:hover { opacity: 0.9; }

/* ── Nav dropdown ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.nav-dropdown > a .material-icons {
    font-size: 18px;
    transition: transform var(--transition);
}

.nav-dropdown:hover > a .material-icons {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    z-index: 200;
    padding-top: 16px;
}

.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

.nav-dropdown-menu a:hover {
    background: var(--surface-alt);
    color: var(--text-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Lien retour (pages légales) */
.nav-back {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}

.nav-back:hover { color: var(--text-primary); }
.nav-back .material-icons { font-size: 18px; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: var(--secondary);
}

.btn-primary:hover {
    background: #d4ad58;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--surface);
    border-color: rgba(255,255,255,0.3);
}

.btn-outline:hover {
    border-color: #fff;
    color: #fff;
}

.btn-green {
    background: var(--primary);
    color: var(--surface);
}

.btn-green:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ── Section Header ────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.underline {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto 20px;
    border-radius: 2px;
}

/* ── CTA Section ───────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    text-align: center;
    padding: 80px 24px;
}

.cta-section h2 {
    color: var(--surface);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 32px;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
    background: var(--background);
    color: var(--text-secondary);
    padding: 48px 24px 32px;
    border-top: 1px solid var(--divider);
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 12px;
    display: flex;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col h4 {
    font-family: "Source Sans 3", sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 1140px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 8px;
}

/* Footer simplifié (pages légales) */
footer.footer-simple {
    background: var(--secondary);
    color: rgba(255,255,255,0.6);
    padding: 32px 24px;
    text-align: center;
    font-size: 0.8rem;
    border-top: none;
}

footer.footer-simple a { color: var(--accent); }

/* ── Pages de contenu (CGU, CGV, etc.) ─────────────────── */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.content h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 8px;
}

.content .underline {
    width: 60px;
    margin: 16px 0 40px;
}

.content section {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--divider);
    margin-bottom: 24px;
}

.content section h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.content p, .content li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.content ul, .content ol {
    padding-left: 20px;
    margin-bottom: 8px;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.content th, .content td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--divider);
    color: var(--text-secondary);
}

.content th {
    font-weight: 600;
    color: var(--text-primary);
    background: #FBFAF8;
}

.placeholder {
    background: #FEF3C7;
    color: #B45309;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ── Tabular nums ──────────────────────────────────────── */
.tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 16px 0;
        gap: 0;
        border-top: 1px solid var(--divider);
        box-shadow: var(--shadow-lg);
        z-index: 100;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > a,
    .nav-dropdown > a {
        padding: 14px 24px;
        font-size: 1rem;
        border-bottom: 1px solid var(--divider);
    }

    .nav-links > a:last-child {
        border-bottom: none;
    }

    .nav-links .nav-cta {
        margin: 16px 24px 8px;
        text-align: center;
        justify-content: center;
        border-bottom: none;
    }

    .nav-toggle { display: block; }

    /* Dropdown mobile : toggle au clic */
    .nav-dropdown-menu {
        display: none;
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--surface-alt);
        margin-top: 0;
        padding: 0;
        min-width: unset;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-menu a {
        padding: 12px 24px 12px 40px;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--divider);
    }

    .nav-dropdown-menu a:last-child {
        border-bottom: none;
    }

    /* Chevron rotation */
    .nav-dropdown.open > a .material-icons {
        transform: rotate(180deg);
    }

    /* Hover désactivé sur mobile */
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown.open:hover .nav-dropdown-menu {
        display: block;
    }

    section { padding: 56px 24px; }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    html { scroll-behavior: auto; }
}
