/* ═══════════════════════════════════════════
   SHARED — Variables, fonts & base pour les sous-pages
   ═══════════════════════════════════════════ */

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Palette par défaut : clair (alignée avec style.css) */
:root {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --accent-color: #d9362b;
    --card-bg: #ffffff;
    --border-color: rgba(217, 54, 43, 0.1);
    --border-subtle: rgba(47, 69, 55, 0.16);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #f5f5f5;
        --card-bg: #1e1e1e;
        --border-subtle: rgba(255, 255, 255, 0.12);
        --border-color: rgba(255, 255, 255, 0.08);
    }
}

:root[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --card-bg: #1e1e1e;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --accent-color: #d9362b;
    --card-bg: #ffffff;
    --border-color: rgba(217, 54, 43, 0.1);
    --border-subtle: rgba(47, 69, 55, 0.16);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 3px;
}

/* Layout */
.page {
    min-height: 100vh;
    padding: 1.75rem 1.25rem 2.5rem;
    display: flex;
    justify-content: center;
}

/* Lien retour */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.back-link::before {
    content: "←";
    font-size: 0.95rem;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    padding: 0.4rem 0.7rem;
    background-color: #ffffff;
    color: var(--text-color);
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    transform: translateY(-150%);
    transition: transform 0.15s ease-out;
    z-index: 20;
    text-decoration: none;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

/* Dark mode chip fallback */
:root[data-theme="dark"] .metric-chip,
:root[data-theme="dark"] .tag {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Smooth theme transition (only after first paint) */
body.theme-transitions-ready {
    transition: background-color 0.25s ease, color 0.25s ease;
}

.contact-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: rgba(128, 128, 128, 0.1);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Dark mode overrides if needed */
:root[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Bouton Contact Mail */
.email-link {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: #FFF;
    background-color: var(--accent-color);
    border: none;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.email-link:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 54, 43, 0.2);
}