/* === SECTION SERVICES === */
.services-section {
  position: relative;
  padding: 5rem 0;
  background: linear-gradient(to bottom, #ffffff, #f8fbff);
  overflow: hidden;
}

[data-theme='dark'] .services-section {
  background: var(--color-bg);
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.services-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(
    to right,
    rgba(1, 112, 168, 0.1),
    rgba(25, 184, 216, 0.1)
  );
  border: 1px solid rgba(1, 112, 168, 0.2);
  color: #0170a8;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 1.5rem;
}

[data-theme='dark'] .services-badge {
  background: linear-gradient(
    to right,
    rgba(1, 112, 168, 0.2),
    rgba(25, 184, 216, 0.2)
  );
  color: #19b8d8;
}

.services-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: #0e1117;
  margin-bottom: 0.75rem;
}

[data-theme='dark'] .services-header h2 {
  color: #ffffff;
}

.services-header p {
  color: #4b5563;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
}

[data-theme='dark'] .services-header p {
  color: #9ca3af;
}

.gradient-text {
  background: linear-gradient(to right, #0170a8, #19b8d8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* === CARTES SERVICES === */
.service-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-top: 15px;
}

.service-card-inner {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(1, 112, 168, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

[data-theme='dark'] .service-card-inner {
  background: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.1);
}

.service-card:hover .service-card-inner {
  transform: translateY(-8px);
  border-color: #0170a8;
  box-shadow: 0 20px 40px rgba(1, 112, 168, 0.25);
}

[data-theme='dark'] .service-card:hover .service-card-inner {
  border-color: #19b8d8;
  box-shadow: 0 20px 40px rgba(25, 184, 216, 0.15);
}

.service-badge {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0170a8, #19b8d8);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 15px rgba(1, 112, 168, 0.4);
  font-size: 1rem;
  z-index: 10;
  transition: all 0.3s ease;
}

.service-card:hover .service-badge {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(1, 112, 168, 0.5),
    0 10px 35px rgba(1, 112, 168, 0.3);
}

.service-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  pointer-events: none;
}

.service-card:hover .service-badge::after {
  opacity: 0.3;
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.service-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: start;
}

.service-icon svg {
  width: 40px;
  height: 40px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0170a8, #19b8d8);
  color: white;
  box-shadow: 0 8px 20px rgba(1, 112, 168, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover .service-icon svg {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 30px rgba(1, 112, 168, 0.35);
}

.service-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #0e1117;
  margin-bottom: 0.75rem;
  text-align: left;
  transition: color 0.3s ease;
}

[data-theme='dark'] .service-title {
  color: #ffffff;
}

.service-card:hover .service-title {
  color: #0170a8;
}

[data-theme='dark'] .service-card:hover .service-title {
  color: #19b8d8;
}

.service-desc {
  color: #4b5563;
  opacity: 0.85;
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
  flex: 1;
}

[data-theme='dark'] .service-desc {
  color: #9ca3af;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0170a8;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  align-self: flex-start;
}

[data-theme='dark'] .service-link {
  color: #19b8d8;
}

.service-card:hover .service-link {
  opacity: 1;
  transform: translateY(0);
}

.service-link .link-text {
  transition: transform 0.3s ease;
}

.service-link .link-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.service-link:hover .link-arrow {
  transform: translateX(4px);
}

.service-link:hover .link-text {
  color: #0198c7;
}

.service-gradient {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #0170a8, #19b8d8);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0 0 1.5rem 1.5rem;
}

.service-card:hover .service-gradient {
  opacity: 1;
}

/* === CTA SECTION === */
.services-cta {
  margin-top: 8rem;
  text-align: center;
}

.services-cta p {
  font-family: 'Poppins', sans-serif;
  color: #4b5563;
  opacity: 0.8;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

[data-theme='dark'] .services-cta p {
  color: #9ca3af;
}

.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0170a8, #19b8d8);
  color: white;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(1, 112, 168, 0.3);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(1, 112, 168, 0.4);
}

/* === MODAL ULTRA MODERNE === */
.service-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 20, 0.75);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

.service-modal.active {
  opacity: 1;
  visibility: visible;
}

.service-modal-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.service-modal-content {
  position: relative;
  width: 95%;
  max-width: 750px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-theme='dark'] .service-modal-content {
  background: var(--color-bg);
  color: #f5f5f5;
}

/* Custom scrollbar */
.service-modal-content::-webkit-scrollbar {
  width: 8px;
}

.service-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.service-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #0170a8, #19b8d8);
  border-radius: 10px;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #6b7280;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .modal-close {
  background: rgba(30, 30, 40, 0.9);
  color: #9ca3af;
}

.modal-close:hover {
  color: #0170a8;
  transform: rotate(90deg);
  box-shadow: 0 4px 15px rgba(1, 112, 168, 0.3);
}

[data-theme='dark'] .modal-close:hover {
  color: #19b8d8;
}

/* === MODAL HEADER === */
.modal-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(1, 112, 168, 0.1);
  z-index: 9;
  padding: 2rem;
}

