/* Fichier: public/assets/css/main.css */

/* --- Variables de Style (Basées sur le JSON) --- */
:root {
    --header-height: 64px;
    --accent: #3266ff; /* primary_color: Blue */
    --accent-alt: #0daeff; /* secondary_color: Lighter Blue */
    --accent-soft: rgba(50, 102, 255, 0.1);
    --bg: #f4f6fb; /* background_color: Light Grey */
    --card-bg: #ffffff; /* card_background: White */
    --text: #111827; /* text_color: Dark Grey/Black */
    --muted: #6b7280; /* muted_text: Medium Grey */
    --warning-bg: #fff7ed;
    --warning-border: #9a3412;
}

/* --- Base Reset & Typographie --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- 1. Global Header (Sticky) --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
}
.logo span {
    color: var(--accent);
}

/* Main Navigation (Desktop only) */
.nav-desktop {
    display: flex;
    gap: 20px;
}
.nav-desktop a {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text);
}
.nav-desktop a:hover {
    background-color: var(--accent-soft);
    text-decoration: none;
}
.nav-desktop a.active { /* active_link_style */
    background-color: var(--accent-soft);
    color: var(--accent);
    font-weight: bold;
}

/* Language Switcher (Desktop only) */
.lang-switcher {
    display: flex;
    gap: 5px;
}
.lang-switcher button {
    padding: 6px 10px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text);
}
.lang-switcher button.active { /* active_style */
    background-color: var(--accent);
    color: white;
}

/* Profile Zone */
.profile-zone {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.profile-zone img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--muted);
}
.profile-zone .role {
    font-size: 0.8rem;
    color: var(--muted);
}

/* --- 2. Mobile Sidebar (Off-Canvas) --- */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: var(--card-bg);
    z-index: 200;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 20px;
}
.mobile-sidebar.open {
    transform: translateX(0);
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.sidebar-nav a {
    display: block;
    padding: 10px 0px 10px 10px;
    color: var(--text);
    font-size: 1.1rem;
}
.sidebar-nav a.active { /* active_link_style */
    background-color: var(--accent-soft);
    color: var(--accent);
    font-weight: bold;
}
.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--bg);
}
.sidebar-lang-switcher {
    text-align: center;
    margin-top: 15px;
}

/* Hamburger Menu Icon (using basic CSS) */
.hamburger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
}

/* --- 3. Main Content Area (Fluid with Max Width) --- */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 5px;
}
.page-header p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* Main Layout Grid (Desktop: 1.5fr / 1fr) */
.main-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr; /* Default to 1fr for mobile */
}

/* --- 4. UI Components --- */
/* Card */
.card { /* Rounded box (16px), White background, Border, Box shadow on hover */
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* Help Highlight (Warning/Alert box) */
.help-highlight {
    background-color: var(--warning-bg);
    border-left: 5px solid var(--warning-border);
    padding: 15px;
    border-radius: 8px;
    color: var(--warning-border);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.help-highlight i { /* Assuming Font Awesome for icons */
    font-size: 1.2rem;
}

/* --- Responsive Breakpoints --- */

/* Tablet Narrow (768px down to 481px) */
@media (max-width: 768px) {
    /* Main nav hidden, Hamburger menu visible */
    .nav-desktop, .lang-switcher {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .main-container {
        padding: 16px; /* Reduced padding on mobile */
    }
}

/* Tablet Wide (1024px down to 769px) - FAQ grid collapses to 1fr */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Desktop (Above 1024px) */
@media (min-width: 1025px) {
    .main-grid.two-col {
        grid-template-columns: 1.5fr 1fr; /* Desktop: 1.5fr / 1fr (faq-grid) */
    }
}