/* === Variables Globales === */
:root {
  --header-h: 90px;
  --main-white: #fff;
  --main-light-grey: #d9dfe4;
  --main-dark-blue: #030a58;
}

main {
  padding-top: var(--header-h) !important;
  padding-bottom: 2rem;
}

/* === Reset & Global === */
html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

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

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

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--main-white);
  color: var(--main-dark-blue);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* === Conteneur fluide responsive === */
.container {
  width: 100%;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 5rem;
  }
}

/* === Links & Buttons Globaux === */
a {
  text-decoration: none;
}

.btn,
button {
  display: inline-block;
  background-color: var(--main-dark-blue);
  color: var(--main-white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .08s ease;
}

.btn:hover,
button:hover {
  background-color: var(--main-light-grey);
  color: var(--main-dark-blue);
}

/* === Header === */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--main-light-grey);
  transform: translateY(0);
  transition: transform .28s ease, box-shadow .2s ease, background-color .2s ease;
}

#site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

#site-header.is-hidden {
  transform: translateY(-100%);
}

#site-header.compact .header-inner {
  padding: .5rem .75rem;
  min-height: 54px;
  transition: padding .2s ease, min-height .2s ease;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 1rem;
}

.header-inner .logo img {
  width: 160px;
}

.header-inner nav {
  flex: 1;
  margin-left: 2rem;
}

.header-inner nav ul {
  display: flex;
  justify-content: space-evenly;
  list-style: none;
}

.header-inner nav a {
  color: var(--main-dark-blue);
  font-weight: 500;
  transition: color 0.2s;
}

.header-inner nav a:hover {
  color: var(--main-white);
}

@media (prefers-reduced-motion: reduce) {
  #site-header {
    transition: none;
  }
}

/* Lang switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.lang-switcher img {
  width: 24px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.lang-switcher img:hover {
  border-color: var(--main-dark-blue);
}

/* Header mobile */
@media (max-width: 767px) {
  .header-inner {
    flex-direction: column;
    padding: 1rem;
  }

  .header-inner nav {
    margin: 1rem 0 0;
    width: 100%;
  }

  .header-inner nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 auto;
  }

  .lang-switcher {
    margin: 0.5rem 0 0;
  }
}

/* === Footer === */
.site-footer {
  background-color: var(--main-dark-blue);
  color: #ccc;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9em;
  margin-top: 3rem;
}

/* === GoTop === */
#top {
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  background-color: var(--main-dark-blue);
  color: var(--main-white);
  width: 50px;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity .25s ease,
    transform .25s ease,
    visibility 0s linear .25s;
}

#top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity .25s ease,
    transform .25s ease,
    visibility 0s;
}

#top:hover {
  background-color: var(--main-light-grey);
  color: var(--main-dark-blue);
}

#top:active {
  transform: scale(.98);
}

#top:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .6);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #top,
  #top.show {
    transition: none;
    transform: none;
  }
}

/* === Cookie Banner === */
#cookie-banner {
  position: fixed;
  inset: auto 10px 10px;
  background: var(--main-white);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  display: none;
  text-align: center;
}

.cookie-btn {
  margin: 5px;
  padding: 10px;
  border-radius: 5px;
}