/* FUSION IA — application : encre de nuit, or mat, argent (même identité que le site). Mobile d'abord. */
:root {
  --encre: #070B16; --ardoise: #0F1628; --ardoise-2: #131C33; --filet: #22304D;
  --or: #D4A548; --or-clair: #E8C478; --argent: #A6B0C2; --blanc: #EDF1F7;
  --vert: #5FBF8F; --rouge: #E07B6A;
  --r: 16px; --r-petit: 12px;
  --bas: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--encre); color: var(--blanc);
  font-family: "Archivo", Arial, sans-serif; font-size: 15px; line-height: 1.5;
}
a { color: var(--or-clair); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 8px; }
.saut { position: absolute; left: -9999px; }
.saut:focus { left: 12px; top: 12px; z-index: 50; background: var(--or); color: var(--encre); padding: 8px 12px; }
[hidden] { display: none !important; }

/* Cadre : menu latéral sur ordinateur, barre en bas sur téléphone */
.cadre { display: flex; min-height: 100vh; min-height: 100dvh; }
.menu-lateral { display: none; }
.contenu { flex: 1; min-width: 0; padding: 16px 14px calc(92px + var(--bas)); max-width: 1120px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px; }
.barre-bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ardoise);
  border-top: 1px solid var(--filet); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: var(--bas); }
.barre-bas a { min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--argent); text-decoration: none; font-size: 11px; font-weight: 700; }
.barre-bas a[aria-current="page"] { color: var(--or-clair); font-weight: 800; }
.barre-bas svg, .liens-menu svg { width: 22px; height: 22px; }
.bouton svg { width: 20px; height: 20px; flex: 0 0 auto; }
.grille-2 { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

@media (min-width: 900px) {
  .barre-bas { display: none; }
  .menu-lateral { display: flex; flex-direction: column; gap: 26px; flex: 0 0 240px; background: var(--ardoise);
    border-right: 1px solid var(--filet); padding: 26px 16px; position: sticky; top: 0; height: 100vh; }
  .contenu { padding: 30px 36px 48px; gap: 20px; }
  .grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}
.marque { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; font-stretch: 115%; }
.marque b { color: var(--or-clair); }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--or); color: var(--encre); display: grid;
  place-items: center; font-weight: 800; }
.liens-menu { display: flex; flex-direction: column; gap: 4px; }
.liens-menu a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--argent); text-decoration: none; font-weight: 600; }
.liens-menu a[aria-current="page"] { background: var(--ardoise-2); color: var(--blanc); font-weight: 700; }
.carte-formule { margin-top: auto; background: var(--ardoise-2); border: 1px solid var(--filet); border-radius: 14px; padding: 14px; }

/* Éléments communs */
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; }
.surtitre { font-size: 12px; color: var(--argent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.15; font-weight: 800; font-stretch: 112%; }
h2 { margin: 0; font-size: 18px; font-weight: 800; font-stretch: 110%; }
h3 { margin: 0; font-size: 15px; font-weight: 800; }
p { margin: 0; }
.petit { font-size: 13px; color: var(--argent); }
.carte { background: var(--ardoise); border: 1px solid var(--filet); border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.carte.or { border-color: var(--or); }
.carte.vert { border-color: var(--vert); }
.carte.rouge { border-color: var(--rouge); }
.ligne { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { background: var(--ardoise); border: 1px solid var(--filet); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--argent); }
.puce b { color: var(--blanc); }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 800;
  background: var(--ardoise-2); color: var(--argent); white-space: nowrap; }
.badge.or { background: var(--or); color: var(--encre); }
.badge.vert { background: var(--vert); color: var(--encre); }
.badge.rouge { background: var(--rouge); color: var(--encre); }
.direct::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.chiffre small { display: block; font-size: 11px; color: var(--argent); font-weight: 800; letter-spacing: .05em; }
.chiffre strong { font-size: 22px; font-weight: 800; font-stretch: 110%; }
.hausse { color: var(--vert); } .baisse { color: var(--rouge); } .neutre { color: var(--argent); }
.tuile { background: var(--ardoise-2); border-radius: var(--r-petit); padding: 10px 12px; min-width: 0; }
.grille-devises { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.jauge { height: 6px; border-radius: 999px; background: var(--filet); margin-top: 6px; overflow: hidden; }
.jauge > span { display: block; height: 100%; border-radius: 999px; }
.liste { display: flex; flex-direction: column; gap: 8px; }
.element { background: var(--ardoise-2); border-radius: var(--r-petit); padding: 10px 12px; display: flex;
  justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; min-height: 44px; }

/* Boutons et formulaires */
.boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 999px; border: 0; background: var(--or); color: var(--encre); font-weight: 800; text-decoration: none;
  cursor: pointer; flex: 1 1 auto; }
.bouton.secondaire { background: transparent; border: 1px solid var(--or); color: var(--or-clair); font-weight: 700; }
.bouton.discret { background: transparent; border: 1px solid var(--filet); color: var(--blanc); font-weight: 600; min-height: 42px; font-size: 13px; flex: 0 1 auto; }
.bouton.vert { background: var(--vert); } .bouton.rouge-contour { background: transparent; border: 1px solid var(--rouge); color: var(--rouge); }
.bouton[disabled] { opacity: .55; cursor: wait; }
.choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choix button { min-height: 48px; border-radius: 12px; border: 2px solid var(--filet); background: transparent; font-weight: 800; cursor: pointer; }
.choix button[aria-pressed="true"].achat { border-color: var(--vert); background: var(--vert); color: var(--encre); }
.choix button[aria-pressed="true"].vente { border-color: var(--rouge); background: var(--rouge); color: var(--encre); }
label { font-size: 13px; font-weight: 700; color: var(--argent); }
input[type=text], select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--filet); background: var(--ardoise-2); font-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.envoi { display: flex; gap: 8px; }
.envoi input { flex: 1; min-width: 0; }
.envoi .bouton { flex: 0 0 52px; padding: 0; border-radius: 12px; }

/* Réponses du bot */
.reponse { background: var(--ardoise-2); border-radius: var(--r-petit); padding: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.reponse code { background: var(--encre); padding: 1px 6px; border-radius: 6px; color: var(--or-clair); }
.erreur { color: var(--rouge); }

/* Discussion IA */
.fil { display: flex; flex-direction: column; gap: 10px; }
.bulle { max-width: 88%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.bulle.moi { align-self: flex-end; background: var(--or); color: var(--encre); font-weight: 600; border-bottom-right-radius: 4px; }
.bulle.ia { align-self: flex-start; background: var(--ardoise); border: 1px solid var(--filet); border-bottom-left-radius: 4px; }
.saisie-ia { position: sticky; bottom: calc(70px + var(--bas)); background: var(--encre); padding-top: 8px; }
@media (min-width: 900px) { .saisie-ia { bottom: 0; padding-bottom: 12px; } }

/* États */
.chargement { display: flex; align-items: center; gap: 12px; padding: 40px 8px; color: var(--argent); }
.rond { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--filet); border-top-color: var(--or);
  animation: tourne 1s linear infinite; flex: 0 0 auto; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rond { animation: none; } }
.bandeau { background: var(--ardoise-2); border: 1px dashed var(--or); border-radius: var(--r-petit); padding: 10px 12px; font-size: 13px; color: var(--or-clair); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--bas)); z-index: 40;
  background: var(--blanc); color: var(--encre); font-weight: 700; padding: 10px 16px; border-radius: 12px; max-width: 92vw; }
.pied { font-size: 12px; color: var(--argent); border-top: 1px solid var(--filet); padding-top: 12px; }
