/* =========================================================
   xProTrading — style_next.css (FINAL)
   Rôle : couche propre AU-DESSUS du legacy (style.css)
   Règle : on n’édite jamais style.css
   ✅ Compatible avec ton theme.css (body.light-mode)
   ✅ Footer glass + Cookie modal glass (dark/light)
   ✅ Plus de doublons Cookie Modal
   ========================================================= */

/* =========================================================
   0) GLOBAL CONTAINER (APP) — cohérence partout
   ========================================================= */
:root{
  --container-max: 1400px;
  --container-pad: 16px;
  --container-pad-lg: 32px;
}

html, body{
  min-height: 100%;
}

/* ✅ Pages "app" : on évite le padding body qui casse le footer */
body.page-dashboard,
body.wallet-page,
body.page-account,
body.page-legal{
  padding: 0 !important;
}

/* Container principal (si présent) */
:root{
  --app-top-space: 50px;
}

.app{
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--app-top-space) var(--container-pad) 0;
  box-sizing: border-box;
}

@media (min-width: 1024px){
  :root{
    --app-top-space: 70px;
  }

  .app{
    padding-left: var(--container-pad-lg);
    padding-right: var(--container-pad-lg);
  }
}

/* Fallback si certaines pages n'utilisent pas .app */
main.container,
.wrap,
.aff-wrap,
.legal-topbar{
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  box-sizing: border-box;
}

/* Fallback si certaines pages n'utilisent pas .app */
main.container,
.wrap,
.aff-wrap,
.legal-topbar{
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  box-sizing: border-box;
}

/* =========================================================
   1) CALENDAR — étoile jour sélectionné
   ========================================================= */

/* Base (desktop + tablette) */
.page-dashboard .calendar-cell.selected-day::after{
  content: "★";
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 20;

  font-size: .9rem;
  font-weight: 700;

  color: #FFD54F;
  text-shadow:
    0 1px 2px rgba(0,0,0,.55),
    0 0 6px rgba(255,193,7,.55);

  pointer-events: none;

  /* reset total des anciens badges */
  background: none;
  border: 0;
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  filter: none;
  width: auto;
  height: auto;
  line-height: 1;
}

/* Parent sécurité */
.page-dashboard .calendar-cell{
  position: relative;
}


/* =========================================================
   2) MOBILE — téléphone portrait uniquement
   ========================================================= */

@media (max-width: 480px) and (orientation: portrait){
  .page-dashboard .calendar-cell.selected-day::after{
    top: 4px;
    right: 2px;
    font-size: .85rem;
  }
}


/* =========================================================
   3) INFO BUTTON (i) — stable & lisible (dark/light)
   ========================================================= */

.page-dashboard .info-row{
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.page-dashboard .info-btn{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.75);
  color: #111;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ✅ Dark mode = body:not(.light-mode) */
body:not(.light-mode) .page-dashboard .info-btn{
  background: rgba(0,0,0,.25);
  color: #fff;
  border-color: rgba(255,255,255,.18);
}


/* =========================================================
   4) INFO MODAL — base propre (dark/light)
   ========================================================= */

.page-dashboard .info-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.page-dashboard .info-modal.open{
  display: block;
}

.page-dashboard .info-modal-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.page-dashboard .info-modal-card{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);

  width: min(520px, calc(100vw - 28px));
  border-radius: 16px;

  background: rgba(255,255,255,.92);
  color: #0b1020;

  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
}

body:not(.light-mode) .page-dashboard .info-modal-card{
  background: #121418;
  color: #fff;
  border-color: rgba(255,255,255,.12);
}

.page-dashboard .info-modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

body:not(.light-mode) .page-dashboard .info-modal-head{
  border-bottom-color: rgba(255,255,255,.10);
}

.page-dashboard .info-modal-title{
  font-weight: 800;
}

.page-dashboard .info-modal-close{
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
}

.page-dashboard .info-modal-body{
  padding: 14px;
  font-size: 14px;
  line-height: 1.45;
  opacity: .95;
  white-space: pre-line;
}


/* =========================================================
   5) xProTrading — FOOTER PREMIUM
   ========================================================= */

.site-footer{
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 32px 0 26px;
  background: var(--surface-bg);
  border-top: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
}

/* Glow bleu subtil */
.site-footer::after{
  content:"";
  position:absolute;
  top:-70px;
  left:0;
  right:0;
  height:140px;

  background: radial-gradient(
    ellipse at center,
    rgba(66,165,245,.18),
    transparent 70%
  );

  pointer-events:none;
  opacity:.6;
}

/* ligne glow */
.site-footer::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(66,165,245,.7),
    transparent
  );

  opacity:.7;
}

/* =========================================================
   INNER LAYOUT
   ========================================================= */

.site-footer__inner{
  max-width: var(--container-max);
  margin: 0 auto;

  padding-left: var(--container-pad);
  padding-right: var(--container-pad);

  display:grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;

  align-items:start;
  box-sizing:border-box;
}

/* colonnes */
.site-footer__cols{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:40px;
}

/* =========================================================
   BRAND
   ========================================================= */

.site-footer__logo{
  display:flex;
  align-items:center;
  gap:10px;

  font-weight:800;
  text-decoration:none;
  color:inherit;
}

.site-footer__desc{
  margin:10px 0 14px;
  line-height:1.5;
  opacity:.82;
  max-width:420px;
}

/* =========================================================
   SOCIAL
   ========================================================= */

.site-footer__social{
  display:flex;
  gap:10px;
}

.footer-icon{
  width:40px;
  height:40px;
  border-radius:12px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  text-decoration:none;
  color:#229ED9;

  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);

  transition: all .2s ease;
}

.footer-icon:visited,
.footer-icon:active{
  color:#229ED9;
}

.footer-icon:hover{
  color:#38B6E8;
  transform: translateY(-2px);
  border-color: rgba(66,165,245,.6);
}

/* =========================================================
   TITLES
   ========================================================= */

.site-footer__title{
  font-weight:800;
  margin-bottom:10px;
  opacity:.95;
}

/* =========================================================
   LINKS
   ========================================================= */

.site-footer__col a{
  display:block;
  text-decoration:none;
  color:inherit;

  opacity:.78;
  padding:6px 0;

  transition: opacity .15s ease, transform .15s ease;
}

.site-footer__col a:hover{
  opacity:1;
  transform: translateX(2px);
}

/* =========================================================
   COOKIE BUTTON
   ========================================================= */

.footer-btn{
  width:100%;

  display:flex;
  align-items:center;
  gap:8px;

  padding:10px 12px;

  border-radius:14px;

  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);

  font-weight:700;
  cursor:pointer;

  color: inherit;

  transition: all .15s ease;
}

.footer-btn:hover{
  border-color: rgba(66,165,245,.6);
}

.footer-btn i{
  color: #42A5F5;
}

/* note */
.site-footer__note{
  margin-top:10px;
  font-size:.9em;
  opacity:.75;
  line-height:1.35;
}

/* =========================================================
   BOTTOM
   ========================================================= */

.site-footer__bottom{
  max-width: var(--container-max);
  margin: 22px auto 0;

  padding-top:16px;

  border-top:1px solid rgba(255,255,255,.08);

  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;

  font-size:.92em;
  opacity:.78;
}

.site-footer__bottom .sep{
  opacity:.5;
}

/* =========================================================
   LIGHT MODE
   ========================================================= */

body.light-mode .site-footer{
  background: rgba(255,255,255,.75);
  border-top:1px solid rgba(0,0,0,.08);
}

body.light-mode .footer-icon{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

body.light-mode .footer-btn{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

body.light-mode .site-footer__bottom{
  border-top:1px solid rgba(0,0,0,.08);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px){

  .site-footer__inner{
    grid-template-columns: 1fr;
    gap:28px;
  }

  .site-footer__cols{
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 520px){

  .site-footer__cols{
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   6) COOKIE MODAL — glass DARK/LIGHT (body.light-mode)
   ✅ (un seul bloc, pas de doublon)
   ========================================================= */

.cookie-modal.hidden{ display:none; }

.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;

  display:flex;
  align-items:flex-end; /* en bas style iOS */
  justify-content:center;
  padding: 18px;
}

.cookie-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}

/* Light mode => backdrop un peu moins sombre */
body.light-mode .cookie-backdrop{
  background: rgba(0,0,0,.35);
}

.cookie-card{
  position: relative;
  width: min(560px, 100%);
  border-radius: 18px;
  padding: 16px 16px 14px;

  /* ✅ utilise tes variables (theme.css) */
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  color: var(--text);

  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
}

.cookie-card h3{
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 900;
}

.cookie-card p{
  margin: 0 0 12px;
  opacity: .88;
  line-height: 1.45;
}

.cookie-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

/* Boutons safe si jamais .btn n'est pas stylé ici */
.cookie-actions .btn{
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
  color: inherit;

  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}

body.light-mode .cookie-actions .btn{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

/* Primary (Accepter) */
.cookie-actions .btn.primary{
  border-color: rgba(66,165,245,.55);
  background: rgba(66,165,245,.14);
}

/* Secondary (Refuser) */
.cookie-actions .btn.secondary{
  opacity: .92;
}

/* Lien "Personnaliser" */
.cookie-link{
  margin-left:auto;
  text-decoration:none;
  color: inherit;
  opacity: .85;
  padding-bottom: 2px;
  border-bottom: 1px dashed rgba(255,255,255,.35);
}

body.light-mode .cookie-link{
  border-bottom-color: rgba(0,0,0,.25);
}


/* =========================================================
   7) Anti “flash” au switch + patch iOS
   ========================================================= */

.app-bg,
.cookie-card,
.page-dashboard .info-modal-card,
.site-footer{
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

/* iOS / mobile: évite background-attachment fixed qui peut “bugger” */
@media (max-width: 1024px){
  .app-bg{ background-attachment: scroll; }
}






/* =========================
   Cookies preferences page
   ========================= */
.page-legal .cookie-prefs{
  max-width: 920px;
  margin: 24px auto 40px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(12px);
}

.cookie-prefs__head h1{
  margin: 0 0 8px;
  font-size: 1.6rem;
}
.cookie-prefs__lead{
  margin: 0 0 18px;
  opacity: .85;
  line-height: 1.45;
}

.cookie-prefs__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px){
  .cookie-prefs__grid{ grid-template-columns: 1fr; }
}

.cookie-cardx{
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,.04);
}
body.light-mode .cookie-cardx{
  background: rgba(0,0,0,.02);
}

.cookie-cardx__top{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.cookie-cardx__icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,.06);
  flex: 0 0 auto;
}
.cookie-cardx__icon i{ font-size: 20px; }

.cookie-cardx__meta{ flex: 1; }
.cookie-cardx__title{ font-weight: 800; margin-bottom: 4px; }
.cookie-cardx__desc{ opacity: .82; line-height: 1.35; font-size: .95rem; }

.cookie-cardx__list{
  margin: 12px 0 0;
  padding-left: 18px;
  opacity: .82;
  line-height: 1.5;
  font-size: .95rem;
}

.badge-on{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .85rem;
  border: 1px solid rgba(76,175,80,.45);
  background: rgba(76,175,80,.12);
}

/* Switch */
.switch{ position: relative; display:inline-block; width: 52px; height: 30px; }
.switch input{ opacity:0; width:0; height:0; }
.slider{
  position:absolute; cursor:pointer; inset:0;
  background: rgba(255,255,255,.12);
  border: 1px solid var(--surface-border);
  transition: .2s;
  border-radius: 999px;
}
.slider:before{
  content:"";
  position:absolute; height: 24px; width: 24px;
  left: 3px; top: 2px;
  background: rgba(255,255,255,.88);
  border-radius: 999px;
  transition: .2s;
}
body.light-mode .slider:before{ background: rgba(0,0,0,.75); }
.switch input:checked + .slider{
  background: rgba(66,165,245,.22);
  border-color: rgba(66,165,245,.45);
}
.switch input:checked + .slider:before{ transform: translateX(22px); }

.cookie-cardx__hint{
  margin-top: 10px;
  opacity: .78;
  font-size: .92rem;
  line-height: 1.35;
}

.cookie-prefs__actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 14px;
}
.cookie-prefs__actions .cookie-back{
  margin-left:auto;
  text-decoration:none;
  opacity: .85;
  color: inherit;
}

.cookie-prefs__status{
  margin-top: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: .18s;
  font-weight: 800;
}
.cookie-prefs__status.show{
  opacity: .9;
  transform: translateY(0);
}

/* ===== Legal topbar ===== */
.legal-topbar{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.legal-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color: var(--text);
  opacity:.85;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  background: var(--surface-bg);
  backdrop-filter: blur(12px);
}
.legal-back:hover{ opacity:1; }

.legal-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
  font-weight: 800;
  opacity:.9;
}

/* ===== Cookie prefs page ===== */
.cookie-prefs{
  max-width: 980px;
  margin: 20px auto 30px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(12px);
}

