# Cookie Policy

**Platform:** RentalDriveGo  
**Domain:** rentaldrivego.ma  
**Last updated:** 2026-05-23

---

## 1. What Are Cookies

Cookies are small text files that a website stores on your device when you visit. They allow the site to remember information about your visit — such as your preferred language or whether you are signed in — so you do not have to re-enter it every time.

RentalDriveGo uses cookies only for the purposes described in this document. We do not use cookies to track your activity across third-party websites, serve advertisements, or build behavioural profiles.

---

## 2. Types of Cookies We Use

We use two categories of cookies: **strictly necessary** and **preference/functional**.

We do not use analytics cookies, advertising cookies, or third-party tracking cookies.

---

## 3. Cookie Details

### 3.1 Authentication Cookie

| Field | Value |
|---|---|
| **Name** | `employee_session` |
| **Category** | Strictly necessary |
| **Duration** | 8 hours (session) |
| **Scope** | All pages (`path=/`) |
| **Third-party** | No |

**Purpose:** This cookie is set when an employee signs in to the RentalDriveGo workspace. Admins receive a separate `admin_session` cookie. It stores a cryptographically signed token (JWT) that proves your identity to the platform. Without this cookie, the dashboard and protected API endpoints cannot verify who you are and will redirect you to the sign-in page.

**When it is set:** On a successful sign-in.  
**When it is removed:** When you sign out, or automatically after 8 hours of inactivity.  
**Can you opt out?** No. This cookie is required for the platform to function. Blocking it will prevent you from signing in.

---

### 3.2 Language Preference Cookie

| Field | Value |
|---|---|
| **Name** | `rentaldrivego-language` |
| **Category** | Functional / preference |
| **Duration** | 1 year |
| **Scope** | All pages (`path=/`) |
| **Third-party** | No |

**Purpose:** Stores your chosen display language so the interface appears in your preferred language on every visit across all parts of the platform (public marketplace, dashboard, and admin panel). Supported values are English (`en`), French (`fr`), and Arabic (`ar`).

**When it is set:** When you change the language using the language selector, or automatically on first visit based on your browser's language settings.  
**Can you opt out?** You can block this cookie. If you do, the platform will fall back to a default language and you may need to select your language on every visit.

---

### 3.3 Theme Preference Cookie

| Field | Value |
|---|---|
| **Name** | `rentaldrivego-theme` |
| **Category** | Functional / preference |
| **Duration** | 1 year |
| **Scope** | All pages (`path=/`) |
| **Third-party** | No |

**Purpose:** Stores your preferred colour scheme — light mode or dark mode. This cookie is read immediately when a page loads (before the interface is drawn) to apply the correct theme without any visible flash of the wrong colours.

**When it is set:** When you toggle the light/dark mode switch.  
**Can you opt out?** You can block this cookie. If you do, the platform will fall back to your operating system's colour scheme preference and the theme may reset on every visit.

---

### 3.4 Per-User Scoped Preference Cookies

| Field | Value |
|---|---|
| **Name** | `rentaldrivego-language--{userID}`, `rentaldrivego-theme--{userID}` |
| **Category** | Functional / preference |
| **Duration** | 1 year |
| **Scope** | All pages (`path=/`) |
| **Third-party** | No |

**Purpose:** When you are signed in, the platform saves your language and theme preferences under a cookie that is tied to your account identifier. This allows multiple employees who share a device (for example, in a shared office environment) to each maintain independent preferences. The `{userID}` portion is derived from the authentication token and does not contain personal information beyond an internal account identifier.

**When it is set:** On every language or theme change while you are signed in.  
**Can you opt out?** You can block these cookies. If you do, your preferences will revert to the shared or default settings each time you sign in on a shared device.

---

### 3.5 Legacy Preference Cookies (Transitional)

| Field | Value |
|---|---|
| **Names** | `dashboard-language`, `marketplace-language` |
| **Category** | Functional / preference |
| **Duration** | 1 year |
| **Scope** | All pages (`path=/`) |
| **Third-party** | No |

**Purpose:** These cookies exist for backward compatibility with older versions of the platform. They store the same language preference as `rentaldrivego-language` but were scoped to individual sub-applications. New code always reads `rentaldrivego-language` first and only falls back to these if the primary cookie is absent.

**Planned removal:** These cookies will be removed once all users have transitioned to the unified preference system. They do not store any additional personal data.

---

## 4. What We Do Not Do

- We do **not** use cookies to track you across other websites.  
- We do **not** share cookie data with advertisers or data brokers.  
- We do **not** use session-replay or behavioural analytics cookies.  
- We do **not** set cookies from third-party domains on our pages.

---

## 5. Cookie Consent

**Strictly necessary cookies** (section 3.1) do not require your consent because they are essential to provide the service you have requested.

**Functional / preference cookies** (sections 3.2–3.5) are used solely to remember your choices and improve your experience. They do not process personal data for marketing or tracking purposes. Under most privacy regulations (including GDPR), these may be set without explicit consent when used exclusively to fulfil user-requested functionality. Where local law requires explicit consent, a consent prompt will be displayed on your first visit.

---

## 6. How to Manage or Delete Cookies

You can control cookies through your browser settings. Common options include:

- **Block all cookies** — the platform will work but you will need to re-enter preferences on every visit and you will not be able to sign in.
- **Block third-party cookies** — this will have no effect on RentalDriveGo as we do not use third-party cookies.
- **Delete cookies on close** — you will be signed out and your preferences will reset each time you close the browser.
- **Delete specific cookies** — use your browser's developer tools (Application → Cookies) to remove individual cookies by name.

Browser-specific instructions:

| Browser | Settings location |
|---|---|
| Chrome | Settings → Privacy and security → Cookies and other site data |
| Firefox | Settings → Privacy & Security → Cookies and Site Data |
| Safari | Settings → Privacy → Manage Website Data |
| Edge | Settings → Cookies and site permissions → Cookies and site data |

---

## 7. Security

The authentication cookies (`employee_session` and `admin_session`) are signed, HttpOnly, and expire after the configured session window. They use `Secure` in production and are not readable by JavaScript. We recommend using the platform on trusted devices only and signing out when you are finished.

---

## 8. Changes to This Policy

We may update this Cookie Policy when we add new features or change how existing cookies work. The "Last updated" date at the top of this document will reflect any changes. Significant changes will be communicated through the platform or by email.

---

## 9. Contact

If you have questions about this Cookie Policy or how we handle your data, please contact us at:

**Email:** rentaldrivego@gmail.com  
**Website:** https://rentaldrivego.ma
