/* Global Styles */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&family=Lato:wght@300;400;700&display=swap');

:root {
  /* Design System Tokens - Figma */
  --brand-600: #004d61; /* bleu pétrole – textes/CTA */
  --brand-300: #2a6e7f; /* hover/fonds */
  --accent-500: #f6a700; /* CTA/indicateurs */
  --gray-900: #111827;
  --gray-600: #4b5563;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --radius: 12px;
  
  /* Legacy compatibility */
  --primary: var(--brand-600);
  --secondary: var(--accent-500);
  --accent: #FFB347;
  --text-dark: var(--gray-900);
  --bg-light: var(--gray-100);
  --dark-bg: #003D47;
}

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

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* Typography Scale - Design System */
h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 40px;
  line-height: 48px;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 0.5em;
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 0.5em;
}

h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  color: var(--brand-600);
  margin-bottom: 0.5em;
}

h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--brand-600);
  margin-bottom: 0.5em;
}

body {
  font-size: 16px;
  line-height: 24px;
}

small, .small {
  font-size: 14px;
  line-height: 20px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
}

/* Navigation */
nav {
  width: 100%;
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 90px;
}

nav .logo {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  max-width: 60%;
}

nav .logo img {
  height: 80px;
  margin-right: 1rem;
  flex-shrink: 0;
}

nav .logo span {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  white-space: normal;
  line-height: 1.3;
  word-wrap: break-word;
  text-shadow: none;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 1rem;
  gap: 0.5rem;
}

nav li {
  margin-left: 0.75rem;
}

nav li a {
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--gray-900);
  font-weight: 500;
}

nav .language-switch {
  margin-left: 1rem;
  border-left: 1px solid var(--bg-light);
  padding-left: 0.75rem;
}

nav .language-switch a {
  font-size: 0.9rem;
}

nav .burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

nav .burger span {
  height: 2px;
  width: 25px;
  background: var(--primary);
  margin-bottom: 4px;
  border-radius: 4px;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  margin-top: 90px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
  z-index: -2;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
  z-index: -1;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 1rem;
}

/* tagline under hero heading */
.hero .hero-tagline {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--white);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero .buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--secondary);
  background-color: var(--secondary);
  color: var(--white);
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
  text-align: center;
}

.btn.secondary {
  background-color: transparent;
  color: var(--brand-600);
  border: 2px solid var(--brand-600);
}

.btn.secondary:hover {
  background-color: #eef6f8;
  border-color: var(--brand-300);
}

/* Bouton secondary sur fond sombre */
section.dark .btn.secondary,
section.cta .btn.secondary,
.hero .btn.secondary {
  color: var(--white);
  border-color: var(--white);
}

section.dark .btn.secondary:hover,
section.cta .btn.secondary:hover,
.hero .btn.secondary:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.btn:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Sections */
section {
  padding: 4rem 2rem;
  margin-top: 0;
}

section:first-of-type {
  margin-top: 90px;
}

section.light {
  background-color: var(--white);
}

section.dark {
  background-color: var(--brand-600);
  color: rgba(255,255,255,0.9);
}

/* Call to Action */
section.cta {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark-bg) 100%);
  color: var(--white);
}

section.cta h2 {
  color: var(--white);
}

section.cta p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
}

section.cta .btn {
  background-color: var(--secondary);
  color: var(--white);
  border: 2px solid var(--secondary);
}

section.cta .btn:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-dark);
  font-size: 1.1rem;
}

/* Titres dans sections sombres */
section.dark .section-title h2 {
  color: #ffffff;
  font-weight: 700;
  text-shadow: none;
}

section.dark .section-title p {
  color: #ffffff;
  font-weight: 400;
  opacity: 1;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.project-item {
  text-align: left;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.card img {
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.02);
}

.domain-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

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

/* Quick access bar (mobile) */
.quick-access-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  padding: 0.75rem 1rem;
  display: none;
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
}

.quick-access-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-dark);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.quick-access-bar a:hover {
  color: var(--secondary);
}

