/* ==========================================================================
   Agylus.Tech — feuille de style partagée du portail
   (index.html, trigstage/privacy.html, trigstage/support.html).

   Design system du portail (bleu #5c84b3, Inter/JetBrains Mono, voir
   BRANDING.md du projet agylustech-dashboard) — distinct de l'identité
   propre à chaque produit (TrigStage a la sienne, voir trigstage.css).

   La page d'accueil (large, hero + panneaux) et les pages légales
   (colonne étroite de lecture) partagent la quasi-totalité de ce fichier.
   Les deux seules différences structurelles réelles (largeur de colonne,
   taille du H1 — hero géant vs. titre de page utilitaire) sont gérées par
   spécificité naturelle plutôt que dupliquées :
   - .wrap a une largeur par défaut (880px, celle du portail) ; les pages
     légales la resserrent via `body.site-legal .wrap`.
   - h1 a un style hero par défaut ; les pages légales le resserrent via
     `main.wrap h1`, plus spécifique donc prioritaire là où il s'applique.
   ========================================================================== */

:root {
  --ink: #070809;
  --surface: #12192a;
  --surface2: #1a2438;
  --line: #26314a;
  --paper: #f7f7f5;
  --dim: #8a95a8;
  --accent: #5c84b3;
  --accent-hover: #6f95c0;
  --ok: #5fa579;
  --warn: #d98a4a;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
/* Colonne resserrée pour les pages de lecture (privacy/support) — le
   portail garde le défaut de 880px ci-dessus. */
body.site-legal .wrap { max-width: 640px; }

/* ---------- nav ---------- */
nav.top { padding: 28px 0; border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brandmark {
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  letter-spacing: .06em; color: var(--paper);
}
/* Logo AGYLUS.TECH : "AGYLUS" en blanc, ".TECH" en bleu accent (comme
   l'artwork du logo, pas juste le point séparateur — retour utilisateur). */
.brandmark .tech { color: var(--accent); }

/* Sélecteur FR/EN en haut à droite partout sur le site (retour
   utilisateur : habitude des visiteurs). */
.lang-switch { display: flex; gap: 10px; font-size: 13px; font-family: var(--mono); }
.lang-switch button {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--dim);
}
.lang-switch button[aria-current="true"] { color: var(--paper); font-weight: 600; text-decoration: underline; }
.lang-switch button:hover { color: var(--paper); }

/* ---------- hero (page d'accueil du portail) ---------- */
/* padding-top/bottom seulement (pas le shorthand padding) : cet élément
   cumule les classes .hero ET .wrap — un shorthand ici écraserait le
   padding horizontal de .wrap (24px), collant le texte au bord de l'écran
   sur mobile (retour utilisateur, capture d'écran iPhone/Brave, 2026-08-02). */
.hero { padding-top: 72px; padding-bottom: 64px; }
/* Centrage à l'essai sur la page d'accueil (retour utilisateur, 2026-08-02
   : "on va tenter le centrage... au pire on reviendra en arrière"). Les
   pages légales (privacy/support) gardent l'alignement à gauche d'origine
   via les contre-overrides `main.wrap .eyebrow`/`main.wrap h1` plus bas. */
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 16px;
  text-align: center;
}
/* Titre hero par défaut (page d'accueil) ; resserré à 28px et remis à
   gauche sur les pages légales via `main.wrap h1` ci-dessous, plus
   spécifique. */
h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 auto 18px;
  max-width: 16ch;
  text-align: center;
}
.hero p.lede {
  font-size: 17px;
  color: var(--dim);
  max-width: 52ch;
  margin: 0 auto;
  text-align: center;
}

/* ---------- sections (page d'accueil du portail) ---------- */
/* Même piège que .hero ci-dessus : longhand uniquement, sinon le shorthand
   écrase le padding horizontal de .wrap sur cet élément qui cumule les
   deux classes. */
