:root {
  /* AXA palette */
  --axa-blue: #00008F;
  --axa-blue-light: #3032C1;
  --axa-red: #c2c2c2;

  /* Remplacement des anciennes couleurs BNP */
  --green-bnp: var(--axa-blue);
  --green-bnp-light: var(--axa-blue-light);
  --green-bnp-dark: var(--axa-red);

  /* Neutres */
  --gray-bg: #f5f5f5;
  --gray-light: #f9f9f9;
  --gray-border: #e0e6ed;
  --gray-hover: #f9fbfd;

  --radius: 8px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  --font-main: 'Source Sans Pro', sans-serif;
}
/* Sélecteur de compte dans le bandeau */ .compte-selector { margin-left: auto; position: relative; font-family: var(--font-main); } .compte-display { cursor: pointer; font-weight: 600; color: var(--axa-blue); padding: 6px 10px; border-radius: 6px; transition: background 0.2s; } .compte-display:hover { background: rgba(0,0,0,0.05); } /* Menu déroulant */ .compte-menu { display: none; position: absolute; right: 0; top: 32px; background: white; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); list-style: none; padding: 6px 0; margin: 0; z-index: 5000; min-width: 120px; } .compte-menu li { padding: 8px 12px; cursor: pointer; color: var(--axa-blue); font-weight: 500; } .compte-menu li:hover { background: rgba(0, 51, 160, 0.08); }
/* ============================
   BANDEAU SUPÉRIEUR AXA
   ============================ */
.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  font-family: var(--font-main);
  position: relative;
  z-index: 3000;
}

.logo-axa {
  height: 40px;
  width: auto;
}

.titre-site {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.ligne-titre {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--axa-blue);
}

/* ============================
   MENU HORIZONTAL AXA
   ============================ */
.topnav {
  width: 100%;
  background-color: var(--axa-blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  top: 0;
  font-family: var(--font-main);
  position: relative;
  z-index: 3000;

}

.nav-container {
  max-width: 1400px;
  margin: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 20px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav-item > a,
.nav-item > span,
.dropdown-toggle {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 4px;
  cursor: pointer;
}

.nav-item:hover > a,
.nav-item:hover > span {
  text-decoration: underline;
}

/* ============================
   DROPDOWN
   ============================ */
.nav-item.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 180px;
  border-radius: 6px;
  padding: 10px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 2600;
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--axa-blue);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background-color: rgba(0, 51, 160, 0.08);
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* ============================
   BASE
   ============================ */
body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--gray-bg);
  color: #333;
}

h1, h2, h3 {
  font-weight: 600;
  margin: 0 0 15px;
}

/* ============================
   LAYOUT
   ============================ */
.layout {
  display: flex;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 30px;
  background-color: #f9f9f9;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
  width: 30px;
  transition: width 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  background-color: var(--green-bnp-light);
  color: white;
  padding: 10px;
  font-size: 0.7rem;
}

.sidebar:hover {
  width: 180px;
}

.sidebar-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.3s ease, opacity 0.3s ease;
}

.sidebar:hover .sidebar-label {
  max-width: 120px;
  opacity: 1;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.sidebar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.sidebar a:hover {
  text-decoration: underline;
}

.icon {
  font-size: 28px;
  color: white;
  margin-right: 12px;
  vertical-align: middle;
}

/* ============================
   SELECTS & INPUTS
   ============================ */
.select-custom,
.popup-content input,
.popup-content select {
  appearance: none;
  padding: 8px 12px;
  padding-right: 36px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background-color: #fff;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23006633' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
  box-sizing: border-box;
}

.select-custom:hover {
  border-color: var(--green-bnp-light);
}

.select-custom:focus,
.popup-content input:focus,
.popup-content select:focus {
  outline: none;
  border-color: var(--green-bnp-light);
  box-shadow: 0 0 0 2px rgba(0, 102, 51, 0.2);
}

/* ============================
   BOUTONS
   ============================ */
.btn-principal,
.btn-secondaire,
#btn-ajouter-operation,
.btn-filtre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 18px;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-principal,
#btn-ajouter-operation,
.btn-filtre {
  background-color: var(--green-bnp-light);
  color: white;
}

.btn-principal:hover,
#btn-ajouter-operation:hover,
.btn-filtre:hover {
  background-color: var(--green-bnp-dark);
  transform: translateY(-1px);
}

.btn-principal:active,
#btn-ajouter-operation:active,
.btn-filtre:active {
  transform: scale(0.98);
}

.btn-secondaire {
  background-color: #e0e0e0;
  color: #333;
}

.btn-secondaire:hover {
  background-color: #ccc;
  transform: translateY(-1px);
}

.btn-secondaire:active {
  transform: scale(0.98);
}

/* ============================
   ENCADRÉS PATRIMOINE
   ============================ */
#encadre {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 30px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bloc-patrimoine {
  display: inline-block;
  margin-bottom: 1px;
}

