/* Variables pour le thème clair/sombre */
:root {
  /* Thème clair (par défaut) */
  --primary-color: #0066cc;
  --secondary-color: #ff3333;
  --accent-color: #00cc99;
  --dark-color: #333333;
  --light-color: #f8f9fa;
  --bg-color: #ffffff;
  --text-color: #333333;
  --text-light: #ffffff;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --code-bg: #2d2d2d;
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #333333;
  --footer-text: #aaaaaa;
  
  /* Autres variables communes */
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --font-main: 'Poppins', sans-serif;
  --font-code: 'Fira Code', monospace;
}

/* Variables pour le thème sombre */
[data-theme="dark"] {
  --primary-color: #3385ff;
  --secondary-color: #ff5555;
  --accent-color: #00eeb1;
  --dark-color: #121212;
  --light-color: #1e1e1e;
  --bg-color: #121212;
  --text-color: #f0f0f0;
  --text-light: #ffffff;
  --card-bg: #1e1e1e;
  --border-color: #333333;
  --code-bg: #1a1a1a;
  --header-bg: rgba(18, 18, 18, 0.95);
  --footer-bg: #0a0a0a;
  --footer-text: #cccccc;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
  overflow-x: hidden;
  transition: var(--transition);
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-color);
  transition: var(--transition);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.75rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  transition: var(--transition);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
}

/* Header & Navigation */
header {
  background-color: var(--header-bg);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-scrolled {
  background-color: var(--header-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  font-weight: 600;
  position: relative;
  color: var(--text-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-controls {
  display: flex;
  align-items: center;
}

.language-switch {
  display: flex;
  align-items: center;
  margin-left: 1rem;
  cursor: pointer;
}

.language-switch span {
  margin: 0 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.active-lang {
  color: var(--primary-color);
}

.theme-switch {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
  cursor: pointer;
}

.theme-switch-icon {
  font-size: 1.2rem;
  color: var(--text-color);
  transition: var(--transition);
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  color: var(--text-color);
}

/* Hero Section */
.hero {
  padding: 8rem 0 5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #004999 100%);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/pattern.svg');
  background-size: cover;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero h1 {
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
  color: var(--text-light);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Service Logos Section */
.service-logos {
  background-color: var(--light-color);
  padding: 2rem 0;
  text-align: center;
  transition: var(--transition);
}

.service-logos-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.service-logo {
  max-width: 180px;
  transition: transform 0.3s ease;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: #e62e2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 51, 51, 0.3);
}

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

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-dark {
  background-color: var(--dark-color);
  color: var(--text-light);
}

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

/* Features Section */
.features {
  padding: 5rem 0;
  background-color: var(--bg-color);
  transition: var(--transition);
}

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

.section-title h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(0, 102, 204, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon i {
  font-size: 1.75rem;
  color: var(--primary-color);
}

.feature-card h3 {
  margin-bottom: 1rem;
}

/* Key Services Section */
.key-services {
  padding: 5rem 0;
  background-color: var(--light-color);
  transition: var(--transition);
}

.service-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--primary-color);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.service-card p {
  color: var(--text-color);
}

.service-logo-small {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

/* Getting Started Section */
.getting-started {
  padding: 5rem 0;
  background-color: var(--bg-color);
  transition: var(--transition);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.step {
  flex: 1;
  min-width: 250px;
  padding: 0 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  z-index: -111;
}

.step:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  width: 50%;
  height: 2px;
  background-color: var(--primary-color);
  z-index: -111;
}

/* Authentication Section */
.authentication {
  padding: 5rem 0;
  background-color: var(--bg-color);
  transition: var(--transition);
}

.auth-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
}

.auth-text {
  flex: 1;
  min-width: 300px;
}

.auth-code {
  flex: 1;
  min-width: 300px;
}

.code-block {
  background-color: var(--code-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  overflow-x: auto;
  position: relative;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #555;
}

.code-language {
  color: #aaa;
  font-size: 0.875rem;
}

.copy-btn {
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  color: white;
}

.code-content {
  font-family: var(--font-code);
  color: #f8f8f2;
  line-height: 1.5;
  font-size: 0.9rem;
}

.token-keyword {
  color: #ff79c6;
}

.token-string {
  color: #f1fa8c;
}

.token-comment {
  color: #6272a4;
}

.token-operator {
  color: #ff79c6;
}

.token-punctuation {
  color: #f8f8f2;
}

.token-property {
  color: #8be9fd;
}

.important-note {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 4px solid var(--warning-color);
  padding: 2rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* API References Section */
.api-references {
  padding: 5rem 0;
  background-color: var(--light-color);
  transition: var(--transition);
}

.endpoints-nav {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.endpoints-list {
  display: flex;
  list-style: none;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.endpoints-list li {
  margin-right: 1.5rem;
  white-space: nowrap;
}

.endpoints-list a {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  color: var(--text-color);
}

.endpoints-list a:hover,
.endpoints-list a.active {
  background-color: var(--primary-color);
  color: white;
}

.endpoint {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.endpoint-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.http-method {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-right: 1rem;
}

.http-method.get {
  background-color: #61affe;
  color: white;
}

.http-method.post {
  background-color: #49cc90;
  color: white;
}

.endpoint-url {
  font-family: var(--font-code);
  font-size: 1rem;
  color: var(--text-color);
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.params-table th,
.params-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.params-table th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--text-color);
}

.params-table td {
  color: var(--text-color);
}

.param-required {
  color: var(--danger-color);
  font-weight: 600;
}

.param-optional {
  color: #6c757d;
}

.response-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

.response-tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  color: var(--text-color);
}

.response-tab.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
}

.response-content {
  display: none;
}

.response-content.active {
  display: block;
}

/* Error Handling Section */
.error-handling {
  padding: 5rem 0;
  background-color: var(--bg-color);
  transition: var(--transition);
}

.error-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.error-table th,
.error-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.error-table th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--text-color);
}

.error-table td {
  color: var(--text-color);
}

.error-code {
  font-family: var(--font-code);
  font-weight: 600;
}

/* Support Section */
.support {
  padding: 5rem 0;
  background-color: var(--light-color);
  transition: var(--transition);
}

.support-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.support-card {
  flex: 1;
  min-width: 250px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.support-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.support-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* CTA Section */
.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #004999 100%);
  color: var(--text-light);
  text-align: center;
}

.cta h2 {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.cta p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-light);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0 1.5rem;
  transition: var(--transition);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--footer-text);
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #444;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.animate-fadeIn {
  animation: fadeIn 1s ease forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 1s ease forwards;
}

.animate-slideInRight {
  animation: slideInRight 1s ease forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 992px) {
  html {
    font-size: 15px;
  }
  
  .step:not(:last-child)::after,
  .step:not(:first-child)::before {
    display: none;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  .nav-links.active {
    transform: translateY(0);
  }
  
  .nav-links li {
    margin: 0.75rem 0;
  }
  
  .nav-controls {
    margin: 1rem 0 0;
    flex-direction: column;
    align-items: center;
  }
  
  .language-switch, .theme-switch {
    margin: 0.5rem 0;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
  
  .endpoints-list {
    flex-wrap: wrap;
  }
  
  .endpoints-list li {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 7rem 0 4rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .endpoint-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .http-method {
    margin-bottom: 0.5rem;
  }
  
  .service-logos-container {
    gap: 1rem;
  }
  
  .service-logo {
    max-width: 120px;
  }
}
