/* ===========================
   RESET & BASE
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background: #f7f8fb;
  line-height: 1.6;
}

/* Liens */
a {
  color: #003876;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Focus visible (accessibilité) */
a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid #e5edf7;
  outline-offset: 2px;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===========================
   ACCESSIBILITÉ – SKIP LINK
=========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  padding: 0.5rem 1rem;
  background: #e5edf7;
  display: inline-block;
}

/* ===========================
   HEADER
=========================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e5ec;
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* robustesse: .inner existe dans ton HTML */
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 38px;
  width: auto;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #001f3f;
}

.logo-tagline {
  font-size: 0.78rem;
  color: #4b5563;
}

/* ===========================
   MAIN NAVIGATION
=========================== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #001f3f;
  opacity: 0.8;
}

.main-nav a:hover {
  opacity: 1;
}

.main-nav a.active {
  border-bottom: 2px solid #0050a3;
  opacity: 1;
}

/* ===========================
   LANG SWITCHER
=========================== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid #e2e5ec;
}

.lang-switcher a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #003876;
  opacity: 0.55;
}

.lang-switcher a:hover {
  opacity: 0.9;
}

.lang-switcher a.active {
  font-weight: 600;
  opacity: 1;
  border-bottom: 2px solid #003876;
}

/* ===========================
   DONATE BUTTON
=========================== */
.donate-btn {
  background: #071a3c;
  color: #ffffff;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 18px;
  transition: 0.2s ease-in-out;
  display: inline-block;
  text-decoration: none;
}

/* priorité sur .main-nav a */
.main-nav .donate-btn {
  color: #ffffff;
  opacity: 1;
}

.donate-btn:hover,
.main-nav .donate-btn:hover {
  background: #0d2b63;
  color: #ffffff;
  text-decoration: none;
}

/* ===========================
   SECTIONS GÉNÉRALES
=========================== */
section {
  padding: 3rem 0;
}

.section {
  padding: 3rem 0;
}

h1, h2, h3 {
  color: #001f3f;
}

p {
  margin-bottom: 1rem;
}

.section-intro {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

/* Listes (rendu stable sur toutes pages) */
ul, ol {
  margin: 0 0 1rem 1.25rem;
}

li {
  margin: 0.25rem 0;
}

/* ===========================
   JOBS / VOLUNTEER (frivillig.no block)
=========================== */
.volunteer-section {
  margin: 1.5rem 0 2.5rem;
  padding: 1.5rem;
  background: #f7f6fb;
  border-left: 5px solid #3b145f;
  border-radius: 8px;
}

.volunteer-section h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.btn-volunteer {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 12px 22px;
  background-color: #3b145f;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
}

.btn-volunteer:hover {
  background-color: #2a0f45;
  color: #ffffff;
  text-decoration: none;
}

.small-note {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ===========================
   PROGRAMMES
=========================== */
.programmes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

.programme-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e5ec;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.programme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
}

.programme-card h3 {
  margin-bottom: 0.4rem;
}

.programme-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #d1d9e6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

/* ===========================
   PARTNERS GRID
=========================== */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2.5rem;
  align-items: center;
  justify-items: center;
  padding: 2rem 0;
}

.partner-logo {
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  padding: 0.5rem;
  opacity: 0.9;
  transition: 0.3s ease-in-out;
}

.partner-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ===========================
   HERO
=========================== */
.hero {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: 8px;
}

.hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ===========================
   FOOTER
=========================== */
.site-footer,
footer {
  background: #001f3f;
  color: #ffffff;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

.footer-lang a {
  color: #dce4ef;
}

.footer-line {
  height: 1px;
  background: #233554;
  margin: 1rem auto;
  max-width: 420px;
}

.footer-donate a {
  color: #f0f4ff;
  font-size: 0.9rem;
}

.footer-contact {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.footer-contact a {
  color: #f0f4ff;
}

.footer-contact p {
  margin: 0.25rem 0;
  color: #dce4ef;
}

.footer-bottom {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: #b8c4dd;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .main-nav,
  .lang-switcher {
    display: none;
  }

  .logo-text,
  .logo-tagline {
    display: none;
  }

  .site-header .inner {
    justify-content: flex-start;
    gap: 1rem;
  }

  section,
  .section {
    padding: 2.2rem 0;
  }
}

/* ===========================
   GIVE ASSISTANT WIDGET
=========================== */
#give-chat-root {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  font-family: inherit;
}

/* Bouton flottant */
.give-chat-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #071a3c;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  padding: 0;
}

/* Fenêtre de chat */
.give-chat-window {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 320px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

/* Masquée par défaut (JS enlève/ajoute cette classe) */
.give-chat-window.hidden {
  display: none;
}

/* En-tête */
.give-chat-header {
  padding: 0.75rem 0.9rem;
  background: #071a3c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.give-chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.give-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #f28c28;
  color: #071a3c;
  font-size: 0.95rem;
}

.give-chat-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.give-chat-subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
}

.give-chat-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  margin-right: 0.35rem;
}

.give-chat-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}

/* Corps du chat */
.give-chat-messages {
  padding: 0.75rem 0.9rem;
  flex: 1;
  overflow-y: auto;
  font-size: 0.85rem;
  background: #f7f8fb;
}

.give-chat-message {
  margin-bottom: 0.6rem;
}

.give-chat-message.assistant {
  background: #ffffff;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Boutons rapides */
.give-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: #fff;
}

.give-quick-buttons button {
  border: 1px solid #e2e5ec;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Zone de saisie */
.give-chat-input {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-top: 1px solid #e2e5ec;
  background: #ffffff;
}

.give-chat-input textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 90px;
  font-size: 0.8rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.give-chat-send {
  border: none;
  border-radius: 6px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: #071a3c;
  color: #ffffff;
  cursor: pointer;
}

/* Mobile : fenêtre plus large et remontée */
@media (max-width: 600px) {
  .give-chat-window {
    width: 92vw;
    right: -4vw;
    max-height: 70vh;
  }
}
