:root {
  --bg: #0f172a;
  --card: #020617;
  --text: #ffffff;
  --muted: #ffffff;
  --line: #1e293b;

  --don: #22c55e;
  --absent: #3b82f6;
  --refus: #f87171;
  --autre: #60a5fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
}

header {
  background-color: #4a90e2; /* Couleur de fond du bandeau */
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

a {
  text-decoration: none;
  color: inherit;
}

.item {
  display: flex;
  align-items: center;          /* alignement vertical */
  text-decoration: none;
  margin: 8px 0;
  border-radius: 14px;
  padding: 12px 14px;
  border: 2px solid transparent; 
  background-color: #444444;
  transition: transform .1s ease, box-shadow .1s ease;
}


.item:active {
  background-color: #cccccc;
}
.item.ligne-orange {
  border-color: #995610;
}
.item.ligne-vert {
  border-color: #147638;
}
.item.ligne-rouge {
  border-color: #aa2f2f;
}
.item.ligne-bleu {
  border-color: #3b82f6;
}
.item.ligne-violet {
  border-color: #e132e2;
}
.item.ligne-gris {
  border-color: #ffffff;
}



.item-hameaux {
  display: block;
  align-items: center;          /* alignement vertical */
  justify-content: space-between; /* gauche / droite */
  text-decoration: none;
  margin: 8px 0;
  border-radius: 14px;
  padding: 22px 14px;
  background-color: #444444;
  transition: transform .1s ease, box-shadow .1s ease;
}

.status-pastille {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 10px; /* Espacement entre le contenu et la pastille */
  background-color: var(--refus); /* Rouge par défaut */
}

/* Couleurs en fonction du statut */
.status-pastille.don,
.status-pastille.absent2,
.status-pastille.refus{
  background-color: var(--don); /* Vert */
}

.status-pastille.absent1,
.status-pastille.autre {
  background-color: var(--absent); /* Orange */
}

 {
  background-color: var(--refus); /* Rouge */
}

.badge {
  white-space: nowrap; /* évite le retour à la ligne */
}



.conteneur-progression {
    display: flex; /* Aligne la barre et le montant horizontalement */
    align-items: center; /* Centre verticalement */
    gap: 10px; /* Espacement entre la barre et le montant */
    margin-top: 5px; /* Espacement entre le nom et la barre */
}

.barre-progression {
    flex-grow: 1; /* Prend tout l'espace disponible */
    height: 15px; /* Hauteur de la barre */
    background-color: #e0e0e0; /* Couleur de fond de la barre */
    border-radius: 7px; /* Coins arrondis */
    overflow: hidden; /* Masque le débordement */
}

.progression {
    height: 100%; /* Remplit la hauteur de la barre */
    background-color: #4a90e2; /* Couleur de la progression */
    border-radius: 7px; /* Coins arrondis */
}

.progression.full {
    background-color: #51cf66; /* Vert si 100% */
}

.montant {
    font-weight: bold; /* Texte en gras */
    min-width: 60px; /* Largeur minimale pour éviter le chevauchement */
    text-align: right; /* Alignement à droite */
}

.ligne {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow:1;
}

.numero {
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #1f2933;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.numero .num {
  font-size: 1rem;
}

.numero .ext {
  font-size: 0.7rem;
  opacity: 0.85;
  text-transform: uppercase;
}


.separateur {
  width: 2px;
  height: 32px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
}


/* Infos */
.infos {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.statut {
  font-size: 0.95rem;
  color: #fff;
}

.details {
  font-size: 0.85rem;
  opacity: .8;
}


.back {
 padding: 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  color: #ffffff;
}

.list {
  display: flex;
  flex-direction: column;
  padding:1em;
}


.item strong {
  font-size: 1rem;
}


form {
  padding: 1rem;
}

h1 {
    color: white; /* Couleur du texte */
    text-align: center; /* Alignement du texte au centre */
    padding: 35px 0; /* Espacement interne (haut/bas, gauche/droite) */
    margin: 0; /* Supprime les marges par défaut */
    font-family: Arial, sans-serif; /* Police de caractères */
    font-size: 4em; /* Taille du texte */
}


h2 {
    background-color: #4a90e2; /* Couleur de fond du bandeau */
    color: white; /* Couleur du texte */
    text-align: center; /* Alignement du texte au centre */
    padding: 35px 0; /* Espacement interne (haut/bas, gauche/droite) */
    margin: 10; /* Supprime les marges par défaut */
    font-family: Arial, sans-serif; /* Police de caractères */
    font-size: 2em; /* Taille du texte */
    border-radius: 5px; /* Coins arrondis (optionnel) */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Ombre légère (optionnel) */
}

.password-input {
    width: 600px; /* Largeur de la zone de saisie */
    padding: 12px 15px; /* Espacement interne (haut/bas, gauche/droite) */
    font-size: 36px; /* Taille du texte */
    border: 1px solid #ccc; /* Bordure légère */
    border-radius: 5px; /* Coins arrondis */
    margin-right: 10px; /* Espacement entre l'input et le bouton */
    box-sizing: border-box; /* Inclut le padding dans la largeur totale */
}

/* Style optionnel pour le bouton */
button {
    padding: 12px 20px;
    font-size: 32px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

  
input, textarea {
  width: 100%;
  padding: .9rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
}



.buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}

.btn {
  padding: 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  color: #ffffff;
}


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


.btn.absent1 {
  background: #3b82f6; 
  opacity: 0.8
}

.btn.absent2 {
  background: #f97316;
    opacity: 0.8
}

.btn.don {
  background: #22c55e;
    opacity: 0.8
}

.btn.refus {
  background: #ef4444;
    opacity: 0.8
}

.btn.autre {
  background: #e132e2;
    opacity: 0.8
}
.btn.inexistant {
  background: #777777;
    opacity: 0.8
}

.btn.selected {
  outline: 3px solid white;
    opacity: 1;
}

.btn.montant {
  background: #1e293b;
  color: var(--text);
}

.btn.valider {
  background: #334155;
  color: white;
}




.actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.actions .btn,
.actions .annuler {
    flex: 1;
    text-align: center;
}

.annuler {
    display: flex;
    padding: 12px;
    align-items:center;
    justify-content:center;
    border-radius: 8px;
    text-decoration: none;
    background: #888;
    color: white;
}

.actions-rue {
    text-align: right;
    margin: 10px 15px 20px;
}

.btn-ajout {
    display: inline-block;
    padding: 12px 18px;
    background: #334155;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transition: transform .15s ease;
}

.btn-retour {
    display: inline-block;
    padding: 1em;
        margin: 10px;
    background: #334155;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transition: transform .15s ease;
}

.btn-ajout:hover {
    transform: scale(1.05);
}

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

.btn-carte {
    margin-left: auto;
    width: auto; /* Largeur automatique pour s'adapter au texte */
    padding: 0 12px; /* Ajoute un peu d'espace autour du texte */
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #202020;
    cursor: pointer;
    font-size: 0.9em; /* Taille de police légèrement réduite */
    flex-shrink: 0;
    display: flex;
    align-items: center; /* Centre verticalement le texte */
    justify-content: center; /* Centre horizontalement le texte */
}

.btn-carte:hover {
    background: #e0e0e0;
}

/* Style pour les boutons de la modale */
#confirm-modal button {
    font-size: 1.2rem; /* Taille réduite pour les boutons "Oui, supprimer" et "Annuler" */
    padding: 6px 12px; /* Réduire le padding pour un rendu plus compact */
}
