/* =========================================================
   AI4HEDGE — additions à la charte graphique AI4VIGIL
   Fichier: css/ai4hedge.css
   Ne redéfinit aucun token : réutilise :root de ai4vigil.css
   (--a4v-navy, --a4v-red, --a4v-border, --a4v-radius, --a4v-font…)
   À charger APRÈS wnco-core.css / wnco-header-legacy.css / ai4vigil.css
   ========================================================= */

/* Centrage .container si bootstrap.min.css n'est pas chargé
   (ex. prévisualisation autonome) — sans effet si bootstrap est présent */
.container{margin-left:auto;margin-right:auto;}

/* ---------------------------------------------------------
   Logo AI4HEDGE : icône (globe extrait du logo AI4VIGIL,
   img/logo_globe_icon.png) + mot-symbole, même gabarit
   typographique que « Ai4VIGIL » (A capitale, i bas-de-casse,
   4 rouge, reste en capitales) */
.a4v-brand img.a4h-brand-icon{
  width:44px;
  height:44px;
  flex:0 0 44px;
  object-fit:contain;
}
.a4h-word{
  font-family:var(--a4v-font);
  font-weight:500;
  font-size:1.3rem;
  letter-spacing:.01em;
  color:var(--a4v-navy);
  white-space:nowrap;
}
.a4h-word .four{color:var(--a4v-red);font-weight:600}

/* Wordmark blanc dans les blocs logo sombres (wnco-logo-col) */
.a4h-wordmark-light{
  font-family:var(--a4v-font);
  font-weight:800;
  font-size:1.5rem;
  color:#fff;
  letter-spacing:-.01em;
  text-align:center;
}

/* ---------------------------------------------------------
   HERO — planète noir/rouge en rotation (couverture globale)
   Vraie 3D : js/ai4hedge-globe.js ray-trace la sphère dans un
   fragment shader WebGL (compression réelle des contours au
   limbe, éclairage et liseré rouge calculés en 3D, glisser pour
   manipuler). Texture : img/globe_map.png (2:1, tuilable en x,
   océan noir bleutéré + contours rouge charte, graticule discret).
   Repli sans WebGL : .globe-map défile en CSS (bande de 400%,
   tuiles à 50%, translation -50% → 0 = exactement une tuile,
   boucle sans couture responsive). La classe .a4h-gl (posée par
   le JS en cas de succès) bascule canvas ↔ repli. */
.a4v-hero .logo-orb{
  width:min(440px,88%);
  margin:0 auto;
  background:transparent;
  padding:0;
  overflow:visible;
  box-shadow:none;
  animation:a4h-globe-float 7s ease-in-out infinite;
}
/* Sphère : fond sombre (visible sous le canvas, disque de repli
   CSS), liseré rouge + ombre portée + halo rouge — le rendu 3D
   et l'éclairage sont dans le shader. */
.a4v-hero .logo-orb .globe-sphere{
  position:absolute;
  inset:0;
  border-radius:50%;
  overflow:hidden;
  background:#050f1e;
  box-shadow:
    inset 0 0 0 1px rgba(237,28,36,.38),
    0 0 0 8px rgba(6,29,58,.04),
    0 26px 70px rgba(6,29,58,.22),
    0 0 90px rgba(237,28,36,.15);
}
/* Canvas WebGL : masqué tant que le JS n'a pas confirmé le
   contexte + la texture (classe .a4h-gl sur .logo-orb). */
.a4v-hero .globe-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:none;
  cursor:grab;
  touch-action:none;
}
.a4v-hero .logo-orb.a4h-gl .globe-canvas{display:block}
.a4v-hero .logo-orb.a4h-gl .globe-map{display:none}

/* Repli CSS (sans WebGL) : carte équirectangulaire défilante. */
.a4v-hero .globe-map{
  position:absolute;
  top:0;
  left:0;
  width:400%;
  height:100%;
  background-image:url("../img/globe_map.png");
  background-repeat:repeat-x;
  background-size:50% 100%;
  animation:a4h-globe-spin 46s linear infinite;
  will-change:transform;
}
/* Rotation vers l'est (sens réel) : la texture part décalée d'une
   tuile vers la gauche puis glisse vers la droite, en boucle. */
@keyframes a4h-globe-spin{from{transform:translateX(-50%)}to{transform:translateX(0)}}
@keyframes a4h-globe-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}

/* Accessibilité : planète figée si prefers-reduced-motion (le JS
   fait de même pour le rendu WebGL). */
@media (prefers-reduced-motion: reduce){
  .a4v-hero .logo-orb,
  .a4v-hero .globe-map{animation:none}
}

/* ---------------------------------------------------------
   HERO — caractéristiques du modèle sous le globe :
   même langage graphique que .stat-item (carte blanche,
   bordure, ombre douce) en version centrée. */
.globe-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:26px;
}
.globe-stat{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  padding:16px 12px;
  text-align:center;
  background:#fff;
  border:1px solid var(--a4v-border);
  border-radius:18px;
  box-shadow:0 12px 28px rgba(6,29,58,.07);
}
.globe-stat .gs-val{
  font-size:.98rem;
  font-weight:800;
  color:var(--a4v-navy);
  line-height:1.15;
}
.globe-stat:first-child .gs-val{color:var(--a4v-red)}
.globe-stat .gs-label{
  font-size:.72rem;
  font-weight:600;
  color:var(--a4v-muted);
  line-height:1.35;
}
@media (max-width:575px){
  .globe-stats{grid-template-columns:1fr}
}