.cookie-prefs__head h1{ margin:0 0 8px; }
.cookie-prefs__lead{ margin:0; opacity:.85; line-height:1.5; }

.cookie-prefs__grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px){
  .cookie-prefs__grid{ grid-template-columns:1fr; }
}

.cookie-cardx{
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--surface-border);
}
body.light-mode .cookie-cardx{
  background: rgba(0,0,0,.03);
}

.cookie-cardx__top{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.cookie-cardx__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--surface-border);
  background: rgba(66,165,245,.12);
}
.cookie-cardx__title{ font-weight: 900; }
.cookie-cardx__desc{ opacity:.82; font-size:.92em; line-height:1.4; margin-top:4px; }
.cookie-cardx__switch{ margin-left:auto; }

.badge-on{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .85em;
  font-weight: 800;
  border: 1px solid rgba(76,175,80,.45);
  background: rgba(76,175,80,.12);
}

.cookie-cardx__list{
  margin: 12px 0 0;
  padding-left: 18px;
  opacity:.85;
  line-height:1.55;
}
.cookie-cardx__hint{
  margin-top: 10px;
  opacity:.82;
  font-size: .92em;
  line-height:1.45;
}

/* switch */
.switch{ position:relative; display:inline-block; width:46px; height:28px; }
.switch input{ display:none; }
.switch .slider{
  position:absolute; inset:0;
  border-radius:999px;
  background: rgba(255,255,255,.18);
  border: 1px solid var(--surface-border);
  cursor:pointer;
  transition: .15s ease;
}
.switch .slider:before{
  content:"";
  position:absolute;
  width:22px; height:22px;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  transition: .15s ease;
}
.switch input:checked + .slider{
  background: rgba(66,165,245,.22);
  border-color: rgba(66,165,245,.5);
}
.switch input:checked + .slider:before{
  transform: translate(18px,-50%);
}

/* actions */
.cookie-prefs__actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
}

.cookie-prefs__status{
  margin-top: 12px;
  opacity:0;
  transform: translateY(6px);
  transition: .18s ease;
  font-weight: 700;
}
.cookie-prefs__status.show{
  opacity:.9;
  transform: translateY(0);
}

/* =========================================================
   CALENDAR CELL — Multi icon + Amount centered + Caret lower
   (BLOC UNIQUE - à garder tout en bas du CSS)
   ========================================================= */

/* Base: cellule positionnable */
.page-dashboard .calendar-cell{
  position: relative;
}

/* ---------- (Optionnel) Zone icônes top-right (ex: échange) ---------- */
.page-dashboard .calendar-cell .exchange-icon{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  pointer-events: none;
}

/* ---------- Montant (contenteditable) : centré + place pour icône ---------- */
.page-dashboard .calendar-cell .calendar-amount.calendar-amount-editable{
  position: relative;
  width: 100%;
  text-align: center;

  /* place réservée à droite pour le bouton multi, et symétrie à gauche pour rester centré */
  padding-right: 36px;
  padding-left: 36px;

  /* ✅ descend légèrement texte + curseur (sans changer la hauteur des cases) */
  padding-top: 4px;      /* ajuste: 3 / 4 / 5 */
  line-height: 1.2;

  /* évite l’outline moche */
  outline: none;
}

/* ---------- Bouton multi (SVG) : ancré dans la zone montant ---------- */
/* IMPORTANT: on cible TON bouton existant .cal-star-btn.cal-multi-btn */
.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
  position: absolute;

  /* on l’ancre par rapport à la cellule (tu peux aussi l’ancrer à .calendar-amount si tu veux) */
  right: 8px;
  top: 50%;
  transform: translateY(-10%); /* ✅ descend un poil le bouton */
  z-index: 7;

  width: 28px;
  height: 28px;
  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);

  cursor: pointer;
  opacity: .75;
  transition: opacity .15s ease, transform .15s ease, border-color .15s ease;
}

.page-dashboard .calendar-cell:hover .cal-star-btn.cal-multi-btn{
  opacity: 1;
}

.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn:hover{
  transform: translateY(-18%); /* léger lift */
}

/* taille SVG - Par default : width: 16px; height: 16px; */
.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg{
  width: 25px;
  height: 25px;
  display: block;
}

/* Dark */
body:not(.light-mode) .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.88);
}

/* Light */
body.light-mode .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
  border-color: rgba(66,165,245,.35);
  background: rgba(66,165,245,.12);
  color: #1E88E5;
}

/* Si 2+ trades => plus “actif” (selon data-trades sur le bouton) */
.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn[data-trades]:not([data-trades="0"]):not([data-trades="1"]){
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(66,165,245,.35);
}

.multi-rows { display:flex; flex-direction:column; gap:10px; margin:12px 0; }

.multi-row{
  display:flex; gap:10px; align-items:center;
  padding:10px; border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.multi-row input{
  width: 140px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
}
.multi-row .multi-note{ flex:1; width:auto; }
.btn-icon{
  width:38px; height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff; cursor:pointer;
}

/* =========================================================
   MULTI DAY MODAL — overlay full-screen (FIX)
   ========================================================= */

#multiDayModal.xmodal{
  position: fixed;
  inset: 0;
  z-index: 100000;           /* au-dessus de tout */
  display: none;             /* caché par défaut */
  align-items: center;       /* centre vertical */
  justify-content: center;   /* centre horizontal */
  padding: 18px;
  background: rgba(0,0,0,.55);
}

/* ouvert */
#multiDayModal.xmodal.is-open{
  display: flex;
}

/* si aria-hidden=true => caché (prioritaire) */
#multiDayModal.xmodal[aria-hidden="true"]{
  display: none !important;
}

/* la "fenêtre" (mets cette classe sur le wrapper interne) */
#multiDayModal .xmodal-dialog{
  width: min(760px, 100%);
  max-height: min(82vh, 820px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(18,20,24,.98);
  color: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.65);
}

/* Light mode */
body.light-mode #multiDayModal.xmodal{
  background: rgba(0,0,0,.35);
}
body.light-mode #multiDayModal .xmodal-dialog{
  background: rgba(255,255,255,.96);
  color: #0b1020;
  border-color: rgba(0,0,0,.10);
}

/* bloque le scroll page quand modal open */
body.modal-open{
  overflow: hidden;
}

/* =========================
   ✅ Multi entries modal (xmodal) — MATCH HTML (overlay + card)
   ========================= */

/* Bloque le scroll page quand modal open */
body.modal-open{ overflow:hidden; }

/* base modal */
#multiDayModal.xmodal{
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;                /* fermé */
  align-items: center;          /* centre vertical */
  justify-content: center;      /* centre horizontal */
  padding: 18px;
}
#multiDayModal.xmodal.is-open{
  display: flex;
}

/* overlay */
#multiDayModal .xmodal-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}

/* card */
#multiDayModal .xmodal-card{
  position: relative;
  z-index: 1;

  width: min(860px, calc(100vw - 28px));
  max-height: min(78vh, 720px);

  border-radius: 22px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(16,18,24,.92);
  color: #fff;

  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  backdrop-filter: blur(14px);

  display: flex;
  flex-direction: column;
}

body.light-mode #multiDayModal .xmodal-card{
  background: rgba(255,255,255,.94);
  color: #0b1020;
  border-color: rgba(0,0,0,.10);
}

/* header */
#multiDayModal .xmodal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
body.light-mode #multiDayModal .xmodal-head{
  border-bottom-color: rgba(0,0,0,.08);
}

#multiDayModal .xmodal-title{
  font-weight: 900;
  font-size: 1.2rem;
}

/* close */
#multiDayModal .xmodal-close{
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  color: inherit;
}
body.light-mode #multiDayModal .xmodal-close{
  background: rgba(0,0,0,.06);
}

/* body */
#multiDayModal .xmodal-body{
  padding: 14px 16px 12px;
  overflow: auto;
}

/* meta */
#multiDayModal .xmodal-meta{
  font-weight: 800;
  opacity: .85;
  margin-bottom: 10px;
}

/* rows */
#multiDayModal .multi-rows{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin: 0 0 12px;
}

#multiDayModal .multi-row{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
body.light-mode #multiDayModal .multi-row{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
}

/* amount input */
#multiDayModal .multi-row input.m-amount{
  width: 160px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: inherit;
  outline: none;
}
body.light-mode #multiDayModal .multi-row input.m-amount{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
}

/* comment */
#multiDayModal .multi-row textarea.m-comment{
  flex:1;
  min-height: 40px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: inherit;
  outline: none;
}
body.light-mode #multiDayModal .multi-row textarea.m-comment{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
}

/* exchange label */
#multiDayModal .multi-row .mini-check{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  font-weight: 800;
  opacity: .95;
}

/* trash */
#multiDayModal .multi-row .trash-btn{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: inherit;
  cursor:pointer;
}
body.light-mode #multiDayModal .multi-row .trash-btn{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
}

/* add row button */
#multiDayModal #multiAddRowBtn.btn-small{
  margin-top: 6px;
  width: 100%;
  justify-content: center;
  border-radius: 14px;
}

/* footer */
#multiDayModal .xmodal-foot{
  margin-top: auto;
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}
body.light-mode #multiDayModal .xmodal-foot{
  border-top-color: rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
}

/* mobile */
@media (max-width: 560px){
  #multiDayModal .xmodal-card{ width: min(720px, calc(100vw - 18px)); }
  #multiDayModal .multi-row{ flex-wrap: wrap; }
  #multiDayModal .multi-row input.m-amount{ width: 100%; }
}

/* =========================
   Multi modal — checkbox "Échange" spacing FIX
   ========================= */

#multiDayModal .mini-check{
  display: inline-flex;
  align-items: center;
  gap: 10px;                 /* 👈 espace entre checkbox et texte */
  padding-left: 4px;         /* 👈 respiration visuelle */
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

/* checkbox elle-même */
#multiDayModal .mini-check input[type="checkbox"]{
  margin: 0;                 /* supprime le margin HTML par défaut */
  width: 18px;
  height: 18px;
  accent-color: #42A5F5;     /* bleu xProTrading */
  cursor: pointer;
}

/* texte "Échange" */
#multiDayModal .mini-check span,
#multiDayModal .mini-check label{
  opacity: .9;
}

/* light mode */
body.light-mode #multiDayModal .mini-check{
  color: #0b1020;
}

/* =========================================================
   Mobile portrait — icône multi sans contour glass
   ========================================================= */

@media (max-width: 480px) and (orientation: portrait){

  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
    border: 0 !important;          /* ❌ plus de contour */
    background: transparent !important; /* ❌ plus de glass */
    backdrop-filter: none !important;
    box-shadow: none !important;

    width: 26px;                   /* un poil plus compact */
    height: 26px;
    padding: 0;
  }

  /* garde l’icône bien lisible */
  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg{
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
  }
}

/* =========================================================
   Mobile portrait — icône multi sans glass + décalée à droite
   ========================================================= */

@media (max-width: 480px) and (orientation: portrait){

  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;

    width: 26px;
    height: 26px;
    padding: 0;

    /* ✅ décalage vers la droite */
    right: 2px;                 /* ajuste : 0 / 2 / 4 selon ton goût */
  }

  /* garde l’icône bien lisible */
  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg{
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
  }
}

/* =========================================================
   Mobile portrait — icône multi remontée vers le haut
   ========================================================= */

@media (max-width: 480px) and (orientation: portrait){

  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;

    width: 26px;
    height: 26px;
    padding: 0;

    right: -4px;          /* déjà OK */
    top: 12px;            /* ✅ REMONTE vers le haut */
    transform: none;     /* IMPORTANT : annule le translateY desktop */
  }

  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg{
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
  }
}

/* =========================
   FOOTER — Utiliser l’espace à droite (mobile portrait)
   ========================= */
