/* ============================================================
   Feuille commune a toutes les pages du site.
   Chargee AVANT la feuille specifique de chaque page.

   Contient : la police, les variables de couleur, la remise a zero,
   le bandeau sombre, sa navigation et son bouton d'acces.
   Ne rien mettre ici qui ne concerne qu'une seule page.
   ============================================================ */

@font-face {
    font-family: "SoItGoes";
    src: url("kg_so_it_goes/KGSoItGoes.ttf") format("truetype"),
         url("kg_so_it_goes/KGSoItGoes.otf") format("opentype");
    font-display: swap;
}

:root {
    --ink: #172026;
    --ink-soft: #26343c;
    --paper: #f5f2e9;
    --card: #ffffff;
    --accent: #f0bc3c;
    --accent-dark: #a96d00;
    --muted: #64727b;
    --line: #d8d4c8;
    --shadow: 0 18px 50px rgba(7, 18, 24, 0.14);
    --radius: 20px;
}

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

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

body {
    min-width: 280px;
    min-height: 100vh;
    margin: 0;
    color: #172026;
    color: var(--ink);
    background: #f5f2e9;
    background: var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
}

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

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button,
input[type="submit"] {
    cursor: pointer;
}

.local-server-warning {
    position: relative;
    z-index: 100;
    padding: 14px 20px;
    color: #172026;
    background: #f0bc3c;
    border-bottom: 2px solid #172026;
    text-align: center;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: #172026;
    background: #f0bc3c;
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* ------------------------------------------------------------
   Le bandeau sombre, identique sur toutes les pages.
   Sa hauteur est fixee pour qu'il ne saute pas d'une page a l'autre.
   ------------------------------------------------------------ */

.site-band {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #172026;
    background: var(--ink);
    border-bottom: 5px solid #f0bc3c;
    border-bottom-color: var(--accent);
}

.site-band::before,
.site-band::after {
    position: absolute;
    width: 420px;
    height: 420px;
    content: "";
    border: 1px solid rgba(240, 188, 60, 0.18);
    border-radius: 50%;
}

.site-band::before {
    right: -110px;
    bottom: -260px;
}

.site-band::after {
    right: 60px;
    bottom: -330px;
}

.site-band__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* 75 px de contenu + 42 px de marge en haut et en bas (box-sizing: border-box) :
       la barre garde la meme hauteur quelle que soit la taille du titre. */
    min-height: 159px;
    width: calc(100% - 40px);
    max-width: 1240px;
    width: min(100% - 40px, 1240px);
    margin: 0 auto;
    padding: 42px 0;
    gap: 18px 30px;
}

.site-band__inner h1 {
    margin: 0;
    font-family: "SoItGoes", Georgia, serif;
    font-size: 4.5rem;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 0.9;
}

/* ------------------------------------------------------------
   Navigation du bandeau
   ------------------------------------------------------------ */

.page-nav {
    display: flex;
    flex-wrap: wrap;
    margin-left: auto;
    gap: 2px 26px;
}

.page-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #cbd3d7;
    border-bottom: 2px solid transparent;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.page-nav a:hover,
.page-nav a:focus {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.45);
    outline: none;
}

.page-nav a[aria-current="page"] {
    color: #f0bc3c;
    color: var(--accent);
    border-bottom-color: #f0bc3c;
    border-bottom-color: var(--accent);
}

.page-nav a:focus-visible {
    outline: 3px solid #f0bc3c;
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ------------------------------------------------------------
   Bouton d'acces (Se connecter / Se deconnecter)
   ------------------------------------------------------------ */

.page-auth {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
}

.access-button {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 11px 24px;
    color: #ffffff;
    background: #26343c;
    background: var(--ink-soft);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
}

.access-button:hover {
    background: #33444e;
    border-color: #f0bc3c;
    border-color: var(--accent);
}

.access-button:focus-visible {
    outline: 3px solid #f0bc3c;
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ------------------------------------------------------------
   Adaptations aux petits ecrans
   ------------------------------------------------------------ */

/* Pied de page : une simple mention, en retrait. */
.site-footer {
    width: calc(100% - 40px);
    max-width: 1240px;
    width: min(100% - 40px, 1240px);
    margin: 0 auto;
    padding: 26px 0 38px;
    border-top: 1px solid #d8d4c8;
    border-top-color: var(--line);
}

.site-footer p {
    margin: 0;
    color: #64727b;
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 720px) {
    .site-band__inner {
        min-height: 0;
    }

    .page-nav {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .site-band__inner {
        align-items: flex-start;
        width: calc(100% - 28px);
        max-width: 1240px;
        width: min(100% - 28px, 1240px);
        padding: 30px 0 36px;
        gap: 18px 24px;
    }

    .page-nav {
        gap: 0 18px;
    }

    .page-auth,
    .page-auth .access-button,
    .site-band__inner > .access-button {
        width: 100%;
    }

    .page-auth .access-button,
    .site-band__inner > .access-button {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .page-nav a,
    .access-button,
    .skip-link {
        transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
    }
}

@media print {
    .site-band,
    .skip-link {
        display: none;
    }
}
