/* Guide Tourisme Madagascar - CSS Principal */

/* Import de la police Poppins depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables CSS pour le système de design */
:root {
  /* Palette de couleurs */
  --primary-color: #00A699;          /* Bleu Lagon */
  --secondary-color: #2E7D32;        /* Vert Végétation */
  --background-light: #F7F5F2;       /* Blanc Cassé */
  --text-dark: #333333;              /* Gris Foncé */
  --text-light: #666666;             /* Gris Moyen */
  --accent-color: #FF6B35;           /* Orange Accent */
  --white: #FFFFFF;
  --border-light: #DDDDDD;           /* Gris Clair */
  --success-color: #28a745;          /* Vert Succès */
  --error-color: #dc3545;            /* Rouge Erreur */
  
  /* Espacement - Unité de base 8px */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  --space-xxxl: 96px;
  
  /* Typographie */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Breakpoints */
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1024px;
  
  /* Bordures et ombres */
  --border-radius: 4px;
  --box-shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
  --box-shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: var(--line-height-base);
}

/* Système de grille responsive 12 colonnes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -var(--space-xs);
}

.col {
  flex: 1;
  padding: 0 var(--space-xs);
}

/* Colonnes spécifiques */
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-8 { flex: 0 0 66.667%; max-width: 66.667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

@media (max-width: 768px) {
  .col-mobile-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 1024px) {
  .col-tablet-6 { flex: 0 0 50%; max-width: 50%; }
}

/* Typographie - Hiérarchie */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-dark);
}

h2 {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-dark);
}

h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
}

h4 {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-dark);
}

h5 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-dark);
}

h6 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
}

/* Responsive typography */
@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
  h4 { font-size: 20px; }
}

/* Paragraphes et texte */
p {
  margin-bottom: var(--space-sm);
  color: var(--text-dark);
}

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

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

/* Boutons - Système complet */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-medium);
}

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

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

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

.btn-disabled {
  background-color: var(--border-light);
  color: var(--text-light);
  cursor: not-allowed;
}

/* Header et navigation */
.header {
  background-color: var(--white);
  box-shadow: var(--box-shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-lg);
}

.nav-item a {
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-item a:hover {
  color: var(--primary-color);
}

.nav-item a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

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

/* Menu mobile */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--box-shadow-medium);
  }
  
  .nav-menu.active {
    display: flex;
  }
}

/* Sections principales */
.hero-section {
  min-height: 70vh;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/hero-madagascar.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
  padding: var(--space-xxxl) 0;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: var(--space-xl);
  color: var(--white);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Cartes (Cards) - Pour autres usages */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-light);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--box-shadow-medium);
}

.card-image {
  height: 200px;
  background-color: var(--background-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-dark);
}

.card-excerpt {
  color: var(--text-light);
  margin-bottom: var(--space-sm);
  flex: 1;
}

.card-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-light);
}

/* Grille de cartes */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Grille d'articles compacte */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Cartes d'articles compactes */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  box-shadow: var(--box-shadow-light);
  transition: all 0.3s ease;
  text-decoration: none;
  min-height: 280px;
  border: 1px solid transparent;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-medium);
  border-color: var(--primary-color);
}

.article-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.article-icon i {
  font-size: 24px;
  color: var(--white);
}

.article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-category {
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.article-excerpt {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--space-md);
}

.article-link {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: gap 0.3s ease;
}

.article-card:hover .article-link {
  gap: var(--space-sm);
}

/* Icônes */
.icon-container {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin: 0 auto var(--space-lg);
  box-shadow: 0 4px 12px rgba(0, 166, 153, 0.3);
}

.icon-container i {
  font-size: 36px;
  color: var(--white);
}

/* Formulaires */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px var(--space-sm);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 166, 153, 0.2);
}

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

.form-error {
  color: var(--error-color);
  font-size: 14px;
  margin-top: var(--space-xs);
}

.form-success {
  color: var(--success-color);
  font-size: 14px;
  margin-top: var(--space-xs);
}

/* Fil d'Ariane (Breadcrumbs) */
.breadcrumb {
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  color: var(--text-light);
  font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
  content: '>';
  margin: 0 var(--space-xs);
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: var(--space-xxl) 0 var(--space-md);
  margin-top: var(--space-xxxl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section a {
  color: #cccccc;
  line-height: 1.6;
}

.footer-section a:hover {
  color: var(--primary-color);
}

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

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  border-top: 1px solid #555555;
  padding-top: var(--space-md);
  text-align: center;
  color: #cccccc;
  font-size: 14px;
}

/* Sections utilitaires */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.py-sm { padding: var(--space-sm) 0; }
.py-md { padding: var(--space-md) 0; }
.py-lg { padding: var(--space-lg) 0; }
.py-xl { padding: var(--space-xl) 0; }
.py-xxl { padding: var(--space-xxl) 0; }
.py-xxxl { padding: var(--space-xxxl) 0; }

.mb-xxl { margin-bottom: var(--space-xxl); }

/* Sections spéciales page d'accueil */
.services-section {
  background-color: var(--background-light);
  padding: var(--space-xxxl) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
  align-items: stretch;
}

.services-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
  text-align: center;
  align-items: stretch;
}

@media (max-width: 1200px) {
  .services-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .services-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid-5 {
    grid-template-columns: 1fr;
  }
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-medium);
}

.service-item h4 {
  margin-bottom: var(--space-md);
}

.service-item p {
  flex: 1;
  margin-bottom: var(--space-lg);
}

.service-item .btn {
  margin-top: auto;
}

.stats-section {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--space-xxxl) 0;
  text-align: center;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-item .stat-number {
  font-size: 48px;
  font-weight: 700;
  display: block;
  margin-bottom: var(--space-sm);
}

.stat-item .stat-label {
  font-size: 18px;
  opacity: 0.9;
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

/* Responsive final */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero-section {
    min-height: 50vh;
    padding: var(--space-xl) 0;
  }
  
  .services-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}