/* ==========================
   Styles généraux
========================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa; /* Fond doux pour le confort visuel */
    margin: 0;
    padding: 0;
}

/* ==========================
   Titres
========================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0 0 0.5em 0;
    color: #2c3e50;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; color: #555; }
label.categorie {
    font-weight: bold;
}
:root {
  --field-height: 40px;
}

/* ==========================
   Paragraphes et textes
========================== */
p {
    margin-bottom: 1em;
}

/* ==========================
   Inputs et textarea
========================== */
input,
select,
textarea,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 2px 4px;
    padding: 0px 6px;
    height: 30px;
    font-size: 0.9rem;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

/* Inputs hover & focus */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="submit"]:hover,
input[type="date"]:hover,
input[type="number"],
textarea:hover,
select:hover {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="submit"]:focus,
input[type="date"]:focus,
input[type="number"],
textarea:focus,
select:focus {
    border-color: #2980b9;
    box-shadow: 0 0 8px rgba(41, 128, 185, 0.4);
}

.form-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 10px;
}

.form-center input[type="submit"] {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================
   Boutons et submit
========================== */
button,
input[type="submit"] {
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

button:hover,
input[type="submit"]:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active,
input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.close-btn:hover {
    background-color: rgba(0,0,0,0.08);
    color: #000;
    transform: scale(1.05);
}


/* ==========================
   Liens
========================== */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ==========================
   Conteneurs et sections
========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ==========================
   Tableaux
========================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #3498db;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

tr:hover {
    background-color: #f1f7fd;
}

/* ==========================
   Messages et alertes
========================== */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #fff;
}

.alert-success { background-color: #2ecc71; }
.alert-warning { background-color: #f1c40f; color: #333; }
.alert-error { background-color: #e74c3c; }

/* ==========================
   Formulaire et champs spécifiques
========================== */
fieldset {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

legend {
    padding: 0 10px;
}

/* ==========================
   Petits détails UI
========================== */
hr {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin: 20px 0;
}

small {
    color: #777;
}

/* ==========================
   Classes utilitaires
========================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mb-1 { margin-bottom: 10px; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.mt-3 { margin-top: 30px; }
.mb-3 { margin-bottom: 30px; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }
.mt-5 { margin-top: 50px; }
.mb-5 { margin-bottom: 50px; }

/* ==========================
   Bouton retour et header
========================== */
.header-container {
    display: flex;
    align-items: center;
    margin: 20px 5%;
}

.btn-retour {
    display: inline-block;
    margin-right: 15px;
    padding: 8px 12px;
    font-size: 1rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-retour:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	text-decoration: none;
	color: white;
}

.titles {
    text-align: center;
    flex: 1;
}

.titles h1 {
    margin: 0;
    font-size: 2em;
}

.titles h4 {
    margin: 5px 0 0 0;
    font-weight: normal;
    font-size: 1em;
}

/* ==========================
   Système liste en lignes
========================== */
.secteur-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    transition: background 0.3s;
    border-top: 1px solid #ddd;
    position: relative;
}

.secteur-line:hover {
    background-color: rgba(0,0,0,0.05);
	cursor: pointer;
}

.secteur-infos {
    font-style: italic;
    text-align: right;
    white-space: nowrap;
    margin-left: auto;
    font-size: 0.95rem;
    color: #555;
}

.submit-line {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: none;
}

.fiche-navigation {
    width: 100%;
    border-collapse: collapse;
}

.fiche-navigation td {
    vertical-align: middle;
}

.nav-left {
    width: 60px;
    text-align: left;
}

.nav-right {
    width: 60px;
    text-align: right;
}

.nav-title {
    text-align: center;
}

.chevron-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #555;
}

.chevron-btn:hover {
    color: #000;
}

.secteur-nom {
    font-weight: 500;
}

.secteur-actions a.btn-action {
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    margin-left: 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.secteur-actions a.btn-action:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.secteur-actions a.btn-suppr {
    background-color: #e74c3c;
}

.secteur-actions a.btn-suppr:hover {
    background-color: #c0392b;
}

.chambre-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px 12px 50px;
    transition: background 0.3s;
    border-top: 1px solid #ddd;
}

.chambre-line:hover {
    background-color: rgba(0,0,0,0.05);
}

.chambre-numero {
    font-weight: 400;
}

.chambre-actions a.btn-action {
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    margin-left: 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.chambre-actions a.btn-action:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chambre-actions a.btn-suppr {
    background-color: #e74c3c;
}

.chambre-actions a.btn-suppr:hover {
    background-color: #c0392b;
}

.fiche-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chevron-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #555;
    transition: color 0.2s, transform 0.2s;
}

.chevron-btn:hover {
    color: #000;
    transform: scale(1.1);
}

/* ==========================
   Badge ADMIN
========================== */
.badge-admin {
    display: inline-block;
    background-color: #e74c3c;
    color: #fff;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 8px;
	text-align: left;
}

/* ==========================
   Boutons poubelle
========================== */
.delete-pansement {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 16px;
}

.delete-pansement:hover {
  color: #e74c3c;
}

.delete-collyre {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 16px;
}

.delete-collyre:hover {
  color: #e74c3c;
}

.delete-patch {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 16px;
}

.delete-patch:hover {
  color: #e74c3c;
}

.delete-pommade {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 16px;
}

.delete-pommade:hover {
  color: #e74c3c;
}

.delete-constante {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 16px;
}

.delete-constante:hover {
  color: #e74c3c;
}

/* ==========================
   Checkbox
========================== */
.checkbox-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
}

.checkbox-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 30px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  background-color: transparent;
  color: gray;
  transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked + label {
  background-color: #3498db;
  border-color: #3498db;
  color: #fff;
  font-weight: bold;
}


/* ==========================
   Fiches résidents
========================== */
.form-row {
  display: flex;
  border-bottom: 1px solid #ccc;
  gap: 4px;
  padding: 2px 0;
}

.form-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-right: 1px solid #ccc;
}

.form-cell:last-child {
  border-right: none;
}

.form-cell label {
  margin-bottom: 4px;
}

.form-cell input,
.form-cell select,
.form-cell textarea {
  width: 100%;
  box-sizing: border-box;
}

.form-cell.full-width {
  flex: 100%;
}

.form-cell.center {
  align-items: center;
  justify-content: center;
}

/* ==========================
   Lignes de constantes
========================== */
.constante-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.constante-line input[type="text"],
.constante-line input[type="date"] {
    width: 80px;
    padding: 4px;
    font-size: 0.85rem;
}

.constante-line label {
    font-size: 0.85rem;
    margin-right: 2px;
}

.constante-line .separator {
    width: 1px;
    height: 20px;
    margin: 0 1px;
}

.constante-line button {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.constante-line .checkbox-group label {
    padding: 0 6px;
    font-size: 0.8rem;
}

/* ==========================
   Séparateur
========================== */
.separator {
  display: inline-block;
  border-left: 4px solid #555;
  height: 50px;
  margin: -10px 10px 0 10px;
  vertical-align: middle;
}