.patrimoine-table {
  width: auto;
  min-width: 170px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 15px;
  overflow: hidden;
  font-size: 0.8rem;
  font-family: var(--font-main);
  background-color: var(--green-bnp-light);
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  color: white;
  text-align: center;
  border: 2px solid var(--green-bnp-dark);
}

.patrimoine-table th {
  font-weight: bold;
  color: white;
  background-color: var(--green-bnp-light);
  padding: 10px 16px;
  border: none;
}

.patrimoine-table td {
  font-weight: bold;
  color: black;
  background-color: #ffffff;
  padding: 10px 16px;
  border: none;
  text-align: center;
}

.variation-text {
  font-size: 0.6rem;
  font-style: italic;
  font-weight: bold;
  text-align: center;
  margin-top: 4px;
}

/* ============================
   FILTRES
   ============================ */
#filtre {
  margin-bottom: 30px;
}

#filtre label {
  margin-right: 10px;
  font-weight: bold;
}

#filtre select {
  margin-right: 20px;
}

/* ============================
   GRAPHIQUES
   ============================ */
.graph-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  justify-content: flex-start;
}

.graph-container {
  flex: 1 1 250px;
  max-width: 270px;
  background-color: white;
  padding: 5px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-family: var(--font-main);
  text-align: center;
}

.chart-canvas {
  max-height: 100%;
}

/* ============================
   TABLEAUX
   ============================ */
.table-wrapper {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.admin-table,
#tableISIN,
#tableFonds {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-main);
}

/* Alternance des lignes */
.admin-table tbody tr:nth-child(odd) {
  background-color: #ffffff; /* blanc */
}

.admin-table tbody tr:nth-child(even) {
  background-color: #f2f2f2; /* gris clair */
}

/* Bordures fines et élégantes */
.admin-table {
  border-collapse: separate;
  border-spacing: 0;
}

/* Bordure fine autour du tableau */
.admin-table {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}

/* Cellules : bordure fine et discrète */
.admin-table td,
.admin-table th {
  border-bottom: 1px solid #e6e6e6;
}

/* Alternance des lignes */
.admin-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.admin-table tbody tr:nth-child(even) {
  background-color: #f7f7f7; /* gris très léger */
}

/* Hover */
.admin-table tbody tr:hover {
  background-color: #f0f4ff; /* léger bleu/gris premium */
}

/* Colonnes plus nettes */
.admin-table td + td,
.admin-table th + th {
  border-left: 1px solid #e6e6e6;
}

.admin-table th,
#tableISIN th,
#tableFonds th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #fcfcfc;
  border-bottom: 2px solid var(--gray-border);
  background: var(--green-bnp-light);
}

.admin-table td,
#tableISIN td,
#tableFonds td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f5;
}

.admin-table tbody tr:hover,
#tableISIN tbody tr:hover,
#tableFonds tbody tr:hover {
  background: var(--gray-hover);
}

/* ============================
   STATUTS
   ============================ */
.statut-actif {
  color: #2e7d32;
  font-weight: 600;
}

.statut-inactif {
  color: #c62828;
  font-weight: 600;
}

.detail-ok {
  color: #2e7d32;
  font-weight: 500;
}

.detail-error {
  color: #c62828;
  font-weight: 500;
  white-space: pre-line;
}

/* ============================
   PAGINATION
   ============================ */
.pagination {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.pagination button {
  background: var(--green-bnp-light);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.pagination button:hover {
  background: var(--green-bnp-dark);
}

.pagination button:disabled {
  background: #bcd9e6;
  cursor: not-allowed;
}

.pagination span {
  font-size: 14px;
  font-weight: 500;
}

/* ============================
   POPUPS
   ============================ */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.popup-content h3 {
  margin-top: 0;
  color: var(--green-bnp-light);
}

/* ============================
   IMMOBILIER
   ============================ */
.encadre-bien {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 20px;
  width: 250px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
}

.encadre-bien h2 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--green-bnp-light);
  font-weight: 600;
}

.header-top { position: relative; z-index: 3500; }
.encadre-bien .ligne-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.encadre-bien .ligne-header span {
  flex: 1;
  font-weight: 500;
  font-size: 0.85rem;
}

.encadre-bien .valeur {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

.content {
  position: relative;
  z-index: 1;
}


/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
  .nav-menu {
    gap: 15px;
  }
}

@media (max-width: 700px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }

  .dropdown-menu {
    position: relative;
    top: 0;
    box-shadow: none;
    border: none;
  }
}
