/* ============================================
 * LOGIMEO — Styles partagés (main.css)
 * Variables, reset, typographie, header, footer, nav
 * Utilisé par toutes les pages statiques
 * ============================================ */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --color-primary: #a9c825;
    --color-primary-dark: #8ba820;
    --color-secondary: #1D1D1D;
    --color-white: #ffffff;
    --color-gray-light: #f8f9fa;
    --color-gray: #6c757d;
    --color-border: #e0e0e0;
    --color-error: #dc3545;
    --color-success: #28a745;
    --font-logo: 'Quicksand', sans-serif;
    --font-body: 'Raleway', sans-serif;
    --header-height: 64px;
    --max-width: 1400px;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ── Accessibilité ──────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 8px 16px;
    z-index: 9999;
    font-weight: 700;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ── Header commun ──────────────────────────────────────────────────────────── */
.header {
    background: var(--color-white);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.header-content {
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    height: 36px;
    width: auto;
}

.logo-text {
    font-family: var(--font-logo);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-secondary);
}

.logo-text .highlight {
    color: var(--color-primary);
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition);
}

.btn-login:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

/* ── Menu hamburger mobile ──────────────────────────────────────────────────── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        gap: 0.5rem;
        z-index: 999;
    }

    .nav.open {
        display: flex;
    }

    .header-content {
        padding: 0 1.5rem;
    }
}

/* ── Boutons communs ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(169, 200, 37, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
    background: var(--color-secondary);
    color: var(--color-white);
}

/* ── Sections communes ──────────────────────────────────────────────────────── */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-gray);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Footer commun ──────────────────────────────────────────────────────────── */
.footer {
    background: var(--color-secondary);
    color: white;
    padding: 4rem 3rem 2rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-link {
    color: #adb5bd;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: color var(--transition);
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--color-primary);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #4a4a4a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #adb5bd;
    font-size: 0.875rem;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 1.5rem 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ── Highlight ──────────────────────────────────────────────────────────────── */
.highlight {
    color: var(--color-primary);
}

/* ── Utilitaires ────────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