@media (max-width: 480px) and (orientation: portrait){

  /* Footer plein écran utile */
  .site-footer{
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Inner : enlève la sensation de colonne étroite */
  .site-footer__inner{
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  /* Colonnes footer : vraie largeur */
  .site-footer__cols{
    width: 100%;
    grid-template-columns: 1fr 1fr; /* 👈 2 colonnes au lieu d’une */
    column-gap: 16px;
    row-gap: 14px;
  }

  /* Préférences en pleine largeur */
  .site-footer__col--prefs{
    grid-column: 1 / -1; /* 👈 prend toute la largeur */
  }

  /* Bouton cookies bien aligné */
  .footer-btn{
    width: 100%;
  }
}

/* ✅ DESKTOP ONLY — décale l’icône échange pour ne pas toucher l’étoile */
@media (min-width: 769px){
  .page-dashboard .calendar-cell .exchange-icon{
    right: 25px !important;   /* ajuste: 40–60 */
    top: 8px !important;
    left: auto !important;
    transform: none !important;
    z-index: 19 !important;   /* sous l’étoile (20) mais visible */
    pointer-events: none;
  }
}

/* ✅ CALENDAR — afficher le montant COMPLET (pas de "…") */
.page-dashboard .calendar-cell .calendar-amount{
  white-space: normal !important;   /* autorise retour à la ligne */
  overflow: visible !important;     /* pas de coupe */
  text-overflow: clip !important;   /* pas de "…" */
}

/* (optionnel) si tu veux éviter que ça déborde trop : 2 lignes max */
.page-dashboard .calendar-cell .calendar-amount{
  display: -webkit-box;
  -webkit-line-clamp: 2;            /* 2 lignes max */
  -webkit-box-orient: vertical;
  overflow: hidden !important;      /* coupe sans "…" */
  text-overflow: clip !important;
}

/* =========================================================
   CALENDAR — Montant toujours sur UNE ligne (sans …)
   ========================================================= */

.page-dashboard .calendar-cell .calendar-amount{
  white-space: nowrap !important;   /* ❌ pas de retour ligne */
  overflow: hidden !important;      /* évite débordement */
  text-overflow: clip !important;   /* ❌ pas de … */
  line-height: 1.1;
}

/* 🔽 Ajustement auto visuel pour gros montants */
.page-dashboard .calendar-cell .calendar-amount{
  font-size: clamp(0.85rem, 1.8vw, 1rem);
}

/* =========================================================
   FIX sparkline : départ au CENTRE (vert->droite, rouge->gauche)
   ========================================================= */

.page-dashboard .calendar-cell{
  position: relative;
}

/* base spark */
.page-dashboard .calendar-cell .calendar-sparkline{
  position: absolute !important;
  bottom: 10px !important;               /* ajuste si besoin */
  height: 6px !important;
  border-radius: 999px !important;
  pointer-events: none !important;

  /* ✅ largeur = ta variable */
  width: var(--spark, 20%) !important;
}

/* ✅ POSITIF : ancré sur le centre côté gauche -> pousse à droite */
.page-dashboard .calendar-cell.day-positive .calendar-sparkline{
  left: 50% !important;
  right: auto !important;
  transform: none !important;
}

/* ✅ NÉGATIF : ancré sur le centre côté droit -> pousse à gauche */
.page-dashboard .calendar-cell.day-negative .calendar-sparkline{
  right: 50% !important;
  left: auto !important;
  transform: none !important;
}

.icon-broker-fee{
  width: 40px;
  height: 40px;
  margin-right: 1px;
  opacity: .95;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));

  position: relative;
  top: -7px; /* monte le logo (augmente à -14 / -18 si besoin) */
}

.tag-fee{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .82em;
  border: 1px solid rgba(255,193,7,.45);
  background: rgba(255,193,7,.10);
}

/* =========================================================
   TEL PAYSAGE — centrer UNIQUEMENT le texte du montant
   (caret + chiffres, sans bouger la case)
   ========================================================= */
@media (max-width: 1024px) and (orientation: landscape){

  .page-dashboard .calendar-grid .calendar-cell
  > .calendar-amount.calendar-amount-editable[contenteditable="true"]{

    /* ❌ on tue le flex (CAUSE DU BUG iOS) */
    display: block !important;

    /* ✅ vrai centrage TEXTE */
    text-align: center !important;

    /* ❌ aucun padding qui fausse le centre */
    padding-left: 0 !important;
    padding-right: 0 !important;

    /* stabilité caret */
    white-space: nowrap !important;
  }
}

/* =========================================================
   DESKTOP — gros montants : centrage VISUEL stable
   (clip des 2 côtés) + garde place bouton multi
   ========================================================= */
@media (min-width: 1025px){

  .page-dashboard .calendar-cell .calendar-amount.calendar-amount-editable{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding-left: 36px !important;
    padding-right: 36px !important;

    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;

    min-width: 0 !important;
  }
}

/* =========================================================
   JOUR / TABLEAU — alignement Frais broker + texte
   ========================================================= */

/* le badge Frais broker */
.page-dashboard .tag-fee{
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;

  padding: 6px 12px;
  line-height: 1;
}

/* icône dans le badge */
.page-dashboard .tag-fee .icon-broker-fee{
  width: 28px;
  height: 28px;

  position: static !important;   /* annule top:-7px global */
  transform: translateY(0) !important;
}

/* texte "Frais broker" */
.page-dashboard .tag-fee span,
.page-dashboard .tag-fee{
  font-weight: 700;
  white-space: nowrap;
}

/* si tu as un texte ou statut après (ex: ok) */
.page-dashboard .planning-table td{
  vertical-align: middle;
}

/* =========================================================
   PLANNING TABLE — NOTE = 👁 ONLY (FINAL)
   ========================================================= */

.page-dashboard .planning-table{
  width: 100%;
  table-layout: fixed; /* 🔒 empêche toute colonne de bouger */
}

/* Largeurs propres et équilibrées */
.page-dashboard .planning-table th:nth-child(1),
.page-dashboard .planning-table td:nth-child(1){ width: 18%; }  /* Date */

.page-dashboard .planning-table th:nth-child(2),
.page-dashboard .planning-table td:nth-child(2){ width: 18%; }  /* Résultat */

.page-dashboard .planning-table th:nth-child(3),
.page-dashboard .planning-table td:nth-child(3){
  width: 12%; 
  text-align: center;             /* 👁 centré */
}

.page-dashboard .planning-table th:nth-child(4),
.page-dashboard .planning-table td:nth-child(4){ width: 52%; }  /* Actions */

/* Bouton œil */
.page-dashboard .note-open-btn{
  width: 36px;
  height: 36px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: inherit;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: all .15s ease;
}

.page-dashboard .note-open-btn:hover{
  transform: scale(1.06);
  opacity: 1;
}

/* Light mode */
body.light-mode .page-dashboard .note-open-btn{
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.05);
}

/* =========================================================
   NOTE MODAL — lecture complète
   ========================================================= */

#noteModal{
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: none;
}

#noteModal.is-open{
  display: block;
}

#noteModal .xmodal-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}

#noteModal .xmodal-card{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);

  width: min(620px, calc(100vw - 28px));
  max-height: min(80vh, 720px);

  border-radius: 18px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(16,18,24,.96);
  color: #fff;

  box-shadow: 0 22px 70px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
}

body.light-mode #noteModal .xmodal-card{
  background: rgba(255,255,255,.96);
  color: #0b1020;
  border-color: rgba(0,0,0,.10);
}

#noteModal .xmodal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

body.light-mode #noteModal .xmodal-head{
  border-bottom-color: rgba(0,0,0,.08);
}

#noteModal .xmodal-title{
  font-weight: 900;
  font-size: 1.1rem;
}

#noteModal .xmodal-close{
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  color: inherit;
}

body.light-mode #noteModal .xmodal-close{
  background: rgba(0,0,0,.06);
}

#noteModal .xmodal-body{
  padding: 16px;
  overflow: auto;
  line-height: 1.6;
  white-space: pre-line;
  word-break: break-word;
  font-size: 0.95rem;
}

#noteModal .xmodal-foot{
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body.light-mode #noteModal .xmodal-foot{
  border-top-color: rgba(0,0,0,.08);
}

/* =========================================================
   MOBILE PORTRAIT — stabilité totale
   ========================================================= */

@media (max-width: 480px){

  .page-dashboard .planning-table th:nth-child(1),
  .page-dashboard .planning-table td:nth-child(1){ width: 25%; }

  .page-dashboard .planning-table th:nth-child(2),
  .page-dashboard .planning-table td:nth-child(2){ width: 25%; }

  .page-dashboard .planning-table th:nth-child(3),
  .page-dashboard .planning-table td:nth-child(3){ width: 15%; }

  .page-dashboard .planning-table th:nth-child(4),
  .page-dashboard .planning-table td:nth-child(4){ width: 35%; }

}


/* =========================
   APP FOOTER (dashboard/legal)
========================= */
.app-footer{
  margin-top: 28px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
}

body.light-mode .app-footer{
  border-top: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.55);
}

.app-footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.app-footer__left{
  display:flex;
  align-items:center;
  gap:10px;
  opacity:.9;
}

.app-footer__brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color:inherit;
  font-weight:600;
}

.app-footer__links{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.app-footer__links a{
  text-decoration:none;
  opacity:.85;
}

.app-footer__links a:hover{ opacity:1; }

.app-footer__sep{ opacity:.4; }

.app-footer__btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: inherit;
  cursor:pointer;
}

body.light-mode .app-footer__btn{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}


.xmodal-title{
  display:flex;
  align-items:center;
  gap:10px;
}

.xicon-title svg{
  width:22px;
  height:22px;
  display:block;
}

.xicon-title{
  color: var(--accent, #42A5F5);
  opacity:.95;
}

/* Overlay tour */
#tourOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9998;
}

/* Bulle au-dessus de tout */
#tourBubble{
  position: fixed;
  z-index: 10001;
}

/* ✅ Highlight AU-DESSUS de l’overlay */
.tour-highlight{
  position: relative !important;   /* important: permet z-index */
  z-index: 10000 !important;
  box-shadow: 0 0 0 3px rgba(66,165,245,.95), 0 18px 60px rgba(0,0,0,.65) !important;
  border-radius: 18px; /* adapte */
}

/* Optionnel: évite que des parents "clippent" le highlight */
.tour-highlight{
  isolation: isolate;
}

.tour-highlight{
  animation: tourPulse 1.8s ease-in-out infinite alternate;
}

@keyframes tourPulse{
  from{
    box-shadow:
      0 0 0 3px rgba(66,165,245,.95),
      0 18px 60px rgba(0,0,0,.65);
  }
  to{
    box-shadow:
      0 0 0 6px rgba(66,165,245,.65),
      0 22px 70px rgba(0,0,0,.75);
  }
}

.page-container {
  padding: 24px;
}

.page-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:24px;
  flex-wrap:wrap;
  gap:12px;
}

.page-title {
  font-size:24px;
  font-weight:700;
}

.page-subtitle {
  opacity:.6;
  margin-top:4px;
}

.badge-group {
  display:flex;
  gap:8px;
}

.badge {
  padding:6px 12px;
  border-radius:20px;
  background:var(--card-bg);
  font-size:12px;
}

.grid-2 {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

@media(max-width:900px){
  .grid-2{
    grid-template-columns:1fr;
  }
}

.card-elevated {
  padding:20px;
  border-radius:18px;
}

.stats-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:16px;
}

.stat-box {
  background:var(--card-bg);
  padding:14px;
  border-radius:14px;
}

.stat-box span {
  display:block;
  font-size:13px;
  opacity:.6;
}

.stat-box strong {
  font-size:18px;
  margin-top:4px;
  display:block;
}

