/* =============================================================
   Sonia Orriger — Socle (reset, éléments globaux, utilitaires)
   ============================================================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--hauteur-header) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--f-texte);
    font-size: var(--t-base);
    font-weight: var(--g-normal);
    line-height: var(--i-base);
    color: var(--c-encre);
    background-color: var(--c-blanc);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-condense);
    font-weight: var(--g-gras);
    line-height: var(--i-serre);
    color: var(--c-encre);
}

h1 { font-size: var(--t-titre-1); }
h2 { font-size: var(--t-titre-2); }
h3 { font-size: var(--t-titre-3); }

p { margin-bottom: var(--e-md); }
p:last-child { margin-bottom: 0; }

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--t-rapide), opacity var(--t-rapide);
}

img, picture, svg, video, canvas {
    display: block;
    max-width: 100%;
}

img { height: auto; }

input, button, textarea, select { font: inherit; }

ul, ol { list-style: none; }

/* ── Conteneurs ─────────────────────────────────────────────── */
.contenu-large {
    width: 100%;
    max-width: var(--largeur-max);
    margin-inline: auto;
    padding-inline: var(--gouttiere);
}

.contenu-etroit {
    width: 100%;
    max-width: var(--largeur-texte);
    margin-inline: auto;
    padding-inline: var(--gouttiere);
}

/* ── Texte riche (contenu éditeur) ──────────────────────────── */
.texte-riche {
    font-size: var(--t-grand);
    line-height: var(--i-aere);
}

.texte-riche > * + * { margin-top: var(--e-md); }
.texte-riche h2 { margin-top: var(--e-xl); }
.texte-riche h3 { margin-top: var(--e-lg); }
.texte-riche a  { color: var(--c-bleu-fonce); }
.texte-riche ul { list-style: disc; padding-left: 1.25em; }
.texte-riche ol { list-style: decimal; padding-left: 1.25em; }
.texte-riche li { margin-bottom: var(--e-xs); }

.texte-riche blockquote {
    border-left: 3px solid var(--c-coeur);
    padding-left: var(--e-md);
    font-style: italic;
    color: var(--c-encre-doux);
}

/* ── Accessibilité ──────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--c-coeur);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--e-md);
    z-index: 1000;
    padding: var(--e-sm) var(--e-md);
    background: var(--c-encre);
    color: var(--c-blanc);
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: top var(--t-rapide);
}

.skip-link:focus { top: var(--e-md); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ── Textes courts mis en forme (portes, encarts, chapô…) ────── */
.texte-court > * + * { margin-top: var(--e-sm); }
.texte-court p { margin-bottom: 0; }

.texte-court a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.texte-court a:hover,
.texte-court a:focus-visible { color: var(--u-bouton, var(--c-encre)); }

.texte-court ul { list-style: disc;    padding-left: 1.25em; }
.texte-court ol { list-style: decimal; padding-left: 1.25em; }
.texte-court strong { font-weight: var(--g-gras); color: var(--c-encre); }

/* ── Boutons insérés dans un contenu ([bouton]) ─────────────── */
/* Les règles de lien des textes (couleur, soulignement) ne doivent pas
   s'appliquer aux boutons : sans cela, texte bleu sur fond sombre. */
.texte-riche a.btn,
.texte-court a.btn,
.texte-riche a.btn:hover,
.texte-court a.btn:hover {
    color: var(--c-blanc);
    text-decoration: none;
}

.bouton-contenu {
    margin-block: var(--e-sm);
    max-width: 100%;
    text-wrap: balance;
}
