/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-body);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* ===== TRANSITION OVERLAY — chargé via CSS donc actif dès le 1er pixel peint ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9990;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    will-change: opacity;
}

body.page-ready::before {
    opacity: 0;
}

body.page-leaving::before {
    opacity: 1;
    pointer-events: all;
}

/* Disables the overlay transition for instant resets (bfcache restore) */
body.no-transition::before {
    transition: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
