/* ============================================================
   SERVICE PAGES - CSS PARTAGÉ
   Alpine Depth Design System
   Extrait des 5 pages services pour éliminer ~5000 lignes dupliquées
   ============================================================ */

/* Variables de service (identiques pour toutes les pages) */
:root {
  --service-primary: var(--lake, #3d8b9c);
  --service-primary-light: var(--lake-light, #4a9cae);
  --service-accent: var(--terracotta, #c17f59);
  --service-accent-light: var(--terracotta-light, #d4956d);
  --service-bg: rgba(61, 139, 156, 0.1);
}

/* Layout général */
.service-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Classe unifiée pour le texte accent (lake) */
.text-accent,
.text-service {
  color: var(--service-primary);
}

/* Section intro */
.service-intro {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--service-bg), rgba(255, 255, 255, 0.05));
  border-radius: 24px;
  border: 1px solid rgba(var(--lake-rgb), 0.2);
  box-shadow: 0 8px 32px rgba(var(--lake-rgb), 0.1);
}

.service-intro h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.service-intro h2::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--service-primary);
  border-radius: 2px;
  margin: 1rem auto 0;
}

.service-intro .lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Grille spécialités — bento asymétrique */
.specialties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.specialties-grid .specialty-card:nth-child(1) { grid-area: 2 / 1; }
.specialties-grid .specialty-card:nth-child(3) { grid-area: 2 / 2; }

.specialty-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.specialty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--service-primary), var(--service-primary-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.specialty-card:hover::before {
  transform: scaleX(1);
}

.specialty-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(var(--lake-rgb), 0.15);
  border-color: var(--service-primary);
}

.specialty-card.featured {
  grid-area: 1 / 1 / 2 / 3;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 3rem;
  border-color: var(--service-primary);
  border-width: 2px;
  box-sizing: border-box;
  background: linear-gradient(135deg, var(--service-bg), rgba(var(--lake-rgb), 0.04));
}

.specialty-card.featured::before {
  transform: scaleX(1);
  height: 3px;
}

.specialty-card.featured h3 {
  font-size: 1.8rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--service-primary);
  background: var(--service-bg);
  border-radius: 0.5rem;
}

.specialty-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.specialty-card ul {
  list-style: none;
  padding: 0;
}

.specialty-card li {
  padding: 0.75rem 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 1rem;
}

.specialty-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--service-primary);
  font-weight: bold;
}

.specialty-card li:last-child {
  border-bottom: none;
}

/* Showcase projet */
.project-showcase {
  background: linear-gradient(135deg, var(--card), rgba(var(--lake-rgb), 0.05));
  border: 1px solid rgba(var(--lake-rgb), 0.2);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 4rem;
  box-shadow: 0 16px 40px rgba(var(--lake-rgb), 0.1);
}

.showcase-header {
  text-align: center;
  margin-bottom: 3rem;
}

.showcase-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  color: var(--service-primary);
  background: var(--service-bg);
  border-radius: 0.75rem;
}

.showcase-header h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.btn-project {
  display: inline-block;
  background: linear-gradient(135deg, var(--service-accent), var(--service-accent-light));
  color: white;
  padding: 1.25rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(var(--terracotta-rgb), 0.3);
}

.btn-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(var(--terracotta-rgb), 0.4);
}

.project-url {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

.challenge-solution {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.challenge, .solution {
  padding: 2rem;
  border-radius: 16px;
}

.challenge {
  background: rgba(var(--error-rgb), 0.1);
  border: 1px solid rgba(var(--error-rgb), 0.2);
}

.solution {
  background: linear-gradient(135deg, var(--service-bg), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(var(--lake-rgb), 0.2);
}

.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--lake-rgb), 0.1);
  border-color: var(--service-primary);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--service-primary);
  background: var(--service-bg);
  border-radius: 0.5rem;
}

.feature-item div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-item strong {
  color: var(--text);
  font-size: 1.1rem;
}

.feature-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Section impact */
.impact-section {
  background: linear-gradient(135deg, rgba(var(--lake-rgb), 0.1), rgba(255, 255, 255, 0.02));
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--lake-rgb), 0.2);
}

.testimonial {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--text);
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  border-left: 4px solid var(--service-primary);
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(var(--lake-rgb), 0.1);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.metric {
  text-align: center;
  padding: 2rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.metric:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(var(--lake-rgb), 0.15);
  border-color: var(--service-primary);
}

.metric-value {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--service-primary);
}

.metric-label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Section processus */
.process-section {
  margin-bottom: 4rem;
}