.positive strong { color:#3ddc84; }
.negative strong { color:#ff5c5c; }
.warning strong { color:#ffb84d; }

.net-after {
  margin-top:16px;
  font-weight:600;
}

.premium-card {
  margin-top:24px;
  padding:20px;
  border:1px dashed rgba(255,255,255,.15);
  border-radius:18px;
  opacity:.85;
}

.fade-in {
  animation:fadeIn .4s ease;
}

@keyframes fadeIn {
  from {opacity:0; transform:translateY(10px);}
  to {opacity:1; transform:translateY(0);}
}

/* =========================
   TAX CALLOUT (xProTrading)
   ========================= */
.tax-callout{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(66,165,245,.08);
  border: 1px solid rgba(66,165,245,.20);
}

.tax-callout-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}

.tax-callout-row + .tax-callout-row{
  margin-top: 8px;
}

.tax-callout-label{
  opacity: .85;
  font-size: 14px;
}

.tax-callout-value{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .2px;
}

.tax-callout-value--warn{
  color: #ffcc66;
}

.tax-callout-help{
  margin-top: 10px;
  opacity: .78;
  font-size: 12.5px;
  line-height: 1.45;
}

.tax-callout-help strong{
  opacity: 1;
}

.tax-callout-muted{
  margin-top: 10px;
  opacity: .6;
  font-size: 12.5px;
}

/* =========================================================
   FIX — boutons soulignés (a.btn-small)
   Cause: styles globaux sur <a> (text-decoration: underline)
   ========================================================= */
a.btn-small,
.btn-small{
  text-decoration: none !important;
}

a.btn-small:hover,
a.btn-small:focus,
a.btn-small:active{
  text-decoration: none !important;
  outline: none;
}


a.btn-small{
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   TABS — Fix mobile portrait (5 onglets)
   ========================================================= */
@media (max-width: 520px) and (orientation: portrait){

  .page-dashboard .tabs{
    gap: 6px !important;
    padding: 6px !important;
    border-radius: 999px;
    overflow: hidden; /* ok */
  }

  .page-dashboard .tab{
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 8px !important;
    justify-content: center;
    gap: 0 !important;
  }

  /* ✅ icônes only */
  .page-dashboard .tab-label{
    display: none !important;
  }

  .page-dashboard .tab-icon{
    font-size: 1.25em !important;
    line-height: 1;
  }

  /* active: on évite le scale qui peut re-déborder */
  .page-dashboard .tab.active{
    transform: none !important;
  }

  /* slider reste ok */
  .page-dashboard .tabs-slider{
    bottom: 4px;
    height: 3px;
  }
}

@media (max-width: 520px) and (orientation: portrait){

  .page-dashboard .tab.active{
    justify-content: flex-start;
    gap: 8px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .page-dashboard .tab.active .tab-label{
    display: inline !important;
    font-size: .72em !important;
    white-space: nowrap;
    opacity: .95;
  }
}

/* ✅ Badge exchange universel */
.x-exchange-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:34px;
  height:34px;
  margin-left:10px;

  border-radius:999px;
  background:rgba(255,193,7,.10);
  border:1px solid rgba(255,193,7,.45);

  vertical-align:middle;
}

.x-exchange-badge--cal{
  position:absolute;
  top:8px;
  right:8px;
  margin-left:0;
  width:30px;
  height:30px;
  z-index:6;
}

.x-exchange-svg{
  width:22px;
  height:22px;
  stroke:#FFC107;
  stroke-width:2.2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter: drop-shadow(0 0 6px rgba(255,193,7,.35));
}

/* ✅ Weekcal (wrap avec montant) */
.week-exchange-wrap{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,193,7,.10);
  border:1px solid rgba(255,193,7,.45);
}
.week-exchange-amt{
  font-weight:800;
  font-size:.85rem;
  color:#FFD54F;
  white-space:nowrap;
}

/* Mobile */
@media (max-width:480px){
  .x-exchange-badge{ width:28px; height:28px; }
  .x-exchange-svg{ width:18px; height:18px; }
  .x-exchange-badge--cal{ width:26px; height:26px; }
}

/* TEL PAYSAGE — réduire le badge exchange */
@media (max-width: 1024px) and (orientation: landscape){
  .page-dashboard .x-exchange-badge--cal{
    width: 15px !important;
    height: 15px !important;
    top: 10px !important;
    right: 50px !important;
  }
  .page-dashboard .x-exchange-svg{
    width: 16px !important;
    height: 16px !important;
  }
}

/* WEEKCAL — aucun doublon possible (SVG inline) */
.page-dashboard .week-exchange-wrap{
  align-items: center !important;
}

/* WEEKCAL — ajuster la hauteur de l’icône si besoin */
.page-dashboard .week-exchange-wrap .x-exchange-svg{
  transform: translateY(0px) !important; /* -1 si tu veux remonter */
}

/* =========================================================
   Mobile portrait — réduire l’icône échange (nouveau système)
   ========================================================= */
@media (max-width: 480px) and (orientation: portrait){

  .page-dashboard .calendar-cell .x-exchange-badge--cal{
    top: 6px;
    right: 17px;
    width: 10px;
    height: 10px;
  }

  .page-dashboard .calendar-cell .x-exchange-svg{
    width: 14px;
    height: 14px;
  }

}

/* =========================================================
   Mobile / tactile en PAYSAGE — multi icon SANS glass (robuste)
   ========================================================= */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-width: 1024px){

  body.page-dashboard .calendar-cell button.cal-star-btn.cal-multi-btn{
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    box-shadow: none !important;
    outline: none !important;

    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;

    /* si ton CSS force une position */
    position: absolute !important;
    right: 4px !important;
    top: 20px !important;
  }

  body.page-dashboard .calendar-cell button.cal-star-btn.cal-multi-btn::before,
  body.page-dashboard .calendar-cell button.cal-star-btn.cal-multi-btn::after{
    content: none !important;
    display: none !important;
  }

  body.page-dashboard .calendar-cell button.cal-star-btn.cal-multi-btn .xicon,
  body.page-dashboard .calendar-cell button.cal-star-btn.cal-multi-btn .xicon svg{
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)) !important;
  }

  body.page-dashboard .calendar-cell button.cal-star-btn.cal-multi-btn .xicon svg{
    width: 18px !important;
    height: 18px !important;
  }
}

/* =========================================================
   Desktop uniquement — déplacer icône échange vers la gauche
   ========================================================= */
@media (min-width: 1025px){

  .page-dashboard .calendar-cell .x-exchange-badge--cal{
    right: auto !important;   /* annule position droite */
    left: 30px !important;     /* position gauche */
    width: 20px !important;
    height: 20px !important;
    top: 5px !important;
  }

}

/* =========================================================
   Desktop — remonter bouton multi
   ========================================================= */
@media (min-width: 1025px){

  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
    top: 12px !important;   /* ajuste : -4 / -6 / -8 selon ton goût */
    right: 25px;
  }

}

/* =========================================================
   Desktop — bouton multi SANS glass
   ========================================================= */
@media (min-width: 1025px){

  .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
    background: transparent !important;
    background-image: none !important;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    border: 0 !important;
    box-shadow: none !important;
  }

}

/* =========================================================
   MULTI ICON — FORCE COLOR via FILTER (works even with inline colors)
   ========================================================= */
@media (min-width: 1025px){

  /* DARK => bleu clair */
  body:not(.light-mode) .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg{
    filter: brightness(1.35) saturate(2.2) hue-rotate(170deg) drop-shadow(0 0 6px rgba(79,195,247,.55)) !important;
  }

  /* LIGHT => bleu plus “profond” */
  body.light-mode .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg{
    filter: brightness(.9) saturate(2.3) hue-rotate(195deg) !important;
  }
}

/* =========================================================
   MULTI ICON — FORCE recolor (SVG stroke/fill) via currentColor
   ========================================================= */

/* 1) le SVG prend la couleur CSS */
.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
  color: #4FC3F7; /* par défaut (dark) */
}

/* 2) FORCE: toutes les formes utilisent currentColor */
.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg,
.page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn .xicon svg *{
  stroke: currentColor !important;
  fill: none !important;            /* la plupart des icônes sont en stroke */
  stroke-width: 2.2 !important;
}

/* 3) Light = bleu plus foncé */
body.light-mode .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
  color: #1976D2 !important;
}

/* 4) Dark = bleu clair + glow */
body:not(.light-mode) .page-dashboard .calendar-cell .cal-star-btn.cal-multi-btn{
  color: #4FC3F7 !important;
  filter: drop-shadow(0 0 6px rgba(79,195,247,.55));
}

.planning-tip-multi{
  opacity:.75;
  font-size:.85em;
  margin: 6px 0 12px 3px;
}

@media (hover: none) and (pointer: coarse){
  .planning-tip-multi{ display:none; }
}

/* Hide old multi icon (now replaced by double-click) */
.cal-multi-btn {
  display: none !important;
}

/* =========================
   TAX TAB — dashboard style
   ========================= */

.tax-card { padding: 16px; }

.tax-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.tax-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  color:#42A5F5;
}

.tax-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.tax-field span{
  display:block;
  font-size:.82em;
  opacity:.75;
  margin-bottom:6px;
}

.tax-field select{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:inherit;
  min-width:140px;
}

.tax-radios{
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
}

.tax-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(210px, 1fr));
  gap:12px;
}

@media (max-width: 900px){
  .tax-grid{ grid-template-columns:repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 520px){
  .tax-grid{ grid-template-columns:1fr; }
}

.tax-metric{
  padding:14px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.tax-k{ font-size:.9em; opacity:.75; margin-bottom:6px; }
.tax-v{ font-size:1.5em; font-weight:800; line-height:1.1; }
.tax-sub{ margin-top:8px; font-size:.9em; opacity:.8; }

.tax-note{ margin-top:14px; opacity:.85; }

/* =========================
   Chart Empty State (design)
   ========================= */
.chart-empty-state{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;

  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.10);

  height: 100%;
}

body.light-mode .chart-empty-state{
  background: rgba(255,255,255,0.75);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.06);
}

.chart-empty-state .empty-icon{ font-size:42px; margin-bottom:8px; }
.chart-empty-state h3{ margin:6px 0 8px; font-size:20px; color:rgba(255,255,255,.92); }
body.light-mode .chart-empty-state h3{ color:rgba(0,0,0,.80); }
.chart-empty-state p{ margin:0; max-width:520px; font-size:14px; line-height:1.45; color:rgba(255,255,255,.72); }
body.light-mode .chart-empty-state p{ color:rgba(0,0,0,.65); }
.chart-empty-state .btn-primary{ margin-top:14px; padding:10px 16px; border-radius:12px; background:#42A5F5; color:#fff; text-decoration:none; font-weight:700; transition:transform .15s ease, opacity .2s ease; }
.chart-empty-state .btn-primary:hover{ opacity:.95; transform:translateY(-1px); }
.chart-empty-state .empty-hint{ margin-top:10px; font-size:12px; opacity:.75; }

/* =========================
   Chart container sizing (1 source)
   ========================= */
.page-dashboard{
  --chart-height: 550px; /* ajuste ici */
}

.page-dashboard .right.chart-container{
  height: var(--chart-height);
  min-height: var(--chart-height);
}

.page-dashboard .right.chart-container .chart-empty-state{
  min-height: 0 !important;
  height: 100% !important;
}

.page-dashboard #chart{
  width: 100%;
  height: var(--chart-height) !important;
  max-height: 100%;
  box-shadow: 0 0 25px rgba(66,165,245,.6);
  border-radius: 12px;
  background: rgba(0,0,0,.2);
}

/* Mobile portrait */
@media (max-width: 768px) and (orientation: portrait){
  .page-dashboard{
    --chart-height: 55vh;
  }
}

/* Mobile paysage */
@media (orientation: landscape) and (hover: none) and (pointer: coarse){
  .page-dashboard{
    --chart-height: 70vh;
  }
}

.calendar-amount-editable{
  width:100%;
  display:block;
  text-align:center;
  font-size:16px; /* important iOS */
  line-height:1.4;
  min-height:28px;
}

.calendar-amount-editable{
  line-height: 1;
  caret-color: auto;
}

.calendar-amount-editable:focus{
  transform: translateY(0);
}

/* =========================================================
   FIX — contenu sous le header (header sticky/fixed)
   ========================================================= */



/* mobile (header souvent plus haut à cause safe-area) */
@media (max-width: 520px){
  :root{ --header-offset: 0px; }
}







/* ===========================
   SUB CARD — Conversion V4
   =========================== */

.sub-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(66,165,245,.25);
  background: linear-gradient(145deg, rgba(66,165,245,.065), rgba(66,165,245,.02));
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.sub-card::before{
  content:"";
  position:absolute;
  top:-45%;
  right:-45%;
  width:360px;
  height:360px;
  background: radial-gradient(circle, rgba(66,165,245,.28), transparent 70%);
  opacity:.7;
  pointer-events:none;
}

.sub-card:hover{
  transform: translateY(-1px);
  border-color: rgba(66,165,245,.48);
  box-shadow: 0 12px 36px rgba(66,165,245,.16);
}

