/* =========================
   RESET & BASE
========================= */
* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif; /* Police plus moderne */
}

/* =========================
   CONTENEUR
========================= */
.container {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Donne du relief */
}

/* =========================
   TITRES
========================= */
h2, h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #1b5e20;
}

/* =========================
   STATUS & BANNER (SYNC)
========================= */
.status {
  text-align: center;
  font-size: 14px;
  margin-bottom: 15px;
  padding: 8px;
  border-radius: 6px;
  font-weight: 500;
}

.status.online {
  color: #2e7d32;
  background: #e8f5e9;
}

.status.offline {
  color: #c62828;
  background: #ffebee;
}

.sync-banner {
  display: none; /* Piloté par JS */
  background: #fff3cd;
  color: #856404;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9em;
  border: 1px solid #ffeeba;
  animation: fadeIn 0.3s ease-in;
}

.modal-confirm {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.7); 
    z-index: 9999; justify-content: center; align-items: center;
}
.modal-content {
    background: white; padding: 20px; border-radius: 12px;
    width: 90%; max-width: 400px; text-align: center;
}

/* =========================
   FORMULAIRES
========================= */
.input-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: #444;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  font-size: 16px;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2e7d32;
}

input[readonly] {
  background-color: #f8f9fa;
  color: #1b5e20;
  font-weight: bold;
  border-style: dashed;
}

/* =========================
   BOUTONS & LOADER
========================= */
button {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: #2e7d32;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  background: #a5d6a7 !important;
  cursor: not-allowed;
}

.loader {
  display: none;
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-top: 10px;
}

/* =========================
   MENU ACCUEIL
========================= */
.menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu a {
  margin-top: 0;
  background: #f1f8e9;
  color: #2e7d32;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid #c8e6c9;
  transition: background 0.2s;
}

.menu a:hover {
  background: #dcedc8;
}

/* Container du menu */
.menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

/* Style des cartes de menu */
.btn-menu {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #eee;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s, background 0.2s;
}

.btn-menu:active {
  transform: scale(0.98);
  background: #f9f9f9;
}

/* Style des cercles d'icônes */
.btn-menu .icon {
  font-size: 28px;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%; /* Forme circulaire */
  margin-right: 15px;
  background: #f0f0f0;
}

/* Couleurs spécifiques par bouton */
/* Ventes - Or/Vert */
.btn-menu:nth-child(1) .icon { background: #e8f5e9; } 
/* Dépenses - Rouge/Gris */
.btn-menu:nth-child(2) .icon { background: #ffebee; }
/* Ponte - Jaune/Orange */
.btn-menu:nth-child(3) .icon { background: #fff3e0; }

/* Textes */
.btn-menu .text-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

/* Conteneur pour aligner l'input et l'icône */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* L'input doit laisser de la place à droite pour l'icône */
.password-wrapper input {
  padding-right: 45px;
  margin-bottom: 0; /* On gère la marge sur le wrapper si besoin */
}

/* Style de l'icône */
.toggle-icon {
  position: absolute;
  right: 12px;
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  padding: 5px;
}

.toggle-icon:hover {
  opacity: 0.7;
}

.btn-menu .title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.btn-menu .subtitle {
  font-size: 12px;
  color: #777;
  font-weight: normal;
}

/* =========================
   LIENS SECONDAIRES
========================= */
.logout-link {
  color: #d32f2f !important;
  font-size: 0.9em;
  opacity: 0.8;
}

hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 20px 0;
}

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

.navigation-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-secondary {
    background: #666;
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    display: block;
}

.btn-logout {
    background: #fff;
    color: #c62828;
    text-align: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    display: block;
    border: 1px solid #c62828;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #ffebee;
}


/* Barre de progression du cycle de vie */
.progress-container {
    width: 100%;
    background-color: #eee;
    border-radius: 10px;
    height: 10px;
    margin: 5px 0;
}
.progress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    width: 0%; /* Mis à jour par le JS */
    transition: width 0.5s;
}
.progress-label {
  font-size: 0.7em;
  color: #666;
  text-align: right;
  display: block;
  margin-top: -5px;
}
	
.site-footer {
  width: 100%;
  align-self: stretch;   /* ⭐ LA LIGNE IMPORTANTE */
  text-align: center;
  padding: 20px 10px;
  color: #666;
  font-size: 0.85em;
  border-top: 1px solid #eee;
  margin-top: 30px;
  font-weight: bold;
}

.container {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body {
  margin: 0;
  padding: 16px;
  background: #f0f2f5;
  color: #222;
  min-height: 100vh;

  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
}