@media (max-width: 768px) {
  .quick-access-bar {
    display: flex;
  }
  
  body {
    padding-bottom: 70px; /* Space for quick access bar */
  }
  
  .domain-cards {
    grid-template-columns: 1fr !important;
  }
  
  .kpi-dashboard {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.card img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.card p {
  font-size: 0.95rem;
}

/* Value cards icons */
.value-card .value-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

/* Domaines section */
.domains .domain-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.domain-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.domain-card:hover {
  transform: translateY(-4px);
}

.domain-card .icon-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.domain-card .icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.domain-card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.domain-card p {
  font-size: 0.9rem;
}

/* Stats */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stats .stat {
  text-align: center;
  flex: 1 1 150px;
}

.stats .stat h2 {
  font-size: 2rem;
  color: var(--primary);
}

.stats .stat span {
  display: block;
  color: var(--text-dark);
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  color: var(--white);
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

footer .legal-links {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

footer .legal-links a {
  margin: 0 1rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

footer .legal-links a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

footer .legal-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

footer .legal-info p {
  margin-bottom: 0.5rem;
}

footer .footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

footer .footer-col {
  flex: 1 1 200px;
}

footer h4 {
  margin-bottom: 1rem;
  color: var(--secondary);
  font-weight: 600;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--white);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Cookie Banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #004d61;
  color: #ffffff;
  padding: 1.5rem 2rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  z-index: 10000;
  display: none;
}

#cookie-banner .cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

#cookie-banner p {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
  font-weight: 400;
  line-height: 1.5;
}

#cookie-banner .cookie-buttons {
  display: flex;
  gap: 1rem;
}

#cookie-banner .cookie-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

#cookie-banner .cookie-btn.accept {
  background: #f6a700;
  color: #111827;
  font-weight: 600;
}

#cookie-banner .cookie-btn.decline {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-weight: 600;
}

#cookie-banner .cookie-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  #cookie-banner .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  #cookie-banner .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}

/* KPI Dashboard */
.kpi-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.kpi-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark-bg) 100%);
  color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-5px);
}

.kpi-card .kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.kpi-card .kpi-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Hero Video */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  overflow: hidden;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--white);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Projects Carousel */
.projects-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1rem 0;
}

.projects-carousel::-webkit-scrollbar {
  display: none;
}

.project-card {
  min-width: 350px;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-card-content {
  padding: 1.5rem;
}

.project-year {
  display: inline-block;
  background: var(--secondary);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.project-card p {
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}

.timeline-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: 3rem;
}

.timeline-year {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.timeline-content {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-content h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin: 2rem 0;
}

.team-card {
  text-align: center;
  padding: 2rem;
}

.team-card h3 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.team-card p {
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-year {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Partners Grid */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.partner-logo {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 1.5rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.partner-logo img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

/* Partenaires sur fond sombre (section.dark) */
section.dark .partner-logo {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.2);
}

/* Partenaires sur fond clair (section.light) */
section.light .partner-logo {
  background: var(--gray-100);
  color: var(--gray-900);
  border-color: var(--gray-600);
}

.partner-logo:hover {
  transform: scale(1.05);
}

.partner-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

section.dark .partner-logo:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--secondary);
}

section.light .partner-logo:hover {
  background: var(--brand-300);
  color: var(--white);
  border-color: var(--brand-600);
}

/* Media Queries */
/* Video container styling */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
  }
  
  nav .logo img {
    height: 50px;
    margin-right: 0.5rem;
  }
  
  nav .logo span {
    font-size: 0.9rem;
    line-height: 1.2;
  }
  
  nav .logo {
    max-width: 70%;
  }
  
  nav {
    min-height: 80px;
    padding: 0.8rem 1rem;
  }
  
  section:first-of-type {
    margin-top: 80px;
  }

  #projects-map {
    height: 400px;
  }

  .projects-carousel {
    gap: 1rem;
  }

  .project-card {
    min-width: 280px;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Grille de valeurs 2 colonnes → 1 colonne sur mobile */
  section.dark div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .card[style*="display: none"] {
    display: none !important;
  }

  nav .burger {
    display: flex;
  }

  nav.active ul {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1rem;
  }

  nav.active li {
    margin: 0;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Grille de valeurs → 1 colonne sur mobile */
  section.dark div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
  }
}