/* Badge AI */
.badge-ai{
  background: linear-gradient(135deg, #42A5F5, #1E88E5);
  color:#fff;
  font-weight:800;
  padding:6px 14px;
  border-radius:999px;
  box-shadow: 0 6px 18px rgba(66,165,245,.35);
  font-size:13px;
  letter-spacing:.35px;
  border: 1px solid rgba(255,255,255,.22);
}

/* Body */
.sub-body.v4{ margin-top:14px; }

.sub-status{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.sub-status-title{
  font-size:18px;
  font-weight:800;
  line-height:1.25;
}

.sub-desc{
  margin-top:8px;
  line-height:1.45;
  color: rgba(255,255,255,.74);
}
body.light-mode .sub-desc{
  color: rgba(0,0,0,.65);
}

/* Chips */
.sub-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:13px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.light-mode .sub-chip{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

.sub-chip-ai{ border-color: rgba(66,165,245,.45); background: rgba(66,165,245,.12); }
.sub-chip-free{ border-color: rgba(255,193,7,.35); background: rgba(255,193,7,.10); }
.sub-chip-warn{ border-color: rgba(244,67,54,.35); background: rgba(244,67,54,.10); }
.sub-chip-info{ border-color: rgba(156,39,176,.30); background: rgba(156,39,176,.10); }

/* Value block */
.sub-value{
  margin-top:14px;
  padding:12px 12px;
  border-radius:14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
body.light-mode .sub-value{
  border-color: rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
}

.sub-value-title{
  font-weight:800;
  margin-bottom:10px;
  letter-spacing:.2px;
}

.sub-features{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:8px;
}

.sub-features li{
  display:flex;
  align-items:flex-start;
  gap:10px;
  line-height:1.35;
  color: rgba(255,255,255,.78);
}
body.light-mode .sub-features li{
  color: rgba(0,0,0,.70);
}

.sub-features .dot{
  width:8px;
  height:8px;
  border-radius:999px;
  margin-top:6px;
  background: rgba(66,165,245,.95);
  box-shadow: 0 0 0 4px rgba(66,165,245,.18);
  flex: 0 0 auto;
}

/* Trust row */
.sub-trust{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  font-size:12.5px;
  color: rgba(255,255,255,.65);
}
body.light-mode .sub-trust{
  color: rgba(0,0,0,.55);
}

/* Price box (for upgrade) */
.sub-pricebox{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border: 1px solid rgba(66,165,245,.22);
  background: linear-gradient(145deg, rgba(66,165,245,.10), rgba(66,165,245,.03));
}

.sub-price-main{
  display:flex;
  align-items:baseline;
  gap:8px;
}

.price-amount{
  font-size:22px;
  font-weight:900;
}

.price-period{
  font-weight:700;
  color: rgba(255,255,255,.70);
}
body.light-mode .price-period{
  color: rgba(0,0,0,.55);
}

.sub-price-sub{
  margin-top:4px;
  font-size:13px;
  color: rgba(255,255,255,.70);
}
body.light-mode .sub-price-sub{
  color: rgba(0,0,0,.55);
}

.sub-note{
  margin-top:10px;
  font-size:13px;
  line-height:1.35;
  color: rgba(255,255,255,.70);
}
body.light-mode .sub-note{
  color: rgba(0,0,0,.58);
}

/* Period */
.sub-period{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  font-size:13px;
  color: rgba(255,255,255,.70);
}
body.light-mode .sub-period{
  color: rgba(0,0,0,.60);
}

.sub-period-label{
  font-weight:800;
  color: rgba(255,255,255,.88);
}
body.light-mode .sub-period-label{
  color: rgba(0,0,0,.78);
}

.sub-renew{
  opacity:.9;
}



/* ===========================
   SUB CARD — Compare V5
   =========================== */
.sub-compare{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
body.light-mode .sub-compare{
  border-color: rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
}

.sub-compare-title{
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: .2px;
}

.sub-compare-grid{
  display:grid;
  grid-template-columns: 1.4fr .7fr .9fr;
  gap: 8px 10px;
  align-items:center;
}

.sub-compare-col-head{
  display:flex;
  justify-content:center;
}

.sub-compare-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}
body.light-mode .sub-compare-pill{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

.sub-compare-pill-free{
  border-color: rgba(160,160,160,.25);
  opacity: .9;
}
.sub-compare-pill-ai{
  border-color: rgba(66,165,245,.40);
  background: rgba(66,165,245,.12);
}

.sub-compare-rowlabel{
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1.25;
}
body.light-mode .sub-compare-rowlabel{
  color: rgba(0,0,0,.68);
}

.sub-compare-cell{
  display:flex;
  justify-content:center;
  font-weight: 900;
  font-size: 14px;
}

.sub-compare-cell.yes{
  color: rgba(66,165,245,.95);
  text-shadow: 0 0 14px rgba(66,165,245,.25);
}
.sub-compare-cell.no{
  color: rgba(255,255,255,.35);
}
body.light-mode .sub-compare-cell.no{
  color: rgba(0,0,0,.35);
}

.sub-compare-foot{
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,.65);
}
body.light-mode .sub-compare-foot{
  color: rgba(0,0,0,.55);
}


.sub-countdown{
  font-weight: 750;
  color: rgba(66,165,245,.95);
  text-shadow: 0 0 14px rgba(66,165,245,.18);
}
body.light-mode .sub-countdown{
  color: rgba(30,136,229,.95);
}









/* ===========================
   RR — Inputs modern (xPro)
   =========================== */

.rr-card {
  width: 100%;
}

.rr-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 820px) { .rr-grid { grid-template-columns: 1fr; } }

.rr-field label{
  display:block;
  margin: 0 0 6px 0;
  font-weight: 700;
  opacity: .85;
  font-size: .95rem;
}

/* Wrapper input "joli" */
.rr-input{
  display:flex;
  align-items:center;
  gap:10px;

  padding: 12px 12px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);

  box-shadow:
    0 10px 30px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.06);

  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}

.light-mode .rr-input{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.10);
  box-shadow:
    0 10px 30px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.65);
}

.rr-input:focus-within{
  border-color: rgba(66,165,245,.55);
  box-shadow:
    0 16px 40px rgba(0,0,0,.35),
    0 0 0 4px rgba(66,165,245,.18),
    inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateY(-1px);
}

/* petite icône à gauche */
.rr-ico{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 16px;
  background: rgba(66,165,245,.16);
  border: 1px solid rgba(66,165,245,.22);
}
.light-mode .rr-ico{
  background: rgba(66,165,245,.10);
  border-color: rgba(66,165,245,.18);
}

/* champ lui-même */
.rr-control{
  width:100%;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: inherit;

  font-size: 16px;          /* IMPORTANT iOS */
  line-height: 1.2;
  padding: 0;
  margin: 0;

  appearance: none;
}

.rr-control::placeholder{
  opacity:.55;
}

/* Select dans le même style */
.rr-select{
  width:100%;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: inherit;
  font-size: 16px;
  appearance: none;

  /* petite flèche */
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.65) 50%),
                    linear-gradient(135deg, rgba(255,255,255,.65) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.light-mode .rr-select{
  background-image: linear-gradient(45deg, transparent 50%, rgba(0,0,0,.55) 50%),
                    linear-gradient(135deg, rgba(0,0,0,.55) 50%, transparent 50%);
}

/* Small hint */
.rr-hint{
  display:block;
  margin-top:6px;
  opacity:.70;
  font-size:.85rem;
}

/* Actions */
.rr-actions{
  display:flex;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
  align-items:center;
}

/* Result cards align */
.rr-out{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media (max-width:820px){.rr-out{grid-template-columns:1fr;}}

.rr-kpi{
  padding: 12px;
}
.rr-kpi .t{opacity:.70;font-size:.9em;}
.rr-kpi .v{font-size:20px;font-weight:900;margin-top:3px;letter-spacing:.2px;}

/* Message badge (rr_msg) plus clean */
#rr_msg{
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 700;
}
.light-mode #rr_msg{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.10);
}






/* ===========================
   RR — UI épurée (safe)
   =========================== */

.rr-wrap{margin-top:18px;}
.rr-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.rr-title{margin:0;font-size:1.2rem;}
.rr-sub{opacity:.82;margin:8px 0 0 0;max-width:70ch;line-height:1.5}

.rr-card{width:100%;}

.rr-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));}
@media (max-width:900px){.rr-grid{grid-template-columns:1fr;}}

.rr-out{display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr));}
@media (max-width:900px){.rr-out{grid-template-columns:1fr;}}

.rr-field label{display:block;font-weight:700;margin:0 0 6px 0;opacity:.9;}
.rr-hint{display:block;margin-top:6px;opacity:.75;font-size:.85em;line-height:1.35;}

.rr-input, .rr-select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .06s ease;
}
.light-mode .rr-input, .light-mode .rr-select{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.10);
}

.rr-input:focus, .rr-select:focus{
  border-color: rgba(66,165,245,.55);
  box-shadow: 0 0 0 4px rgba(66,165,245,.18);
}

.rr-actions{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap;align-items:center;}
.rr-msg{opacity:.85;font-weight:700}
.rr-msg.bad{color:#ff6b6b}
.rr-msg.ok{color:#7CFC98}

.rr-kpi{padding:14px;}
.rr-kpi .t{opacity:.75;font-size:.92em;font-weight:700;}
.rr-kpi .v{font-size:20px;font-weight:900;margin-top:6px;}
.rr-kpi .mini{opacity:.75;font-size:.85em;margin-top:4px;line-height:1.35;}

.rr-pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;
  background:rgba(66,165,245,.12);
  border:1px solid rgba(66,165,245,.18);
  font-weight:800;
}
.light-mode .rr-pill{background:rgba(66,165,245,.10);}

.rr-split{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
}
@media(max-width:1100px){.rr-split{grid-template-columns:1fr;}}

/* ===========================
   Modal IA
   =========================== */
.rr-modal{position:fixed;inset:0;display:none;z-index:9999;}
.rr-modal.is-open{display:block;}
.rr-modal .ov{
  position:absolute;inset:0;background:rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.rr-modal .box{
  position:relative;
  max-width:780px;
  margin: min(12vh,120px) auto 0 auto;
  background: rgba(18,24,38,.92);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
}
.light-mode .rr-modal .box{
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.10);
}
.rr-modal .hd{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.10);
}
.light-mode .rr-modal .hd{border-bottom-color: rgba(0,0,0,.08);}
.rr-modal .hd strong{font-size:1rem;}
.rr-modal .bd{padding:14px 16px;}
.rr-modal .ft{padding:12px 16px;border-top:1px solid rgba(255,255,255,.10);display:flex;justify-content:flex-end;gap:10px;}
.light-mode .rr-modal .ft{border-top-color: rgba(0,0,0,.08);}

.rr-ai-text{white-space:pre-line;line-height:1.55;}

.rr-msg:empty {
  display: none;
}

/* ===========================
   Centrer modal Analyse IA
   =========================== */
.rr-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.rr-modal.open{
  display: flex;
}

.rr-modal .box{
  max-width: 600px;
  width: 90%;
}









/* =========================
   🧠 PLANNING AI
   ========================= */
.planning-ai-card{
  margin:18px 0;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(66,165,245,.10), rgba(255,255,255,.03));
}

.planning-ai-card-bottom{
  margin-top:24px;
}

.planning-ai-top{
  display:flex;
  justify-content:flex-end;
  margin-bottom:12px;
}

.planning-ai-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.planning-ai-kicker{
  margin-bottom:4px;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.75;
}

.planning-ai-title{
  margin:0;
  font-size:1.1rem;
}

.planning-ai-sub{
  margin:6px 0 0;
  font-size:.92rem;
  opacity:.8;
}

.planning-ai-box{
  min-height:120px;
}

.planning-ai-empty,
.planning-ai-loading,
.planning-ai-error,
.trade-history-empty{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  opacity:.9;
}

