/*
 * ArtShare — feuille de style principale (design-site.md).
 * Les couleurs et réglages viennent de config/artshare.php, injectés en
 * variables CSS dans le gabarit. Aucune étape de compilation n'est nécessaire.
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter/inter-latin-wght-normal.woff2') format('woff2-variations');
    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;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

/* --- Base --------------------------------------------------------------- */

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0 0 .75rem; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
p { margin: 0 0 1rem; }

a {
    color: var(--color-accent);
    text-underline-offset: 3px;
    transition: color var(--transition);
}

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

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.text-secondary { color: var(--color-text-secondary); }

.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;
    left: 16px; top: -48px;
    padding: 8px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    z-index: 10;
}
.skip-link:focus { top: 8px; }

/* --- Mise en page ------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .container { padding: 0 32px; }
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
}

.site-main {
    flex: 1;
    padding-top: 32px;
    padding-bottom: 48px;
}

/* --- En-tête (design-site.md §4) ----------------------------------------- */

.site-header { border-bottom: 1px solid var(--color-border); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    gap: 16px;
}

.site-header__name {
    color: var(--color-text);
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
}

.site-header__login {
    color: var(--color-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.site-header__login:hover { text-decoration: underline; }

/* --- Pied de page (design-site.md §8) ------------------------------------ */

.site-footer {
    border-top: 1px solid var(--color-border);
    font-size: 14px;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.site-footer a {
    color: var(--color-text-secondary);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.site-footer a:hover { color: var(--color-text); text-decoration: underline; }

/* --- Formulaires ---------------------------------------------------------- */

.input {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.input:focus { border-color: var(--color-accent); outline: none; }
.input:disabled { color: var(--color-text-secondary); cursor: not-allowed; }

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    color: var(--color-text);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
}
.icon-button:disabled { color: var(--color-text-secondary); cursor: not-allowed; }
.icon-button svg { width: 20px; height: 20px; stroke-width: 1.5; }

/* --- Accueil ------------------------------------------------------------- */

.home-search { max-width: 640px; margin: 0 auto 48px; }

.search-form { display: flex; gap: 8px; }

.notice { max-width: 640px; margin: 0 auto; text-align: center; }

/* --- Champs et boutons ----------------------------------------------------- */

.field { margin: 0 0 20px; border: 0; padding: 0; }
.field > label, .field > legend { display: block; margin-bottom: 6px; font-weight: 500; }
.field__error { margin: 6px 0 0; color: var(--color-error); font-size: 14px; }

input[type="radio"], input[type="checkbox"] { accent-color: var(--color-accent); }

.radio { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 20px;
    font: inherit;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition);
}
.button--primary { color: #fff; background: var(--color-accent); border-color: var(--color-accent); }
.button--primary:hover { filter: brightness(1.15); }

/* --- Maintenance ----------------------------------------------------------- */

.maintenance { max-width: 720px; }
.maintenance__form { margin-top: 24px; }
.maintenance__output {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    white-space: pre-wrap;
    overflow-x: auto;
}
