/* ==========================================================================
   Acephal — Base: fonts, reset, typography, layout primitives, utilities
   ========================================================================== */

/* ---- Fonts (self-hosted Montserrat variable, SIL OFL) ------------------- */
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../assets/fonts/montserrat-latin-ext-wght.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
        U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
        U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../assets/fonts/montserrat-latin-wght.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
        U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
ul,
figure,
blockquote {
    margin: 0;
}

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

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

a {
    color: inherit;
}

/* ---- Document ----------------------------------------------------------- */
body {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--acephal-night-deep);
    color: var(--acephal-white);
    font-family: var(--font-sans);
    font-weight: var(--weight-regular);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout primitives -------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--wide {
    padding-inline: var(--gutter-wide);
}

/* ---- Shared typographic patterns ---------------------------------------- */
.label {
    font-size: 0.75rem;
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

/* Short cyan rule used under key statements (plaquette_projet). */
.accent-rule {
    display: block;
    width: 3rem;
    height: 3px;
    border: 0;
    margin: 0;
    background: var(--acephal-cyan);
}

/* Line icon from the inline sprite. */
.icon {
    width: 1.5rem;
    height: 1.5rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Accessibility utilities -------------------------------------------- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--acephal-white);
    color: var(--acephal-night);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

:focus-visible {
    outline: 2px solid var(--acephal-cyan);
    outline-offset: 3px;
}

/* Skip-link target receives programmatic focus only. */
main:focus {
    outline: none;
}

/* Sprite container: kept in the DOM (not display:none) so gradients work. */
.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---- Scrollbars (Acephal palette) --------------------------------------- */
html {
    scrollbar-color: var(--acephal-blue) var(--acephal-night-deep);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--acephal-night-deep);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--acephal-night-deep);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--acephal-blue), var(--acephal-cyan));
}

::-webkit-scrollbar-thumb:hover {
    background: var(--acephal-cyan);
}

::-webkit-scrollbar-corner {
    background: var(--acephal-night-deep);
}