.planning-ai-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.planning-ai-item{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.planning-ai-item-wide{
  grid-column:1 / -1;
}

.planning-ai-label{
  display:block;
  margin-bottom:6px;
  font-size:.8rem;
  opacity:.7;
}

.planning-ai-item p{
  margin:0;
  line-height:1.5;
}

/* =========================
   📊 TRADE DETAIL
   ========================= */
.trade-detail-card,
.trade-history-card{
  margin:18px 0 20px;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.trade-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.trade-detail-title{
  margin:4px 0 6px;
  font-size:1.05rem;
  color:#42A5F5;
}

.trade-detail-sub{
  margin:0;
  font-size:.92rem;
  opacity:.8;
}

.trade-detail-body{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
}

.trade-form-topbar{
  display:flex;
  gap:16px;
  margin-bottom:18px;
}

.trade-form-topbar .trade-field{
  width:100%;
  min-width:220px;
  max-width:280px;
}

.trade-form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.trade-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.trade-field label{
  font-size:.9rem;
  font-weight:600;
  opacity:.9;
}

.trade-field input,
.trade-field select,
.trade-field textarea{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:#fff;
  outline:none;
}

.trade-field textarea{
  resize:vertical;
  min-height:90px;
}

.trade-field-full{
  grid-column:1 / -1;
}

.trade-detail-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

/* =========================
   📜 TRADE HISTORY
   ========================= */
.trade-history-card{
  margin-top:18px;
  padding:16px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
}

.trade-history-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.trade-history-head h5{
  margin:0;
  font-size:15px;
  font-weight:700;
}

.trade-history-title{
  font-size:1rem;
  font-weight:800;
}

.trade-history-date,
.trade-history-date-label{
  font-size:.9rem;
  opacity:.75;
}

.trade-history-box{
  margin-top:14px;
  margin-bottom:16px;
}

.trade-history-empty{
  border-style:dashed;
  border-color:rgba(255,255,255,.10);
}

.trade-history-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.trade-history-item{
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.trade-history-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.trade-history-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.trade-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
}

.trade-history-result{
  font-size:15px;
  font-weight:800;
}

.trade-history-result.up{
  color:#4CAF50;
}

.trade-history-result.down{
  color:#F44336;
}

.trade-history-comment{
  margin-top:10px;
  line-height:1.5;
  white-space:pre-line;
  opacity:.92;
}

.trade-history-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* =========================
   🪟 TRADE MODAL
   ========================= */
.trade-modal-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.trade-modal-headline{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.trade-modal-date{
  font-weight:800;
  opacity:.9;
}

.trade-modal-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.trade-modal-item{
  padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.trade-modal-item-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

.trade-modal-chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.trade-modal-pnl{
  font-size:1rem;
  font-weight:800;
}

.trade-modal-comment{
  margin-top:10px;
  line-height:1.5;
  white-space:pre-line;
  opacity:.92;
}

.trade-modal-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.trade-modal-empty{
  padding:16px;
  text-align:center;
  opacity:.75;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:14px;
}

.trade-modal-form-wrap{
  padding:14px;
  border-radius:16px;
  background:rgba(66,165,245,.06);
  border:1px solid rgba(66,165,245,.18);
}

.trade-modal-form-title{
  margin-bottom:12px;
  font-weight:800;
  color:#42A5F5;
}

.trade-modal-form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

/* =========================
   📱 RESPONSIVE
   ========================= */
@media (max-width: 768px){
  .planning-ai-grid,
  .trade-form-grid{
    grid-template-columns:1fr;
  }

  .planning-ai-item-wide{
    grid-column:auto;
  }

  .trade-detail-head{
    flex-direction:column;
    align-items:stretch;
  }

  .trade-form-topbar{
    flex-direction:column;
  }

  .trade-form-topbar .trade-field{
    max-width:none;
  }
}


:root{
  --chart-card-bg: rgba(16,21,29,.78);
  --chart-card-border: rgba(255,255,255,.10);
  --chart-plot-bg: rgba(11,15,20,.90);
}

html.light-mode{
  --chart-card-bg: rgba(255,255,255,.78);
  --chart-card-border: rgba(15,23,42,.10);
  --chart-plot-bg: rgba(248,250,252,.92);
}

/* Desktop */
.chart-container{
  background: var(--chart-card-bg);
  border: 1px solid var(--chart-card-border);
  border-radius: 24px;

  padding: 18px 18px 54px 18px;
  min-height: 476px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Tablette */
@media (max-width: 1024px){
  .chart-container{
    padding: 16px 16px 42px 16px;
    min-height: auto;
  }
}

/* Mobile */
@media (max-width: 768px){
  .chart-container{
    padding: 14px 14px 36px 14px;
    min-height: auto;
  }
}


/* =========================================================
   PRICING PAGE
   ========================================================= */

.pricing-page{
  padding:28px 0 40px;
}

.pricing-hero{
  text-align:center;
  margin-bottom:28px;
  padding:24px;
  border-radius:22px;
  border:1px solid var(--surface-border);
  background:var(--surface-bg);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.pricing-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(66,165,245,.12);
  border:1px solid rgba(66,165,245,.26);
  color:var(--accent);
  font-size:.85rem;
  margin-bottom:12px;
}

.pricing-hero h2{
  margin:0 0 10px;
}

.pricing-hero p{
  margin:0;
  opacity:.86;
}

.pricing-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:28px;
  margin-top:26px;
  align-items:stretch;
  perspective:1200px;
}

.pricing-card{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  padding:26px;
  border-radius:22px;
  border:1px solid var(--surface-border);
  background:var(--surface-bg);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transform-style:preserve-3d;
  will-change:transform;
  transition:
    transform .18s ease,
    box-shadow .25s ease,
    border-color .25s ease,
    background .25s ease;
  isolation:isolate;
  overflow:visible;
}

.pricing-card:hover{
  box-shadow:0 22px 50px rgba(0,0,0,.30);
}

body.light-mode .pricing-card:hover{
  box-shadow:0 18px 36px rgba(0,0,0,.12);
}

.pricing-card::before{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:24px;
  filter:blur(24px);
  opacity:.80;
  z-index:0;
  pointer-events:none;
  transition:
    opacity .28s ease,
    filter .28s ease,
    transform .28s ease;
}

.pricing-card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:22px;
  background:
    radial-gradient(
      circle 180px at var(--x, 50%) var(--y, 50%),
      rgba(255,255,255,0.16),
      transparent 60%
    );
  opacity:0;
  transition:opacity .20s ease;
  pointer-events:none;
  z-index:1;
}

body.light-mode .pricing-card::after{
  background:
    radial-gradient(
      circle 180px at var(--x, 50%) var(--y, 50%),
      rgba(255,255,255,0.60),
      transparent 60%
    );
}

.pricing-card:hover::after{
  opacity:1;
}

.pricing-card:hover::before{
  opacity:1;
  filter:blur(30px);
  transform:scale(1.02);
}

.pricing-card > *{
  position:relative;
  z-index:2;
}

.pricing-card.free::before{
  background:none;
}

.pricing-card.is-pro::before{
  background:linear-gradient(
    135deg,
    rgba(66,165,245,.65),
    rgba(66,165,245,.25),
    transparent 60%
  );
}

.pricing-card.is-elite::before{
  background:linear-gradient(
    135deg,
    rgba(255,193,7,.85),
    rgba(255,193,7,.35),
    transparent 60%
  );
}

.pricing-card.is-pro{
  border:1px solid rgba(66,165,245,.55);
  transform:scale(1.04);
  z-index:2;
  box-shadow:0 14px 40px rgba(66,165,245,.25);
}

.pricing-card.is-elite{
  border:1px solid rgba(255,193,7,.55);
  box-shadow:0 14px 40px rgba(255,193,7,.25);
}

.pricing-card.is-current{
  box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 12px 34px rgba(0,0,0,.25);
}

body.light-mode .pricing-card.is-current{
  box-shadow:0 0 0 1px rgba(0,0,0,.06), 0 12px 34px rgba(0,0,0,.10);
}

.pricing-badge-pro,
.pricing-badge-elite{
  transition:transform .28s ease, box-shadow .28s ease;
}

.pricing-card:hover .pricing-badge-pro,
.pricing-card:hover .pricing-badge-elite{
  transform:translateY(-2px) scale(1.05);
}

.pricing-badge-pro{
  position:absolute;
  top:-12px;
  right:18px;
  background:#42A5F5;
  color:#fff;
  font-size:.72rem;
  font-weight:600;
  padding:6px 12px;
  border-radius:999px;
  box-shadow:0 4px 14px rgba(66,165,245,.4);
  z-index:5;
}

.pricing-badge-elite{
  position:absolute;
  top:-12px;
  right:18px;
  background:#FFC107;
  color:#000;
  font-size:.72rem;
  font-weight:700;
  padding:6px 12px;
  border-radius:999px;
  box-shadow:0 4px 14px rgba(255,193,7,.4);
  z-index:5;
}

.pricing-title{
  font-size:1.4rem;
  margin-bottom:6px;
}

.pricing-price{
  font-size:2.1rem;
  font-weight:700;
  margin-bottom:6px;
}

.pricing-sub{
  opacity:.8;
  margin-bottom:16px;
  min-height:24px;
}

.pricing-highlight{
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.05);
  margin-bottom:18px;
  font-weight:600;
}

body.light-mode .pricing-highlight{
  background:rgba(0,0,0,.035);
}

.pricing-list{
  list-style:none;
  padding:0;
  margin:0 0 18px;
  display:grid;
  gap:10px;
}

.pricing-list li{
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.pricing-list li::before{
  content:"✓";
  color:var(--accent);
  font-weight:700;
  flex:0 0 auto;
}

.pricing-footer{
  margin-top:auto;
}

.pricing-footer form{
  margin:0;
}

.pricing-footer .btn,
.pricing-footer .btn-small{
  width:100%;
  justify-content:center;
}

.pricing-bottom{
  margin-top:28px;
  padding:18px;
  border-radius:20px;
  border:1px solid var(--surface-border);
  background:var(--surface-bg);
  text-align:center;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.pricing-actions{
  margin-top:16px;
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.pricing-actions .btn,
.pricing-actions .btn-small{
  width:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.pricing-actions a{
  min-width:180px;
}

@media (max-width: 900px){
  .pricing-card.is-pro{
    transform:scale(1.02);
  }
}

@media (max-width: 768px){
  .pricing-grid{
    perspective:none;
    gap:20px;
  }

  .pricing-page{
    padding:20px 0 34px;
  }

  .pricing-card{
    padding:22px;
    transform:none !important;
    will-change:auto;
  }

  .pricing-card::after{
    display:none;
  }

  .pricing-price{
    font-size:1.8rem;
  }

  .pricing-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .pricing-actions a{
    min-width:0;
    width:100%;
  }
}


/* =========================================================
   TRADINGVIEW — fix header + débordement bas + fullscreen
   ========================================================= */

:root{
  --appHeaderH: 88px;
  --tvCardPad: 14px;
  --tvToolbarH: 52px;
}

#tradingviewTab .tv-card{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

#tradingviewTab .tv-header{
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

#tradingviewTab .tv-wrapper{
  position: relative;
  z-index: 1;
  width: 100%;
  height: calc(100vh - var(--appHeaderH) - 210px);
  min-height: 480px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.08);
}

#tradingviewTab #tradingview-widget{
  width: 100%;
  height: 100%;
  min-height: 480px;
}

#tradingviewTab #tradingview-widget iframe{
  width: 100% !important;
  height: 100% !important;
  display: block;
  border: 0;
}

#tvFullscreenToggle.is-active{
  box-shadow: 0 0 0 2px rgba(66,165,245,.22) inset;
}

/* Fullscreen */
.tv-card:fullscreen{
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: var(--tvCardPad);
  border-radius: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  box-sizing: border-box;
}

.tv-card:fullscreen .tv-header{
  margin-bottom: 12px;
}

.tv-card:fullscreen .tv-wrapper{
  height: calc(100vh - var(--tvToolbarH) - (var(--tvCardPad) * 2));
  min-height: 0;
  border-radius: 14px;
}

/* Safari */
.tv-card:-webkit-full-screen{
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: var(--tvCardPad);
  border-radius: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  box-sizing: border-box;
}

.tv-card:-webkit-full-screen .tv-header{
  margin-bottom: 12px;
}

.tv-card:-webkit-full-screen .tv-wrapper{
  height: calc(100vh - var(--tvToolbarH) - (var(--tvCardPad) * 2));
  min-height: 0;
  border-radius: 14px;
}

/* Light mode */
body.light-mode #tradingviewTab .tv-wrapper{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(0,0,0,.08);
}

/* Tablet */
@media (max-width: 1024px){
  :root{
    --appHeaderH: 82px;
  }

  #tradingviewTab .tv-wrapper{
    height: calc(100vh - var(--appHeaderH) - 195px);
    min-height: 440px;
  }
}

/* Mobile */
@media (max-width: 768px){
  :root{
    --appHeaderH: 74px;
    --tvCardPad: 10px;
    --tvToolbarH: 50px;
  }

  #tradingviewTab .tv-header{
    flex-wrap: wrap;
    align-items: flex-start;
  }

  #tradingviewTab .tv-wrapper{
    height: calc(100vh - var(--appHeaderH) - 170px);
    min-height: 360px;
    border-radius: 14px;
  }

  .tv-card:fullscreen .tv-wrapper,
  .tv-card:-webkit-full-screen .tv-wrapper{
    height: calc(100vh - var(--tvToolbarH) - (var(--tvCardPad) * 2) - env(safe-area-inset-bottom));
  }
}

.mt5-connect-card{
  border:1px solid rgba(66,165,245,.18);
  background:linear-gradient(180deg, rgba(66,165,245,.08), rgba(255,255,255,.03));
}

.mt5-connect-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.mt5-connect-box{
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

.mt5-label{
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  opacity:.72;
  margin-bottom:10px;
}

.mt5-api-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.mt5-api-row code{
  display:block;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.08);
  font-size:.95rem;
  word-break:break-all;
  flex:1;
}

.mt5-steps li{
  margin-bottom:4px;
}

@media (max-width: 768px){
  .mt5-connect-grid{
    grid-template-columns:1fr;
  }
}






.mt5-steps{
display:flex;
flex-direction:column;
gap:14px;
margin-top:10px;
}

.mt5-step{
display:flex;
gap:12px;
align-items:flex-start;
padding:10px 12px;
border-radius:12px;
background:rgba(255,255,255,0.03);
border:1px solid rgba(255,255,255,0.06);
}

.mt5-step-num{
width:26px;
height:26px;
border-radius:50%;
background:#42A5F5;
color:white;
font-weight:600;
display:flex;
align-items:center;
justify-content:center;
font-size:13px;
flex-shrink:0;
}

.mt5-step-content strong{
display:block;
font-size:.92rem;
}

.mt5-step-content p{
margin:2px 0 0;
font-size:.85rem;
opacity:.75;
}


/* =========================================================
   PRICING PAGE — CLEAN FINAL
   ========================================================= */

.page-pricing .pricing-page{
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 18px 0 30px;
}

/* =========================
   Glass card générique
   ========================= */
.page-pricing .glass-card{
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: 0 14px 38px rgba(0,0,0,.22);
}

body.light-mode.page-pricing .glass-card{
  border-color: rgba(0,0,0,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.68));
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

/* =========================
   Hero
   ========================= */
.page-pricing .pricing-hero{
  padding: 28px 24px;
  text-align: center;
}

.page-pricing .pricing-hero-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(66,165,245,.14);
  border: 1px solid rgba(66,165,245,.22);
  color: #42A5F5;
  font-size: .85rem;
  font-weight: 700;
}

.page-pricing .pricing-hero h1{
  max-width: 780px;
  margin: 0 auto 12px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.page-pricing .pricing-hero-text{
  max-width: 760px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
  opacity: .86;
}

.page-pricing .pricing-hero-points{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.page-pricing .pricing-hero-points div{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  font-size: .92rem;
}

body.light-mode.page-pricing .pricing-hero-points div{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}

/* =========================
   Grid
   ========================= */
.page-pricing .pricing-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 1024px){
  .page-pricing .pricing-grid{
    grid-template-columns: 1fr;
  }
}

/* =========================
   Cards
   ========================= */
.page-pricing .pricing-card{
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px 20px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.page-pricing .pricing-card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.page-pricing .pricing-card > *{
  position: relative;
  z-index: 1;
}

.page-pricing .pricing-card:hover{
  box-shadow: 0 18px 42px rgba(0,0,0,.24);
}

body.light-mode.page-pricing .pricing-card{
  border-color: rgba(0,0,0,.08);
  background:
    radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.45), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.76));
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
}

