/**
 * MLG Solutions - Composants Réutilisables
 */

/* === BOUTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--font-size-base);
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
}

.btn-primary {
  background: var(--coral-pink);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(255, 106, 149, 0.3);
}

.btn-primary:hover {
  background: var(--deep-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 42, 86, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

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

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

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  color: var(--deep-blue);
  box-shadow: var(--glass-shadow);
}

.btn-glass:hover {
  background: var(--white);
  border-color: var(--coral-pink);
  color: var(--coral-pink);
}

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-base);
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

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

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

.card-title {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.card-text {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--deep-blue-80);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  flex: 1;
}

.card-footer {
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--deep-blue-10);
}

/* === CUSTOM SHAPES === */
.shape-negative {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.shape-top-right {
  top: 0;
  right: 0;
  border-radius: 0 0 0 100%;
  width: 40%;
  height: 40%;
}

.shape-bottom-left {
  bottom: 0;
  left: 0;
  border-radius: 0 100% 0 0;
  width: 40%;
  height: 40%;
}

.shape-gradient-pink {
  background: var(--gradient-pink-white);
  opacity: 0.3;
}

.shape-gradient-teal {
  background: var(--gradient-teal-white);
  opacity: 0.3;
}

/* === SECTIONS === */
.section {
  padding: var(--space-4xl) var(--space-md);
  position: relative;
  overflow: hidden;
}

.section-lg {
  padding: var(--space-5xl) var(--space-md);
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-5xl) var(--space-xl);
  }

  .container {
    padding: 0 var(--space-xl);
  }
}

/* === GRILLES === */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

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

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* === TITRES === */
.section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-4xl);
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: var(--space-xl);
  line-height: 1.2;
  text-align: center;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--deep-blue-80);
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-3xl);
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--font-size-5xl);
  }
}

/* === BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pink {
  background: var(--coral-pink-10);
  color: var(--coral-pink);
}

.badge-teal {
  background: var(--bright-teal-10);
  color: var(--bright-teal);
}

.badge-blue {
  background: var(--deep-blue-10);
  color: var(--deep-blue);
}

/* === ANIMATIONS === */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === LIENS === */
.link {
  color: var(--coral-pink);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base);
}

.link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral-pink);
  transition: width var(--transition-base);
}

.link:hover::after {
  width: 100%;
}

/* === IMAGES === */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-rounded {
  border-radius: var(--radius-lg);
}

.img-fade {
  position: relative;
}

.img-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--white), transparent);
  pointer-events: none;
}

/* === CUSTOM SHAPES BACKGROUND === */
.section-with-shapes {
  position: relative;
  overflow: hidden;
}

.section-with-shapes .shape-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.section-with-shapes > * {
  position: relative;
  z-index: 1;
}

.custom-shape {
  position: absolute;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  opacity: 0.15;
  animation: float-shape 25s ease-in-out infinite, morph-shape 15s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
  filter: none;
}

/* Gradient variations - Flat design with clear edges */
.shape-gradient-1 {
  background: linear-gradient(135deg, var(--deep-blue) 0%, var(--coral-pink) 100%);
}

.shape-gradient-2 {
  background: linear-gradient(135deg, var(--coral-pink) 20%, var(--bright-teal) 80%);
}

.shape-gradient-3 {
  background: linear-gradient(135deg, var(--bright-teal) 0%, var(--coral-pink) 100%);
}

.shape-solid-blue {
  background: var(--deep-blue);
}

.shape-solid-coral {
  background: var(--coral-pink);
}

.shape-solid-teal {
  background: var(--bright-teal);
}

/* Shape positions - Large */
.shape-large-1 {
  width: 600px;
  height: 600px;
  top: -15%;
  right: -10%;
  animation-delay: 0s;
}

.shape-large-2 {
  width: 500px;
  height: 500px;
  bottom: -10%;
  left: -8%;
  animation-delay: 5s;
}

.shape-large-3 {
  width: 450px;
  height: 450px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

/* Shape positions - Medium */
.shape-medium-1 {
  width: 350px;
  height: 350px;
  top: 20%;
  left: 10%;
  animation-delay: 2s;
}

.shape-medium-2 {
  width: 400px;
  height: 400px;
  bottom: 15%;
  right: 15%;
  animation-delay: 7s;
}

/* Shape positions - Small */
.shape-small-1 {
  width: 250px;
  height: 250px;
  top: 60%;
  right: 20%;
  animation-delay: 3s;
}

.shape-small-2 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 30%;
  animation-delay: 8s;
}

/* Float animation */
@keyframes float-shape {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(30px, -30px) rotate(90deg) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) rotate(180deg) scale(0.9);
  }
  75% {
    transform: translate(40px, 10px) rotate(270deg) scale(1.05);
  }
}

/* Morphing animation for organic shapes */
@keyframes morph-shape {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  }
  25% {
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
  }
  50% {
    border-radius: 30% 70% 50% 50% / 60% 30% 70% 40%;
  }
  75% {
    border-radius: 70% 30% 50% 50% / 40% 70% 30% 60%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .custom-shape {
    opacity: 0.1;
    filter: none;
  }

  .shape-large-1,
  .shape-large-2,
  .shape-large-3 {
    width: 300px;
    height: 300px;
  }

  .shape-medium-1,
  .shape-medium-2 {
    width: 200px;
    height: 200px;
  }

  .shape-small-1,
  .shape-small-2 {
    width: 150px;
    height: 150px;
  }
}
