:root{
  --bg:#0e0f13;
  --card:#151823;
  --text:#eef2f7;
  --muted:#b7c0d1;
  --primary:#4c7dff;
  --accent:#11c8a8;
  --light:#ffffff;
  --radius:18px;
  --shadow:0 10px 30px rgba(0,0,0,.25);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  background:linear-gradient(180deg,#0b0c10,var(--bg));
  line-height:1.6;
}
img{display:block;width:100%;height:auto;border-radius:14px}
.container{max-width:1100px;margin:0 auto;padding:0 18px}

/* ===================== HERO ===================== */

.hero{
  padding:60px 0 40px;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:26px;
  align-items:center;
}
.hero-title{
  font-size:clamp(28px,5vw,48px);
  margin:0 0 8px;
}
.hero-title-static{
  margin-right:8px;
}
.highlight{
  background:linear-gradient(135deg,var(--primary),var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero-text p{
  color:var(--muted);
  max-width:640px;
}
.cta{
  display:flex;
  gap:10px;
  margin-top:16px;
}
.btn{
  display:inline-block;
  padding:10px 16px;
  border-radius:10px;
  font-weight:800;
  text-decoration:none;
  border:1px solid transparent;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-main{
  background:linear-gradient(135deg,var(--primary),#6aa2ff);
  color:#081017;
  box-shadow:var(--shadow);
}
.btn.ghost{
  background:transparent;
  color:var(--text);
  border-color:rgba(255,255,255,.15);
}

/* Hover / focus boutons */
.btn:hover,
.btn:focus-visible{
  transform:translateY(-2px) scale(1.03);
  box-shadow:0 14px 34px rgba(0,0,0,.38);
}
.btn-main:hover,
.btn-main:focus-visible{
  background:linear-gradient(135deg,#6aa2ff,var(--primary));
}
.btn.ghost:hover,
.btn.ghost:focus-visible{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.35);
  color:var(--light);
}

.hero-image img{
  aspect-ratio:4/3;
  object-fit:cover;
  filter:saturate(1.05) contrast(1.05);
  box-shadow:var(--shadow);
}

/* ===== petite transition entre sections (ombre douce) ===== */
.section-divider{
  height:26px;
  background:linear-gradient(180deg,rgba(0,0,0,.55),transparent);
  opacity:.7;
}

/* ===================== COMPÉTENCES CLÉS ===================== */

.skills{
  padding:28px 0 32px;
  margin-top:10px;
  border-top:1px solid rgba(255,255,255,.04);
}
.skills h2{
  margin:0 0 14px;
}

/* On passe en grille : 5 colonnes desktop, 3 mobile */
.tags{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  list-style:none;
  margin:0;
  padding:0;
}
.tags li{
  background:rgba(255,255,255,.92);
  color:#081017;
  font-weight:800;
  border-radius:999px;
  padding:6px 8px;          /* boutons moins larges */
  font-size:13px;
  text-align:center;
  white-space:nowrap;
}

/* ===================== SERVICES (6 BLOCS D'IMAGES) ===================== */

.services{
  padding:10px 0 60px;
  border-top:1px solid rgba(255,255,255,.04);
}
.services-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr)); /* 2 images par ligne */
  gap:22px;
}

.service-card{
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius);
  padding:16px;
  overflow:hidden;
  position:relative;
  opacity:0;
  transform:translateY(24px);
  transition:
    opacity .7s ease,
    transform .7s ease;
}

/* direction de départ par côté */
.service-card[data-anim="left"]{
  transform:translateX(-40px);
}
.service-card[data-anim="right"]{
  transform:translateX(40px);
}

/* état visible appliqué par JS */
.service-card.visible{
  opacity:1;
  transform:translateX(0) translateY(0);
}

/* décalage dans le temps : un bloc après l'autre */
.service-card.visible:nth-child(1){ transition-delay:0s; }
.service-card.visible:nth-child(2){ transition-delay:0.1s; }
.service-card.visible:nth-child(3){ transition-delay:0.2s; }
.service-card.visible:nth-child(4){ transition-delay:0.3s; }
.service-card.visible:nth-child(5){ transition-delay:0.4s; }
.service-card.visible:nth-child(6){ transition-delay:0.5s; }

/* Titre + description AU-DESSUS de l’image */
.service-card h2{
  margin:0 0 6px;
  font-size:18px;
}
.service-card p{
  margin:0 0 10px;
  color:var(--muted);
  font-size:14px;
}

/* Image complète dans le bloc, sans découpe ni déformation */
.service-card img{
  width:100%;
  height:500px;         /* 🔥 Hauteur moyenne, stable, non déformée */
  object-fit:cover;     /* 🔥 remplit le bloc sans déformer */
  border-radius:14px;
}


/* ===================== RESPONSIVE ===================== */

@media (max-width:980px){
  .hero-grid{
    grid-template-columns:1fr;
  }

  .services-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .tags{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media (max-width:760px){
  .services-grid{
    grid-template-columns:1fr; /* 1 bloc par ligne sur mobile */
  }
  .cta{
    flex-direction:column;
    align-items:flex-start;
  }
  .tags{
    grid-template-columns:repeat(3,minmax(0,1fr)); /* 3 compétences par ligne sur mobile */
  }
}

@media (max-width:560px){
  .tags{
    grid-template-columns:repeat(3,minmax(0,1fr)); /* on garde 3 par ligne même très petit */
  }
}
@media (max-width:760px){
  .cta{
    flex-direction:row !important;  /* 🔥 garde les boutons côte à côte */
    gap:10px;
  }
  .btn{
    width:auto !important;
  }
}
