/* ================================
   STYLE ESPACE COLLECTIVITÉS / ENTREPRISES 4Recyclage
   ================================ */

:root {
  --green-4e: #12D36B;
  --green-4e-dark: #0EB65B;
  --text: #0B2240;
  --muted: #5B677A;
  --b: #E3E8EF;
  --bg: #F7FAFC;
}

/* Structure */
.auth {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 32px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--b);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(11, 34, 64, .06);
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--green-4e);
  color: var(--green-4e-dark);
  border-radius: 999px;
  background: rgba(18, 211, 107, .06);
  font-size: 12px;
  margin-bottom: 10px;
}

h1 {
  font-size: 26px;
  color: var(--text);
  margin: 6px 0 6px;
}

p.muted {
  color: var(--muted);
  margin: 0 0 18px;
}

/* Champs */
label {
  font-weight: 600;
  color: #304056;
  margin-bottom: 6px;
  display: block;
}

.field {
  margin-bottom: 14px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--b);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}

input:focus {
  outline: none;
  border-color: var(--green-4e);
}

/* Row remember / mdp oublié */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 18px;
}

/* Bouton principal */


/* Liens */
a.link {
  color: var(--green-4e-dark);
  text-decoration: none;
}

a.link:hover {
  text-decoration: underline;
}

.alt {
  margin-top: 14px;
  font-size: 14px;
  color: #50607a;
  text-align: center;
}

/* Flash messages */
.flash {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.flash.success {
  background: #E9FBF1;
  color: #0B6B3A;
  border: 1px solid #C6F6D5;
}

.flash.error {
  background: #FDEDEE;
  color: #8A1433;
  border: 1px solid #F9C2CC;
}

.flash.info {
  background: #EEF4FF;
  color: #253B80;
  border: 1px solid #D6E4FF;
}


/* ================================
   DASHBOARD ESPACE COLLECTIVITÉS
   ================================ */

.dashboard-wrapper {
  padding: 32px;
  background: var(--bg);
  min-height: calc(100vh - 140px);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-header h1 {
  margin: 0 0 4px;
  font-size: 28px;
  color: var(--text);
}

.dashboard-header .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--b);
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(11, 34, 64, 0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(11, 34, 64, 0.1);
}

.card-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.card-info h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-info p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.dashboard-value {
  font-weight: 700;
  font-size: 26px;
  color: var(--text);
}

.dashboard-card.highlight {
  border-left: 5px solid var(--green-4e);
}

.dashboard-extra {
  background: #fff;
  border: 1px solid var(--b);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(11, 34, 64, 0.05);
}

.dashboard-extra h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--text);
}

.btn-logout {
  text-decoration: none;
  background: var(--green-4e);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-block;
  transition: background .2s ease;
}

.btn-logout:hover {
  background: var(--green-4e-dark);
}

.subtitle strong {
  color: var(--green-4e-dark);
  font-weight: 600;
}

/* Carte lien (clicable) */
.link-card {
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.link-card:hover {
  background: #f9fafc;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(11, 34, 64, 0.12);
}


/* ================================
   DOCUMENTS
   ================================ */

.upload-box {
  margin-bottom: 24px;
  flex-direction: column;
  align-items: flex-start;
}

.upload-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.upload-box input[type="file"] {
  padding: 8px;
  border: 1px solid var(--b);
  border-radius: 8px;
  background: #fff;
}

.documents-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.documents-table th,
.documents-table td {
  padding: 12px;
  border-bottom: 1px solid var(--b);
  text-align: left;
  font-size: 14px;
}

.documents-table th {
  background: #f9fafc;
  font-weight: 600;
}

.documents-table .badge {
  background: var(--green-4e);
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
}



/* ================================
   DEPOTS
   ================================ */

.dashboard-depots {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.section-header h2 {
  color: #013759;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-header .subtext {
  color: #6b7280;
  font-size: 0.9rem;
}

/* --- Liste verticale espacée --- */
.depot-list {
  display: flex;
  flex-direction: column;
  gap: 26px; /* <-- espace entre chaque carte */
  margin-top: 25px;
  padding-top: 5px;
  border-top: 1px solid #f1f5f9;
}

/* --- carte individuelle --- */
.depot-card {
  background: #f9fafb;
  border-radius: 14px;
  padding: 20px 22px;
  border: 1px solid #eef1f5;
  transition: all 0.25s ease-in-out;
  position: relative;
}

.depot-card:hover {
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* effet alterné (1 sur 2) */
.depot-card:nth-child(even) {
  background: #fdfdfd;
}

/* --- entête --- */
.depot-header {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- borne info --- */
.depot-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.borne-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.borne-status {
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid transparent;
}

.online {
  background: #e7f9ef;
  color: #0b8c3d;
  border-color: #b8e6c6;
}

.offline {
  background: #fde8e8;
  color: #c0392b;
  border-color: #f5c2c0;
}

/* --- pied de carte --- */
.depot-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.badge-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.badge-type.megots { background-color: #e74c3c; }
.badge-type.plastique { background-color: #3498db; }
.badge-type.verre { background-color: #27ae60; }
.badge-type.papier { background-color: #9b59b6; }
.badge-type.metal { background-color: #95a5a6; }
.badge-type.autre { background-color: #f1c40f; }

.quantite {
  font-size: 1.25rem;
  color: #013759;
  font-weight: 700;
}

.quantite span {
  font-size: 0.85rem;
  color: #6b7280;
}

