/* ============================================
   GESIS — Design System & Global Styles
   Partagé par toutes les pages (FR + EN)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ---- VARIABLES ---- */
:root {
  --blue:         #1B3C6B;
  --blue-mid:     #234f8a;
  --blue-light:   #eaf0f9;
  --green:        #2E7D32;
  --green-mid:    #3d9e42;
  --green-light:  #edf7ee;
  --orange:       #E6920A;
  --orange-light: #fef4e0;

  --ink:    #0f1c2e;
  --body:   #3a4a5c;
  --muted:  #7a8a9a;
  --rule:   #dde4ec;
  --paper:  #F9F8F6;
  --white:  #ffffff;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --section-py: 96px;
  --container:  1200px;
  --radius:     8px;

  --shadow-sm: 0 2px 8px rgba(27,60,107,0.08);
  --shadow-md: 0 8px 32px rgba(27,60,107,0.12);
  --shadow-lg: 0 20px 60px rgba(27,60,107,0.16);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: var(--section-py) 0; }

/* ---- TYPOGRAPHIE ---- */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.75;
}

.text-center { text-align: center; }
.text-center .section-label { justify-content: center; }
.text-center .section-label::before { display: none; }
.text-center .section-subtitle { margin: 0 auto; }

/* ---- BOUTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.btn-lg { padding: 16px 32px; font-size: 16px; }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(230,146,10,0.35);
}
.btn-primary:hover {
  background: #c97d08;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230,146,10,0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-green {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(46,125,50,0.3);
}
.btn-green:hover {
  background: #256828;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,125,50,0.4);
}

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: all 0.3s var(--ease);
}

.header.transparent { background: transparent; }

.header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo-img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--white);
  padding: 3px;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

/* Sur fond transparent (hero), légère luminosité sur le logo */
.header.transparent .nav-logo-img {

  background: rgba(255,255,255,0.92);
}

.nav-logo-text { display: flex; flex-direction: column; }

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  transition: color 0.3s;
}

.nav-logo-tagline {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  margin-top: 3px;
  transition: color 0.3s;
}

.header.transparent .nav-logo-name    { color: var(--white); }
.header.transparent .nav-logo-tagline { color: rgba(255,255,255,0.65); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover       { color: var(--blue); background: var(--blue-light); }
.nav-link.active      { color: var(--blue); font-weight: 600; }

.header.transparent .nav-link          { color: rgba(255,255,255,0.82); }
.header.transparent .nav-link:hover    { color: var(--white); background: rgba(255,255,255,0.12); }

/* ---- SÉLECTEUR DE LANGUE ---- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(27,60,107,0.07);
  border-radius: 20px;
  padding: 3px;
  flex-shrink: 0;
}

.header.transparent .lang-switcher {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

.lang-btn {
  padding: 6px 13px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  line-height: 1;
}

.lang-btn:hover { color: var(--blue); }

.lang-btn.active {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(27,60,107,0.3);
}

.header.transparent .lang-btn         { color: rgba(255,255,255,0.7); }
.header.transparent .lang-btn:hover   { color: var(--white); }
.header.transparent .lang-btn.active  {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(230,146,10,0.4);
}

/* Sur mobile, le lang-switcher dans nav-right reste visible */
/* Seul le lang-switcher dans nav-links est masqué */
.nav-links .lang-switcher { display: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

.header.transparent .nav-burger span { background: var(--white); }

/* Menu mobile */
.nav-mobile {
  display: none;
  position: fixed;
  top: 76px; left: 0; right: 0;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 20px 24px 28px;
  flex-direction: column;
  gap: 2px;
  z-index: 999;
  animation: slideDown 0.3s var(--ease);
}

.nav-mobile.open { display: flex; }

.nav-mobile .nav-link {
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ink) !important;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent !important;
}

.nav-mobile .nav-link:hover {
  color: var(--blue) !important;
  background: var(--blue-light) !important;
}

.nav-mobile .nav-link.active {
  color: var(--blue) !important;
  font-weight: 600;
}

.nav-mobile .nav-link:last-of-type { border-bottom: none; }

.nav-mobile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.nav-mobile .lang-switcher {
  background: var(--paper);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- PAGE HERO (pages intérieures) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 60%, #1a5276 100%);
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(46,125,50,0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(230,146,10,0.15) 0%, transparent 50%);
}

.page-hero-content { position: relative; z-index: 1; }

.page-hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.page-hero-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--orange);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 680px;
}

