/* ======================================================================
   COMMON STYLES - Partagés entre toutes les pages
   ====================================================================== */

/* === Variables communes === */
:root {
  --main-white: #fff;
  --main-light-grey: #d9dfe4;
  --main-dark-blue: #030a58;
}

/* === Scrollbar personnalisée === */
body::-webkit-scrollbar {
  width: 15px;
}

body::-webkit-scrollbar-track {
  background: var(--main-light-grey);
}

body::-webkit-scrollbar-thumb {
  background-color: var(--main-dark-blue);
  border-radius: 20px;
  border: 3px solid var(--main-light-grey);
}

/* ======================================================================
   Header & Navigation
   ====================================================================== */
#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;
  flex-wrap: wrap;
  justify-content: center;
}

.header-inner .logo {
  display: flex;
  justify-content: center;
}

.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;
  margin: 0;
  padding: 0;
}

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

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

/* 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 responsive */
@media (max-width: 767px) {
  .header-inner {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
  }

  .header-inner .logo {
    width: 100%;
    margin-bottom: 0.5rem;
  }

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

  .header-inner nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .header-inner nav li {
    width: 100%;
    text-align: center;
  }

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

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

/* ======================================================================
   Go To Top Button
   ====================================================================== */
#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;
  bottom: 10px;
  right: 10px;
  background: var(--main-white);
  color: var(--main-dark-blue);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-align: center;
  z-index: 10000;
  animation: slideUp 0.6s ease forwards;
  max-width: 350px;
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#cookie-banner p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Boutons cookie */
.cookie-btn {
  margin: 5px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-btn.accept {
  background: var(--main-dark-blue);
  color: var(--main-white);
}

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

.cookie-btn.reject {
  background: #f2f2f2;
  color: var(--main-dark-blue);
  border: 1px solid var(--main-light-grey);
}

.cookie-btn.reject:hover {
  background: var(--main-light-grey);
}

.cookie-btn.settings {
  background: transparent;
  color: var(--main-dark-blue);
  text-decoration: underline;
  font-size: 0.9rem;
  border: none;
  margin-top: 0.5rem;
}

.cookie-btn.settings:hover {
  color: var(--main-light-grey);
}

/* ======================================================================
   Cookie Modal
   ====================================================================== */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal-content {
  background: var(--main-white);
  color: var(--main-dark-blue);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 420px;
  text-align: center;
  transform: translateY(10px);
  animation: popUp 0.4s ease forwards;
}

@keyframes popUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-modal-content h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--main-dark-blue);
}

.cookie-modal-content p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.cookie-modal-content label {
  display: block;
  text-align: left;
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--main-dark-blue);
}

.cookie-modal-content input[type="checkbox"] {
  accent-color: var(--main-dark-blue);
  transform: scale(1.1);
  margin-right: 6px;
}

.cookie-modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.cookie-modal-actions button {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cookie-modal-actions #save-cookies {
  background: var(--main-dark-blue);
  color: var(--main-white);
}

.cookie-modal-actions #save-cookies:hover {
  background: var(--main-light-grey);
  color: var(--main-dark-blue);
}

.cookie-modal-actions #cancel-cookies {
  background: #f2f2f2;
  color: var(--main-dark-blue);
  border: 1px solid var(--main-light-grey);
}

.cookie-modal-actions #cancel-cookies:hover {
  background: var(--main-light-grey);
}

.cookie-modal[hidden] {
  display: none;
}

/* Responsive pour les cookies */
@media (max-width: 600px) {
  #cookie-banner {
    left: 10px;
    right: 10px;
    max-width: none;
    border-radius: 10px;
  }
  
  .cookie-modal-content {
    padding: 1.5rem;
    width: 95%;
  }
}