/* style-app.css – pour toutes les pages sauf l'accueil */

/* ----- BASE ----- */
body {
  background-color: #000000;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 2em 1em;
  box-sizing: border-box;
}

h1, h2, h3 {
  color: #fff;
  margin-bottom: 0.5em;
}

p {
  color: #ccc;
  line-height: 1.6;
}

button {
  background-color: #0d1117;
  color: white;
  padding: 0.9em 2em;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #1e293b;
}


/* ----- NAVBAR AVEC LOGO ET MENU RESPONSIVE ----- */
.navbar {
  background-color: #000;
  padding: 1em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  position: relative;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 0.5em;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: #ccc;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
  display: flex;
  gap: 1.5em;
  align-items: center;
  justify-content: center;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  padding: 1em;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
  width: 100%;
  text-align: center;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: transparent;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  color: white;
}

@media (max-width: 1100px) {
  .hamburger {
    display: flex;
  }

    .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;       /* <-- centrer les liens */
    position: absolute;
    top: 100%;
    left: 0;
    width: 90vw;               /* rendre le menu un peu plus fin */
    margin: 0 5vw;             /* centrer le conteneur */
    background-color: #0d1117;
    padding: 1em 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    z-index: 99;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 1em 0;
    border-bottom: 1px solid #333;
  }

  .navbar {
    flex-wrap: wrap;
  }
}



/* ----- TABLES ----- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
  background-color: #161b22;
}

table th, table td {
  padding: 1.2em;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #ddd;
}

table tr:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table th {
  background-color: #1e293b;
  color: #fff;
}

tr.selected {
  background-color: rgba(76, 175, 80, 0.2); /* vert pâle */
}


/* ----- INPUTS ----- */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="tel"],
select {
  background-color: #161b22;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 0.5em 0.8em;
  border-radius: 5px;
  margin: 0.5em auto;
  width: 80%;
  display: block;
  max-width: 400px;
  text-align: center;
}


form button {
  display: block;
  margin: 1.5em auto 2em;
  padding: 1em 6em;
}

/* ----- FILE INPUT CENTERING ----- */
input[type="file"] {
  margin: 1em auto;
  display: block;
  color: #ccc;
  background-color: #161b22;
  padding: 0.5em 0.8em;
  border-radius: 5px;
  border: 1px solid #333;
  width: 80%;
  max-width: 400px;
  text-align: center;
}

/* ----- DELETE ICON BUTTON ----- */
.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em;
  margin-left: auto; /* aligne à droite dans un flex */
  width: 30px;
  height: 30px;
}

.delete-btn:hover {
  color: #f87171;
}


.delete-btn:hover {
  color: #f87171;
}

.delete-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ----- PAGINATION BUTTONS ----- */
.pagination {
  display: flex;
  justify-content: space-between;
  margin: 2em 0;
  gap: 2em;
}

.pagination button {
  padding: 0.6em 6em;
  background-color: #0d1117; /* même fond que le body */
  border: none;              /* supprime les contours */
  border-radius: 5px;
  color: #e0e0e0;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
}

.pagination button:hover {
  background-color: #1e293b;
  color: white;
}

/*pagination urssaf ----*/

.pagination {
  margin: 25px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination-wrapper {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  background: #0f0f0f;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid #333;
}

.pagination-wrapper button {
  background: #1a1a1a;
  color: #f5f5f5;
  border: 1px solid #444;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-wrapper button:hover:not(:disabled) {
  background: #f0b90b;
  color: #000;
}

.pagination-wrapper button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-wrapper span {
  color: #ccc;
  font-weight: 500;
}


/* ----- NOTIFICATIONS ----- */


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ----- DASHBOARD STATS ----- */
.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5em;
  margin-bottom: 2em;
}

.stats p {
  font-size: 0.95em;
  width: 200px;
  max-width: 200px;
  color: #e2e8f0;
  margin: 0;
  text-align: center;
  background-color: #1f2937;
  padding: 0.7em 1em;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.stat-btn {
  background: #1e293b;
  color: #ccc;
  border: none;
  padding: 0.8em 1.2em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.stat-btn.active {
  background: #2e2f92;
  color: #fff;
}


.stat-btn:hover {
  background-color: #1e293b;
  color: white;
}


.stat-btn.inactive {
  opacity: 0.5;
}



/* ----- GRAPHIC CANVAS ----- */
canvas {
  background-color: #0d1117 !important; /* fond le plus sombre */
  border-radius: 10px;
  padding: 10px;
  margin: auto;
  display: block;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  border: 1px solid #333;
}




canvas#historiqueCA {
  width: 100% !important;
  max-width: 1000px;
  height: 500px !important;
}

canvas#graphique {
  width: 100% !important;
  max-width: 1000px;
  height: 400px !important;
}

canvas#graphique {
  width: 100% !important;
  height: 600px !important;
  max-width: 1000px;
  margin: auto;
}

@media (max-width: 600px) {
  canvas#graphique {
    height: 250px !important;
    max-width: 100%;
  }
}



