* { box-sizing: border-box; margin: 0; font-family: "Segoe UI", Arial, sans-serif; }

body { background: #eef2f7; color: #1a2333; min-height: 100vh; }

header {
  background: linear-gradient(135deg, #0f2545 0%, #1f3a5f 100%);
  color: white;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-carre {
  background: linear-gradient(135deg, #4a9eff, #2d7dd2);
  border-radius: 10px; padding: 8px 12px;
  font-weight: 800; font-size: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.logo-texte { font-size: 22px; letter-spacing: 0.5px; }
.logo-texte b { color: #6db3f2; }

.recherche {
  flex: 1; min-width: 200px; max-width: 420px;
  padding: 10px 16px; border: none; border-radius: 8px;
  font-size: 14px; background: rgba(255,255,255,0.12);
  color: white; outline: none;
}
.recherche::placeholder { color: rgba(255,255,255,0.6); }
.recherche:focus { background: rgba(255,255,255,0.2); }

.utilisateur { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.utilisateur label { font-size: 13px; opacity: 0.85; }
.utilisateur input {
  padding: 9px 14px; border: none; border-radius: 8px;
  width: 180px; font-size: 14px; outline: none;
}

main { max-width: 1100px; margin: 32px auto; padding: 0 24px; }

.barre-actions { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }

.btn {
  border: none; border-radius: 10px; cursor: pointer;
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  color: white; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-bleu { background: linear-gradient(135deg, #2d7dd2, #1f5fa8); }
.btn-vert { background: linear-gradient(135deg, #2e9e5b, #217a44); }
.btn-gris { background: linear-gradient(135deg, #64748b, #475569); }

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.carte {
  background: white; border-radius: 14px; padding: 18px;
  box-shadow: 0 2px 10px rgba(15,37,69,0.08);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.carte:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(15,37,69,0.15); }

.carte-haut { display: flex; gap: 14px; align-items: flex-start; }

.icone {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: white; flex-shrink: 0;
}
.icone-docx { background: linear-gradient(135deg, #2b7cd3, #185abd); }
.icone-xlsx { background: linear-gradient(135deg, #34a869, #107c41); }
.icone-pptx { background: linear-gradient(135deg, #f0a03c, #d35400); }

.carte-infos { min-width: 0; }
.carte-nom {
  font-weight: 700; font-size: 15px; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.carte-meta { font-size: 12px; color: #7a8699; margin-top: 2px; }

.carte-actions { display: flex; gap: 8px; margin-top: 14px; }

.btn-petit {
  border: none; border-radius: 8px; padding: 8px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-petit:hover { opacity: 0.85; }
.btn-petit.ouvrir { background: #e3edf9; color: #1f5fa8; }
.btn-petit.renommer { background: #eef2f7; color: #475569; }
.btn-petit.supprimer { background: #fdeaea; color: #b04040; }

.aucun { text-align: center; color: #7a8699; padding: 60px 0; font-size: 15px; }

.voile {
  position: fixed; inset: 0;
  background: rgba(15,37,69,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

.modal {
  background: white; border-radius: 16px; padding: 28px;
  width: 400px; max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h3 { margin-bottom: 18px; color: #0f2545; }
.modal-label { font-size: 13px; font-weight: 600; color: #475569; display: block; margin-bottom: 6px; }
.modal input {
  width: 100%; padding: 11px 14px;
  border: 2px solid #d7dfe9; border-radius: 8px;
  font-size: 14px; outline: none;
}
.modal input:focus { border-color: #2d7dd2; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0f2545; color: white;
  padding: 12px 24px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3); z-index: 2000;
}
[hidden] { display: none !important; }
