/* ============================================================
   ILLUSTRATIONS & SVG ANIMÉS
   Style line-art technique (dégradé qui se dessine, rotation,
   pulse, halo). Couleurs pilotées par variables CSS → s'adaptent
   automatiquement aux modes clair / sombre.
   ============================================================ */

/* ============================================================
   PROJETS — blocs alternés
   ============================================================ */
.projects-stack {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.project-block {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: stretch;
}

.project-block--reverse .project-visual { order: 2; }

.project-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 1rem;
  position: relative;
  background: transparent;
  /* Neutre (lignes fines) — inversé clair/sombre */
  --illus-neutral: #34506b;
}

.dark-mode .project-visual { --illus-neutral: #c7d3dd; }

/* Dégradé d'accent par app (a → b), theme-aware */
.project-visual--msh { --illus-a: #0c8a65; --illus-b: #2bbd92; }
.project-visual--mm  { --illus-a: #2f9e87; --illus-b: #4fb0c6; --illus-c: #cf9a00; }
.project-visual--pro { --illus-a: #0c8a65; --illus-b: #2bbd92; }
.dark-mode .project-visual--msh { --illus-a: #37EFBA; --illus-b: #0c9a71; }
.dark-mode .project-visual--mm  { --illus-a: #37c9a0; --illus-b: #7EC8D9; --illus-c: #F5D547; }
.dark-mode .project-visual--pro { --illus-a: #37EFBA; --illus-b: #0c9a71; }

.project-visual svg {
  width: 100%;
  height: 100%;
  max-width: 540px;
  max-height: 700px;
}

.project-logo {
  width: 78%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
}

.project-logo--rounded {
  border-radius: 24px;
  max-width: 180px;
}

.project-content h3 {
  font-size: 1.9rem;
  margin-bottom: 0.25rem;
}

.project-tagline {
  color: var(--accent-text);
  font-weight: 600;
  margin-bottom: 0;
}

.project-desc {
  opacity: 0.85;
  line-height: 1.7;
  margin: 0 0 1.25rem 0;
  max-width: none;
  text-align: left;
}

.project-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  display: grid;
  gap: 0.55rem;
}

.project-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border-left: none;
  margin: 0;
  padding: 0;
}

.project-features li i {
  color: var(--accent-text);
  width: 1.1rem;
  text-align: center;
}

.project-platforms {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  opacity: 0.7;
  font-size: 0.9rem;
}

.project-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* En-tête : logo + (nom au-dessus de la tagline) */
.project-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

/* Titre + tagline empilés, alignés à droite de l'icône */
.project-head-text {
  min-width: 0;
}

.project-logo-mini {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.project-logo-mini--rounded { border-radius: 11px; }

.project-head h3 { margin: 0 0 0.15rem 0; }

/* Bloc compétences / ingénierie */
.project-skills {
  margin: 0.5rem 0 1.25rem 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent-color);
  background: rgba(127, 127, 127, 0.06);
  border-radius: 0 12px 12px 0;
}

.project-skills-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 0.5rem;
}

.project-skills p {
  margin: 0 0 0.85rem 0;
  font-size: 0.92rem;
  line-height: 1.65;
  opacity: 0.85;
}

.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-chip {
  font-size: 0.78rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent-text);
  color: var(--accent-text);
  background: rgba(55, 239, 186, 0.08);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .project-block,
  .project-block--reverse {
    grid-template-columns: 1fr;
  }
  .project-block--reverse .project-visual { order: 0; }
  .project-visual { min-height: 300px; }
}

/* ============================================================
   SYSTÈME D'ANIMATION « TECHNIQUE » (.illus-tech)
   - dr-draw : tracé qui se dessine
   - dr-fade : apparition en fondu (échelonnée)
   - dr-spin : rotation continue
   - dr-pulse / dr-glow : clignotement / halo
   ============================================================ */
.illus-tech .dr-draw  { stroke-dasharray: 900; stroke-dashoffset: 900; animation: drDraw 2.8s cubic-bezier(.4,0,.2,1) forwards .2s; }
.illus-tech .dr-draw2 { stroke-dasharray: 500; stroke-dashoffset: 500; animation: drDraw 2s cubic-bezier(.4,0,.2,1) forwards .9s; }
.illus-tech .dr-draw3 { stroke-dasharray: 300; stroke-dashoffset: 300; animation: drDraw 1.5s cubic-bezier(.4,0,.2,1) forwards 1.6s; }
@keyframes drDraw { to { stroke-dashoffset: 0; } }

.illus-tech .dr-fade { opacity: 0; animation: drFade .6s ease forwards; }
.illus-tech .dr-f1 { animation-delay: 1.6s; }
.illus-tech .dr-f2 { animation-delay: 2.2s; }
.illus-tech .dr-f3 { animation-delay: 2.8s; }
.illus-tech .dr-f4 { animation-delay: 3.4s; }
@keyframes drFade { to { opacity: 1; } }

.illus-tech .dr-spin  { transform-box: fill-box; transform-origin: center; animation: drSpin 7s linear infinite; }
.illus-tech .dr-spin2 { transform-box: fill-box; transform-origin: center; animation: drSpin 7s linear infinite reverse; }
@keyframes drSpin { to { transform: rotate(360deg); } }

.illus-tech .dr-float { transform-box: fill-box; transform-origin: center; animation: drFloat 3.6s ease-in-out infinite; }
@keyframes drFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.illus-tech .dr-pulse  { animation: drPulse 2.5s ease-in-out infinite; }
.illus-tech .dr-pulse2 { animation: drPulse 2.5s ease-in-out infinite .6s; }
.illus-tech .dr-pulse3 { animation: drPulse 2.5s ease-in-out infinite 1.2s; }
.illus-tech .dr-pulse4 { animation: drPulse 2.5s ease-in-out infinite 1.8s; }
@keyframes drPulse { 0%, 100% { opacity: .8; } 50% { opacity: .15; } }

.illus-tech .dr-glow { animation: drGlow 4s ease-in-out infinite; }
@keyframes drGlow { 0%, 100% { opacity: .5; } 50% { opacity: .9; } }

.illus-tech .dr-flow  { stroke-dasharray: 7 11; animation: drFlow 1.5s linear infinite; }
.illus-tech .dr-flow2 { stroke-dasharray: 7 11; animation: drFlow 1.5s linear infinite 0.4s; }
@keyframes drFlow { to { stroke-dashoffset: -36; } }

/* ============================================================
   SECTION IA — illustration + points
   ============================================================ */
.ia-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 3.5rem;
  align-items: stretch;
  max-width: 1080px;
  margin: 2.5rem auto 0;
}

.ia-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  --illus-neutral: #34506b;
  --illus-a: #0c8a65;
  --illus-b: #2bbd92;
}

.dark-mode .ia-visual {
  --illus-neutral: #c7d3dd;
  --illus-a: #37EFBA;
  --illus-b: #0c9a71;
}

.ia-visual svg { width: 100%; height: 100%; max-width: 500px; max-height: 640px; }

/* Paquets qui naviguent entre les nœuds (réseau IA) */
.illus-ai .ai-packet { offset-rotate: 0deg; }
.illus-ai .ai-packet-1 { offset-path: path("M248 130 L330 90 L404 170 L330 310 L248 410 L330 200 Z"); animation: aiPacket 7s linear infinite; }
.illus-ai .ai-packet-2 { offset-path: path("M248 270 L330 420 L404 340 L330 200 L248 130 L404 170 Z"); animation: aiPacket 9.5s linear infinite; }
.illus-ai .ai-packet-3 { offset-path: path("M404 340 L330 310 L248 410 L330 420 L404 170 L248 270 Z"); animation: aiPacket 8s linear infinite 1.4s; }
@keyframes aiPacket { to { offset-distance: 100%; } }

.ia-points {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ia-point {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ia-point-ic {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-text);
  background: rgba(55, 239, 186, 0.1);
}

.ia-point h3 { margin: 0 0 0.3rem 0; font-size: 1.1rem; }
.ia-point p { margin: 0; opacity: 0.85; line-height: 1.6; font-size: 0.95rem; }
.ia-intro { margin: 0 0 2rem 0; opacity: 0.9; line-height: 1.7; }

@media (max-width: 860px) {
  .ia-layout { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   ARRIÈRE-PLANS DE SECTIONS — halos d'accent + texture pointillée
   (pseudo-élément, indépendant de la couleur de fond de section)
   ============================================================ */
/* --sec-dot et --accent-text → centralisés dans CSS/tokens.css */

#a-propos, #avantages, #services-entreprises,
#ia, #projets, #temoignages {
  position: relative;
  overflow: hidden;
}

#a-propos::before, #avantages::before, #services-entreprises::before,
#ia::before, #projets::before, #temoignages::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(760px 440px at 6% -10%, rgba(55, 239, 186, 0.08), transparent 62%),
    radial-gradient(660px 420px at 97% 114%, rgba(55, 239, 186, 0.055), transparent 60%),
    radial-gradient(var(--sec-dot) 1px, transparent 1.6px);
  background-size: 100% 100%, 100% 100%, 30px 30px;
}

/* Le contenu reste au-dessus du décor */
.body-content section > .container { position: relative; z-index: 1; }

/* ============================================================
   HERO — couche constellation tech (ambiance)
   ============================================================ */
.hero-illus {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0.55;
  pointer-events: none;
  --illus-a: #37EFBA;
  --illus-b: #0c9a71;
}

.hero-illus svg { width: 100%; height: 100%; display: block; }

/* Réseau de neurones animé (canvas) */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

/* ============================================================
   ICÔNES « Ce qui me définit » — au trait, animées au survol
   ============================================================ */
.advantage-icon svg {
  width: 34px;
  height: 34px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.advantage-card:hover .advantage-icon svg {
  transform: scale(1.15) rotate(-6deg);
}

@media (prefers-reduced-motion: reduce) {
  .advantage-card:hover .advantage-icon svg { transform: none; }
}

/* ============================================================
   ACCESSIBILITÉ — coupe les animations si demandé
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .illus-tech * { animation: none !important; }
  .illus-tech .dr-draw,
  .illus-tech .dr-draw2,
  .illus-tech .dr-draw3 { stroke-dashoffset: 0 !important; }
  .illus-tech .dr-fade { opacity: 1 !important; }
}
