/* Navigation commune pour toutes les pages */
:root {
    --nav-height: 72px;
    --accent: #0056b3;
}

/* Fond global */
body {
    background: #f4f4f4;
    color: #333;
}

nav {
    background: #1f1f1f;
    color: #fff;
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-height);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(18px, 4vw, 40px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.6vw, 14px);
}

nav ul li a {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 9px 15px;
    font-size: 1rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

nav ul li a.active,
nav ul li a:hover {
    background-color: var(--accent);
    color: #fff;
}

.lang-switcher {
    position: absolute;
    right: clamp(18px, 4vw, 40px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switcher button {
    background-color: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.lang-switcher button:hover {
    background-color: rgba(0, 86, 179, 0.4);
}

.lang-switcher button.active {
    background-color: var(--accent);
}

.lang-switcher button.active:hover {
    background-color: var(--accent);
}

.lang-switcher button:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.lang-switcher button img {
    display: block;
    width: 28px;
    height: auto;
}

/* Footer */
footer.site-footer {
    background: #000;
    color: #fff;
    margin-top: 40px;
    padding: 12px clamp(18px, 4vw, 40px);
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-footer__side {
    flex: 0 0 min(260px, 28vw);
    display: flex;
    align-items: center;
}

.site-footer__side--left { justify-content: flex-start; }
.site-footer__side--right { justify-content: flex-end; }

.site-footer__logo {
    display: block;
    width: auto;
    max-height: 56px;
    /* Le cote du pied de page vaut min(260px, 28vw) : entre 720 et 930 px de
       large, il tombe sous la largeur du logo RGSSA. Sans cette limite,
       l'image deborderait au lieu de se reduire. */
    max-width: 100%;
    object-fit: contain;
}

.site-footer__copy {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Style unifie des liens "flèche haut" (up-arrow.svg) */
a.up-arrow-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 999px !important;
    background: #fff !important;
    border: 1px solid rgba(0, 86, 179, 0.35) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.12s ease !important;
    vertical-align: middle !important;
}

a.up-arrow-link:hover {
    background: #eef5ff !important;
    transform: translateY(-1px);
}

a.up-arrow-link:focus-visible {
    outline: 3px solid #FFD700 !important;
    outline-offset: 3px !important;
}

h1 a.up-arrow-link,
h2 a.up-arrow-link,
h3 a.up-arrow-link,
h4 a.up-arrow-link,
h5 a.up-arrow-link,
h6 a.up-arrow-link {
    margin-left: 8px;
}

a.backtop.up-arrow-link {
    margin-left: 0;
}

a.up-arrow-link > img[src*="up-arrow.svg"] {
    width: 24px !important;
    height: 24px !important;
    margin-left: 0 !important;
    vertical-align: middle !important;
    opacity: 1 !important;
}

@media (max-width: 720px) {
    .site-footer__inner {
        flex-direction: column;
        gap: 12px;
    }
    .site-footer__side {
        flex: none;
        width: 100%;
        justify-content: center;
    }
}

/* Tablettes */
@media (max-width: 1040px) {
    :root { --nav-height: 64px; }
    nav { padding: 0 18px; }
    nav ul { gap: 8px; }
    nav ul li a { padding: 8px 12px; font-size: 0.92rem; }
    .lang-switcher { gap: 8px; }
    .lang-switcher button { width: 38px; height: 38px; }
    .lang-switcher button img { width: 22px; }
}

@media (max-width: 880px) {
    :root { --nav-height: 60px; }
    nav { padding: 0 14px; }
    nav ul { gap: 6px; }
    nav ul li a { padding: 6px 10px; font-size: 0.84rem; }
    .lang-switcher { gap: 6px; }
    .lang-switcher button { width: 34px; height: 34px; }
    .lang-switcher button img { width: 20px; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --nav-height: 52px; }
    nav { height: var(--nav-height); padding: 0 8px 0 8px; }
    nav ul { gap: 3px; margin-right: 68px; }
    nav ul li a { padding: 4px 5px; font-size: 0.7rem; }
    .lang-switcher { gap: 3px; }
    .lang-switcher button { width: 26px; height: 26px; }
    .lang-switcher button img { width: 16px; }
}