.process-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 600;
}

/* Timeline verticale */
.process-steps {
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 0;
  padding-left: 1rem;
}

.process-steps::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 28px;
  height: calc(100% - 56px);
  width: 2px;
  background: linear-gradient(to bottom,
    var(--service-primary) 0%,
    rgba(var(--lake-rgb), 0.15) 100%);
  z-index: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: none;
  position: relative;
  z-index: 1;
}

.step::before { display: none; }

.step:hover {
  transform: none;
  box-shadow: none;
}

.step-number {
  background: linear-gradient(135deg, var(--service-primary), var(--service-primary-light));
  color: white;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(var(--lake-rgb), 0.3);
  z-index: 2;
  position: relative;
}

.step-content {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.step:hover .step-content {
  border-color: var(--service-primary);
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(var(--lake-rgb), 0.1);
}

.step-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
}

.step-content p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Section confiance */
.trust-section {
  margin-bottom: 4rem;
}

.trust-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.trust-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.trust-card::before { display: none; }

.trust-card:hover {
  border-color: var(--service-primary);
  box-shadow: 0 4px 12px rgba(var(--lake-rgb), 0.08);
  transform: none;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--service-primary);
  background: var(--service-bg);
  border-radius: 10px;
}

.trust-card h3 {
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.trust-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trust-card li {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0;
  border-bottom: none;
  padding-left: 0;
  line-height: 1.5;
}

.trust-card li::before { display: none; }
.trust-card li:not(:last-child)::after { content: ' · '; }

/* Trust cards avec illustrations (web.md) */
.trust-card-illustrated {
  text-align: center;
}

.trust-card-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(var(--lake-rgb), 0.08);
  border-radius: 16px;
}

.trust-card-illustration img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(var(--lake-rgb), 0.15));
  transition: transform 0.3s ease;
}

.trust-card-illustrated:hover .trust-card-illustration img {
  transform: scale(1.08);
}

.trust-card-illustrated h3 {
  text-align: center;
}

.trust-card-illustrated ul {
  text-align: left;
}

/* Section résultats */
.results-section {
  background: linear-gradient(135deg, var(--card), rgba(var(--lake-rgb), 0.03));
  border: 1px solid rgba(var(--lake-rgb), 0.2);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 4rem;
  box-shadow: 0 8px 32px rgba(var(--lake-rgb), 0.1);
}

.results-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
  font-size: 2.5rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 600;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(var(--lake-rgb), 0.1);
  transition: all 0.3s ease;
}

.result-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(var(--lake-rgb), 0.15);
  border-color: var(--service-primary);
}

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  color: var(--service-primary);
  background: var(--service-bg);
  border-radius: 0.75rem;
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-content strong {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
}

.result-content span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* CTA final */
.cta-section {
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, var(--service-bg), rgba(255, 255, 255, 0.05));
  border-radius: 20px;
  border: 1px solid rgba(var(--lake-rgb), 0.2);
  box-shadow: 0 8px 32px rgba(var(--lake-rgb), 0.1);
}

.cta-section p {
  margin: 0 0 2rem 0;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-consultation, .btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-consultation {
  background: linear-gradient(135deg, var(--service-accent), var(--service-accent-light));
  color: white;
  box-shadow: 0 8px 24px rgba(var(--terracotta-rgb), 0.3);
}

.btn-consultation:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(var(--terracotta-rgb), 0.4);
}

.btn-contact {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--service-primary);
}

.btn-contact:hover {
  background: var(--service-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--lake-rgb), 0.2);
}

/* Images responsives dans les pages services */
.service-hero-illustration {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-hero-illustration img,
.specialty-icon img,
.project-showcase-illustration img,
.trust-card-illustration img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout showcase-content */
.showcase-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-showcase-illustration {
  display: flex;
  justify-content: center;
}

.project-showcase-illustration img {
  max-width: min(300px, 100%);
  height: auto;
}

/* Icônes inline (bi, data, ia-chatbot) */
.icon-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  color: var(--color-error);
}

.icon-inline.success {
  color: var(--service-primary);
}

/* Section icon */
.section-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  color: var(--service-primary);
}