.graph-filters button {
  background-color: #0d1117;
  color: #e0e0e0;
  border: 1px solid #333;
  margin: 5px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.graph-filters button:hover {
  background-color: #1e293b;
}

.graph-filters button.active {
  background-color: #1e293b; /* bleu vif pour bouton actif */
  color: #fff;
  font-weight: bold;
}


/* GRAPHIQUE HISTORIQUE*/

canvas {
  background-color: #1a1a1a; /* fond sombre du canvas */
  border-radius: 10px;
  padding: 10px;
}

.graph-filters button {
  background-color: #2c2c2c;
  color: #fff;
  border: none;
  margin: 5px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.graph-filters button:hover {
  background-color: #444;
}

@media screen and (max-width: 600px) {
  .graph-filters button {
    padding: 6px 10px;
    font-size: 13px;
  }

  canvas {
    padding: 5px;
  }
}

/*graphique journalier*/


.graph-container {
  display: flex;
  align-items: flex-start;
}
.graph-sidebar {
  writing-mode: vertical-rl;
  text-align: center;
  margin-right: 10px;
  color: #ccc;
  font-weight: bold;
}






/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .stats {
    flex-direction: column;
    align-items: center;
  }

  .stats p {
    width: 100%;
  }

  table th, table td {
    font-size: 0.9em;
  }

  button {
    width: 100%;
    margin-top: 1em;
  }

  .delete-btn {
    width: 28px;
    height: 28px;
  }

}
@media (max-width: 600px) {
  .pagination {
    flex-direction: column;
    align-items: center;
  }

  .pagination button {
    width: 100%;
    margin-bottom: 1em;
  }
}
textarea {
  background-color: #161b22;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 0.8em;
  border-radius: 5px;
  margin-bottom: 1em;
  width: 80%;
  max-width: 400px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}


.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}


#acreBtn {
  background-color: #444;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

#acreBtn.active {
  background-color: #1e293b; /* actif */
  color: white;
}


/* ----- ESPACEMENT ENTRE LES BLOCS ----- */
.container > * {
  margin-bottom: 2em;
}

/* ----- CENTRER LES BOUTONS DE GRAPHIQUE ----- */
.graph-buttons {
 
  justify-content: center;
  gap: 2em;
  margin-bottom: 1.5em;
}

/* ----- STYLE ACTIF POUR BOUTON DE GRAPHE ----- */
.graph-buttons button.active {
  background-color: #1e293b;
  color: white;
  box-shadow: 0 0 10px #1e293b;
}

/* Effet visuel lors du clic */
.graph-buttons button:focus {
  outline: none;
  background-color: #1e293b;
}


.hover-delete {
  background-color: rgba(255, 0, 0, 0.1); /* Rouge clair */
  transition: background-color 0.3s ease;
}


/* ----- NOTIFICATIONS ----- */
.alert-zone {
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-line {
  background-color: #252525;
  color: #f1c40f;
  padding: 10px 14px;
  border-left: 4px solid #f1c40f;
  border-radius: 5px;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
}

.alert-line:hover {
  background-color: #2c2c2c;
}

.alert-line button {
  background: none;
  border: none;
  color: #888;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 15px;
}
.alert-line button:hover {
  color: #fff;
}

.input-alert {
  border: 2px solid #e63946 !important;
  color: #e63946 !important;
  background-color: #1a1a1a;
}

.alertes-container {
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1000px;
  margin: auto;
}

.alerte-message {
  display: flex;
  align-items: center;
  background-color: #2b2b2b;
  color: #f8d7da;
  border-left: 5px solid #ff6b6b;
  padding: 12px 16px;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  font-size: 15px;
}

.alerte-message i {
  margin-right: 8px;
  color: #ff6b6b;
  font-size: 18px;
}

.alerte-message button {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 12px;
}

.alerte-message button:hover {
  color: #fff;
}

/* ----- POINT D’ALERTE DANS LA NAVBAR (❗) ----- */
.alert-dot {
  font-weight: bold;
  margin-left: 4px;
  color: #e74c3c;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.4); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.alert-urssaf {
  margin: 1em 0;
  padding: 1em;
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border-left: 4px solid #e74c3c;
  border-radius: 6px;
  font-weight: 500;
  animation: clignote 1.5s infinite;
}
@keyframes clignote {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


#pdfResult {
  margin-top: 1rem;
  font-weight: bold;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.loader {
  border: 4px solid #444;
  border-top: 4px solid #60a5fa;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 1em auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.essai-banner {
  background-color: rgb(228, 172, 15);
  color: #000;
  padding: 10px;
  text-align: center;
  font-weight: bold;
}

/* === Clients.html : forcer la MÊME largeur pour TOUS les champs du formulaire === */
.form-grid .input-dark,
.form-grid select.input-dark {
  width: 80% !important;        /* même largeur que tes champs existants */
  max-width: 400px !important;  /* même limite que la règle globale */
  margin: 0.5em auto !important;
  display: block;
}
