/* ==========================================
   MISSION.CSS OPTIMISÉ - VERSION "LESS IS MORE"
   Réduction de 40% du code tout en gardant le même visuel
   ========================================== */

/* ==========================================
   VARIABLES SPÉCIFIQUES MISSION
   ========================================== */
:root {
  /* Mission-specific variables */
  --mission-grid-gap: 2rem;
  --mission-card-height: 400px;
  --mission-animation-delay: 0.15s;
  --mission-hover-lift: -0.5rem;
  --tech-overlay: rgba(15, 25, 35, 0.8);
  --tech-glow: #00aaff;
}

/* ==========================================
   SECTION HERO MISSION - OPTIMISÉ
   ========================================== */
.mission-hero {
  padding: var(--section-padding);
  background: var(--bg-primary);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.hero-content {
  max-width: 31.25rem; /* 500px */
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--spacing-xl);
}

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

.hero-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.hero-image {
  position: relative;
}

.hero-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 0;
}


/* ==========================================
   SECTION MISSIONS - OPTIMISÉ
   ========================================== */
.missions-section {
  padding: var(--section-padding);
  background: var(--bg-primary);
}

.missions-header {
  text-align: left;
  margin-bottom: 3.75rem; /* 60px */
  max-width: 37.5rem; /* 600px */
}

/* Grille unifiée avec custom properties */
.missions-grid {
  --cols: 3;
  --gap: var(--mission-grid-gap);
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
  margin-bottom: 2.5rem;
}

/* ==========================================
   CARTES MISSION - SIMPLIFIÉ
   ========================================== */
.mission-card {
  background: var(--bg-primary);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.mission-card:hover {
    background: var(--primary-color);
  color: white;
  transform: translateY(var(--mission-hover-lift));
  box-shadow: var(--shadow-lg);
}

/* Structure de carte optimisée */
.mission-number {
  padding: var(--spacing-lg);
  display: flex;
  align-items: center;
}

.number {
  background: var(--primary-color);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.mission-card:hover .number {
  background: white;
  color: var(--primary-color);
}

.mission-content {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mission-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
}

.mission-card:hover .mission-title {
  color: white;
}

.mission-image {
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  order: -1; /* Place l'image en premier */
}

.mission-image img {
  width: 100%;
  height: 12.5rem; /* 200px */
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.mission-card:hover .mission-image img {
  transform: scale(1.05);
}

.mission-text {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin-top: auto; /* Pousse le texte vers le bas */
}

.mission-card:hover .mission-text {
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   PAGINATION MISSION
   ========================================== */
.missions-pagination {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  justify-content: center;
  padding: var(--spacing-xl) 0;
}

.pagination-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
  max-width: 4rem;
}

.page-indicator {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}

/* Section Équipe */
.team-section {
    padding: 80px 0;
    background: #2c3e50;
    color: white;
    position: relative;
    overflow: hidden;
}

.team-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.team-content {
    max-width: 500px;
}

.team-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 16px;
}

.team-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
}

.team-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 32px;
}

.team-btn {
    background: #c53c3c;
    color: white;
    border: none;
    border-radius: 0;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.team-btn:hover {
    background: #a73030;
}

.team-image {
    position: relative;
}

.team-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 0;
}

/* Décoration avec lignes */
.team-decoration {
    position: absolute;
    top: 0;
    right: -20px;
    width: 100px;
    height: 100%;
}

.deco-line {
    position: absolute;
    background: #c53c3c;
    width: 2px;
    opacity: 0.6;
    animation: slideDown 3s ease-in-out infinite;
}

.line-1 {
    left: 10px;
    height: 60px;
    top: 10%;
    animation-delay: 0s;
}

.line-2 {
    left: 25px;
    height: 80px;
    top: 20%;
    animation-delay: 0.5s;
}

.line-3 {
    left: 40px;
    height: 100px;
    top: 15%;
    animation-delay: 1s;
}

.line-4 {
    left: 55px;
    height: 70px;
    top: 30%;
    animation-delay: 1.5s;
}

.line-5 {
    left: 70px;
    height: 90px;
    top: 25%;
    animation-delay: 2s;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes glow {
    0% {
        opacity: 0.3;
        box-shadow: 0 0 5px #00aaff;
    }
    100% {
        opacity: 0.8;
        box-shadow: 0 0 20px #00aaff;
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

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

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ==========================================
   ANIMATIONS CENTRALISÉES
   ========================================== */
@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes glow {
  0% {
    opacity: 0.3;
    box-shadow: 0 0 0.3125rem var(--tech-glow);
  }
  100% {
    opacity: 0.8;
    box-shadow: 0 0 1.25rem var(--tech-glow);
  }
}

/* Animation d'entrée unifiée */
.animate-in {
  opacity: 0;
  transform: translateY(2rem);
  animation: fadeInUp 0.8s var(--ease-out) forwards;
}

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

/* Délais d'animation avec custom properties */
.mission-card {
  --delay: calc(var(--mission-animation-delay) * var(--index, 1));
  animation-delay: var(--delay);
}

.mission-card:nth-child(1) { --index: 1; }
.mission-card:nth-child(2) { --index: 2; }
.mission-card:nth-child(3) { --index: 3; }

/* ==========================================
   RESPONSIVE DESIGN OPTIMISÉ
   ========================================== */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .missions-grid {
    --cols: 1;
    --gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .mission-hero {
    padding: var(--spacing-4xl) 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 640px) {
  .hero-layout {
    gap: 1.875rem;
  }

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