/* ============================================
   RESPONSIVE — Tablet (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  .service-page {
    padding: 1rem 0.75rem;
  }

  .service-intro {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  .service-intro h2 {
    font-size: 1.75rem;
  }

  .service-intro .lead {
    font-size: 1rem;
  }

  .specialties-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .specialty-card.featured,
  .specialties-grid .specialty-card:nth-child(1),
  .specialties-grid .specialty-card:nth-child(3) {
    grid-area: auto;
    grid-column: 1 / -1;
    display: block;
  }

  .specialty-card {
    padding: 1.5rem;
  }

  .specialty-card h3 {
    font-size: 1.25rem;
  }

  .project-showcase {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .challenge-solution {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .features-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-left: 0.5rem;
  }

  /* Désactiver translateX sur mobile = évite scroll horizontal */
  .step:hover .step-content {
    transform: none;
  }

  /* Featured card: centrer l'image en mode block */
  .specialty-card.featured .specialty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
  }

  /* Showcase content mobile */
  .showcase-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Témoignage */
  .testimonial {
    font-size: 1.1rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
  }

  /* Showcase header */
  .showcase-header h2 {
    font-size: 1.75rem;
  }

  /* Result item */
  .result-item {
    padding: 1.25rem;
    gap: 1rem;
  }

  /* Metric */
  .metric {
    padding: 1.25rem;
  }

  .metric-value {
    font-size: 2.25rem;
  }

  /* CTA */
  .cta-section {
    padding: 1.5rem;
  }

  .cta-section p {
    font-size: 1.1rem;
  }

  .btn-consultation, .btn-contact {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  /* Challenge/Solution */
  .challenge, .solution {
    padding: 1.25rem;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Trust cards : stacker icon / titre / liste verticalement */
  .trust-card {
    flex-direction: column;
  }

  .trust-card h3,
  .trust-card ul {
    min-width: 0;
    word-wrap: break-word;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .process-section h2,
  .trust-section h2,
  .results-section h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   RESPONSIVE — Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  .service-page {
    padding: 0.75rem 0.5rem;
  }

  .service-intro {
    padding: 1rem 0.75rem;
    border-radius: 16px;
  }

  .service-intro h2 {
    font-size: 1.5rem;
  }

  .specialty-card {
    padding: 1rem;
    border-radius: 12px;
  }

  .specialty-card h3 {
    font-size: 1.1rem;
  }

  .project-showcase {
    padding: 1rem;
    border-radius: 16px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .impact-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
  }

  .results-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .cta-section {
    padding: 1rem;
    border-radius: 12px;
  }

  .challenge-solution {
    margin-bottom: 1rem;
  }

  .service-intro,
  .specialties-grid,
  .project-showcase,
  .process-section,
  .trust-section {
    margin-bottom: 1.5rem;
  }

  /* Trust cards mobile compact */
  .trust-card {
    padding: 1.25rem;
  }

  .trust-icon {
    width: 36px;
    height: 36px;
  }

  /* Featured card */
  .specialty-card.featured h3 {
    font-size: 1.3rem;
  }

  /* Showcase header */
  .showcase-header h2 {
    font-size: 1.4rem;
  }

  /* Testimonial */
  .testimonial {
    font-size: 1rem;
    padding: 1rem;
  }

  /* Métriques */
  .metric {
    padding: 1rem;
  }

  .metric-value {
    font-size: 2rem;
  }

  /* Résultats */
  .result-item {
    padding: 1rem;
    gap: 0.75rem;
  }

  .result-icon {
    width: 44px;
    height: 44px;
  }

  /* CTA buttons: pleine largeur sur mobile */
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn-consultation, .btn-contact {
    font-size: 0.95rem;
    padding: 0.875rem 1.25rem;
    justify-content: center;
    width: 100%;
  }

  .cta-section p {
    font-size: 1rem;
  }

  /* Challenge/Solution */
  .challenge, .solution {
    padding: 1rem;
  }

  /* Process timeline */
  .process-section h2 {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
  }

  .step-number {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.2rem;
  }

  .step-content {
    padding: 1rem;
  }

  /* Sections header h2 */
  .trust-section h2,
  .results-section h2 {
    font-size: 1.35rem;
  }

  /* Overflow safeguard global */
  .service-page {
    overflow-x: hidden;
  }

  /* Featured card: padding réduit */
  .specialty-card.featured {
    padding: 1.25rem;
    gap: 1rem;
  }

  /* Prose: lisibilité mobile */
  .prose, .prose-lg {
    font-size: 0.925rem !important;
    line-height: 1.65 !important;
  }
}

/* ============================================
   RESPONSIVE — Service Hero (all breakpoints)
   ============================================ */
.service-hero-title {
  font-size: clamp(1.75rem, 6vw, 3.75rem);
}
.service-hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

@media (max-width: 768px) {
  .service-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}
