/* Cas généraux */
.body {
margin: 0;

font-family: 'Segoe UI', sans-serif;
/*background: linear-gradient(135deg, #a3d5ff, #e0f7ff); /* plus de contraste */ /* dégradé pastel bleu */
color: #003366;
}

.h2 {
    color: #4a4a4a;
}

/* Container */
.container {
	display: flex;
	flex-wrap: nowrap;
	gap: 40px;
	align-items: flex-start;
}

/* Partie gauche : liste des comptes */
.liste-comptes {
	flex: 2;
  max-width: 80%;
  overflow-x: auto;
}
#table-comptes {
  width: 100%;
  table-layout: auto;
}

#table-comptes th,
#table-comptes td {
  white-space: nowrap;
}

.recherche-comptes {
  margin-bottom: 20px;
}

#recherche {
  width: 100%;
  padding: 12px 16px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.table.dataTable {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table.dataTable th {
  background-color: #e0d7f5;
  color: #333;
}

/* Partie droite : formulaire */
.formulaire-ajout {
	flex: 1;
	min-width: 300px;
	max-width: 20%;
	background-color: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	position: sticky;
	top: 20px;
}

.nom a {
	font-weight: bold;
	font-size: 1.1em;
	color: #6c5ce7;
	text-decoration: none;
}

.etablissement, solde {
	font-size: 1em;
	color: #444;
}

.actions {
	text-align: right;
}

.actions a {
	margin-left: 12px;
	text-decoration: none;
	font-size: 1.2em;
	padding: 6px;
	border-radius: 4px;
}

.actions a:hover {
	background-color: #eee;
}

/* code temporaire pour visualiser le contour des blocs du container
.container {
  outline: 2px dashed red;
}
.liste-comptes {
  outline: 2px dashed blue;
}
.formulaire-ajout {
  outline: 2px dashed green;
}
/* fin du code temporaire */
details {
  margin-top: 15px;
  background: #f0f7ff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

details summary {
  font-weight: bold;
  cursor: pointer;
  color: #4a4a4a;
}

.ajout-client input {
  display: block;
  margin: 8px 0;
  padding: 10px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  margin: 5% auto;
  width: 800px;
  height: 600px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  animation: zoomIn 0.3s ease-in-out;
}

.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.confirmation-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-weight: bold;
  z-index: 2000;
  animation: fadeOut 4s forwards;
}

@keyframes fadeOut {
  0%   { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; display: none; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

* {
  box-sizing: border-box;
}
.modal-content {
  overflow-y: auto;
}

// Afficher le message de confirmation
const msg = window.parent.document.getElementById('confirmationMessage');
msg.style.display = 'block';

// Masquer le message après 4 secondes
setTimeout(() => {
  msg.style.display = 'none';
}, 4000);
