/* Base styles for the body and fonts */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* A very light grey for the background */
    margin: 0;
    padding: 0;
}

/* Color variables for consistency */
.header-bg {
    background-color: #2E7D32; /* Dark green matching the theme */
}
.text-primary-green {
    color: #2E7D32; /* Dark green for headings and accents */
}
.bg-primary-green-light {
    background-color: #E8F5E9; /* Very light green for alternating section backgrounds (now mostly for download) */
}
.bg-section-green {
    background-color: #4CAF50; /* Green for specific sections */
}

/* Primary button styles */
.btn-primary {
    background-color: #2E7D32;
    color: white;
    padding: 0.75rem 1.5rem; /* Slightly reduced padding */
    border-radius: 0.5rem; /* Refined rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}
.btn-primary:hover {
    background-color: #388E3C; /* Slightly lighter green on hover */
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Outline button styles */
.btn-outline {
    border: 2px solid white;
    color: white;
    padding: 0.75rem 1.5rem; /* Slightly reduced padding */
    border-radius: 0.5rem; /* Refined rounded corners */
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}
.btn-outline:hover {
    background-color: white;
    color: #2E7D32;
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Custom shadow for cards and sections - slightly more pronounced for a "floating" paper look */
.shadow-custom {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Stronger shadow */
}

/* Layout for the main content (navigation + policies) */
.container-wrapper {
    max-width: 1400px; /* Wider max-width for the whole wrapper */
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem; /* Base padding */
}

@media (min-width: 1024px) { /* On large screens and up */
    .container-wrapper {
        display: flex; /* Enable flexbox for side-by-side layout */
        align-items: flex-start; /* Align items to the top */
        padding: 0 2rem;
    }
}

/* Sticky Navigation (Sidebar) */
.sticky-nav {
    top: 20px; /* Distance from the top of the viewport when sticky */
    max-height: calc(100vh - 40px); /* Max height to fit viewport, considering top/bottom margin */
    overflow-y: auto; /* Enable scrolling if content overflows */
    padding: 1.5rem; /* Smaller padding */
    position: sticky; /* Make it sticky */
    align-self: flex-start; /* Ensure it stays at the top of its flex container */
    flex-shrink: 0; /* Prevent it from shrinking */
    background-color: #fff; /* White background for the nav */
}

@media (max-width: 1023px) { /* On medium screens and smaller, make it full width and not sticky */
    .sticky-nav {
        position: static; /* Disable sticky on smaller screens */
        max-height: none; /* Remove max height */
        overflow-y: visible; /* No scrollbar */
        width: 100%; /* Full width */
        margin-right: 0; /* Remove right margin */
        margin-bottom: 2rem; /* Add bottom margin for separation */
    }
}

.sticky-nav-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-nav-list .nav-item {
    display: block;
    padding: 0.5rem 0.75rem; /* Compact padding */
    border-radius: 0.375rem; /* Small rounded corners */
    color: #4a5568; /* Grey text color */
    font-size: 0.95rem; /* Slightly smaller font for nav items */
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none; /* Remove underline */
}

.sticky-nav-list .nav-item:hover,
.sticky-nav-list .nav-item.active { /* 'active' class handled by JS */
    background-color: #E8F5E9; /* Light green on hover/active */
    color: #2E7D32; /* Dark green text on hover/active */
    font-weight: 600; /* Bold active item */
}


/* Policy Content Area */
.policy-content-area {
    background-color: white; /* White background for policy content */
    padding: 2.5rem 2rem; /* Reduced padding compared to previous */
    border-radius: 0.75rem; /* Rounded corners for the main content block */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    flex-grow: 1; /* Allow it to grow and fill space */
    width: 100%; /* Ensure it takes full width within its context */
}
@media (max-width: 640px) { /* Even smaller padding on very small screens */
    .policy-content-area {
        padding: 1.5rem 1rem;
    }
}


/* Policy Blocks within the content area */
.policy-block {
    background-color: white; /* Explicitly white for consistency with main content area */
    padding: 0; /* No extra padding here as it's part of the main content block */
    border-radius: 0; /* No extra border radius */
    box-shadow: none; /* No extra shadow */
    margin-bottom: 2.5rem; /* Spacing between policy blocks */
    border: none; /* No extra border */
}

.policy-block:last-child {
    margin-bottom: 0; /* No bottom margin for the last policy block */
}

/* Chapter titles (H2 inside policy blocks) */
.chapter-title {
    font-size: 2.25rem; /* Default size */
    margin-bottom: 1.5rem; /* Spacing below title */
}
@media (max-width: 1024px) {
    .chapter-title {
        font-size: 2rem;
    }
}
@media (max-width: 768px) {
    .chapter-title {
        font-size: 1.75rem;
    }
}
@media (max-width: 640px) {
    .chapter-title {
        font-size: 1.5rem;
    }
}


/* Sub-section titles (H3-like, e.g., "1. Identification de l'Éditeur") */
.policy-content .font-semibold.text-primary-green.text-xl {
    font-size: 1.125rem; /* Default for these sub-titles */
    margin-top: 1.5rem; /* Spacing above */
    margin-bottom: 0.75rem; /* Spacing below */
}
@media (max-width: 768px) {
    .policy-content .font-semibold.text-primary-green.text-xl {
        font-size: 1rem;
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }
}

/* General paragraph text and list items */
.text-lg { /* Main content paragraphs, default 18px */
    font-size: 1rem; /* Reduced to 16px for document feel */
    line-height: 1.7; /* Tighter line height for document feel */
}
@media (max-width: 768px) {
    .text-lg {
        font-size: 0.9375rem; /* Approx. 15px */
    }
}
@media (max-width: 640px) {
    .text-lg {
        font-size: 0.875rem; /* Approx. 14px */
    }
}

/* Reduced spacing within text blocks for density */
.policy-content .space-y-4 > * + * {
    margin-top: 0.75rem !important; /* Reduced vertical spacing between paragraphs/list items */
}
.policy-content ul.list-disc.space-y-1 > li + li,
.policy-content ul.list-decimal.space-y-1 > li + li,
.policy-content ul.list-circle.space-y-1 > li + li {
    margin-top: 0.25rem !important; /* Very small spacing for list items */
}

/* Specific styling for the download section if needed */
#telechargement {
    margin-bottom: 3rem; /* Ensure good spacing after this block */
}

/* Media query for print styles - REMOVED for Google-like behavior. Add back if needed */
@media print {
    body > *:not(.print-allow) {
        display: none !important;
    }
    body::before {
        content: "Impression et copie de cette politique sont interdites.";
        display: block;
        text-align: center;
        margin: 50px;
        font-size: 20px;
        color: #ff0000;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}
