/*==================================================
  AMÉLIORATIONS GÉNÉRALES - PAGE D'ACCUEIL
  Styles pour améliorer l'apparence globale
==================================================*/

/*==================================================
  VARIABLES GLOBALES AMÉLIORÉES
==================================================*/
:root {
  /* Couleurs togolaises */
  --togo-primary: #006A4E;
  --togo-primary-light: #009B5C;
  --togo-primary-dark: #004A37;
  --togo-gold: #FFD700;
  --togo-gold-dark: #B8860B;
  --togo-red: #DC143C;
  
  /* Nouvelles couleurs complémentaires */
  --togo-blue: #2563EB;
  --togo-orange: #EA580C;
  --togo-purple: #7C3AED;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--togo-primary) 0%, var(--togo-primary-light) 100%);
  --gradient-gold: linear-gradient(135deg, var(--togo-gold) 0%, var(--togo-gold-dark) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(0, 106, 78, 0.9) 0%, rgba(0, 155, 92, 0.8) 100%);
  
  /* Ombres */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 15px 40px rgba(0, 0, 0, 0.15);
  --shadow-colored: 0 8px 25px rgba(0, 106, 78, 0.2);
  
  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/*==================================================
  AMÉLIORATIONS GÉNÉRALES
==================================================*/
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Amélioration de la sélection de texte */
::selection {
  background: var(--togo-gold);
  color: var(--togo-primary-dark);
}

::-moz-selection {
  background: var(--togo-gold);
  color: var(--togo-primary-dark);
}

/*==================================================
  AMÉLIORATION DES CARTES D'OPPORTUNITÉS
==================================================*/
.opportunity-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 106, 78, 0.08);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

/* Barre colorée sur le côté */
.opportunity-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition-base);
}

.opportunity-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: var(--togo-primary);
}

.opportunity-item:hover::before {
  width: 8px;
  background: var(--gradient-gold);
}

/* Amélioration des titres dans les cartes */
.opportunity-item h4 {
  font-weight: 700;
  color: var(--togo-primary);
  margin-bottom: 15px;
  position: relative;
}

.opportunity-item h4 a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
  position: relative;
}

/* Soulignement animé */
.opportunity-item h4 a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -3px;
  left: 0;
  background: var(--gradient-gold);
  transition: width 0.4s ease;
  border-radius: 2px;
}

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

/* Amélioration des méta-informations */
.opportunity-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.opportunity-item .meta span {
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--togo-primary);
  border: 1px solid rgba(0, 106, 78, 0.1);
  transition: var(--transition-base);
  backdrop-filter: blur(5px);
}

.opportunity-item:hover .meta span {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--togo-gold);
  transform: scale(1.05);
}

.opportunity-item .meta .deadline {
  background: rgba(220, 53, 69, 0.1);
  color: var(--togo-red);
  border-color: rgba(220, 53, 69, 0.2);
}

/*==================================================
  AMÉLIORATION DES CARTES "POURQUOI NOUS CHOISIR"
==================================================*/
.why-us-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 35px 25px;
  text-align: center;
  transition: var(--transition-bounce);
  border: 1px solid rgba(0, 106, 78, 0.08);
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Effet de fond animé */
.why-us-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 0;
}

.why-us-card:hover::before {
  transform: scale(1);
}

.why-us-card:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: var(--shadow-strong);
  border-color: var(--togo-gold);
}

.why-us-card .icon {
  width: 90px;
  height: 90px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  transition: var(--transition-bounce);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-colored);
}

.why-us-card:hover .icon {
  background: var(--gradient-gold);
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.why-us-card .icon i {
  font-size: 2.2rem;
  color: white;
  transition: var(--transition-base);
}

.why-us-card:hover .icon i {
  color: var(--togo-primary-dark);
  transform: scale(1.1);
}

.why-us-card h4 {
  color: var(--togo-primary);
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.why-us-card p {
  color: #6c757d;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/*==================================================
  AMÉLIORATION DES CARTES D'ARTICLES/PORTRAITS
==================================================*/
.article-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-bounce);
  position: relative;
  height: 100%;
  border: 1px solid rgba(0, 106, 78, 0.05);
}

.article-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: var(--togo-primary);
}

.article-card .article-img {
  position: relative;
  overflow: hidden;
  height: 250px;
}

/* Overlay coloré au survol */
.article-card .article-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.article-card:hover .article-img::after {
  opacity: 0.8;
}

/* Icône de lecture au survol */
.article-card .article-img::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 3rem;
  color: white;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.article-card:hover .article-img::before {
  transform: translate(-50%, -50%) scale(1);
}

.article-card .portrait-image {
  transition: var(--transition-base);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.article-card:hover .portrait-image {
  transform: scale(1.1);
}

.article-card .article-content {
  padding: 25px;
  position: relative;
}

.article-card .article-content h3 {
  color: var(--togo-primary);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.article-card .article-content .category {
  color: var(--togo-gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

/*==================================================
  AMÉLIORATION DE LA SECTION HERO
==================================================*/
.hero-content-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 50px 40px;
  border-radius: 25px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-content-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-gold);
}

.hero-content-box h1 {
  color: var(--togo-primary);
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content-box h2 {
  color: var(--togo-primary-dark);
  margin-bottom: 30px;
  font-weight: 500;
}

/*==================================================
  AMÉLIORATION DES HEADERS DE SECTION
==================================================*/
.section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-header h2 {
  color: var(--togo-primary);
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

.section-header p {
  color: #6c757d;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/*==================================================
  ANIMATIONS GÉNÉRALES
==================================================*/
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

/* Application de l'animation float aux icônes */
.why-us-card .icon {
  animation: float 3s ease-in-out infinite;
}

.why-us-card:nth-child(2) .icon {
  animation-delay: 0.5s;
}

.why-us-card:nth-child(3) .icon {
  animation-delay: 1s;
}

.why-us-card:nth-child(4) .icon {
  animation-delay: 1.5s;
}

/*==================================================
  RESPONSIVE AMÉLIORÉ
==================================================*/
@media (max-width: 768px) {
  .hero-content-box {
    padding: 30px 25px;
    border-radius: 20px;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .why-us-card {
    padding: 25px 20px;
  }
  
  .why-us-card .icon {
    width: 70px;
    height: 70px;
  }
  
  .why-us-card .icon i {
    font-size: 1.8rem;
  }
  
  .opportunity-item {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .article-card .article-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero-content-box {
    padding: 25px 20px;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .why-us-card {
    padding: 20px 15px;
  }
}

/*==================================================
  AMÉLIORATIONS POUR L'ACCESSIBILITÉ
==================================================*/
@media (prefers-reduced-motion: reduce) {
  .opportunity-item,
  .why-us-card,
  .article-card,
  .why-us-card .icon {
    animation: none;
    transition: none;
  }
  
  .opportunity-item:hover,
  .why-us-card:hover,
  .article-card:hover {
    transform: none;
  }
}

/* Focus visible amélioré */
.opportunity-item:focus-within,
.why-us-card:focus-within,
.article-card:focus-within {
  outline: 3px solid var(--togo-gold);
  outline-offset: 2px;
}