body.light-mode.page-pricing .pricing-card:hover{
  box-shadow: 0 16px 28px rgba(0,0,0,.10);
}

.page-pricing .pricing-card.free::before{
  background: none;
}

.page-pricing .pricing-card.is-pro::before{
  background: radial-gradient(circle at top right, rgba(66,165,245,.18), transparent 55%);
}

.page-pricing .pricing-card.is-elite::before{
  background: radial-gradient(circle at top right, rgba(255,193,7,.18), transparent 55%);
}

.page-pricing .pricing-card.is-pro{
  border-color: rgba(66,165,245,.24);
}

.page-pricing .pricing-card.is-elite{
  border-color: rgba(255,215,90,.24);
}

.page-pricing .pricing-card.is-current{
  border: 1px solid rgba(76,175,80,.28);
  box-shadow: 0 0 0 1px rgba(76,175,80,.10), 0 12px 28px rgba(76,175,80,.08);
}

/* =========================
   Header card
   ========================= */
.page-pricing .pricing-top{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.page-pricing .pricing-icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.06);
}

body.light-mode.page-pricing .pricing-icon{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}

.page-pricing .pricing-head{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-pricing .pricing-title{
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.page-pricing .pricing-sub{
  font-size: .95rem;
  opacity: .72;
}

/* =========================
   Price
   ========================= */
.page-pricing .pricing-price{
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.page-pricing .pricing-price strong{
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
}

.page-pricing .pricing-price span{
  padding-bottom: 4px;
  font-size: .95rem;
  opacity: .7;
}

.page-pricing .pricing-billing{
  margin-bottom: 16px;
  font-size: .88rem;
  opacity: .68;
}

/* =========================
   Highlight
   ========================= */
.page-pricing .pricing-highlight{
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(66,165,245,.10);
  border: 1px solid rgba(66,165,245,.18);
  color: #ddecff;
  font-weight: 700;
  line-height: 1.4;
}

body.light-mode.page-pricing .pricing-highlight{
  color: #12508d;
  background: rgba(66,165,245,.08);
  border-color: rgba(66,165,245,.16);
}

/* =========================
   Features
   ========================= */
.page-pricing .pricing-list{
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-pricing .pricing-list li{
  position: relative;
  padding-left: 24px;
  line-height: 1.45;
  opacity: .95;
}

.page-pricing .pricing-list li::before{
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: #42A5F5;
  font-weight: 800;
}

.page-pricing .pricing-footer{
  margin-top: auto;
}

.page-pricing .pricing-footer form{
  margin: 0;
}

.page-pricing .pricing-footer .btn,
.page-pricing .pricing-footer .btn-secondary{
  width: 100%;
  justify-content: center;
}

/* =========================
   Badges
   ========================= */
.page-pricing .pricing-badge-popular,
.page-pricing .pricing-badge-elite{
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.page-pricing .pricing-current-badge{
  position: absolute;
  top: 16px;
  left: 16px;
  right: auto;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(76,175,80,.10);
  color: #43A047;
  border: 1px solid rgba(76,175,80,.28);
}

.page-pricing .pricing-badge-popular{
  background: #42A5F5;
  color: #fff;
  border: 1px solid rgba(66,165,245,.35);
}

.page-pricing .pricing-badge-elite{
  background: #FFC107;
  color: #1a1a1a;
  border: 1px solid rgba(255,193,7,.35);
}

.page-pricing .pricing-card.is-current,
.page-pricing .pricing-card:has(.pricing-badge-popular),
.page-pricing .pricing-card:has(.pricing-badge-elite){
  padding-top: 72px;
}

/* =========================
   Compare
   ========================= */
.page-pricing .pricing-compare{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.page-pricing .pricing-compare-item{
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

body.light-mode.page-pricing .pricing-compare-item{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}

.page-pricing .pricing-compare-title{
  margin-bottom: 8px;
  font-size: 1.02rem;
  font-weight: 800;
}

.page-pricing .pricing-compare-item p{
  margin: 0;
  line-height: 1.55;
  opacity: .8;
}

/* =========================
   Reassurance
   ========================= */
.page-pricing .pricing-reassurance{
  padding: 18px;
}

.page-pricing .pricing-reassurance-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.page-pricing .pricing-reassurance-grid div{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

body.light-mode.page-pricing .pricing-reassurance-grid div{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}

.page-pricing .pricing-reassurance-grid i{
  color: #42A5F5;
  font-size: 1.1rem;
}

/* =========================
   Bottom action
   ========================= */
.page-pricing .pricing-actions-simple{
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.page-pricing .pricing-actions-simple .btn,
.page-pricing .pricing-actions-simple .btn-secondary{
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

/* =========================
   Secondary button
   ========================= */
.page-pricing .btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    background .18s ease,
    transform .18s ease,
    border-color .18s ease,
    opacity .18s ease;
}

.page-pricing .btn-secondary:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.page-pricing .btn-secondary:disabled{
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

body.light-mode.page-pricing .btn-secondary{
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}

body.light-mode.page-pricing .btn-secondary:hover{
  background: rgba(0,0,0,.06);
}

/* =========================
   MT5 locked card
   ========================= */
.mt5-connect-card--locked{
  padding: 28px 24px;
}

.mt5-locked-layout{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.mt5-locked-left{
  max-width: 520px;
}

.mt5-locked-right{
  display: flex;
  align-items: center;
}

.mt5-locked-inner{
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}

.mt5-locked-title{
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #42A5F5;
  font-size: 2rem;
}

.mt5-locked-text{
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.mt5-benefits{
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.7;
  font-size: 1rem;
  opacity: .95;
}

.mt5-benefits li{
  margin-bottom: 6px;
}

.btn-upgrade{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg,#42A5F5,#1E88E5);
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.10);
  text-decoration: none;
  transition: all .2s ease;
}

.btn-upgrade:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(66,165,245,.35);
}

.btn-back{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-back i{
  font-size: 1.1rem;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px){
  .page-pricing .pricing-compare{
    grid-template-columns: 1fr;
  }

  .page-pricing .pricing-reassurance-grid{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px){
  .page-pricing .pricing-page{
    gap: 18px;
    padding: 12px 0 22px;
  }

  .page-pricing .glass-card{
    border-radius: 20px;
  }

  .page-pricing .pricing-hero{
    padding: 20px 14px 18px;
  }

  .page-pricing .pricing-hero-badge{
    margin: 0 auto 10px;
    padding: 8px 12px;
    font-size: .78rem;
  }

  .page-pricing .pricing-hero h1{
    max-width: 100%;
    margin: 0 0 8px;
    font-size: 1.65rem;
    line-height: 1.15;
  }

  .page-pricing .pricing-hero-text{
    max-width: 100%;
    font-size: .95rem;
    line-height: 1.5;
    opacity: .9;
  }

  .page-pricing .pricing-hero-points{
    gap: 8px;
    margin-top: 14px;
  }

  .page-pricing .pricing-hero-points div{
    gap: 6px;
    padding: 8px 10px;
    font-size: .82rem;
  }

  .page-pricing .pricing-grid{
    gap: 14px;
  }

  .page-pricing .pricing-card{
    min-height: auto;
    padding: 18px 16px 16px;
    border-radius: 20px;
  }

  .page-pricing .pricing-card.is-current,
  .page-pricing .pricing-card:has(.pricing-badge-popular),
  .page-pricing .pricing-card:has(.pricing-badge-elite){
    padding-top: 64px;
  }

  .page-pricing .pricing-top{
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-pricing .pricing-icon{
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.1rem;
  }

  .page-pricing .pricing-title{
    font-size: 1.2rem;
  }

  .page-pricing .pricing-sub{
    font-size: .88rem;
  }

  .page-pricing .pricing-price{
    gap: 6px;
    margin-bottom: 6px;
  }

  .page-pricing .pricing-price strong{
    font-size: 1.9rem;
  }

  .page-pricing .pricing-price span{
    padding-bottom: 3px;
    font-size: .88rem;
  }

  .page-pricing .pricing-billing{
    margin-bottom: 14px;
    font-size: .82rem;
  }

  .page-pricing .pricing-highlight{
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: .9rem;
  }

  .page-pricing .pricing-list{
    gap: 8px;
    margin-bottom: 18px;
  }

  .page-pricing .pricing-list li{
    padding-left: 22px;
    font-size: .92rem;
    line-height: 1.4;
  }

  .page-pricing .pricing-badge-popular,
  .page-pricing .pricing-badge-elite{
    top: 12px;
    right: 12px;
    left: auto;
    padding: 6px 10px;
    font-size: .68rem;
  }

  .page-pricing .pricing-current-badge{
    top: 12px;
    left: 12px;
    right: auto;
    padding: 6px 10px;
    font-size: .68rem;
  }

  .page-pricing .pricing-compare{
    gap: 10px;
    padding: 14px;
  }

  .page-pricing .pricing-compare-item{
    padding: 14px;
    border-radius: 16px;
  }

  .page-pricing .pricing-compare-title{
    margin-bottom: 6px;
    font-size: .95rem;
  }

  .page-pricing .pricing-compare-item p{
    font-size: .9rem;
    line-height: 1.45;
  }

  .page-pricing .pricing-reassurance{
    padding: 14px;
  }

  .page-pricing .pricing-reassurance-grid{
    gap: 10px;
  }

  .page-pricing .pricing-reassurance-grid div{
    padding: 12px;
    border-radius: 14px;
    font-size: .9rem;
  }

  .page-pricing .pricing-actions-simple{
    padding-top: 2px;
  }
}

@media (max-width: 700px){
  .mt5-locked-layout{
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .mt5-locked-right{
    width: 100%;
  }

  .btn-upgrade{
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 640px){
  .page-pricing .pricing-reassurance-grid{
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   MT DETAIL MODAL
   ========================================================= */
#mt5DetailModal.xmodal{
  position:fixed;
  inset:0;
  z-index:10060;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}

#mt5DetailModal.xmodal.is-open{
  display:flex;
}

#mt5DetailModal .xmodal-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(6px);
}

#mt5DetailModal .xmodal-card{
  position:relative;
  z-index:1;
  width:min(1100px, calc(100vw - 28px));
  max-height:min(82vh, 820px);
  border-radius:22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(16,18,24,.96);
  color:#fff;
  box-shadow:0 22px 70px rgba(0,0,0,.45);
  backdrop-filter:blur(14px);
  display:flex;
  flex-direction:column;
}

body.light-mode #mt5DetailModal .xmodal-card{
  background:rgba(255,255,255,.96);
  color:#0b1020;
  border-color:rgba(0,0,0,.10);
}

#mt5DetailModal .xmodal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

body.light-mode #mt5DetailModal .xmodal-head{
  border-bottom-color:rgba(0,0,0,.08);
}

#mt5DetailModal .xmodal-body{
  padding:14px 16px 12px;
  overflow:auto;
}

#mt5DetailModal .xmodal-foot{
  margin-top:auto;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:12px 16px;
  border-top:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.12);
}

body.light-mode #mt5DetailModal .xmodal-foot{
  border-top-color:rgba(0,0,0,.08);
  background:rgba(255,255,255,.65);
}


/* =========================================================
   PLANNING TABLE / MT INFO
   ========================================================= */
.planning-result-wrap{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.planning-info-icon{
  width:28px;
  height:28px;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:6px;
  border-radius:999px;
  border:1px solid rgba(66,165,245,.45);
  background:rgba(66,165,245,.12);
  color:#42A5F5;
  font-size:14px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  vertical-align:middle;
  transition:background .18s ease, transform .18s ease;
}

.planning-info-icon:hover{
  background:rgba(66,165,245,.22);
  transform:translateY(-1px);
}

.planning-table tbody tr:hover{
  background:rgba(66,165,245,.06);
}

.planning-table th,
.planning-table td{
  padding:12px 14px;
}

.planning-table td.pnl-positive .money-val{
  color:#2ecc71;
  font-weight:600;
}

.planning-table td.pnl-negative .money-val{
  color:#ff5a5a;
  font-weight:600;
}

.planning-table td.pnl-exchange .money-val{
  color:#42A5F5;
  font-weight:600;
}


/* =========================================================
   MT TRADES BADGE
   ========================================================= */
.mt-trades-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:90px;
  padding:8px 16px;
  border-radius:999px;
  border:1px solid rgba(66,165,245,.35);
  background:rgba(66,165,245,.12);
  color:#5A9BE6;
  font-size:.88em;
  font-weight:600;
  line-height:1;
  text-align:center;
  white-space:nowrap;
}


.mt-side{
  display:inline-block;
  padding:4px 10px;
  border-radius:8px;
  font-weight:700;
  font-size:12px;
  letter-spacing:.4px;
}

.mt-side-buy{
  background:rgba(46,204,113,.15);
  color:#2ecc71;
  border:1px solid rgba(46,204,113,.35);
}

.mt-side-sell{
  background:rgba(231,76,60,.15);
  color:#e74c3c;
  border:1px solid rgba(231,76,60,.35);
}

.mt-side-unknown{
  background:rgba(255,255,255,.08);
  color:#bbb;
  border:1px solid rgba(255,255,255,.15);
}


/* =========================================================
   MT5 DETAIL MODAL / BOX
   ========================================================= */

.mt5-detail-top{
  margin-bottom:16px;
}

.mt5-detail-title{
  margin:0 0 6px;
  color:#42A5F5;
}

.mt5-detail-subtitle{
  opacity:.8;
}

.mt5-detail-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin-bottom:18px;
}

.mt5-detail-card{
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
}

.mt5-detail-card-label{
  opacity:.75;
  font-size:.9rem;
}

.mt5-detail-card-value{
  font-size:1.2rem;
  font-weight:700;
}

.mt5-detail-empty{
  padding:18px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  opacity:.8;
}

.mt5-detail-table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
}

/* =========================================================
   MT SIDE BADGE
   ========================================================= */

.mt-side-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  letter-spacing:.2px;
  border:1px solid transparent;
  white-space:nowrap;
}

.mt-side-buy{
  color:#2ecc71;
  background:rgba(46,204,113,.12);
  border-color:rgba(46,204,113,.35);
}

.mt-side-sell{
  color:#ff6b6b;
  background:rgba(255,107,107,.12);
  border-color:rgba(255,107,107,.35);
}

.mt-side-unknown{
  color:#bfc7d5;
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
}

.mt-side-arrow{
  font-size:13px;
  font-weight:900;
  line-height:1;
}

/* =========================================================
   MT MONEY
   ========================================================= */

.mt-money{
  white-space:nowrap;
  font-weight:700;
}

.mt-money-positive{
  color:#2ecc71 !important;
}

.mt-money-negative{
  color:#ff6b6b !important;
}

.mt-money-flat{
  color:#cfd6e4 !important;
}

/* =========================================================
   MT TABLE
   ========================================================= */

.mt5-detail-table th,
.mt5-detail-table td,
.history th,
.history td{
  white-space:nowrap;
  vertical-align:middle;
}


.planning-result-wrap{
  display:inline-grid;
  grid-template-columns:120px 34px auto;
  align-items:center;
  column-gap:8px;
}

.planning-result-wrap .money-val{
  display:block;
  min-width:120px;
  text-align:right;
  white-space:nowrap;
}

.planning-result-wrap .planning-info-icon{
  margin:0;
  justify-self:center;
}

.planning-result-wrap .x-exchange-badge,
.planning-result-wrap .x-broker-fee-badge{
  justify-self:start;
}


/* =========================
   DASHBOARD LEFT STACK
   ========================= */

.dashboard-left-stack{
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* =========================
   PERFORMANCE GROUP CARD
   ========================= */

.metric-group-card{
  padding:20px 22px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(20,27,40,.92), rgba(13,18,28,.96));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 14px 34px rgba(0,0,0,.22);
  color:#fff;
}

.metric-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
  font-size:1rem;
  font-weight:700;
  color:#dbe7ff;
}

.metric-group-lines{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.metric-group-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.metric-group-line:last-child{
  border-bottom:none;
}

.metric-group-line span{
  color:rgba(255,255,255,.72);
  font-weight:500;
  font-size:.95rem;
}

.metric-group-line strong{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:1.05rem;
  font-weight:800;
  text-align:right;
  color:#fff;
}

.metric-group-line strong.up{
  color:#4cd964;
}

.metric-group-line strong.down{
  color:#ff6b6b;
}

.metric-group-line strong i{
  font-size:1rem;
}

/* =========================
   RISK CARD
   ========================= */

.metric-risk-card{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:14px;

  min-height:220px;
  padding:20px 22px;
  border-radius:22px;

  background:linear-gradient(180deg, rgba(20,27,40,.92), rgba(13,18,28,.96));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 14px 34px rgba(0,0,0,.22);

  color:#fff;
}

.metric-risk-card .metric-risk-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  font-size:1rem;
  font-weight:700;
  color:#dbe7ff;
  opacity:.96;
}

.metric-risk-card .value{
  margin:0;
  font-size:2.1rem;
  line-height:1;
  font-weight:800;
  letter-spacing:-0.02em;
}

.metric-risk-card .value.down{
  color:#ff5c5c;
}

.metric-risk-card .value.up{
  color:#4cd964;
}

.metric-risk-lines{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.metric-risk-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
  font-size:.95rem;
}

.metric-risk-line:last-child{
  border-bottom:none;
}

.metric-risk-line span{
  color:rgba(255,255,255,.72);
  font-weight:500;
}

.metric-risk-line strong{
  color:#fff;
  font-weight:700;
  text-align:right;
}

.metric-risk-line strong.down{
  color:#ff6b6b;
}

.metric-risk-line strong.up{
  color:#4cd964;
}

/* =========================
   LIGHT MODE
   ========================= */

body.light-mode .metric-group-card,
body.light-mode .metric-risk-card{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,249,255,.96));
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
  color:#18202b;
}

body.light-mode .metric-group-head,
body.light-mode .metric-risk-card .metric-risk-head{
  color:#1c2b45;
}

body.light-mode .metric-group-line{
  border-bottom:1px solid rgba(0,0,0,.06);
}

body.light-mode .metric-group-line span,
body.light-mode .metric-risk-line span{
  color:rgba(0,0,0,.62);
}

body.light-mode .metric-group-line strong,
body.light-mode .metric-risk-line strong,
body.light-mode .metric-risk-card .value{
  color:#18202b;
}

body.light-mode .metric-group-line strong.up,
body.light-mode .metric-risk-line strong.up,
body.light-mode .metric-risk-card .value.up{
  color:#1f9d55;
}

body.light-mode .metric-group-line strong.down,
body.light-mode .metric-risk-line strong.down,
body.light-mode .metric-risk-card .value.down{
  color:#e53935;
}

body.light-mode .metric-risk-line{
  border-bottom:1px solid rgba(0,0,0,.06);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 640px){
  .metric-group-card,
  .metric-risk-card{
    padding:18px 16px;
    border-radius:18px;
  }

  .metric-group-line,
  .metric-risk-line{
    font-size:.9rem;
  }

  .metric-group-line strong{
    font-size:.98rem;
  }

  .metric-risk-card .value{
    font-size:1.7rem;
  }
}


.metric-group-line strong,
.metric-risk-line strong{
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}


/* =========================
   DASHBOARD TABS
   ========================= */

.tabs{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;

  width:100%;
  padding:10px;
  margin:10px 0 22px;

  border-radius:28px;

  background:linear-gradient(180deg, #2f2f31, #262628);
  border:1px solid rgba(255,255,255,.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 10px 28px rgba(0,0,0,.30);

  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}

.tabs::-webkit-scrollbar{
  display:none;
}

/* =========================
   TAB
   ========================= */

.tab{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  min-height:54px;
  padding:0 20px;
  border-radius:18px;

  white-space:nowrap;
  cursor:pointer;
  user-select:none;

  font-size:1rem;
  font-weight:600;
  color:rgba(255,255,255,.78);

  transition:
    background .25s ease,
    color .25s ease,
    transform .15s ease,
    box-shadow .25s ease;
}

.tab:hover{
  background:rgba(255,255,255,.06);
  color:#ffffff;
}

.tab:active{
  transform:translateY(1px);
}

/* =========================
   ICON / LABEL
   ========================= */

.tab-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  font-size:1.15rem;
  line-height:1;
  flex:0 0 auto;
  color:inherit;
}

.tab-icon svg,
.tab-icon i{
  width:24px;
  height:24px;
  color:inherit;
  stroke:currentColor;
  fill:none;
  opacity:1;
}

.tab-label{
  display:inline-flex;
  align-items:center;
  line-height:1.1;
  color:inherit;
}

/* =========================
   ACTIVE TAB
   ========================= */

.tab.active{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,247,250,.94));
  color:#1b1f27;
  box-shadow:
    0 8px 18px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.75);
}

