/* ==================== main.css - VERSION NETTOYÉE ==================== */
/* Ce fichier contient uniquement les styles spécifiques au dashboard */
/* Les styles de base, variables, reset, layout et composants sont dans leurs fichiers respectifs */

/* ==================== GRILLE DASHBOARD ==================== */

/* Grille spécifique pour les comptes (dashboard) */
.account-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Mobile : 3 colonnes */
  gap: var(--box-gap);
  margin: 3px 0; /* Marge au-dessus et en dessous des lignes de cases dans les box */
  width: 100%;
}

/* Desktop : 6 colonnes */
@media (min-width: 900px) {
  .account-row {
    grid-template-columns: repeat(6, 1fr);
  }
  
  /* Neutraliser span-3 sur desktop */
  .account-box.span-3 {
    grid-column: auto / span 6;
  }
}

/* ==================== RESPONSIVE GAIN BOXES ==================== */

/* Mobile : masquer les gains par défaut, afficher si expanded */
@media (max-width: 899px) {
  .account-row .gain-box {
    display: none;
  }
  
  .account-block.expanded .account-row .gain-box {
    display: flex;
  }
}

/* Desktop : toujours afficher */
@media (min-width: 900px) {
  .account-row .gain-box {
    display: flex;
  }
}

/* ==================== TOTAL BALANCE BOX ==================== */

.total-balance-box {
  max-width: none;
  width: 100%;
  background-color: var(--color-profit);
  color: white;
  text-align: center;
  border-radius: var(--radius);
  padding: 8px 14px;
}

.total-balance {
  font-size: 1.4rem;
  font-weight: bold;
}

.total-equity {
  font-size: 1.1rem;
  margin-top: 2px;
}

/* ==================== DÉTAILS TOGGLE (EXPAND/COLLAPSE) ==================== */

/* Détails masqués par défaut */
.account-details {
  display: none;
  margin-top: 8px;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.account-block.expanded .account-details {
  display: block;
}

/* ==================== DELETE WARNING ==================== */

.delete-warning {
  background: var(--color-loss-bg);
  border: 1px solid var(--color-loss);
  color: var(--color-loss);
  font-weight: bold;
  cursor: pointer;
}

.delete-warning:hover {
  background: var(--color-loss);
  color: white;
}

/* ==================== MODALE ==================== */

.modal {
  display: none;
  position: fixed;
  z-index: var(--z-modal);
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-block);
  padding: 20px;
  max-width: 420px;
  margin: 12% auto;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-evenly;
  gap: 10px;
}

/* Boutons de modale */
.btn-danger,
.btn-secondary {
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-secondary {
  background: var(--color-text-secondary);
  color: white;
}

.btn-danger:hover {
  filter: brightness(0.9);
}

.btn-secondary:hover {
  filter: brightness(0.9);
}

/* ==================== RESPONSIVE TYPOGRAPHY ==================== */

/* Ajuster les tailles sur desktop */
@media (min-width: 900px) {
  .account-label,
  .account-balance,
  .account-pl-pct,
  .gain-label {
    font-size: 1.05rem;
    text-align: center;
  }
  
  .account-number,
  .account-equity,
  .account-pl-eur,
  .gain-value {
    font-size: 1rem;
  }
}

/* ==================== SÉLECTEUR DE LANGUE (legacy) ==================== */

.lang-switch {
  top: 10px;
  right: 20px;
  font-size: 0.9rem;
}

.lang-switch a {
  text-decoration: none;
  margin: 0 4px;
  color: var(--color-text-secondary);
}

.lang-switch a:hover {
  color: var(--color-primary);
}

/* ==================== AUTRES STYLES SPÉCIFIQUES ==================== */

/* Typo dans les box (spécifique dashboard) */
.account-label,
.account-balance,
.account-pl-pct,
.gain-label {
  font-weight: bold;
  font-size: var(--font-size-base);
}

.account-number,
.account-equity,
.account-pl-eur,
.gain-value {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ==================== NOTES ==================== */

/*
Ce fichier a été nettoyé le 2026-01-12.
Les styles suivants ont été déplacés vers leurs composants respectifs :
- Variables → 00-variables.css
- Reset CSS → 01-reset.css
- Layout/Containers → 03-layout.css
- Header → components/header.css
- Cards/Boxes → components/cards.css

Garder ce fichier uniquement pour les styles spécifiques au dashboard
qui ne peuvent pas être réutilisés ailleurs.
*/