section.block { padding-bottom: 64px; }
section.block h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 auto 14px;
  max-width: 22ch;
  text-align: center;
}
section.block p.lede {
  font-size: 16px; color: var(--dim); max-width: 56ch; margin: 0 auto 28px;
  text-align: center;
}

/* ---------- TrigStage ecosystem panel (page d'accueil) ----------
   Carte centrée (icône, titre, description, lien) — même modèle que
   .app-card ci-dessous (retour utilisateur, 2026-08-02 : reprendre le
   rendu centré de la carte ChatCast pour toutes les cartes d'app). */
.eco-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px;
  display: flex;
  gap: 8px;
}
@media (max-width: 640px) { .eco-panel { flex-direction: column; } }
.eco-app {
  flex: 1;
  padding: 28px 24px;
  border-radius: 14px;
  transition: background .15s;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.eco-app:hover { background: var(--surface2); }
.eco-app img { width: 44px; height: 44px; border-radius: 12px; margin: 0 0 16px; }
.eco-app h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.eco-app p { margin: 0 0 16px; color: var(--dim); font-size: 14.5px; }
.eco-app a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 500;
}
.eco-app a:hover { color: var(--accent-hover); text-decoration: underline; }
.eco-divider {
  width: 1px; background: var(--line); flex: none; margin: 8px 0;
}
@media (max-width: 640px) { .eco-divider { width: auto; height: 1px; margin: 0 8px; } }

/* ---------- other projects (page d'accueil) ----------
   Carte centrée : icône, titre, badge "bientôt disponible" (si présent)
   sous le titre, description, liens — modèle repris tel quel pour
   .eco-app ci-dessus (retour utilisateur, 2026-08-02). */
.app-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
}
.app-card img { width: 56px; height: 56px; border-radius: 14px; margin: 0 0 16px; }
.app-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.app-card .badge-soon { margin: 0 0 14px; }
.app-card p { margin: 0 0 14px; color: var(--dim); font-size: 14.5px; }
.app-card .links { display: flex; gap: 18px; font-size: 13.5px; justify-content: center; }
.app-card .links a { color: var(--dim); text-decoration: none; }
.app-card .links a:hover { color: var(--paper); text-decoration: underline; }

.badge-soon {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .04em; color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: 999px; padding: 3px 10px;
}
.badge-soon .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--warn);
  box-shadow: 0 0 6px color-mix(in srgb, var(--warn) 70%, transparent);
}

/* ---------- footer (page d'accueil) ---------- */
footer { padding: 40px 0 56px; border-top: 1px solid var(--line); }
footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--dim);
}
footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------- pages légales (privacy / support) ----------
   Tout ce qui suit est scopé sous `main.wrap` : cette combinaison de
   balise+classe n'existe que sur les pages légales (le portail n'a pas de
   <main>), ce qui évite tout débordement de ces règles génériques
   (h1/h2/p/section/strong) sur la page d'accueil. */
main.wrap { padding: 56px 24px 72px; display: flex; flex-direction: column; gap: 28px; }
/* Contre-overrides : le centrage à l'essai sur la page d'accueil (voir
   .eyebrow/h1 plus haut) ne doit pas toucher les pages légales, qui gardent
   leur alignement à gauche d'origine. */
main.wrap .eyebrow { text-align: left; }
main.wrap h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 0; max-width: none; text-align: left; }
.updated { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
main.wrap section { display: flex; flex-direction: column; gap: 8px; }
main.wrap h2 { font-size: 16px; font-weight: 600; margin: 0; }
main.wrap p { margin: 0; color: var(--dim); }
main.wrap strong { color: var(--paper); }
a.contact { color: var(--accent); font-weight: 600; text-decoration: none; }
a.contact:hover, a.contact:focus-visible { text-decoration: underline; }
footer.page-footer { font-size: 13px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 20px; }
footer.page-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
footer.page-footer a:hover { color: var(--accent-hover); text-decoration: underline; }

[data-lang-content="en"] { display: none; }