.tab.active .tab-icon,
.tab.active .tab-label{
  color:#1b1f27;
}

.tab.active .tab-icon svg,
.tab.active .tab-icon i{
  color:#1b1f27;
  stroke:#1b1f27;
  fill:none;
  opacity:1;
}

/* slider supprimé */
.tabs-slider{
  display:none !important;
}

/* =========================
   LIGHT MODE
   ========================= */

body.light-mode .tabs,
html.light-mode .tabs{
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,250,253,.80));
  border:1px solid rgba(0,0,0,.08);
  box-shadow:
    0 10px 25px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.75);
}

body.light-mode .tab,
html.light-mode .tab{
  color:rgba(0,0,0,.58);
}

body.light-mode .tab:hover,
html.light-mode .tab:hover{
  background:rgba(0,0,0,.04);
  color:#111827;
}

body.light-mode .tab.active,
html.light-mode .tab.active{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,246,251,.95));
  color:#111827;
  box-shadow:
    0 6px 14px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.92);
}

body.light-mode .tab.active .tab-icon,
body.light-mode .tab.active .tab-label,
html.light-mode .tab.active .tab-icon,
html.light-mode .tab.active .tab-label{
  color:#111827;
}

body.light-mode .tab.active .tab-icon svg,
body.light-mode .tab.active .tab-icon i,
html.light-mode .tab.active .tab-icon svg,
html.light-mode .tab.active .tab-icon i{
  color:#111827;
  stroke:#111827;
  fill:none;
  opacity:1;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width:900px){
  .tabs{
    gap:8px;
    padding:8px;
  }

  .tab{
    min-height:50px;
    padding:0 16px;
    font-size:.95rem;
  }
}

@media (max-width:640px){
  .tab{
    min-height:46px;
    padding:0 14px;
  }

  .tab-label{
    font-size:.92rem;
  }
}

/* =========================
   METRIC GROUP HEAD
   ========================= */

.metric-group-head{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;

  font-size:1.2rem;
  font-weight:700;
  text-align:center;
}

.metric-group-head span{
  display:flex;
  align-items:center;
  gap:10px;
}





.trading-stats-card{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(66,165,245,.22);
  background:
    linear-gradient(180deg, rgba(66,165,245,.14), rgba(66,165,245,.08));
  box-shadow:0 14px 34px rgba(0,0,0,.16);
}

.trading-stats-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(135deg, rgba(255,255,255,.06), transparent 55%);
}

.trading-stats-card .metric-risk-head span{
  color:#2d5f9a;
  font-weight:800;
}

.trading-stats-card .value{
  color:#1fa55b;
}

.trading-stats-card .metric-risk-line{
  border-bottom:1px solid rgba(0,0,0,.06);
}

.trading-stats-card .metric-risk-line:last-child{
  border-bottom:none;
}

body:not(.light-mode) .trading-stats-card{
  border:1px solid rgba(66,165,245,.30);
  background:
    linear-gradient(180deg, rgba(43,126,247,.22), rgba(43,126,247,.12));
  box-shadow:0 16px 34px rgba(0,0,0,.28);
}

body:not(.light-mode) .trading-stats-card .metric-risk-head span{
  color:#d9ecff;
}

body:not(.light-mode) .trading-stats-card .metric-risk-line{
  border-bottom:1px solid rgba(255,255,255,.08);
}

body:not(.light-mode) .trading-stats-card .value{
  color:#63d98a;
}


.dashboard-subtabs{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
  margin:18px 0 22px;
}

.dashboard-subtab{
  border:none;
  border-radius:16px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  font-weight:600;
  font-size:14px;
  background:rgba(255,255,255,.05);
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
  transition:all .2s ease;
  min-height:52px;
}

.dashboard-subtab:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.08);
  border-color:rgba(66,165,245,.35);
}

.dashboard-subtab.active{
  background:linear-gradient(135deg, rgba(66,165,245,.22), rgba(66,165,245,.10));
  border-color:rgba(66,165,245,.55);
  color:#42A5F5;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}

.dashboard-subcontent{
  display:none;
}

.dashboard-subcontent.active{
  display:block;
}

body.light-mode .dashboard-subtab{
  background:rgba(255,255,255,.8);
  color:#1b2430;
  border:1px solid rgba(0,0,0,.08);
}

body.light-mode .dashboard-subtab:hover{
  background:rgba(255,255,255,.95);
  border-color:rgba(66,165,245,.35);
}

body.light-mode .dashboard-subtab.active{
  color:#1976d2;
  background:linear-gradient(135deg, rgba(66,165,245,.14), rgba(66,165,245,.06));
  border-color:rgba(66,165,245,.45);
}

@media (max-width: 900px){
  .dashboard-subtabs{
    grid-template-columns:1fr;
  }

  .dashboard-subtab{
    justify-content:flex-start;
  }
}


#dashPerformance{
  padding-bottom:30px;
}