.page-hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  line-height: 1.75;
}

/* ---- FORMULAIRES ---- */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,60,107,0.08);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

/* ---- FOOTER ---- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  display: block;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 280px;
}

.footer-socials { display: flex; gap: 10px; margin-top: 16px; }

.footer-social {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  display: block;
}

.footer-social[aria-label="Facebook"]:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(24,119,242,0.35);
}

.footer-social[aria-label="LinkedIn"]:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(10,102,194,0.35);
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-contact-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.55;
}

.footer-contact-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.footer-contact-item a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer-contact-item a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- COOKIE BANNER ---- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 640px;
  background: var(--ink);
  color: rgba(255,255,255,0.8);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  line-height: 1.6;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.4s var(--ease);
  flex-wrap: wrap;
}

.cookie-banner.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.cookie-text { flex: 1; min-width: 200px; }

.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-btn {
  padding: 8px 18px;
  border-radius: 8px;
  background: var(--white);
  padding: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-body);
}

.cookie-decline {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}
.cookie-decline:hover { background: rgba(255,255,255,0.18); }

.cookie-accept { background: var(--orange); color: var(--white); }
.cookie-accept:hover { background: #c97d08; }

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  /* Réduire espacement nav sur tablette */
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .nav-cta   { padding: 9px 14px; font-size: 13px; }
}

/* Tablette intermédiaire — masquer les liens, garder burger */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  /* Réduire le bouton don pour éviter le débordement */
  .nav-cta { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
}

@media (max-width: 768px) {
  :root { --section-py: 64px; }

  /* Container avec moins de padding sur mobile */
  .container { padding: 0 16px; }

  /* Nav — layout mobile */
  .nav { height: 64px; gap: 8px; }
  .nav-links { display: none; }

  /* Logo — réduire légèrement sur mobile */
  .nav-logo-img  { height: 32px; width: 32px; }
  .nav-logo-name { font-size: 18px; }
  .nav-logo-tagline { display: none; }

  /* nav-right : lang-switcher + burger seulement, bouton don masqué */
  .nav-right { gap: 8px; }
  .nav-cta   { display: none; }
  .nav-burger { display: flex; }

  /* Lang-switcher compact */
  .lang-btn { padding: 5px 10px; font-size: 11px; }

  /* Menu mobile s'ouvre sous la nav de 64px */
  .nav-mobile { top: 64px; }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Page hero intérieure */
  .page-hero { padding: 100px 0 56px; }
  .page-hero h1 { font-size: clamp(26px, 7vw, 40px); }
  .page-hero p  { font-size: 15px; }
}

@media (max-width: 480px) {
  :root { --section-py: 48px; }
  .container { padding: 0 14px; }

  /* Logo encore plus compact */
  .nav-logo-text { display: none; }

  /* Menu mobile plein écran sur très petits écrans */
  .nav-mobile { padding: 16px 16px 24px; }
  .nav-mobile .nav-link { padding: 14px 12px; font-size: 16px; }

  /* Bouton don dans le menu mobile plus grand */
  .nav-mobile-footer .btn { font-size: 15px; padding: 14px; }
}

/* ---- RESPONSIVE SUPPLÉMENTAIRE ---- */
/* Correction overflow horizontal sur toutes les pages */
@media (max-width: 768px) {
  /* Eviter tout débordement horizontal */
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* Sections padding réduit */
  .section { padding: 56px 0; }

  /* Titres adaptatifs */
  .section-title { font-size: clamp(22px, 6vw, 36px); }

  /* Page hero intérieure */
  .page-hero { padding: 90px 0 48px; }
  .page-hero h1 { font-size: clamp(24px, 7vw, 38px); max-width: 100%; }
  .page-hero p  { font-size: 14px; }

  /* Footer */
  .footer { padding: 48px 0 0; }

  /* Cookie banner mobile */
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px; flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .section { padding: 40px 0; }
  .page-hero { padding: 80px 0 40px; }
  .section-title { font-size: clamp(20px, 6vw, 30px); }

  /* Boutons full width sur mobile */
  .btn-lg { width: 100%; justify-content: center; }
}
