/* Petit reset maison : Bootstrap n'est plus chargé. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* La navbar est fixe : sans ça, les ancres arrivent cachées dessous. */
    scroll-padding-top: calc(var(--hauteur-nav-totale) + 1rem);
    -webkit-text-size-adjust: 100%;
    /* Le voile gris au toucher est remplacé plus bas par un retour visible. */
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background-color: var(--fond);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: var(--t-corps);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Grain très fin sur le fond : il casse l'aspect « aplat numérique » et supprime
   les bandes visibles dans les dégradés. Passe derrière le contenu (z-index négatif). */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23b)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: var(--police-titre);
    font-weight: 600;
    line-height: 1.15;
    /* Les empattements se resserrent bien aux grandes tailles. */
    letter-spacing: -0.015em;
    margin: 0 0 var(--e3);
    text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p {
    margin: 0 0 var(--e3);
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

a {
    color: var(--accent-doux);
    text-decoration-color: rgba(255, 180, 87, 0.45);
    text-underline-offset: 0.2em;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

button {
    font: inherit;
    color: inherit;
}

/* Supprime le délai de 300 ms que gardent encore plusieurs navigateurs intégrés
   avant de déclencher un appui : le site répond au doigt tout de suite. */
a,
button,
summary,
[role="button"] {
    touch-action: manipulation;
}

strong {
    font-weight: 600;
    color: #fff;
}

/* Un focus visible au clavier, invisible à la souris. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--accent);
    color: #1a1204;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
