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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    /* Avoid forcing viewport-wide min width which can trigger horizontal overflow on mobile */
    /* min-width: 100vw; */
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-weight: 500;
    line-height: 1.6;
    color: var(--black);
    min-height: 100vh;
    width: 100%;
    /* Avoid forcing viewport-wide min width which can trigger horizontal overflow on mobile */
    /* min-width: 100vw; */
    margin: 0;
    /* offset for fixed navbar */
    padding: var(--navbar-height) 0 0 0;
    overflow-x: hidden;
    /* Improve initial text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-synthesis: none; /* avoid fake bold/italic before real fonts are ready */
}

/* When quest progress bar is visible, we need extra top space (bar ~60px) */
body.with-quest-progress {
    padding-top: calc(var(--navbar-height) + var(--questbar-height));
}

/* Global background removed. Backgrounds are now applied per-section (see styles/sections/hero.css and about.css). */

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

ul, ol {
    list-style: none;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.section-title {
    font-family: var(--font-accent);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--violet-dark);
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(62, 73, 118, 0.2);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-medium);
    max-width: 600px;
    margin: 0 auto;
}

/* Classe utilitaire pour surligner */
.highlight {
    background-color: var(--orange);
    color: var(--white);
    font-weight: 700;
    display: inline;
    padding: 0.1em 0.3em;
    border-radius: 4px;
}

/* Classe pour texte orange simple (sans fond) */
.orange-text {
    color: var(--orange);
    font-weight: 700;
    display: inline;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
