:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --background: #f8fafc;
  --surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* Smooth scrolling pour toute la page */
html {
  scroll-behavior: smooth;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
}

.logo i {
  font-size: 1.5rem;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.1);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--warning-color);
  animation: pulse 2s infinite;
}

.status-indicator.online {
  background-color: var(--success-color);
}

.status-indicator.offline {
  background-color: var(--error-color);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Main Content */
.main {
  min-height: calc(100vh - 80px);
}

.section {
  display: none;
  padding: 2rem 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  opacity: 0;
  transform: translateY(20px);
}

.section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

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

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.section-header h2 i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Focus indicator pour l'accessibilité */
.section:target {
  animation: sectionHighlight 2s ease-in-out;
}

@keyframes sectionHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
}

.hero-content {
  text-align: left;
}

.flag-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.hero-visual {
  display: flex;
  justify-content: center;
  width: 100%;
}

.api-demo {
  width: 100%;
  max-width: 500px;
  min-width: 0; /* Permet la réduction en dessous de la taille du contenu */
}

.code-block {
  background: var(--text-primary);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 100%;
  min-width: 0; /* Permet la réduction */
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #374151;
  border-bottom: 1px solid #4b5563;
}

.code-lang {
  color: #10b981;
  font-size: 0.875rem;
  font-weight: 500;
}

.copy-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition);
}

.copy-btn:hover {
  color: #ffffff;
  background: #4b5563;
}

