/* ══════════════════════════════════════
   SERVICES CARDS (Finition Premium)
══════════════════════════════════════ */
.services-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.serv-carte { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; box-shadow: 0 10px 40px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.02); transition: var(--tr); }
.serv-carte:hover { transform: translateY(-8px); box-shadow: 0 30px 60px rgba(0,0,0,0.12); }
.serv-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.serv-carte:hover .serv-img { transform: scale(1.06); }
.serv-overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,12,24,0.95) 0%, rgba(12,12,24,0.3) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 35px; transition: var(--tr);
}
.serv-icone { width: 50px; height: 50px; border-radius: 12px; background: var(--rouge); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; box-shadow: 0 8px 25px var(--rouge-glow); }
.serv-icone i { font-size: 22px; color: #fff; }
.serv-titre { font-family: var(--f1); font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.serv-desc { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s; opacity: 0; }
.serv-carte:hover .serv-desc { max-height: 80px; opacity: 1; }
.serv-lien { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f1); font-size: 13px; font-weight: 700; color: var(--rouge); margin-top: 15px; transition: gap .25s; }
.serv-carte:hover .serv-lien { gap: 12px; }

/* ══════════════════════════════════════
   THE GENIUS GRID (LOGICIELS, PLATEFORMES, FORMATIONS)
══════════════════════════════════════ */
.logiciels-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.plat-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Structure de la carte technologique */
.tech-card {
  background: var(--blanc);
  border-radius: 28px;
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.01);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  height: 100%;
}

/* Micro-grille de fond furtive inside la carte pour l'aspect mathématique/ingénieur */
.tech-card::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,0,0,0.008) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.008) 1px, transparent 1px);
  background-size: 16px 16px; pointer-events: none; z-index: 1;
}

.tech-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 0, 0, 0.2);
  box-shadow: 0 30px 60px rgba(204,0,0,0.06);
}

/* ── Le Canevas UI (Le chef-d'œuvre visuel) ── */
.tc-canvas {
  width: 100%;
  height: 170px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: #f4f4fa;
  margin-bottom: 24px;
  z-index: 2;
  border: 1px solid rgba(0,0,0,0.02);
}
.plat-grille .tc-canvas, .form-grille .tc-canvas { height: 220px; } /* Plus d'espace sur les grandes cartes */

/* Image de l'interface en arrière-plan du canevas */
.tc-ui-layer {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s;
}
.tech-card:hover .tc-ui-layer {
  transform: scale(0.96);
  filter: brightness(0.9) contrast(1.05);
}

/* Le composant flottant en verre (L'effet de génie) */
.tc-glass-widget {
  position: absolute;
  bottom: 15px; left: 15px; right: 15px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(12,12,24,0.06);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s;
  z-index: 3;
}
.tc-glass-widget i {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--rouge); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.widget-text { display: flex; flex-direction: column; }
.widget-text .w-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--txt2); }
.widget-text .w-status { font-size: 13px; font-weight: 800; color: var(--txt); }

/* Animation Parallaxe au survol */
.tech-card:hover .tc-glass-widget {
  transform: translateY(-5px) scale(1.02);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 0, 0, 0.15);
}

/* ── Contenu textuel sous le canevas ── */
.tc-meta {
  display: flex; flex-direction: column; flex-grow: 1; z-index: 2;
}
.tc-tag {
  align-self: flex-start; font-size: 10px; font-weight: 900;
  letter-spacing: 1px; text-transform: uppercase; color: var(--rouge);
  background: var(--rouge-soft); padding: 4px 10px; border-radius: 50px; margin-bottom: 12px;
}
.tc-titre {
  font-family: var(--f1); font-size: 18px; font-weight: 800;
  color: var(--txt); margin-bottom: 8px; line-height: 1.3;
  transition: color 0.3s ease;
}
.tech-card:hover .tc-titre { color: var(--rouge); }

.tc-desc { font-size: 13px; color: var(--txt2); line-height: 1.6; margin-bottom: 20px; flex-grow: 1; }

.tc-action {
  font-size: 13px; font-weight: 700; color: var(--txt);
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; transition: all 0.3s;
}
.tech-card:hover .tc-action { color: var(--rouge); transform: translateX(4px); }

/* ══════════════════════════════════════
   RÉALISATIONS CARDS (Inchangé)
══════════════════════════════════════ */
.real-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.real-carte { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 16px; padding: 28px; backdrop-filter: blur(12px); box-shadow: 0 4px 24px rgba(0,0,0,.07); transition: var(--tr); position: relative; overflow: hidden; }
.real-carte::before { content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--rouge); opacity: 0; transition: opacity .35s; }
.real-carte:hover { border-color: var(--rouge-border); transform: translateX(5px); box-shadow: 0 12px 40px rgba(0,0,0,.10); }
.real-carte:hover::before { opacity: 1; }
.real-pays { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--rouge); border: 1px solid var(--rouge-border); background: var(--rouge-soft); padding: 4px 12px; border-radius: 20px; margin-bottom: 14px; }
.real-t { font-family: var(--f1); font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 10px; line-height: 1.3; }
.real-d { font-size: 13px; color: var(--txt2); line-height: 1.65; }

/* Responsive global */
@media(max-width: 1200px) { .logiciels-grille { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 900px) { .plat-grille { grid-template-columns: 1fr; } .form-grille { grid-template-columns: 1fr; } }
@media(max-width: 640px) { .logiciels-grille { grid-template-columns: 1fr; } }