[data-theme='dark'] .modal-header {
  background: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.modal-icon-slot {
  position: relative;
  flex-shrink: 0;
}

.modal-icon-glow {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #0170a8, #19b8d8);
  filter: blur(25px);
  opacity: 0.5;
  animation: pulse 3s ease-in-out infinite;
}

.modal-icon {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #0170a8, #19b8d8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(1, 112, 168, 0.3);
  overflow: hidden;
}

.modal-icon svg {
  width: 35px;
  height: 35px;
  color: white;
  position: relative;
  z-index: 1;
}

.modal-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.modal-titles {
  flex: 1;
}

.modal-titles h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  background: linear-gradient(to right, #0170a8, #19b8d8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.modal-subtitle {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

[data-theme='dark'] .modal-subtitle {
  color: #9ca3af;
}

/* === MODAL BODY === */
.modal-body {
  padding: 2rem;
  color: #374151;
}

[data-theme='dark'] .modal-body {
  color: #d1d5db;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section:last-child {
  margin-bottom: 0;
}

/* Section Header */
.modal-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.modal-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(1, 112, 168, 0.15),
    rgba(25, 184, 216, 0.15)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme='dark'] .modal-section-icon {
  background: linear-gradient(
    135deg,
    rgba(1, 112, 168, 0.25),
    rgba(25, 184, 216, 0.25)
  );
}

.modal-section-icon svg {
  color: #0170a8;
}

[data-theme='dark'] .modal-section-icon svg {
  color: #19b8d8;
}

.modal-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0e1117;
  margin: 0;
  padding-left: 1rem;
}

.modal-section-header-description h3::before {
  content: '';
  position: absolute;
  left: 25px;
  width: 3px;
  height: 1.5rem;
  background: linear-gradient(
    to bottom,
    var(--color-accent-start),
    var(--color-accent-end)
  );
  border-radius: 2px;
}

[data-theme='dark'] .modal-section h3 {
  color: #ffffff;
}

/* Glass Effect Section */
.modal-section.glass {
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid rgba(1, 112, 168, 0.15);
  border-radius: 1.25rem;
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(1, 112, 168, 0.05);
}

[data-theme='dark'] .modal-section.glass {
  background: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-section.glass p {
  margin: 0;
  line-height: 1.7;
  color: #4b5563;
}

[data-theme='dark'] .modal-section.glass p {
  color: #d1d5db;
}

/* Prestations List */
.prestations {
  padding: 0.5rem;
}

.prestations-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prestations-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem;
  background: linear-gradient(
    to right,
    rgba(1, 112, 168, 0.05),
    rgba(25, 184, 216, 0.05)
  );
  border: 1px solid rgba(1, 112, 168, 0.1);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

[data-theme='dark'] .prestations-list li {
  background: linear-gradient(
    to right,
    rgba(1, 112, 168, 0.1),
    rgba(25, 184, 216, 0.1)
  );
  border-color: rgba(255, 255, 255, 0.1);
}

.prestations-list li:hover {
  transform: translateX(4px);
  border-color: #0170a8;
  box-shadow: 0 4px 12px rgba(1, 112, 168, 0.15);
}

[data-theme='dark'] .prestations-list li:hover {
  border-color: #19b8d8;
}

.prestations-list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #0170a8;
  margin-top: 2px;
}

[data-theme='dark'] .prestations-list li svg {
  color: #19b8d8;
}

.prestations-list li span {
  flex: 1;
  line-height: 1.6;
  color: #374151;
  font-size: 0.95rem;
}

[data-theme='dark'] .prestations-list li span {
  color: #d1d5db;
}

/* Advantages Grid */
.advantages {
  padding: 0.5rem;
}

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

.advantage-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(1, 112, 168, 0.15);
  border-radius: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

[data-theme='dark'] .advantage-card {
  background: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.1);
}

.advantage-card:hover {
  transform: translateY(-4px);
  border-color: #0170a8;
  box-shadow: 0 8px 20px rgba(1, 112, 168, 0.15);
}

[data-theme='dark'] .advantage-card:hover {
  border-color: #19b8d8;
}

.advantage-card svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #19b8d8;
  margin-top: 2px;
}

.advantage-card span {
  flex: 1;
  line-height: 1.5;
  color: #4b5563;
  font-size: 0.9rem;
}

[data-theme='dark'] .advantage-card span {
  color: #d1d5db;
}

/* === MODAL FOOTER === */
.modal-footer {
  padding: 2rem;
  border-top: 1px solid rgba(1, 112, 168, 0.1);
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

[data-theme='dark'] .modal-footer {
  background: var(--color-bg);
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.125rem 2.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(90deg, #0170a8, #19b8d8);
  color: #fff;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(1, 112, 168, 0.3);
}

.modal-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.modal-cta:hover::before {
  transform: translateX(100%);
}

.modal-cta:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(1, 112, 168, 0.4);
}

.modal-cta .arrow {
  transition: transform 0.3s ease;
}

.modal-cta:hover .arrow {
  transform: translateX(4px);
}

/* === ANIMATIONS === */
@keyframes modalFadeIn {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.fade-up-delayed {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.fade-up-delayed5 {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease 0.5s forwards;
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .services-section {
    padding: 4rem 0;
  }

  .services-container {
    padding: 0 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header-inner {
    flex-direction: column;
    text-align: center;
  }

  .modal-titles h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-footer {
    padding: 1.5rem;
  }

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

  .service-modal-content {
    width: 100%;
    max-height: 95vh;
    border-radius: 1.5rem;
  }

  .services-header h2 {
    font-size: 2rem;
  }

  .modal-cta {
    width: 85%;
    padding: 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .service-card-inner {
    padding: 1.5rem;
  }

  .service-icon svg {
    width: 60px;
    height: 60px;
    padding: 14px;
  }

  .service-title {
    font-size: 1.25rem;
  }

  .modal-icon {
    width: 60px;
    height: 60px;
  }

  .modal-icon svg {
    width: 35px;
    height: 35px;
  }
}