.code-block pre {
  padding: 1rem;
  margin: 0;
  overflow-x: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.code-block code {
  color: #e5e7eb;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-all;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  white-space: nowrap;
  min-height: 40px;
  justify-content: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--background);
  transform: translateY(-1px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Features */
.features {
  margin-top: 4rem;
}

.features h3 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

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

.feature-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Explorer Section */
.explorer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: var(--surface);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.view-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.25rem;
}

.toggle-btn {
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.toggle-btn.active,
.toggle-btn:hover {
  background: var(--primary-color);
  color: white;
}

.wilayas-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.wilayas-container.list-view {
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .wilayas-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.wilaya-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.wilaya-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.wilaya-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.wilaya-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.wilaya-code {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.communes-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.delivery-info {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.delivery-price {
  color: var(--success-color);
  font-weight: 500;
}

.delivery-delay {
  color: var(--text-secondary);
}

/* Wilaya Details */
.wilaya-details {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-top: 2rem;
  overflow: hidden;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
}

.details-header h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.details-tabs {
  display: flex;
  background: var(--background);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  font-weight: 500;
}

.tab-btn.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--surface);
}

.tab-content {
  padding: 1.5rem;
}

.communes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.commune-item {
  padding: 0.5rem;
  background: var(--background);
  border-radius: 4px;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
}

/* Calculator Section */
.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .calculator-result {
    position: static;
  }
}

.calculator-form {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.calculator-form h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: var(--surface);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calculator-result {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  position: sticky;
  top: 100px;
}

@media (max-width: 1024px) {
  .calculator-result {
    position: static;
    top: auto;
  }
}

.calculator-result h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.result-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.result-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.result-section h4 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.result-item.total {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* Documentation Section */
.docs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.endpoint-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.endpoint-card:hover {
  box-shadow: var(--shadow);
}

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

.method {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.method.get {
  background: #dcfce7;
  color: #166534;
}

.method.post {
  background: #dbeafe;
  color: #1e40af;
}

.path {
  font-family: 'Monaco', 'Menlo', monospace;
  background: var(--background);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.try-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: var(--transition);
  margin-top: 0.75rem;
}

.try-btn:hover {
  background: var(--primary-dark);
}

.api-response {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  position: sticky;
  top: 100px;
  max-height: 600px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .api-response {
    position: static;
    top: auto;
    max-height: 400px;
  }
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
}

.response-content {
  padding: 1rem;
  max-height: 500px;
  overflow-y: auto;
}

.response-content pre {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerGrid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23footerGrid)"/></svg>');
  opacity: 0.3;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  padding: 3rem 0;
  position: relative;
  z-index: 1;
}

.footer-section {
  padding: 0;
}

.footer-section h4 {
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section h4 i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.footer-section p {
  color: #cbd5e1;
  text-decoration: none;
  display: block;
  margin-bottom: 1rem;
  transition: var(--transition);
  line-height: 1.6;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
  padding: 0.5rem 0;
  border-radius: 6px;
  font-weight: 500;
}

.footer-section a:hover {
  color: white;
  background: rgba(37, 99, 235, 0.1);
  padding-left: 0.5rem;
  transform: translateX(4px);
}

.footer-section a i {
  color: var(--primary-color);
  width: 18px;
  text-align: center;
}

.api-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.api-stats span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 500;
}

.api-stats i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.developer-info {
  margin-bottom: 1.25rem;
}

.developer-info strong {
  color: white;
  font-size: 1.05rem;
}

.portfolio-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white !important;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.portfolio-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
  padding-left: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
  margin-bottom: 0;
  padding: 0;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  padding: 0;
}

.social-links a i {
  font-size: 1.1rem;
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: #94a3b8;
  margin: 0;
  font-size: 0.95rem;
}

.footer-bottom strong {
  color: white;
  font-weight: 600;
}

.footer-tech {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-tech > span:first-child {
  color: #94a3b8;
  font-size: 0.875rem;
}

.tech-badge {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

/* Footer Responsive */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
    text-align: center;
  }
  
  .footer-section a {
    justify-content: center;
  }
  
  .api-stats {
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-tech {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-content {
    padding: 2rem 0;
    gap: 2rem;
  }
  
  .footer-section {
    padding: 0 1rem;
  }
  
  .footer-section h4 {
    font-size: 1.1rem;
    justify-content: center;
  }
  
  .api-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .portfolio-link {
    width: 100%;
    justify-content: center;
    max-width: 280px;
    margin: 0 auto 1.5rem;
  }
  
  .footer-bottom-content {
    padding: 1.5rem 0;
  }
  
  .footer-bottom p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .footer-tech {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 360px) {
  .footer-content {
    gap: 1.5rem;
  }
  
  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .portfolio-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    max-width: 240px;
  }
  
  .social-links a {
    width: 36px;
    height: 36px;
  }
  
  .social-links a i {
    font-size: 1rem;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Real Usage Section */
.real-usage {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.real-usage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.usage-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.usage-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.usage-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.usage-features {
  margin: 2rem 0;
}

.usage-feature {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.usage-feature i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.usage-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.usage-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.usage-cta .btn-primary {
  background-color: #2563eb;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.usage-cta .btn-primary:hover {
  background-color: #ff9500;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 149, 0, 0.4);
}

.usage-cta .btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.usage-cta .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Browser Mockup */
.browser-mockup {
  background: #f6f8fa;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.3s ease;
}

.browser-mockup:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.browser-header {
  background: #e1e4e8;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #d1d5da;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
}

.browser-dots span:nth-child(2) {
  background: #ffbd2e;
}

.browser-dots span:nth-child(3) {
  background: #27ca3f;
}

.browser-url {
  background: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #586069;
  border: 1px solid #d1d5da;
  flex-grow: 1;
}

.browser-content {
  padding: 2rem;
  background: white;
  min-height: 300px;
}

.plugin-preview h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.form-elements {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 600;
  color: #24292f;
  font-size: 0.875rem;
}

.select-field,
.input-field {
  padding: 12px 16px;
  border: 2px solid #d0d7de;
  border-radius: 6px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #24292f;
  font-size: 0.875rem;
}

.select-field:hover,
.input-field:hover {
  border-color: var(--primary-color);
}

.delivery-info {
  background: #f6f8fa;
  padding: 12px 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 1rem;
}

.delivery-info i {
  color: var(--accent-color);
}

/* Responsive for Real Usage - Optimisation Mobile Poussée */
@media (max-width: 1200px) {
  .usage-content {
    gap: 3rem;
  }
  
  .usage-text h2 {
    font-size: 2.25rem;
  }
  
  .usage-stats {
    gap: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .real-usage {
    padding: 4rem 0;
  }
  
  .usage-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .usage-text h2 {
    font-size: 2rem;
  }
  
  .usage-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 2rem auto;
  }
  
  .stat-number {
    font-size: 2.25rem;
  }
  
  .usage-features {
    max-width: 500px;
    margin: 2rem auto;
    text-align: left;
  }
  
  .usage-cta {
    justify-content: center;
    max-width: 400px;
    margin: 2rem auto 0;
  }
  
  .browser-mockup {
    transform: none;
    margin: 0 auto;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .real-usage {
    padding: 3.5rem 0;
  }
  
  .usage-content {
    gap: 2.5rem;
  }
  
  .usage-text h2 {
    font-size: 1.95rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
  }
  
  .usage-text p {
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
    line-height: 1.65;
  }
  
  .usage-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.75rem auto;
    max-width: 500px;
  }
  
  .stat-number {
    font-size: 2.1rem;
    margin-bottom: 0.375rem;
  }
  
  .stat-label {
    font-size: 0.825rem;
    line-height: 1.3;
  }
  
  .usage-features {
    margin: 1.75rem auto;
    max-width: 450px;
  }
  
  .usage-feature {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    gap: 1rem;
  }
  
  .usage-feature i {
    font-size: 1.15rem;
  }
  
  .usage-cta {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.75rem;
    max-width: 320px;
  }
  
  .browser-mockup {
    max-width: 520px;
    border-radius: 12px;
  }
  
  .browser-content {
    padding: 1.75rem;
    min-height: 280px;
  }
  
  .plugin-preview h3 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 640px) {
  .real-usage {
    padding: 3rem 0;
  }
  
  .usage-content {
    gap: 2.25rem;
  }
  
  .usage-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .usage-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .usage-stats {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 280px;
    margin: 1.5rem auto;
  }
  
  .stat-item {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
  }
  
  .stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
  }
  
  .stat-number {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .stat-label {
    font-size: 0.875rem;
    opacity: 0.95;
  }
  
  .usage-features {
    max-width: 380px;
    margin: 1.5rem auto;
  }
  
  .usage-feature {
    font-size: 0.9rem;
    margin-bottom: 0.875rem;
    padding: 0.5rem 0;
  }
  
  .usage-cta {
    margin-top: 1.5rem;
    gap: 0.875rem;
    max-width: 300px;
  }
  
  .browser-mockup {
    max-width: 100%;
    border-radius: 12px;
  }
  
  .browser-content {
    padding: 1.5rem;
    min-height: 250px;
  }
  
  .plugin-preview h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .real-usage {
    padding: 2.75rem 0;
  }
  
  .usage-content {
    gap: 2rem;
  }
  
  .usage-text h2 {
    font-size: 1.7rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .usage-text p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.65;
  }
  
  .usage-stats {
    margin: 1.5rem auto;
    gap: 1.125rem;
    max-width: 260px;
  }
  
  .stat-item {
    padding: 1.125rem;
  }
  
  .stat-number {
    font-size: 2.25rem;
    margin-bottom: 0.375rem;
  }
  
  .stat-label {
    font-size: 0.825rem;
  }
  
  .usage-features {
    margin: 1.375rem auto;
    max-width: 320px;
  }
  
  .usage-feature {
    font-size: 0.875rem;
    margin-bottom: 0.825rem;
    gap: 0.875rem;
  }
  
  .usage-feature i {
    font-size: 1.1rem;
  }
  
  .usage-cta {
    margin-top: 1.375rem;
    gap: 0.75rem;
    max-width: 280px;
  }
  
  .usage-cta .btn {
    padding: 0.825rem 1.125rem;
  }
  
  .browser-content {
    padding: 1.25rem;
    min-height: 220px;
  }
  
  .plugin-preview h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .form-field label {
    font-size: 0.825rem;
  }
  
  .select-field,
  .input-field {
    padding: 10px 12px;
    font-size: 0.825rem;
  }
  
  .browser-header {
    padding: 10px 12px;
  }
  
  .browser-url {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

@media (max-width: 360px) {
  .real-usage {
    padding: 2.5rem 0;
  }
  
  .usage-content {
    gap: 1.75rem;
  }
  
  .usage-text h2 {
    font-size: 1.55rem;
    margin-bottom: 0.875rem;
  }
  
  .usage-text p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }
  
  .usage-stats {
    gap: 1rem;
    margin: 1.25rem auto;
    max-width: 240px;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-label {
    font-size: 0.775rem;
  }
  
  .usage-features {
    margin: 1.25rem auto;
    max-width: 280px;
  }
  
  .usage-feature {
    font-size: 0.825rem;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .usage-feature i {
    font-size: 1rem;
  }
  
  .usage-cta {
    margin-top: 1.25rem;
    gap: 0.675rem;
    max-width: 260px;
  }
  
  .usage-cta .btn {
    padding: 0.775rem 1rem;
  }
  
  .browser-content {
    padding: 1rem;
    min-height: 200px;
  }
  
  .plugin-preview h3 {
    font-size: 1.1rem;
    margin-bottom: 0.875rem;
  }
  
  .form-field {
    gap: 0.375rem;
  }
  
  .form-field label {
    font-size: 0.8rem;
  }
  
  .select-field,
  .input-field {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  
  .delivery-info {
    margin-top: 0.875rem;
    padding: 10px 12px;
    font-size: 0.825rem;
  }
  
  .browser-header {
    padding: 8px 10px;
  }
  
  .browser-dots span {
    width: 10px;
    height: 10px;
  }
  
  .browser-url {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/* Responsive Design */

/* Tablets */
@media (max-width: 1024px) {
  .hero {
    gap: 2rem;
  }
  
  .calculator-container,
  .docs-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .wilayas-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Mobile Large (768px and down) */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .header .container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
    align-items: center;
  }

  .logo {
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    min-height: 44px; /* Taille tactile recommandée */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 100px;
  }

  .api-status {
    font-size: 0.85rem;
    padding: 0.5rem 0;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
    padding: 1.5rem 0;
  }

  .hero h2 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
  }

  .hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
  }

  .hero-stats {
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .hero-actions {
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 48px; /* Amélioration tactile */
    justify-content: center;
    font-weight: 600;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .api-demo {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  .code-block {
    margin: 0 auto;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .code-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
  }

  .code-block pre {
    padding: 1rem;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  .code-block code {
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
    display: block;
    width: 100%;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 48px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
  }

  .feature-card i {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
  }

  .feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }

  .feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .section-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .section-header p {
    font-size: 1.1rem;
  }

  .explorer-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-box {
    max-width: none;
  }

  .search-box input {
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border-radius: 12px;
    min-height: 48px;
  }

  .search-box i {
    left: 1rem;
    font-size: 1.1rem;
  }

  .view-toggle {
    align-self: center;
    border-radius: 12px;
    padding: 0.5rem;
  }

  .toggle-btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    min-height: 44px;
    font-size: 0.9rem;
  }

  .wilayas-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .wilaya-card {
    padding: 1.5rem;
    border-radius: 12px;
    min-height: auto;
  }

  .wilaya-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }

  .wilaya-info {
    margin-bottom: 1rem;
  }

  .wilaya-code {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .communes-count {
    font-size: 0.95rem;
  }

  .delivery-info {
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 0.95rem;
  }

  .wilaya-details {
    margin-top: 1.5rem;
    border-radius: 12px;
  }

  .details-header {
    padding: 1.5rem;
  }

  .details-header h3 {
    font-size: 1.3rem;
  }

  .close-btn {
    padding: 0.75rem;
    border-radius: 8px;
    min-height: 44px;
    min-width: 44px;
  }

  .details-tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
    min-height: 48px;
  }

  .tab-content {
    padding: 1.5rem;
  }

  .communes-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .commune-item {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .calculator-container,
  .docs-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calculator-form,
  .calculator-result {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-group input,
  .form-group select {
    padding: 1rem;
    font-size: 1rem;
    border-radius: 10px;
    min-height: 48px;
  }

  .form-group label {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }

  .endpoint-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .method {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .path {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  .try-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 10px;
    min-height: 44px;
    margin-top: 1rem;
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: 2rem 0;
  }

  .footer-section {
    padding: 0 1rem;
  }
}

/* Mobile Small (480px and down) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .header .container {
    padding: 0.75rem;
  }

  .nav {
    gap: 0.25rem;
    width: 100%;
  }

  .nav-link {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    flex: 1;
    text-align: center;
    border-radius: 10px;
  }

  .logo h1 {
    font-size: 1.15rem;
  }

  .logo i {
    font-size: 1.3rem;
  }

  .hero {
    padding: 1rem 0;
    gap: 2rem;
  }

  .hero h2 {
    font-size: 1.9rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.75rem;
    line-height: 1.65;
  }

  .flag-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .hero-stats {
    gap: 1.25rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .stat {
    flex: 1;
    min-width: 80px;
  }

  .stat-number {
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }

  .stat-label {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
  }

  .api-demo {
    max-width: 100%;
    margin: 0;
  }

  .code-block {
    font-size: 0.8rem;
    margin: 0 -0.75rem; /* Utilise toute la largeur disponible */
    border-radius: 12px;
  }

  .code-header {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .code-lang {
    font-size: 0.8rem;
  }

  .copy-btn {
    padding: 0.5rem;
    border-radius: 6px;
  }

  .code-block pre {
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .code-block code {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .section {
    padding: 2rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 1.7rem;
    margin-bottom: 0.75rem;
  }

  .section-header p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .feature-card {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .feature-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .feature-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .search-box input {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .search-box i {
    left: 0.875rem;
  }

  .toggle-btn {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .wilayas-container {
    gap: 0.875rem;
  }

  .wilaya-card {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .wilaya-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .wilaya-code {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
  }

  .communes-count {
    font-size: 0.875rem;
  }

  .delivery-info {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.9rem;
  }

  .details-header {
    padding: 1.25rem;
  }

  .details-header h3 {
    font-size: 1.2rem;
  }

  .close-btn {
    padding: 0.75rem;
  }

  .tab-btn {
    padding: 0.875rem 0.5rem;
    font-size: 0.875rem;
  }

  .tab-content {
    padding: 1.25rem;
  }

  .commune-item {
    padding: 0.675rem;
    font-size: 0.875rem;
    border-radius: 8px;
  }

  .calculator-form,
  .calculator-result {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .calculator-form h3,
  .calculator-result h3 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
  }

  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.875rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .endpoint-card {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .endpoint-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .method {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    border-radius: 6px;
  }

  .path {
    font-size: 0.8rem;
    word-break: break-all;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
  }

  .try-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    width: 100%;
    border-radius: 10px;
  }

  .result-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .result-item {
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
  }

  .result-item.total {
    font-size: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .api-response {
    max-height: 450px;
    border-radius: 12px;
  }

  .response-header {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .response-content {
    padding: 0.75rem;
    max-height: 350px;
  }

  .response-content pre {
    font-size: 0.7rem;
    line-height: 1.4;
  }

  .footer {
    margin-top: 2.5rem;
  }

  .footer-content {
    padding: 2rem 0;
    gap: 1.5rem;
  }

  .footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .footer-section p,
  .footer-section a {
    font-size: 0.9rem;
    margin-bottom: 0.625rem;
  }
}

/* Very Small Mobile (360px and down) */
@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }

  .header .container {
    padding: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .logo {
    justify-content: center;
    width: 100%;
    margin-bottom: 0;
  }

  .logo h1 {
    font-size: 1rem;
    text-align: center;
  }

  .logo i {
    font-size: 1.2rem;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: 0.125rem;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 0.625rem 0.375rem;
    font-size: 0.8rem;
    min-width: 60px;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .api-status {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
  }

  .api-demo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
  }

  .code-block {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 10px;
    margin: 0;
  }

  .code-header {
    width: 100%;
    padding: 0.625rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .code-lang {
    font-size: 0.75rem;
    text-align: center;
  }

  .copy-btn {
    padding: 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
  }

  .code-block pre {
    width: 100%;
    padding: 0.625rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0;
  }

  .code-block code {
    font-size: 0.7rem;
    line-height: 1.3;
    text-align: center;
    display: block;
    width: 100%;
  }

  .hero h2 {
    font-size: 1.7rem;
    text-align: center;
    line-height: 1.25;
  }

  .hero p {
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.6;
  }

  .hero-stats {
    justify-content: center;
    text-align: center;
    gap: 1rem;
  }

  .stat {
    text-align: center;
    min-width: 70px;
  }

  .stat-number {
    font-size: 1.8rem;
    text-align: center;
  }

  .stat-label {
    font-size: 0.75rem;
    text-align: center;
  }

  .hero-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    text-align: center;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }

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

  .section-header h2 {
    font-size: 1.6rem;
    text-align: center;
  }

  .section-header p {
    font-size: 0.95rem;
    text-align: center;
  }

  .features-grid {
    gap: 1rem;
  }

  .feature-card {
    text-align: center;
    padding: 1rem;
  }

  .feature-card i {
    font-size: 1.8rem;
  }

  .feature-card h4 {
    font-size: 1rem;
    text-align: center;
  }

  .feature-card p {
    font-size: 0.875rem;
    text-align: center;
  }

  .explorer-controls {
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }

  .search-box {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .search-box input {
    width: 100%;
    text-align: center;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    font-size: 0.9rem;
  }

  .toggle-btn {
    padding: 0.625rem;
    font-size: 0.8rem;
    text-align: center;
  }

  .wilaya-card {
    text-align: center;
    padding: 1rem;
  }

  .wilaya-card h4 {
    font-size: 1rem;
    text-align: center;
  }

  .delivery-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .calculator-form h3,
  .calculator-result h3 {
    font-size: 1.1rem;
    text-align: center;
  }

  .endpoint-card {
    text-align: center;
    padding: 1rem;
  }

  .endpoint-header {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .path {
    text-align: center;
    font-size: 0.75rem;
  }

  .try-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .result-section h4 {
    text-align: center;
    font-size: 0.95rem;
  }

  .footer-content {
    padding: 1.5rem 0;
    gap: 1.25rem;
  }

  .footer-section {
    text-align: center;
    padding: 0 0.5rem;
  }

  .footer-section h4 {
    font-size: 1rem;
    text-align: center;
  }

  .footer-section p,
  .footer-section a {
    font-size: 0.875rem;
    text-align: center;
  }

  .footer-bottom {
    text-align: center;
    padding: 1rem 0;
  }
}