/* Correctif : .team-initial hérite un flex-basis:58px de l'ancienne
   règle .team-initial (ligne ~158 d'ai4vigil.css, non ré-écrit par le
   correctif plus récent qui ne fixe que width/height) — l'avatar rendait
   ovale (58px de large réellement affiché pour 95px de haut). On force
   le flex-basis à la même valeur que width/height pour un cercle net. */
.team-initial{flex:0 0 95px}

/* Valeur non encore définie (placeholder explicite) */
.ph{
  color:var(--a4v-muted);
  border-bottom:1px dashed rgba(8,26,52,.3);
  font-style:italic;
}

/* ---------------------------------------------------------
   Callout / note de méthode (prudence scientifique) */
.a4h-callout{
  margin-top:30px;
  padding:24px 28px;
  display:flex;
  gap:18px;
  align-items:flex-start;
  border-radius:var(--a4v-radius-sm);
  background:rgba(237,28,36,.045);
  border:1px solid rgba(237,28,36,.22);
}
.a4h-callout-mark{
  flex:0 0 auto;
  padding:6px 11px;
  border-radius:999px;
  background:var(--a4v-red);
  color:#fff;
  font-size:.66rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}
.a4h-callout p{
  margin:0;
  color:var(--a4v-muted);
  font-size:.92rem;
  line-height:1.65;
  font-weight:500;
}
.a4h-callout p b{color:var(--a4v-navy)}

/* ---------------------------------------------------------
   Schéma d'assimilation (remplace ai4vigil_concept.png) */
.a4h-flow{display:flex;flex-direction:column;gap:0;width:100%;max-width:420px;margin:0 auto;}
.a4h-flow-node{
  padding:16px 18px;
  border:1px solid var(--a4v-border);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 20px rgba(6,29,58,.06);
}
.a4h-flow-node .k{
  display:block;
  margin-bottom:4px;
  font-size:.64rem;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--a4v-red);
}
.a4h-flow-node .v{font-size:.85rem;font-weight:600;color:var(--a4v-navy);line-height:1.45}
.a4h-flow-node.dest{border-color:rgba(237,28,36,.35);box-shadow:0 10px 26px rgba(237,28,36,.12)}
.a4h-flow-arrow{align-self:center;padding:8px 0;font-size:.72rem;font-weight:700;color:var(--a4v-muted)}

/* ===========================================================
   BENCHMARK — cartes modèles + tableau comparatif
   =========================================================== */
.bench-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:36px}
.bench-card{
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:26px;
  background:#fff;
  border:1px solid var(--a4v-border);
  border-radius:var(--a4v-radius-sm);
  box-shadow:0 18px 44px rgba(6,29,58,.08);
}
.bench-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.bench-name{font-size:1.1rem;font-weight:800;color:var(--a4v-navy);line-height:1.2}
.bench-org{margin-top:4px;font-size:.76rem;color:var(--a4v-muted);font-weight:600}
.bench-tag{
  flex:0 0 auto;
  padding:5px 10px;
  border-radius:999px;
  font-size:.6rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  background:rgba(6,29,58,.06);
  color:var(--a4v-navy);
  white-space:nowrap;
}
.bench-tag.live{background:rgba(237,28,36,.10);color:var(--a4v-red)}
.bench-desc{font-size:.85rem;line-height:1.6;color:var(--a4v-muted);font-weight:500}
.bench-facts{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--a4v-border)}
.bench-fact{display:flex;gap:10px;font-size:.78rem}
.bench-fact .k{flex:0 0 90px;font-size:.62rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--a4v-muted);padding-top:1px}
.bench-fact .v{color:var(--a4v-navy);font-weight:600;line-height:1.5}
.bench-diff{margin-top:auto;padding-top:14px;border-top:1px dashed rgba(6,29,58,.16);font-size:.78rem;color:var(--a4v-navy);font-weight:500;line-height:1.55}
.bench-diff b{color:var(--a4v-red)}
.bench-src{font-size:.68rem;color:var(--a4v-muted)}
.bench-src a{color:var(--a4v-navy);border-bottom:1px dotted rgba(6,29,58,.3)}
.bench-src a:hover{color:var(--a4v-red)}

.cmp-wrap{
  margin-top:34px;
  overflow-x:auto;
  background:#fff;
  border:1px solid var(--a4v-border);
  border-radius:var(--a4v-radius-sm);
  box-shadow:0 18px 44px rgba(6,29,58,.08);
}
table.cmp{width:100%;min-width:680px;border-collapse:collapse;font-size:.85rem}
table.cmp th{
  padding:14px 18px;
  text-align:left;
  font-size:.64rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--a4v-muted);
  background:rgba(6,29,58,.03);
  border-bottom:1px solid var(--a4v-border);
  white-space:nowrap;
}
table.cmp td{padding:16px 18px;border-bottom:1px solid var(--a4v-border);color:var(--a4v-muted);font-weight:500;vertical-align:top}
table.cmp tr:last-child td{border-bottom:0}
table.cmp td.model{color:var(--a4v-navy);font-weight:800}
table.cmp tr.us{background:rgba(237,28,36,.035)}
table.cmp tr.us td{color:var(--a4v-navy)}
table.cmp tr.us td.model{color:var(--a4v-red)}

@media (max-width:991px){
  .bench-grid{grid-template-columns:1fr}
}
