/* Grille & cartes carrées et élégantes */
.ai-tile {
  position: relative;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  aspect-ratio: 1 / 1;           /* carré parfait */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.16);
}

.ai-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12);
  color: #ddd;
}

/* Logo grande taille, bien centré */
.ai-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.08);
}

.ai-logo img {
  max-width: 200%;
  max-height: 200%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
  border-radius : 8px;
}

.ai-title {
  font-weight: 800;
  letter-spacing: .2px;
}

/* Couleurs d’accent par marque (subtil glow) */
.ai-tile[data-brand="openai"]:hover { box-shadow: 0 16px 40px rgba(16,163,127,.35); }
.ai-tile[data-brand="gemini"]:hover { box-shadow: 0 16px 40px rgba(66,133,244,.35); }
.ai-tile[data-brand="mistral"]:hover{ box-shadow: 0 16px 40px rgba(255,119,0,.32); }
.ai-tile[data-brand="claude"]:hover { box-shadow: 0 16px 40px rgba(186,104,200,.32); }

/* Petits écrans : on réduit un peu le logo */
@media (max-width: 575.98px) {
  .ai-logo { width: 96px; height: 96px; }
}

/* IA Home : ajustements */
.ai-title {
  font-weight: 900;
  font-size: 1.6rem; /* plus gros */
}

.ai-desc {
  font-size: 1rem;
  color: #aaa;
}

.ai-tile {
  border: 1px solid rgba(255,255,255,.15); /* bordure plus visible */
}
.ai-tile:hover {
  border-color: rgba(255,255,255,.3);
}

/* ===== IA Home: layout 2x2 sans scroll, titres/logos + gros, bordure visible ===== */

/* Grille compacte sur desktop */
.ai-grid { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }

/* Sur écrans ≥ 992px (desktop), force des cartes plus basses pour tenir sur 2 lignes */
@media (min-width: 992px) {
  .ai-tile {
    aspect-ratio: auto;               /* on libère la hauteur */
    height: clamp(180px, 24vh, 260px);/* 2 lignes + header sans scroll */
  }
}

/* Bordure bien visible (et qui se renforce au survol) */
.ai-tile {
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012));
}
.ai-tile:hover {
  border-color: rgba(255,255,255,.45);
}

/* Logos plus gros mais contenus dans la tuile compacte */
.ai-logo {
  width: clamp(88px, 9vh, 120px);
  height: clamp(88px, 9vh, 120px);
  margin-bottom: 12px;
  border: 1px dashed rgba(255,255,255,.14);
}
.ai-logo img { max-width: 85%; max-height: 85%; }

/* Titres plus présents */
.ai-title {
  font-weight: 900;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  letter-spacing: .2px;
  color: yellow;
}

/* Descriptions légèrement plus lisibles sans prendre trop de place */
.ai-desc { font-size: clamp(.95rem, 1.1vw, 1rem); color: #bdbdbd; }

/* En bonus: resserrer un peu l'en-tête pour gratter de la hauteur visible */
h1.fw-bold { margin-bottom: .5rem; }

/* Style des onglets IA */
.nav-tabs .nav-link {
  font-family: "Poppins", "Segoe UI", sans-serif; /* Police moderne et lisible */
  font-size: 1.1rem;          /* + grand que par défaut */
  font-weight: 600;           /* semi-bold pour mieux ressortir */
  color: #e5e7eb;             /* gris clair lisible sur fond sombre */
  background-color: #111827;  /* fond sombre chic */
  border: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: #fff;
  background-color: #1f2937; /* un peu plus clair au survol */
}

.nav-tabs .nav-link.active {
  color: #fff;
  background-color: #2563eb; /* bleu vif pour l’onglet actif */
  font-weight: 700;
  box-shadow: 0 -2px 8px rgba(37,99,235,0.4) inset;
}
